Adding user email address when downloading questionnaire results

Adding user email address when downloading questionnaire results

by Zaid Odeh -
Number of replies: 4

Hey, 

I want to add the email of the respondent user when downloading the questionnaire report. 

I've Modify the setting.php file as and add " 'email' => get_string('email') " as following screenshot 

 

Then I go to site administration -> plugin -> local plugin -> questionnaire and it's show the email address on the questionnaire setting page and I selected it. 


When I downloading the result on one letter appears in the downloaded report. as the following screenshot


Is there any additional changes I need to have to retrieve the email address within the exported report? 


Thanks,

Average of ratings: Useful (1)
In reply to Zaid Odeh

Re: Adding user email address when downloading questionnaire results

by Zaid Odeh -
Is there any possible help for this?
Thanks
In reply to Zaid Odeh

Re: Adding user email address when downloading questionnaire results

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Zaid,

You have to modify 3 questionnaire files to obtain the email data. See my github at https://github.com/rezeau/moodle-mod_questionnaire/commit/00b7dd0456f0cd95a3b4d10a0dece5bc431d9240

If there is more interest in this and if Mike agrees I can do a pull request.

Average of ratings: Useful (3)
In reply to Joseph Rézeau

Re: Adding user email address when downloading questionnaire results

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
This would be helpful. I am using the provided UserID data to pull over the student's email outside of Moodle.
Kind Regards.
In reply to Joseph Rézeau

Re: Adding user email address when downloading questionnaire results

by Luis Fernando Resendiz Cruz -

Hi,

I have users who have an extra field added through the option "User profile fields" and I would like to use it in the report, is it possible to use this type of field?

Thanks for the answers.