Home › Forums › Legacy Support › Support queries › Setup issues › Student registration
Tagged: student registration
- This topic has 11 replies, 4 voices, and was last updated 3 years, 7 months ago by Veronica.
Viewing 12 posts - 1 through 12 (of 12 total)
-
AuthorPosts
-
April 30, 2021 at 4:22 pm #355420studiomedicopavesi_0412SpectatorHello, 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? ThanksMay 1, 2021 at 4:41 am #355471AdaParticipantHI, You can find these details in extended profile section https://prntscr.com/12ccx28May 3, 2021 at 1:01 pm #355727studiomedicopavesi_0412SpectatorWhen 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.May 4, 2021 at 12:58 pm #355921Anshuman SahuKeymasterPlease 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'; } }
May 4, 2021 at 1:13 pm #355926studiomedicopavesi_0412SpectatorThank you, now I can see email in stats, it's possible to add surname?May 6, 2021 at 1:30 pm #356303VeronicaModeratorhi 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 confirmMay 6, 2021 at 6:25 pm #356363studiomedicopavesi_0412SpectatorYes, it could be very useful for me identify the user with surname.May 7, 2021 at 11:46 am #356485VeronicaModeratorhi 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/May 11, 2021 at 9:50 am #356907studiomedicopavesi_0412SpectatorHi 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? ThanksMay 12, 2021 at 5:24 am #357000VeronicaModeratorhi may I know the exact code you have added and also make sure you have some data added to the user profileMay 12, 2021 at 5:07 pm #357093studiomedicopavesi_0412SpectatorThis reply has been marked as private.May 13, 2021 at 1:31 pm #357195VeronicaModeratorhi can you please provide details so we can check this -
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
- The topic ‘Student registration’ is closed to new replies.