Skip to content

Commit

Permalink
Merge pull request #752 from turnitin/Suspended-User-Checks
Browse files Browse the repository at this point in the history
Fix undefined variable $user
  • Loading branch information
jack-tii authored Jul 30, 2024
2 parents aeec01f + 97fdd35 commit 2801a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion turnitintooltwo_assignment.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,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;
Expand Down

0 comments on commit 2801a5c

Please sign in to comment.