From: moodler Date: Sun, 26 Sep 2004 02:42:54 +0000 (+0000) Subject: Fixed my recently introduced bug with the redirect bug 2000 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=83f3c62dbebca8d08f1070259087dab845245aef;p=moodle.git Fixed my recently introduced bug with the redirect bug 2000 --- diff --git a/course/view.php b/course/view.php index 6b4050f9d0..3e53f96a94 100644 --- a/course/view.php +++ b/course/view.php @@ -23,10 +23,6 @@ } } - if ($course->id == SITEID) { // This course is not a real course. - redirect("$CFG->wwwroot/"); - } - require_login($course->id); require_once($CFG->dirroot.'/calendar/lib.php'); /// This is after login because it needs $USER @@ -139,6 +135,10 @@ $SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id"; + if ($course->id == SITEID) { // This course is not a real course. + redirect("$CFG->wwwroot/"); + } + $strcourse = get_string("course"); $loggedinas = "

".user_login_string($course, $USER)."

";