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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user