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/user_competency_info.min.js.map

{"version":3,"sources":["../src/user_competency_info.js"],"names":["define","$","notification","ajax","templates","Info","rootElement","competencyId","userId","planId","courseId","displayuser","_rootElement","_competencyId","_userId","_planId","_courseId","_valid","_displayuser","_methodName","_args","competencyid","planid","_templateName","userid","courseid","prototype","reload","self","promises","call","methodname","args","done","context","render","html","js","replaceNode","fail","exception"],"mappings":"AAuBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,mBAAX,CAAgC,WAAhC,CAA6C,gBAA7C,CAAD,CAAiE,SAASC,CAAT,CAAYC,CAAZ,CAA0BC,CAA1B,CAAgCC,CAAhC,CAA2C,CAY9G,GAAIC,CAAAA,CAAI,CAAG,SAASC,CAAT,CAAsBC,CAAtB,CAAoCC,CAApC,CAA4CC,CAA5C,CAAoDC,CAApD,CAA8DC,CAA9D,CAA2E,CAClF,KAAKC,YAAL,CAAoBN,CAApB,CACA,KAAKO,aAAL,CAAqBN,CAArB,CACA,KAAKO,OAAL,CAAeN,CAAf,CACA,KAAKO,OAAL,CAAeN,CAAf,CACA,KAAKO,SAAL,CAAiBN,CAAjB,CACA,KAAKO,MAAL,IACA,KAAKC,YAAL,CAA4C,WAAvB,QAAOP,CAAAA,CAAR,CAAuCA,CAAvC,GAApB,CAEA,GAAI,KAAKI,OAAT,CAAkB,CACd,KAAKI,WAAL,CAAmB,kDAAnB,CACA,KAAKC,KAAL,CAAa,CAACC,YAAY,CAAE,KAAKR,aAApB,CAAmCS,MAAM,CAAE,KAAKP,OAAhD,CAAb,CACA,KAAKQ,aAAL,CAAqB,yCACxB,CAJD,IAIO,IAAI,KAAKP,SAAT,CAAoB,CACvB,KAAKG,WAAL,CAAmB,oDAAnB,CACA,KAAKC,KAAL,CAAa,CAACI,MAAM,CAAE,KAAKV,OAAd,CAAuBO,YAAY,CAAE,KAAK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,CAACqB,SAAL,CAAeX,OAAf,CAAyB,IAAzB,CAEAV,CAAI,CAACqB,SAAL,CAAeb,aAAf,CAA+B,IAA/B,CAEAR,CAAI,CAACqB,SAAL,CAAeZ,OAAf,CAAyB,IAAzB,CAEAT,CAAI,CAACqB,SAAL,CAAeP,WAAf,CAA6B,IAA7B,CAEAd,CAAI,CAACqB,SAAL,CAAeN,KAAf,CAAuB,IAAvB,CAEAf,CAAI,CAACqB,SAAL,CAAeH,aAAf,CAA+B,IAA/B,CAEAlB,CAAI,CAACqB,SAAL,CAAeR,YAAf,IAEA,MAAyDb,CAAAA,CAE5D,CAxFK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Module to refresh a user competency summary in a page.\n *\n * @package    tool_lp\n * @copyright  2015 Damyon Wiese\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/notification', 'core/ajax', 'core/templates'], function($, notification, ajax, templates) {\n\n    /**\n     * Info\n     *\n     * @param {JQuery} rootElement Selector to replace when the information needs updating.\n     * @param {Number} competencyId The id of the competency.\n     * @param {Number} userId The id of the user.\n     * @param {Number} planId The id of the plan.\n     * @param {Number} courseId The id of the course.\n     * @param {Boolean} displayuser If we should display the user info.\n     */\n    var Info = function(rootElement, competencyId, userId, planId, courseId, displayuser) {\n        this._rootElement = rootElement;\n        this._competencyId = competencyId;\n        this._userId = userId;\n        this._planId = planId;\n        this._courseId = courseId;\n        this._valid = true;\n        this._displayuser = (typeof displayuser !== 'undefined') ? displayuser : false;\n\n        if (this._planId) {\n            this._methodName = 'tool_lp_data_for_user_competency_summary_in_plan';\n            this._args = {competencyid: this._competencyId, planid: this._planId};\n            this._templateName = 'tool_lp/user_competency_summary_in_plan';\n        } else if (this._courseId) {\n            this._methodName = 'tool_lp_data_for_user_competency_summary_in_course';\n            this._args = {userid: this._userId, competencyid: this._competencyId, courseid: this._courseId};\n            this._templateName = 'tool_lp/user_competency_summary_in_course';\n        } else {\n            this._methodName = 'tool_lp_data_for_user_competency_summary';\n            this._args = {userid: this._userId, competencyid: this._competencyId};\n            this._templateName = 'tool_lp/user_competency_summary';\n        }\n    };\n\n    /**\n     * Reload the info for this user competency.\n     *\n     * @method reload\n     */\n    Info.prototype.reload = function() {\n        var self = this,\n            promises = [];\n\n        if (!this._valid) {\n            return;\n        }\n\n        promises = ajax.call([{\n            methodname: this._methodName,\n            args: this._args\n        }]);\n\n        promises[0].done(function(context) {\n            // Check if we should also the user info.\n            if (self._displayuser) {\n                context.displayuser = true;\n            }\n            templates.render(self._templateName, context).done(function(html, js) {\n                templates.replaceNode(self._rootElement, html, js);\n            }).fail(notification.exception);\n        }).fail(notification.exception);\n    };\n\n    /** @type {JQuery} The root element to replace in the DOM. */\n    Info.prototype._rootElement = null;\n    /** @type {Number} The id of the course. */\n    Info.prototype._courseId = null;\n    /** @type {Boolean} Is this module valid? */\n    Info.prototype._valid = null;\n    /** @type {Number} The id of the plan. */\n    Info.prototype._planId = null;\n    /** @type {Number} The id of the competency. */\n    Info.prototype._competencyId = null;\n    /** @type {Number} The id of the user. */\n    Info.prototype._userId = null;\n    /** @type {String} The method name to load the data. */\n    Info.prototype._methodName = null;\n    /** @type {Object} The arguments to load the data. */\n    Info.prototype._args = null;\n    /** @type {String} The template to reload the fragment. */\n    Info.prototype._templateName = null;\n    /** @type {Boolean} If we should display the user info? */\n    Info.prototype._displayuser = false;\n\n    return /** @alias module:tool_lp/user_competency_info */ Info;\n\n});\n"],"file":"user_competency_info.min.js"}