MDL-36209 Allow teachers to assess submissions during the grading evaluation phase

This commit is contained in:
David Mudrák
2012-11-04 08:47:21 +01:00
parent 6109f2112c
commit 4affa7242e
+5 -2
View File
@@ -1547,8 +1547,11 @@ class workshop {
public function assessing_allowed($userid) {
if ($this->phase != self::PHASE_ASSESSMENT) {
// assessing is not allowed but in the assessment phase
return false;
// assessing is allowed in the assessment phase only, unless the user is a teacher
// providing additional assessment during the evaluation phase
if ($this->phase != self::PHASE_EVALUATION or !has_capability('mod/workshop:overridegrades', $this->context, $userid)) {
return false;
}
}
$now = time();