Commit 801fa661 authored by Lisa Seeto's avatar Lisa Seeto Committed by Robert Lyon
Browse files

Bug 1773609: User export has column "remotename" instead of "remoteuser"

func generate_csv() altered to substitute preferredname and remoteuser
in /lib/mahara.php


Change-Id: I086caedf30acd51afed122996281a73762ddb107
Signed-off-by: default avatarLisa Seeto <>
parent f44049da
......@@ -671,10 +671,13 @@ function userdetails_stats_table($limit, $offset, $extra, $institution, $urllink
$item->quotapercent_format = round($item->quotapercent * 100);
$item->quota_format = display_size($item->quota);
$item->quotaused_format = !empty($item->quotaused) ? display_size($item->quotaused) : 0;
// Map statistics page column headers to CSV column headers to allow for easier user update CSV import
$item->preferredname = $item->displayname;
$item->remoteuser = $item->remotename;
if (!empty($extra['csvdownload'])) {
$csvfields = array('firstname', 'lastname', 'email', 'studentid',
'displayname', 'username', 'remotename', 'quotapercent_format', 'lastlogin');
'preferredname', 'username', 'remoteuser', 'quotapercent_format', 'lastlogin');
$USER->set_download_file(generate_csv($data, $csvfields), $institution . 'userdetailsstatistics.csv', 'text/csv');
$result['csv'] = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment