MDL-13899 feedback itself is a type of grading - date graded is now affected by feedback too; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-03-18 23:21:23 +00:00
parent cf12f6c5a9
commit c55c9d73df
2 changed files with 5 additions and 4 deletions

View 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);
}

View 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)) {