Adding username to datasets in exported Files

Re: Adding username to datasets in exported Files

by BISS Edtech -
Number of replies: 2
Oh I see. I though this "However in 3.1 feedback export all user identity fields are exported if the current user has 'moodle/site:viewuseridentity' capability." meant that it should work.
In reply to BISS Edtech

Re: Adding username to datasets in exported Files

by Mohammad kabir -

Hi,

Upgrade moodle from 2.8.3  to moodle 3.2.1  

and missing username to datasets in exported files.


I really need username to do some work.

If anybody help me where to hack, then I can hack and download the csv file with username.  I will delete the hacked code soon after download file.

Thanks in advance.



In reply to Mohammad kabir

Re: Adding username to datasets in exported Files

by Mohammad kabir -

Thank you . Hacked it and find the solution.


Hacked file:

www/mod/feedback/classes/responses_table.php

function init(){

/*  hacked below 3 lilnes.  just add: username with existing code */

$tablecolumns = array('userpic', 'fullname', 'username');

 $tableheaders = array(get_string('userpic'), get_string('fullnameuser'), get_string('username'));

 $fields = 'c.id, c.timemodified as completed_timemodified, c.courseid, u.username, '.$ufields;

}

Its temporary solution. If that helps some people.