From 8bdd97a35a4ff9fbf7c47526010d1fc51fd7df0b Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 14 Sep 2016 09:20:33 +0800 Subject: [PATCH] MDL-54872 mod_assign: Allocate Unique IDs before tests --- mod/assign/tests/locallib_participants_test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/assign/tests/locallib_participants_test.php b/mod/assign/tests/locallib_participants_test.php index fd8e54f67e8..7121383bd7a 100644 --- a/mod/assign/tests/locallib_participants_test.php +++ b/mod/assign/tests/locallib_participants_test.php @@ -61,6 +61,10 @@ class mod_assign_locallib_participants extends advanced_testcase { $context = context_module::instance($cm->id); $assign = new assign($context, $cm, $course); + // Allocate IDs now. + // We're testing whether the IDs are correct after allocation. + assign::allocate_unique_ids($assign->get_instance()->id); + $participants = $assign->list_participants(null, false); // There should be exactly two participants and they should be the students.