Student registration

Home Forums Legacy Support Support queries Setup issues Student registration

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #355420
    Hello, when new student registers I ask the following mandatory data: Email Password Name Surname When I search the new student in "Users" I can find: Username = email Name = name Email = email Surname is missing and this for me it's a problem, because I have to identify each one. Where can I find this data? Email appears in two fields, it's possible to change one of these fields with surname? Thanks
    #355471
    Ada
    Participant
    HI, You can find these details in extended profile section https://prntscr.com/12ccx28
    #355727
    When I have to check student progress in statistics there is only name and there are a lot of people with the same name! According to Italian Law I have to demonstrate that a user completed the course. Please add also surname.
    #355921
    Anshuman Sahu
    Keymaster
    Please add this custom code in your wplms-customizer.php file in wplms customizer plugin :
    add_action('wplms_course_stats_process','process_custom_course_stat',10,8);
    add_filter('wplms_course_stats_list','add_custom_course_stat');
    
     function add_custom_course_stat($list){
       $new_list = array(
                        'email'=>'Email'
                        //add another element like same above 'user_field3'=>'Gender'
                         );
       
       $list=array_merge($list,$new_list);
        return $list;
    }
              
    function process_custom_course_stat(&$csv_title, &$csv,&$i,&$course_id,&$user_id,&$field,&$ccsv,&$k){
      if($field != 'email') // Ensures the field was checked.
         return;
    
        $title=__('Email','wplms');
    	if(!in_array($title,$csv_title))
    	 $csv_title[$k]=array('title'=>$title,'field'=>'Email');
    		$ifield = 'Email'; 
    		$user = get_user_by('id',$user_id);
    		
      	$field_val = $user->data->user_email;
       		
    	if(isset($field_val) &&  $field_val){
    	  
       		$csv[$i][]= $field_val;
          	$ccsv[$i]['Email'] =  $field_val;
    	   
        }else{
    
          $csv[$i][]= 'NA';
          $ccsv[$i]['Email'] = 'NA';
        }
    	
    
    }
    #355926
    Thank you, now I can see email in stats, it's possible to add surname?
    #356303
    Veronica
    Moderator
    hi means with the above code you are able to add email right? and in the same way, you want to add the surname of the user? please confirm
    #356363
    Yes, it could be very useful for me identify the user with surname.
    #356485
    Veronica
    Moderator
    hi as you have added this field custom right! so we need to know that what's the meta key is storing for this I have added a nickname field in my profile field section so this is how it is stored in the database http://prntscr.com/12mftaf in site database>>usermeta so can you please let us know the meta key for your this custom field and also you can also change this code accordingly: change "email" to "your custom field meta key" like "surname" and "Email" to "the name you want to show" like "Surname" as the tip is already available https://wplms.io/support/knowledge-base/add-custom-field-in-download-stats-for-quizassignmentunitsquestion/
    #356907
    Hi Veronica, I changed email with surname as you suggested. Now in Course Statistics Surname appears, but the field is empty. I have to add something also in user registration? Thanks
    #357000
    Veronica
    Moderator
    hi may I know the exact code you have added and also make sure you have some data added to the user profile
    #357093
    This reply has been marked as private.
    #357195
    Veronica
    Moderator
    hi can you please provide details so we can check this
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Student registration’ is closed to new replies.