MDL-58001 mod_assign: Return early if no grade items are available

This commit is contained in:
Tony Butler
2025-09-16 17:48:25 +01:00
parent 0ec57fc3f2
commit e495958b7c
+3
View File
@@ -8794,6 +8794,9 @@ class assign {
$shouldreopen = true;
break;
case ASSIGN_ATTEMPT_REOPEN_METHOD_UNTILPASS:
if (!is_gradable($this->course->id, 'mod', 'assign', $this->get_instance()->id)) {
return false;
}
// Check the gradetopass from the gradebook.
$gradeitem = $this->get_grade_item();
if ($gradeitem) {