Skip to content

Commit dfd9b86

Browse files
committed
MDL-58001 mod_assign: Return early if no grade items are available
1 parent 93aa033 commit dfd9b86

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

mod/assign/locallib.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8700,6 +8700,9 @@ protected function reopen_submission_if_required($userid, $submission, $addattem
87008700
$shouldreopen = true;
87018701
break;
87028702
case ASSIGN_ATTEMPT_REOPEN_METHOD_UNTILPASS:
8703+
if (!is_gradable($this->course->id, 'mod', 'assign', $this->get_instance()->id)) {
8704+
return false;
8705+
}
87038706
// Check the gradetopass from the gradebook.
87048707
$gradeitem = $this->get_grade_item();
87058708
if ($gradeitem) {

0 commit comments

Comments
 (0)