MDL-33475: Fix javascript error when advanced grading is used in mod_assign

This commit is contained in:
Damyon Wiese 2012-06-07 10:52:05 +08:00
parent 4a5be0e949
commit eba009ea63

View File

@ -140,9 +140,11 @@ M.mod_assign.init_grading_options = function(Y) {
Y.one('form.gradingoptionsform').submit();
});
var quickgradingelement = Y.one('#id_quickgrading');
quickgradingelement.on('change', function(e) {
Y.one('form.gradingoptionsform').submit();
});
if (quickgradingelement) {
quickgradingelement.on('change', function(e) {
Y.one('form.gradingoptionsform').submit();
});
}
});