mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-18518 user firstaccess - added suport to display user->firstaccess. Credit goes to Anthony Borrow!
Merged from 19_STABLE
This commit is contained in:
parent
692e0c3395
commit
1263a0ff1d
4 changed files with 14 additions and 1 deletions
|
@ -351,7 +351,14 @@
|
|||
print_row(get_string('courses').':', rtrim($courselisting,', '));
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($hiddenfields['firstaccess'])) {
|
||||
if ($user->firstaccess) {
|
||||
$datestring = userdate($user->firstaccess)." (".format_time(time() - $user->firstaccess).")";
|
||||
} else {
|
||||
$datestring = get_string("never");
|
||||
}
|
||||
print_row(get_string("firstaccess").":", $datestring);
|
||||
}
|
||||
if (!isset($hiddenfields['lastaccess'])) {
|
||||
if ($user->lastaccess) {
|
||||
$datestring = userdate($user->lastaccess)." (".format_time(time() - $user->lastaccess).")";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue