From: moodler Date: Mon, 27 Oct 2003 14:15:05 +0000 (+0000) Subject: The last access date is now that of the course. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f1603208db2ebdebd872f5b170f84fa49076c183;p=moodle.git The last access date is now that of the course. --- diff --git a/user/view.php b/user/view.php index 91c9d7ecee..eda8489fba 100644 --- a/user/view.php +++ b/user/view.php @@ -22,10 +22,14 @@ require_login($course->id); } - $countries = get_list_of_countries(); - add_to_log($course->id, "user", "view", "view.php?id=$user->id&course=$course->id", "$user->id"); + if ($student = get_record("user_students", "userid", $user->id, "course", $course->id)) { + $user->lastaccess = $student->timeaccess; + } else if ($teacher = get_record("user_teachers", "userid", $user->id, "course", $course->id)) { + $user->lastaccess = $teacher->timeaccess; + } + $fullname = "$user->firstname $user->lastname"; $personalprofile = get_string("personalprofile"); $participants = get_string("participants"); @@ -92,6 +96,7 @@ echo "city or $user->country) { + $countries = get_list_of_countries(); print_row(get_string("location").":", "$user->city, ".$countries["$user->country"]); }