Skip to content

Commit

Permalink
MDL-72098 core: Remove redundant insert function
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Dias committed Oct 14, 2021
1 parent 9145d80 commit 724a6a5
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/grade/grade_grade.php
Expand Up @@ -1021,19 +1021,6 @@ public function is_passed($grade_item = null) {
return $this->finalgrade >= $this->grade_item->gradepass;
}

/**
* Insert the grade_grade instance into the database.
*
* @param string $source From where was the object inserted (mod/forum, manual, etc.)
* @param bool $isbulkupdate If bulk grade update is happening.
* @return int The new grade_grade ID if successful, false otherwise
*/
public function insert($source = null, $isbulkupdate = false) {
// TODO: dategraded hack - do not update times, they are used for submission and grading (MDL-31379)
//$this->timecreated = $this->timemodified = time();
return parent::insert($source, $isbulkupdate);
}

/**
* In addition to update() as defined in grade_object rounds the float numbers using php function,
* the reason is we need to compare the db value with computed number to skip updates if possible.
Expand Down

0 comments on commit 724a6a5

Please sign in to comment.