mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
After rebuilding cache - get the course record again
This commit is contained in:
parent
f5626b4c6b
commit
db34bb5992
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue