Current Path : C:/xampp/htdocs/moodle/report/competency/amd/build/ |
Current File : C:/xampp/htdocs/moodle/report/competency/amd/build/grading_popup.min.js |
define ("report_competency/grading_popup",["jquery","core/notification","core/str","core/ajax","core/log","core/templates","tool_lp/dialogue"],function(a,b,c,d,f,g,h){var i=function(b,c){this._regionSelector=b;this._userCompetencySelector=c;a(this._regionSelector).on("click",this._userCompetencySelector,this._handleClick.bind(this))};i.prototype._handleClick=function(c){var e=a(c.target).closest(this._userCompetencySelector),g=a(e).data("competencyid"),h=a(e).data("courseid"),i=a(e).data("userid");f.debug("Clicked on cell: competencyId="+g+", courseId="+h+", userId="+i);var j=d.call([{methodname:"tool_lp_data_for_user_competency_summary_in_course",args:{userid:i,competencyid:g,courseid:h}},{methodname:"core_competency_user_competency_viewed_in_course",args:{userid:i,competencyid:g,courseid:h}}]);a.when(j[0],j[1]).then(this._contextLoaded.bind(this)).catch(b.exception)};i.prototype._contextLoaded=function(b){b.displayuser=!0;M.util.js_pending("report_competency/grading_popup:_contextLoaded");return a.when(c.get_string("usercompetencysummary","report_competency"),g.render("tool_lp/user_competency_summary_in_course",b)).then(function(a,b){return new h(a,b[0],function(){g.runTemplateJS(b[1]);M.util.js_complete("report_competency/grading_popup:_contextLoaded")},this._refresh.bind(this),!0)}.bind(this))};i.prototype._refresh=function(){var c=a(this._regionSelector),e=c.data("courseid"),f=c.data("moduleid"),g=c.data("userid");if(""===f){f=0}return d.call([{methodname:"report_competency_data_for_report",args:{courseid:e,userid:g,moduleid:f},done:this._pageContextLoaded.bind(this),fail:b.exception}])};i.prototype._pageContextLoaded=function(a){g.render("report_competency/report",a).then(function(a,b){g.replaceNode(this._regionSelector,a,b)}.bind(this)).catch(b.exception)};i.prototype._regionSelector=null;i.prototype._userCompetencySelector=null;return i}); //# sourceMappingURL=grading_popup.min.js.map