Quiz

Download quiz results, with userid

 
 
Picture of Warren Toomey
Download quiz results, with userid
 
I'd like to be able to download quiz results in CSV or Excel format but with the student's userid (login name). I have several students with the same name, so I need their login name as it is unique. I've had a quick look at the PHP code to see if it was easy to modify, or if there was a configuration setting, but no luck. Can anybody offer any suggestions, even pointers to documentation and/or which PHP files to look at? Many thanks in advance for any help, Warren
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Download quiz results, with userid
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

You can almost control this using the Show user identity setting: http://docs.moodle.org/24/en/Roles_settings#Show_user_identity

Unfortunately it does not allow username.

However, you can set the option in your config.php file, and include username there. http://docs.moodle.org/27/en/Configuration_file

 
Average of ratings:Useful (1)
Picture of Warren Toomey
Re: Download quiz results, with userid
 
Thanks for the reply Tim. I've enabled "Show ID number" in the show user identity settings; unfortunately when I download the column is empty. My usernames are all integers (student-ids), is there any way to copy the username into the ID, or should I already be seeing the ID? I had a quick look at config-dist.php, but I couldn't see which config setting would include the username, can you tell me which setting I should use? Otherwise, which PHP file might I hack at wink Cheers, Warren
 
Average of ratings: -
Picture of Warren Toomey
Re: Download quiz results, with userid
 
I have a solution. Tim showed me how to display the student ID in the quiz results, but I wasn't sure how to populate the field. Using SQL it's easy to copy the username field into the student ID field: update mdl_user set idnumber=username; Now I have the username field in the Quiz downloads. Cheers, Warren
 
Average of ratings: -