mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-32275 enrol: Last site access column now shows last course access
This commit is contained in:
parent
272fec367f
commit
e89682d822
6 changed files with 28 additions and 13 deletions
|
@ -363,7 +363,12 @@ if ($mode === MODE_BRIEF && !isset($hiddenfields['country'])) {
|
|||
}
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
$tablecolumns[] = 'lastaccess';
|
||||
$tableheaders[] = get_string('lastaccess');
|
||||
if ($course->id == SITEID) {
|
||||
// Exception case for viewing participants on site home.
|
||||
$tableheaders[] = get_string('lastsiteaccess');
|
||||
} else {
|
||||
$tableheaders[] = get_string('lastcourseaccess');
|
||||
}
|
||||
}
|
||||
|
||||
if ($bulkoperations && $mode === MODE_USERDETAILS) {
|
||||
|
@ -376,8 +381,8 @@ $table->define_columns($tablecolumns);
|
|||
$table->define_headers($tableheaders);
|
||||
$table->define_baseurl($baseurl->out());
|
||||
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
$table->sortable(true, 'lastaccess', SORT_DESC);
|
||||
if (!isset($hiddenfields['lastcourseaccess'])) {
|
||||
$table->sortable(true, 'lastcourseaccess', SORT_DESC);
|
||||
} else {
|
||||
$table->sortable(true, 'firstname', SORT_ASC);
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ if (!isset($hiddenfields['firstaccess'])) {
|
|||
} else {
|
||||
$datestring = get_string("never");
|
||||
}
|
||||
echo html_writer::tag('dt', get_string('firstaccess'));
|
||||
echo html_writer::tag('dt', get_string('firstsiteaccess'));
|
||||
echo html_writer::tag('dd', $datestring);
|
||||
}
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
|
@ -416,7 +416,7 @@ if (!isset($hiddenfields['lastaccess'])) {
|
|||
} else {
|
||||
$datestring = get_string("never");
|
||||
}
|
||||
echo html_writer::tag('dt', get_string('lastaccess'));
|
||||
echo html_writer::tag('dt', get_string('lastsiteaccess'));
|
||||
echo html_writer::tag('dd', $datestring);
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ if (!isset($hiddenfields['lastaccess'])) {
|
|||
} else {
|
||||
$datestring = get_string("never");
|
||||
}
|
||||
echo html_writer::tag('dt', get_string('lastaccess'));
|
||||
echo html_writer::tag('dt', get_string('lastcourseaccess'));
|
||||
echo html_writer::tag('dd', $datestring);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue