MDL-44454 core_user: removed unused code from user/index.php

This commit is contained in:
Andrew Davis
2014-04-07 12:02:15 +08:00
parent 1a727e121e
commit abdfe18ddb
-21
View File
@@ -786,27 +786,6 @@ if ($mode === MODE_USERDETAILS) { // Print simple listing.
$data[] = $lastaccess;
}
if (isset($userlistextra) && isset($userlistextra[$user->id])) {
$ras = $userlistextra[$user->id]['ra'];
$rastring = '';
foreach ($ras as $key => $ra) {
$rolename = $allrolenames[$ra['roleid']];
if ($ra['ctxlevel'] == CONTEXT_COURSECAT) {
$rastring .= $rolename. ' @ ' . '<a href="'.$CFG->wwwroot.'/course/index.php?categoryid='.$ra['ctxinstanceid'].'">'.s($ra['ccname']).'</a>';
} else if ($ra['ctxlevel'] == CONTEXT_SYSTEM) {
$rastring .= $rolename. ' - ' . get_string('globalrole', 'role');
} else {
$rastring .= $rolename;
}
}
$data[] = $rastring;
if ($groupmode != 0) {
// Use htmlescape with s() and implode the array.
$data[] = implode(', ', array_map('s', $userlistextra[$user->id]['group']));
$data[] = implode(', ', array_map('s', $userlistextra[$user->id]['gping']));
}
}
$table->add_data($data);
}
}