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.
|
||||
$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];
|
||||
|
||||
// Check backup/restore support.
|
||||
|
|
|
@ -69,7 +69,7 @@ class core_event_grade_deleted_testcase extends advanced_testcase {
|
|||
$sink = $this->redirectEvents();
|
||||
course_delete_module($quiz->cmid);
|
||||
$events = $sink->get_events();
|
||||
$event = reset($events);
|
||||
$event = $events[1];
|
||||
$sink->close();
|
||||
|
||||
// Check the event details are correct.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue