]> git.mjollnir.org Git - moodle.git/commitdiff
use min max bounds in update_final_grade()
authorskodak <skodak>
Mon, 16 Jul 2007 07:16:08 +0000 (07:16 +0000)
committerskodak <skodak>
Mon, 16 Jul 2007 07:16:08 +0000 (07:16 +0000)
lib/grade/grade_item.php

index 5b899f133ca9f2a2c0e3756f16650219b4a1a0c5..85383cf8f4c77e1783378ff77928936e4f5e7fc9 100644 (file)
@@ -1146,7 +1146,7 @@ class grade_item extends grade_object {
         }
 
         if ($finalgrade !== false) {
-            $grade->finalgrade = $finalgrade;
+            $grade->finalgrade = bounded_number($this->grademin, $finalgrade, $this->grademax);
             // if we can update the raw grade, do update it
             if (!$this->is_normal_item() or $this->plusfactor != 0 or $this->multfactor != 1
              or !events_is_registered('grade_updated', $this->itemtype.'/'.$this->itemmodule)) {