Skip to content

Commit

Permalink
MDL-69113 assign: save grader app workflow/marker filters correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
usqfowlerj committed Jun 25, 2020
1 parent 1ab9522 commit c31a321
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mod/assign/amd/build/grading_navigation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mod/assign/amd/build/grading_navigation.min.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions mod/assign/amd/src/grading_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,13 @@ define(['jquery', 'core/notification', 'core/str', 'core/form-autocomplete',
// There are 3 types of filter right now.
var filterPanel = this._region.find('[data-region="configure-filters"]');
var filters = filterPanel.find('select');
var preferenceNames = [];

this._filters = [];
filters.each(function(idx, ele) {
this._filters.push($(ele).val());
var element = $(ele);
this._filters.push(element.val());
preferenceNames.push('assign_' + element.prop('name'));
}.bind(this));

// Update the active filter string.
Expand All @@ -250,7 +253,6 @@ define(['jquery', 'core/notification', 'core/str', 'core/form-autocomplete',

var select = this._region.find('[data-action=change-user]');
var currentUserID = select.data('currentuserid');
var preferenceNames = ['assign_filter', 'assign_workflowfilter', 'assign_markerfilter'];
this._updateFilterPreferences(currentUserID, this._filters, preferenceNames).done(function() {
// Reload the list of users to apply the new filters.
if (!this._loadAllUsers()) {
Expand Down
Loading

0 comments on commit c31a321

Please sign in to comment.