Skip to content

Commit

Permalink
MDL-54721 report_competency: Do not ignore the first user selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed May 26, 2016
1 parent 6a74e76 commit 6e91817
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.

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

2 changes: 0 additions & 2 deletions admin/tool/lp/amd/src/user_competency_course_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ define(['jquery'], function($) {
UserCompetencyCourseNavigation.prototype._courseId = null;
/** @type {String} Plugin base url. */
UserCompetencyCourseNavigation.prototype._baseUrl = null;
/** @type {Boolean} Ignore the first change event for users. */
UserCompetencyCourseNavigation.prototype._ignoreFirstUser = null;
/** @type {Boolean} Ignore the first change event for competencies. */
UserCompetencyCourseNavigation.prototype._ignoreFirstCompetency = null;

Expand Down
2 changes: 1 addition & 1 deletion report/competency/amd/build/user_course_navigation.min.js

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

8 changes: 0 additions & 8 deletions report/competency/amd/src/user_course_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ define(['jquery'], function($) {
this._baseUrl = baseUrl;
this._userId = userId + '';
this._courseId = courseId;
this._ignoreFirstUser = true;

$(userSelector).on('change', this._userChanged.bind(this));
};
Expand All @@ -47,11 +46,6 @@ define(['jquery'], function($) {
* @param {Event} e
*/
UserCourseNavigation.prototype._userChanged = function(e) {
if (this._ignoreFirstUser) {
this._ignoreFirstUser = false;
return;
}

var newUserId = $(e.target).val();
var queryStr = '?user=' + newUserId + '&id=' + this._courseId;
document.location = this._baseUrl + queryStr;
Expand All @@ -63,8 +57,6 @@ define(['jquery'], function($) {
UserCourseNavigation.prototype._courseId = null;
/** @type {String} Plugin base url. */
UserCourseNavigation.prototype._baseUrl = null;
/** @type {Boolean} Ignore the first change event for users. */
UserCourseNavigation.prototype._ignoreFirstUser = null;

return /** @alias module:report_competency/user_course_navigation */ UserCourseNavigation;

Expand Down

0 comments on commit 6e91817

Please sign in to comment.