Adding username to datasets in exported Files

Re: Adding username to datasets in exported Files

by Florian Gruber -
Number of replies: 5

Thanks for your reply. I have added a tracker request as you suggested: https://tracker.moodle.org/browse/MDL-55317

In reply to Florian Gruber

Re: Adding username to datasets in exported Files

by BISS Edtech -
According to the tracker, this is fixed, but even with the required permissions set, still can't export data with the username field.
In reply to BISS Edtech

Re: Adding username to datasets in exported Files

by Florian Gruber -

Actually, it is not. The issue is closed, but it is not fixed. On the contrary, it says explicitly that there won't be a fix, unfortunately. Exporting the username seems to be regarded as a security hole or privacy issue.

In reply to Florian Gruber

Re: Adding username to datasets in exported Files

by BISS Edtech -
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.