MDL-11966 implemented dategraded and datesubmitted, tweaked altering of grades depending in hidden grades

MDL-11974 improved gradebook CSS
This commit is contained in:
skodak
2007-11-01 08:25:05 +00:00
parent 32d651c853
commit ced5ee5921
17 changed files with 240 additions and 111 deletions
+23 -1
View File
@@ -96,6 +96,28 @@ class grade_scale extends grade_object {
return grade_object::fetch_all_helper('scale', 'grade_scale', $params);
}
/**
* Records this object in the Database, sets its id to the returned value, and returns that value.
* If successful this function also fetches the new object data from database and stores it
* in object properties.
* @param string $source from where was the object inserted (mod/forum, manual, etc.)
* @return int PK ID if successful, false otherwise
*/
function insert($source=null) {
$this->timemodified = time();
return parent::insert($source);
}
/**
* In addition to update() it also updates grade_outcomes_courses if needed
* @param string $source from where was the object inserted
* @return boolean success
*/
function update($source=null) {
$this->timemodified = time();
return parent::update($source);
}
/**
* Returns the most descriptive field for this object. This is a standard method used
* when we do not know the exact type of an object.
@@ -210,7 +232,7 @@ class grade_scale extends grade_object {
function is_used() {
global $CFG;
// count grade items excluding the
// count grade items excluding the
$sql = "SELECT COUNT(id) FROM {$CFG->prefix}grade_items WHERE scaleid = {$this->id} AND outcomeid IS NULL";
if (count_records_sql($sql)) {
return true;