MDL-10109 optional aggregation of outcomes together with grades

This commit is contained in:
skodak 2007-08-06 12:05:45 +00:00
parent e754b3e058
commit 29d509f59a
9 changed files with 70 additions and 8 deletions

View file

@ -29,6 +29,10 @@ class edit_category_form extends moodleform {
$mform->addElement('select', 'aggregation', get_string('aggregation', 'grades'), $options);
$mform->setDefault('gradetype', GRADE_AGGREGATE_MEAN_ALL);
if (!empty($CFG->enableoutcomes)) {
$mform->addElement('advcheckbox', 'aggregateoutcomes', get_string('aggregateoutcomes', 'grades'));
}
$options = array();
$options[0] = get_string('none');
for ($i=1; $i<=20; $i++) {

View file

@ -26,6 +26,7 @@ class edit_outcomeitem_form extends moodleform {
}
}
$mform->addElement('select', 'outcomeid', get_string('outcome', 'grades'), $options);
$mform->addRule('outcomeid', get_string('required'), 'required');
$options = array(0=>get_string('none'));
if ($coursemods = get_course_mods($COURSE->id)) {