From: moodler Date: Fri, 22 Aug 2003 16:20:35 +0000 (+0000) Subject: After rebuilding cache - get the course record again X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=db34bb59927427dfca39224b732a620cf51fa7c6;p=moodle.git After rebuilding cache - get the course record again --- diff --git a/course/view.php b/course/view.php index 0fec158dfe..165b903251 100644 --- a/course/view.php +++ b/course/view.php @@ -92,6 +92,9 @@ if (empty($course->modinfo)) { // Course cache was never made rebuild_course_cache($course->id); + if (! $course = get_record("course", "id", $course->id) ) { + error("That's an invalid course id"); + } } if (!file_exists("$CFG->dirroot/course/format/$course->format.php")) { // Default format is weeks