From a66555328b49c2f0dbe0976d738ead18c7ed86b4 Mon Sep 17 00:00:00 2001 From: Pavel Sokolov Date: Thu, 5 Dec 2013 11:56:14 +0400 Subject: [PATCH] MDL-43199 assign: fix js error when expanding comments for non editing teachers in assign grading table --- mod/assign/module.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/assign/module.js b/mod/assign/module.js index 66095522ec4..29814649434 100644 --- a/mod/assign/module.js +++ b/mod/assign/module.js @@ -150,9 +150,11 @@ M.mod_assign.init_grading_options = function(Y) { }); } var showonlyactiveenrolelement = Y.one('#id_showonlyactiveenrol'); - showonlyactiveenrolelement.on('change', function(e) { + if (showonlyactiveenrolelement) { + showonlyactiveenrolelement.on('change', function(e) { Y.one('form.gradingoptionsform').submit(); - }); + }); + } }); };