Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/mod/assign/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/mod/assign/amd/build/grading_navigation_user_info.min.js

define ("mod_assign/grading_navigation_user_info",["jquery","core/notification","core/ajax","core/templates"],function(a,b,c,d){var e=function(b){this._regionSelector=b;this._region=a(b);this._userCache={};a(document).on("user-changed",this._refreshUserInfo.bind(this))};e.prototype._regionSelector=null;e.prototype._userCache=null;e.prototype._region=null;e.prototype._lastUserId=0;e.prototype._getAssignmentId=function(){return this._region.attr("data-assignmentid")};e.prototype._refreshUserInfo=function(e,f){var g=a.Deferred();this._region.attr("data-userid",f);if(this._lastUserId==f){return}this._lastUserId=f;d.render("mod_assign/loading",{}).done(function(e,h){this._region.fadeOut("fast",function(){d.replaceNodeContents(this._region,e,h);this._region.fadeIn("fast")}.bind(this));if(0>f){d.render("mod_assign/grading_navigation_no_users",{}).done(function(a,b){if(f==this._lastUserId){this._region.fadeOut("fast",function(){d.replaceNodeContents(this._region,a,b);this._region.fadeIn("fast")}.bind(this))}}.bind(this)).fail(b.exception);return}if("undefined"!=typeof this._userCache[f]){g.resolve(this._userCache[f])}else{var i=this._getAssignmentId(),j=c.call([{methodname:"mod_assign_get_participant",args:{userid:f,assignid:i,embeduser:!0}}]);j[0].done(function(a){if(!a.hasOwnProperty("id")){g.reject("No users")}else{this._userCache[f]=a;g.resolve(this._userCache[f])}}.bind(this)).fail(b.exception)}g.done(function(c){var e=a("[data-showuseridentity]").data("showuseridentity").split(","),g=[];c.courseid=a("[data-region=\"grading-navigation-panel\"]").attr("data-courseid");if(c.user){a.each(e,function(a,b){if("undefined"!=typeof c.user[b]&&""!==c.user[b]){c.hasidentity=!0;g.push(c.user[b])}});c.identity=g.join(", ");if(c.user.profileimageurl){c.profileimageurl=c.user.profileimageurl}}d.render("mod_assign/grading_navigation_user_summary",c).done(function(a,b){if(f==this._lastUserId){this._region.fadeOut("fast",function(){d.replaceNodeContents(this._region,a,b);this._region.fadeIn("fast")}.bind(this))}}.bind(this)).fail(b.exception)}.bind(this)).fail(function(){d.render("mod_assign/grading_navigation_no_users",{}).done(function(a,b){this._region.fadeOut("fast",function(){d.replaceNodeContents(this._region,a,b);this._region.fadeIn("fast")}.bind(this))}.bind(this)).fail(b.exception)}.bind(this))}.bind(this)).fail(b.exception)};return e});
//# sourceMappingURL=grading_navigation_user_info.min.js.map