MDL-13730 site setting for aggregation of scales; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2008-03-03 11:03:54 +00:00
parent 3908893554
commit 91f9a62c3f
6 changed files with 41 additions and 11 deletions
+17
View File
@@ -3243,6 +3243,23 @@ class admin_setting_special_gradebookroles extends admin_setting_configmultichec
}
}
class admin_setting_regradingcheckbox extends admin_setting_configcheckbox {
function write_setting($data) {
global $CFG;
$oldvalue = $this->config_read($this->name);
$return = parent::write_setting($data);
$newvalue = $this->config_read($this->name);
if ($oldvalue !== $newvalue) {
// force full regrading
set_field('grade_items', 'needsupdate', 1, 'needsupdate', 0);
}
return $return;
}
}
/**
* Which roles to show on course decription page
*/