]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13899 feedback itself is a type of grading - date graded is now affected by feedb...
authorskodak <skodak>
Tue, 18 Mar 2008 23:21:23 +0000 (23:21 +0000)
committerskodak <skodak>
Tue, 18 Mar 2008 23:21:23 +0000 (23:21 +0000)
lib/grade/grade_grade.php
lib/grade/grade_item.php

index b1fa4d985cf549b1f2c462c13ef76504bf231cca..f23fd2432059a7cb177111f7a04d93ebf987e2ee 100644 (file)
@@ -715,8 +715,9 @@ class grade_grade extends grade_object {
         return $this->finalgrade >= $this->grade_item->gradepass;
     }
 
-    function insert($source=null) { 
-        $this->timecreated = $this->timemodified = time(); 
+    function insert($source=null) {
+        // TODO: dategraded hack - do not update times, they are used for submission and grading  
+        //$this->timecreated = $this->timemodified = time(); 
         return parent::insert($source);
     }
 
index e70d535faac3eaf5e6161a432de7fb08e39b5269..9863ed8893f44153a2c5788649fd0c4a0c49ed4d 100644 (file)
@@ -1538,8 +1538,8 @@ class grade_item extends grade_object {
             $grade->finalgrade = $this->adjust_raw_grade($grade->rawgrade, $grade->rawgrademin, $grade->rawgrademax);
         }
 
-        if (is_null($grade->rawgrade)) {
-            $grade->timemodified = null; // dategraded hack - not graded if no grade present, comments do not count here as grading
+        if (is_null($grade->rawgrade) and is_null($grade->feedback)) {
+            $grade->timemodified = null; //TODO: dategraded hack - feedback counts as grading too ;-)
         }
 
         if (empty($grade->id)) {