diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index f98e598658f..9ad8df3a806 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -2026,6 +2026,8 @@ class assign { // More efficient to load this here. require_once($CFG->libdir.'/filelib.php'); + require_capability('mod/assign:grade', $this->context); + // Load all users with submit. $students = get_enrolled_users($this->context, "mod/assign:submit");