MDL-32275 enrol: Last site access column now shows last course access

This commit is contained in:
Dave Cooper 2014-09-23 15:05:22 +08:00
parent 272fec367f
commit e89682d822
6 changed files with 28 additions and 13 deletions

View file

@ -186,7 +186,7 @@ foreach ($extrafields as $field) {
$fields = array(
'userdetails' => $userdetails,
'lastseen' => get_string('lastaccess'),
'lastcourseaccess' => get_string('lastcourseaccess'),
'role' => get_string('roles', 'role'),
'group' => get_string('groups', 'group'),
'enrol' => get_string('enrolmentinstances', 'enrol')
@ -196,7 +196,7 @@ $fields = array(
if (!has_capability('moodle/course:viewhiddenuserfields', $context)) {
$hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields));
if (isset($hiddenfields['lastaccess'])) {
unset($fields['lastseen']);
unset($fields['lastcourseaccess']);
}
if (isset($hiddenfields['groups'])) {
unset($fields['group']);