From 97fdd350a8f6d6f74c4c3d66bcbc28ff2973ecf8 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 29 Jul 2024 14:21:10 +0100 Subject: [PATCH] Fix undefined variable $user --- turnitintooltwo_assignment.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turnitintooltwo_assignment.class.php b/turnitintooltwo_assignment.class.php index 748927e7..974cd8fd 100755 --- a/turnitintooltwo_assignment.class.php +++ b/turnitintooltwo_assignment.class.php @@ -622,10 +622,10 @@ public function enrol_all_students($cm) { $members = array_keys($students); foreach ($members as $member) { // Don't include user if they are suspended. + $user = new turnitintooltwo_user($member, "Learner"); if (isset($suspendedusers[$user->id])) { continue; } - $user = new turnitintooltwo_user($member, "Learner"); $user->join_user_to_class($course->turnitin_cid); } return true;