After rebuilding cache - get the course record again

This commit is contained in:
moodler 2003-08-22 16:20:35 +00:00
parent f5626b4c6b
commit db34bb5992

View file

@ -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