MDL-35339 Better cache reset for get_fast_modinfo(), allow exec get_fast_modinfo($courseid)

This commit is contained in:
Marina Glancy
2012-10-15 14:08:15 +08:00
parent 38b19bbca1
commit b46be6adf4
8 changed files with 72 additions and 73 deletions
+2 -3
View File
@@ -400,9 +400,8 @@ EOD;
throw new coding_exception('section must be present in phpunit_util::create_course_section() $record');
}
$course = $DB->get_record('course', array('id' => $record['course']), '*', MUST_EXIST);
course_create_sections_if_missing($course, $record['section']);
return get_fast_modinfo($course)->get_section_info($record['section']);
course_create_sections_if_missing($record['course'], $record['section']);
return get_fast_modinfo($record['course'])->get_section_info($record['section']);
}
/**