Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 3bcff380158e81506b210b3004b865fe39cf6917 1 parent d402e05
@rlorenzo rlorenzo authored
Showing with 9 additions and 5 deletions.
  1. +3 −1 mod/assign/locallib.php
  2. +6 −4 mod/assign/module.js
View
4 mod/assign/locallib.php
@@ -2760,7 +2760,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
10 mod/assign/module.js
@@ -117,9 +117,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) {
@@ -139,4 +141,4 @@ M.mod_assign.init_grade_change = function(Y) {
}
});
}
-};
+};
Please sign in to comment.
Something went wrong with that request. Please try again.