diff --git a/public/mod/quiz/tests/external/external_test.php b/public/mod/quiz/tests/external/external_test.php index 26fc744b913..6f23d7c2adb 100644 --- a/public/mod/quiz/tests/external/external_test.php +++ b/public/mod/quiz/tests/external/external_test.php @@ -240,6 +240,11 @@ final class external_test extends \core_external\tests\externallib_testcase { break; } } + + // Clear static cache and call get_fast_modinfo() again so that in the following cache should not be rebuilt. + \course_modinfo::clear_instance_cache(); + get_fast_modinfo($record->course); + $enrol->enrol_user($instance2, $this->student->id, $this->studentrole->id); self::setUser($this->student);