MDL-43740 core_grade: Thanks for Robert Russo for the patch. Removed the ability to set manual grade items to grade type "None"

This commit is contained in:
Andrew Davis 2014-08-04 12:04:37 +08:00
parent d29fb4ac65
commit 93dbb21841

View file

@ -51,10 +51,10 @@ class edit_item_form extends moodleform {
$mform->addHelpButton('idnumber', 'idnumbermod');
$mform->setType('idnumber', PARAM_RAW);
$options = array(GRADE_TYPE_NONE=>get_string('typenone', 'grades'),
GRADE_TYPE_VALUE=>get_string('typevalue', 'grades'),
GRADE_TYPE_SCALE=>get_string('typescale', 'grades'),
GRADE_TYPE_TEXT=>get_string('typetext', 'grades'));
// Manual grade items cannot have grade type GRADE_TYPE_NONE.
$options = array(GRADE_TYPE_VALUE => get_string('typevalue', 'grades'),
GRADE_TYPE_SCALE => get_string('typescale', 'grades'),
GRADE_TYPE_TEXT => get_string('typetext', 'grades'));
$mform->addElement('select', 'gradetype', get_string('gradetype', 'grades'), $options);
$mform->addHelpButton('gradetype', 'gradetype', 'grades');