From 9b02b5342aee7e17174d507249c34e910b3111ff Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 29 May 2006 05:56:28 +0000 Subject: [PATCH] global $course fix; merged from MOODLE_16_STABLE --- my/index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/my/index.php b/my/index.php index de6ca4653d..919a0e1abf 100644 --- a/my/index.php +++ b/my/index.php @@ -1,4 +1,4 @@ -id); $site = get_site(); + $course = $site; //just in case we need the old global $course hack if (array_key_exists($site->id,$courses)) { unset($courses[$site->id]); } - foreach ($courses as $course) { - if (isset($USER->timeaccess) && array_key_exists($course->id,$USER->timeaccess)) { - $courses[$course->id]->lastaccess = $USER->timeaccess[$course->id]; + foreach ($courses as $c) { + if (isset($USER->timeaccess) && array_key_exists($c->id,$USER->timeaccess)) { + $courses[$c->id]->lastaccess = $USER->timeaccess[$c->id]; } else { - $courses[$course->id]->lastaccess = 0; + $courses[$c->id]->lastaccess = 0; } } -- 2.39.5