diff --git a/public/mod/assign/locallib.php b/public/mod/assign/locallib.php index 9318496d25a..66b8a9c13c2 100644 --- a/public/mod/assign/locallib.php +++ b/public/mod/assign/locallib.php @@ -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) {