Merge branch 'MDL-47392-master' of git://github.com/xow/moodle

This commit is contained in:
Dan Poltawski 2014-10-16 11:12:01 +01:00
commit 7829a6d1ca
3 changed files with 24 additions and 24 deletions

View file

@ -161,14 +161,6 @@ class edit_category_form extends moodleform {
$mform->disabledIf('grade_item_grademin', 'aggregation', 'eq', GRADE_AGGREGATE_SUM); $mform->disabledIf('grade_item_grademin', 'aggregation', 'eq', GRADE_AGGREGATE_SUM);
} }
$mform->addElement('advcheckbox', 'grade_item_weightoverride', get_string('adjustedweight', 'grades'));
$mform->addHelpButton('grade_item_weightoverride', 'weightoverride', 'grades');
$mform->addElement('text', 'grade_item_aggregationcoef2', get_string('weight', 'grades'));
$mform->addHelpButton('grade_item_aggregationcoef2', 'weight', 'grades');
$mform->setType('grade_item_aggregationcoef2', PARAM_RAW);
$mform->disabledIf('grade_item_aggregationcoef2', 'grade_item_weightoverride');
$mform->addElement('text', 'grade_item_gradepass', get_string('gradepass', 'grades')); $mform->addElement('text', 'grade_item_gradepass', get_string('gradepass', 'grades'));
$mform->setType('grade_item_gradepass', PARAM_RAW); $mform->setType('grade_item_gradepass', PARAM_RAW);
$mform->addHelpButton('grade_item_gradepass', 'gradepass', 'grades'); $mform->addHelpButton('grade_item_gradepass', 'gradepass', 'grades');
@ -228,6 +220,14 @@ class edit_category_form extends moodleform {
/// parent category related settings /// parent category related settings
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades')); $mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
$mform->addElement('advcheckbox', 'grade_item_weightoverride', get_string('adjustedweight', 'grades'));
$mform->addHelpButton('grade_item_weightoverride', 'weightoverride', 'grades');
$mform->addElement('text', 'grade_item_aggregationcoef2', get_string('weight', 'grades'));
$mform->addHelpButton('grade_item_aggregationcoef2', 'weight', 'grades');
$mform->setType('grade_item_aggregationcoef2', PARAM_RAW);
$mform->disabledIf('grade_item_aggregationcoef2', 'grade_item_weightoverride');
$options = array(); $options = array();
$default = -1; $default = -1;
$categories = grade_category::fetch_all(array('courseid'=>$COURSE->id)); $categories = grade_category::fetch_all(array('courseid'=>$COURSE->id));

View file

@ -97,14 +97,6 @@ class edit_item_form extends moodleform {
$mform->setType('grademin', PARAM_RAW); $mform->setType('grademin', PARAM_RAW);
} }
$mform->addElement('advcheckbox', 'weightoverride', get_string('adjustedweight', 'grades'));
$mform->addHelpButton('weightoverride', 'weightoverride', 'grades');
$mform->addElement('text', 'aggregationcoef2', get_string('weight', 'grades'));
$mform->addHelpButton('aggregationcoef2', 'weight', 'grades');
$mform->setType('aggregationcoef2', PARAM_RAW);
$mform->disabledIf('aggregationcoef2', 'weightoverride');
$mform->addElement('text', 'gradepass', get_string('gradepass', 'grades')); $mform->addElement('text', 'gradepass', get_string('gradepass', 'grades'));
$mform->addHelpButton('gradepass', 'gradepass', 'grades'); $mform->addHelpButton('gradepass', 'gradepass', 'grades');
$mform->disabledIf('gradepass', 'gradetype', 'eq', GRADE_TYPE_NONE); $mform->disabledIf('gradepass', 'gradetype', 'eq', GRADE_TYPE_NONE);
@ -184,6 +176,14 @@ class edit_item_form extends moodleform {
/// parent category related settings /// parent category related settings
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades')); $mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
$mform->addElement('advcheckbox', 'weightoverride', get_string('adjustedweight', 'grades'));
$mform->addHelpButton('weightoverride', 'weightoverride', 'grades');
$mform->addElement('text', 'aggregationcoef2', get_string('weight', 'grades'));
$mform->addHelpButton('aggregationcoef2', 'weight', 'grades');
$mform->setType('aggregationcoef2', PARAM_RAW);
$mform->disabledIf('aggregationcoef2', 'weightoverride');
$options = array(); $options = array();
$coefstring = ''; $coefstring = '';
$categories = grade_category::fetch_all(array('courseid'=>$COURSE->id)); $categories = grade_category::fetch_all(array('courseid'=>$COURSE->id));

View file

@ -73,14 +73,6 @@ class edit_outcomeitem_form extends moodleform {
$mform->addHelpButton('cmid', 'linkedactivity', 'grades'); $mform->addHelpButton('cmid', 'linkedactivity', 'grades');
$mform->setDefault('cmid', 0); $mform->setDefault('cmid', 0);
$mform->addElement('advcheckbox', 'weightoverride', get_string('adjustedweight', 'grades'));
$mform->addHelpButton('weightoverride', 'weightoverride', 'grades');
$mform->addElement('text', 'aggregationcoef2', get_string('weight', 'grades'));
$mform->addHelpButton('aggregationcoef2', 'weight', 'grades');
$mform->setType('aggregationcoef2', PARAM_RAW);
$mform->disabledIf('aggregationcoef2', 'weightoverride');
/// hiding /// hiding
/// advcheckbox is not compatible with disabledIf !! /// advcheckbox is not compatible with disabledIf !!
$mform->addElement('checkbox', 'hidden', get_string('hidden', 'grades')); $mform->addElement('checkbox', 'hidden', get_string('hidden', 'grades'));
@ -96,6 +88,14 @@ class edit_outcomeitem_form extends moodleform {
/// parent category related settings /// parent category related settings
$mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades')); $mform->addElement('header', 'headerparent', get_string('parentcategory', 'grades'));
$mform->addElement('advcheckbox', 'weightoverride', get_string('adjustedweight', 'grades'));
$mform->addHelpButton('weightoverride', 'weightoverride', 'grades');
$mform->addElement('text', 'aggregationcoef2', get_string('weight', 'grades'));
$mform->addHelpButton('aggregationcoef2', 'weight', 'grades');
$mform->setType('aggregationcoef2', PARAM_RAW);
$mform->disabledIf('aggregationcoef2', 'weightoverride');
$options = array(); $options = array();
$default = ''; $default = '';
$coefstring = ''; $coefstring = '';