Skip to content

Commit

Permalink
MDL-31731 Advanced Grading: Marking Guide - prevent negative scores w…
Browse files Browse the repository at this point in the history
…hen marking users
  • Loading branch information
danmarsden authored and danpoltawski committed May 4, 2012
1 parent bea7f96 commit cfc73aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grade/grading/form/guide/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,8 @@ public function validate_grading_element($elementvalue) {
foreach ($criteria as $id => $criterion) {
if (!isset($elementvalue['criteria'][$id]['score'])
|| $criterion['maxscore'] < $elementvalue['criteria'][$id]['score']
|| !is_numeric($elementvalue['criteria'][$id]['score'])) {
|| !is_numeric($elementvalue['criteria'][$id]['score'])
|| $elementvalue['criteria'][$id]['score'] < 0) {
$this->validationerrors[$id]['score'] = $elementvalue['criteria'][$id]['score'];
}
}
Expand Down

0 comments on commit cfc73aa

Please sign in to comment.