From: skodak Date: Mon, 29 May 2006 05:56:28 +0000 (+0000) Subject: global $course fix; merged from MOODLE_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9b02b5342aee7e17174d507249c34e910b3111ff;p=moodle.git global $course fix; merged from MOODLE_16_STABLE --- 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; } }