Merge branch 'MDL-47896-master' of git://github.com/zbdd/moodle
authorDan Poltawski <dan@moodle.com>
Thu, 30 Oct 2014 15:15:28 +0000 (15:15 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 30 Oct 2014 15:15:28 +0000 (15:15 +0000)
grade/report/singleview/classes/local/ui/finalgrade.php

index 58bf08b..29901b2 100644 (file)
@@ -46,9 +46,13 @@ class finalgrade extends grade_attribute_format implements unique_value, be_disa
      */
     public function get_value() {
         $this->label = $this->grade->grade_item->itemname;
-        // Manual item raw grade support.
-        $val = $this->grade->grade_item->is_manual_item() && (!is_null($this->grade->rawgrade)) ?
-            $this->grade->rawgrade : $this->grade->finalgrade;
+
+        $isoverridden = $this->grade->is_overridden();
+        if (!empty($isoverridden)) {
+            $val = $this->grade->finalgrade;
+        } else {
+            $val = $this->grade->rawgrade;
+        }
 
         if ($this->grade->grade_item->scaleid) {
             return $val ? (int)$val : -1;