Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/grade_user_competency_inline.min.js

define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c<b.length;c++){e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){a.on("rated",function(a,e){var f=d._args;f.grade=e.rating;f.note=e.note;c.call([{methodname:d._methodName,args:f,done:function done(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])});return a}).then(function(a){d._dialogue=a;M.util.js_complete("tool_lp/grade_user_competency_inline:_setUp")}).fail(b.exception)};h.prototype._scaleId=null;h.prototype._competencyId=null;h.prototype._userId=null;h.prototype._planId=null;h.prototype._courseId=null;h.prototype._chooseStr=null;h.prototype._dialogue=null;return h});
//# sourceMappingURL=grade_user_competency_inline.min.js.map