Skip to content

Commit

Permalink
Merge branch 'MDL-65599-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed May 15, 2019
2 parents 802f7c4 + 54d09c4 commit 2b8ffcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion report/competency/amd/build/grading_popup.min.js

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

6 changes: 6 additions & 0 deletions report/competency/amd/src/grading_popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ define(['jquery', 'core/notification', 'core/str', 'core/ajax', 'core/log', 'cor
*/
GradingPopup.prototype._contextLoaded = function(context) {
var self = this;

// We have to display user info in popup.
context.displayuser = true;
templates.render('tool_lp/user_competency_summary_in_course', context).done(function(html, js) {
Expand All @@ -93,6 +94,11 @@ define(['jquery', 'core/notification', 'core/str', 'core/ajax', 'core/log', 'cor
var moduleId = region.data('moduleid');
var userId = region.data('userid');

// The module id is expected to be an integer, so don't pass empty string.
if (moduleId === '') {
moduleId = 0;
}

ajax.call([{
methodname: 'report_competency_data_for_report',
args: {courseid: courseId, userid: userId, moduleid: moduleId},
Expand Down

0 comments on commit 2b8ffcc

Please sign in to comment.