mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-48012 core: fixed failing unit tests
This commit is contained in:
parent
393038961e
commit
1c42ad7135
2 changed files with 6 additions and 1 deletions
|
@ -92,6 +92,11 @@ class course extends recyclebin
|
||||||
|
|
||||||
// Get more information.
|
// Get more information.
|
||||||
$modinfo = get_fast_modinfo($cm->course);
|
$modinfo = get_fast_modinfo($cm->course);
|
||||||
|
|
||||||
|
if (!isset($modinfo->cms[$cm->id])) {
|
||||||
|
return; // Can't continue without the module information.
|
||||||
|
}
|
||||||
|
|
||||||
$cminfo = $modinfo->cms[$cm->id];
|
$cminfo = $modinfo->cms[$cm->id];
|
||||||
|
|
||||||
// Check backup/restore support.
|
// Check backup/restore support.
|
||||||
|
|
|
@ -69,7 +69,7 @@ class core_event_grade_deleted_testcase extends advanced_testcase {
|
||||||
$sink = $this->redirectEvents();
|
$sink = $this->redirectEvents();
|
||||||
course_delete_module($quiz->cmid);
|
course_delete_module($quiz->cmid);
|
||||||
$events = $sink->get_events();
|
$events = $sink->get_events();
|
||||||
$event = reset($events);
|
$event = $events[1];
|
||||||
$sink->close();
|
$sink->close();
|
||||||
|
|
||||||
// Check the event details are correct.
|
// Check the event details are correct.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue