MDL-57795 mod_assign: fix for filters killing review pane when grading

Fixes a bug in which the review pane was destroyed if the user selected
a combination of filters resulting in no matched users. Now, the pane
is just hidden in such cases, and displayed again if subsequent filter
changes return one or more users.
This commit is contained in:
Jake Dallimore
2017-02-20 08:53:00 +08:00
parent 1a754e8446
commit bd4f6ce186
2 changed files with 3 additions and 5 deletions
File diff suppressed because one or more lines are too long
+2 -4
View File
@@ -298,12 +298,10 @@ define(['jquery', 'core/yui', 'core/notification', 'core/templates', 'core/fragm
}.bind(this))
.fail(notification.exception);
}.bind(this)).fail(notification.exception);
$('[data-region="review-panel"]').show();
} else {
this._region.hide();
var reviewPanel = $('[data-region="review-panel"]');
if (reviewPanel.length) {
this._niceReplaceNodeContents(reviewPanel, '', '');
}
$('[data-region="review-panel"]').hide();
$(document).trigger('finish-loading-user');
// Tell behat we are friends again.
window.M.util.js_complete('mod-assign-loading-user');