MDL-46818 core_grades: added YUI form change validation

This commit is contained in:
Mark Nelson 2014-09-01 21:46:43 -07:00
parent 1446e02f69
commit 742d9165b7
2 changed files with 9 additions and 0 deletions

View File

@ -368,6 +368,14 @@ if ($moving) {
echo $OUTPUT->container_end();
$PAGE->requires->yui_module('moodle-core-formchangechecker',
'M.core_formchangechecker.init',
array(array(
'formid' => 'gradetreeform'
))
);
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
echo $OUTPUT->footer();
// Restore original show/hide preference if moving

View File

@ -671,6 +671,7 @@ class grade_edit_tree_column_aggregation extends grade_edit_tree_column_category
} else {
$attributes = array();
$attributes['id'] = 'aggregation_'.$category->id;
$attributes['class'] = 'ignoredirty';
$aggregation = html_writer::label(get_string('aggregation', 'grades'), 'aggregation_'.$category->id, false, array('class' => 'accesshide'));
$aggregation .= html_writer::select($options, 'aggregation_'.$category->id, $category->aggregation, null, $attributes);
$action = new component_action('change', 'update_category_aggregation', array('courseid' => $params['id'], 'category' => $category->id, 'sesskey' => sesskey()));