Merge branch 'MDL-36209-workshop-assess-while-evaluating' of git://github.com/mudrd8mz/moodle

This commit is contained in:
Dan Poltawski 2012-11-07 15:30:38 +08:00
commit defcb763fe

View File

@ -1553,8 +1553,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();