Skip to content
Browse files

Merge branch 'MDL-32076_unlimited2_23' of git://github.com/andyjdavis…

…/moodle into MOODLE_23_STABLE
  • Loading branch information...
2 parents 0225b63 + cd536c6 commit 35f7e66ed715b9ef14157649abd69abe9bc6c735 @danpoltawski danpoltawski committed Feb 12, 2013
Showing with 8 additions and 5 deletions.
  1. +7 −4 grade/report/grader/ajax_callbacks.php
  2. +1 −1 grade/report/grader/lib.php
View
11 grade/report/grader/ajax_callbacks.php
@@ -81,10 +81,13 @@
// Warn if the grade is out of bounds.
if (is_null($finalgrade)) {
// ok
- } else if ($finalgrade < $grade_item->grademin) {
- $errorstr = 'lessthanmin';
- } else if ($finalgrade > $grade_item->grademax) {
- $errorstr = 'morethanmax';
+ } else {
+ $bounded = $grade_item->bounded_grade($finalgrade);
+ if ($bounded > $finalgrade) {
+ $errorstr = 'lessthanmin';
+ } else if ($bounded < $finalgrade) {
+ $errorstr = 'morethanmax';
+ }
}
if ($errorstr) {
View
2 grade/report/grader/lib.php
@@ -256,7 +256,7 @@ public function process_data($data) {
} else {
$bounded = $gradeitem->bounded_grade($finalgrade);
if ($bounded > $finalgrade) {
- $errorstr = 'lessthanmin';
+ $errorstr = 'lessthanmin';
} else if ($bounded < $finalgrade) {
$errorstr = 'morethanmax';
}

0 comments on commit 35f7e66

Please sign in to comment.
Something went wrong with that request. Please try again.