mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-12329 fixed last access when course not accessed yet - patch by Yolanda Ordóñez Rufat; backported from MOODLE_19_STABLE
This commit is contained in:
parent
aeae7ec39d
commit
1cefec56ed
1 changed files with 1 additions and 0 deletions
|
@ -152,6 +152,7 @@
|
|||
add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id");
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
$user->lastaccess = false;
|
||||
if ($lastaccess = get_record('user_lastaccess', 'userid', $user->id, 'courseid', $course->id)) {
|
||||
$user->lastaccess = $lastaccess->timeaccess;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue