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);
}
$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)) {