MDL-22999 core_grades: Added ability to configure maximum grade value both globally and for each graded-activity.

This commit is contained in:
James McQuillan 2014-04-07 16:00:20 -04:00
parent 1a727e121e
commit 597662335d
7 changed files with 369 additions and 36 deletions

View file

@ -461,6 +461,8 @@ abstract class moodleform_mod extends moodleform {
$mform->addElement('modgrade', 'scale', get_string('scale'), false);
$mform->disabledIf('scale', 'assessed', 'eq', 0);
$mform->addHelpButton('scale', 'modgrade', 'grades');
$mform->setDefault('scale', $CFG->gradepointdefault);
$mform->addElement('checkbox', 'ratingtime', get_string('ratingtime', 'rating'));
$mform->disabledIf('ratingtime', 'assessed', 'eq', 0);
@ -786,7 +788,8 @@ abstract class moodleform_mod extends moodleform {
//if supports grades and grades arent being handled via ratings
if (!$this->_features->rating) {
$mform->addElement('modgrade', 'grade', get_string('grade'));
$mform->setDefault('grade', 100);
$mform->addHelpButton('grade', 'modgrade', 'grades');
$mform->setDefault('grade', $CFG->gradepointdefault);
}
if ($this->_features->advancedgrading