Permalink
Browse files

MDL-36051 - Quick Grading in Assignment module does not turn on in so…

…me circumstances

* Fixed bug with quick grading when file submission is turned off
  • Loading branch information...
1 parent 6109f21 commit 00917ec682fa2bba1be50501d38c9f9664f9f1d4 @rlorenzo rlorenzo committed Nov 8, 2012
Showing with 8 additions and 4 deletions.
  1. +3 −1 mod/assign/locallib.php
  2. +5 −3 mod/assign/module.js
View
@@ -3632,7 +3632,9 @@ private function process_save_grading_options() {
'showquickgrading'=>false));
if ($formdata = $mform->get_data()) {
set_user_preference('assign_perpage', $formdata->perpage);
- set_user_preference('assign_filter', $formdata->filter);
+ if (isset($formdata->filter)) {
+ set_user_preference('assign_filter', $formdata->filter);
+ }
}
}
View
@@ -127,9 +127,11 @@ M.mod_assign.init_grading_options = function(Y) {
Y.one('form.gradingoptionsform').submit();
});
var filterelement = Y.one('#id_filter');
- filterelement.on('change', function(e) {
- Y.one('form.gradingoptionsform').submit();
- });
+ if (filterelement) {
+ filterelement.on('change', function(e) {
+ Y.one('form.gradingoptionsform').submit();
+ });
+ }
var quickgradingelement = Y.one('#id_quickgrading');
if (quickgradingelement) {
quickgradingelement.on('change', function(e) {

0 comments on commit 00917ec

Please sign in to comment.