Current Path : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/ |
Current File : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/competency_outcomes.min.js.map |
{"version":3,"sources":["../src/competency_outcomes.js"],"names":["define","$","Str","NONE","EVIDENCE","COMPLETE","RECOMMEND","getAll","self","get_strings","key","component","then","strings","outcomes","code","name","getString","id","all","Deferred","reject","promise"],"mappings":"AAuBAA,OAAM,+BAAC,CAAC,QAAD,CACC,UADD,CAAD,CAEE,SAASC,CAAT,CAAYC,CAAZ,CAAiB,CAOrB,MAAwD,CAEpDC,IAAI,EAFgD,CAGpDC,QAAQ,EAH4C,CAIpDC,QAAQ,EAJ4C,CAKpDC,SAAS,EAL2C,CAapDC,MAAM,CAAE,iBAAW,CACf,GAAIC,CAAAA,CAAI,CAAG,IAAX,CACA,MAAON,CAAAA,CAAG,CAACO,WAAJ,CAAgB,CACnB,CAACC,GAAG,CAAE,wBAAN,CAAgCC,SAAS,CAAE,SAA3C,CADmB,CAEnB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAFmB,CAGnB,CAACD,GAAG,CAAE,6BAAN,CAAqCC,SAAS,CAAE,SAAhD,CAHmB,CAInB,CAACD,GAAG,CAAE,4BAAN,CAAoCC,SAAS,CAAE,SAA/C,CAJmB,CAAhB,EAKJC,IALI,CAKC,SAASC,CAAT,CAAkB,CACtB,GAAIC,CAAAA,CAAQ,CAAG,EAAf,CACAA,CAAQ,CAACN,CAAI,CAACL,IAAN,CAAR,CAAsB,CAACY,IAAI,CAAEP,CAAI,CAACL,IAAZ,CAAkBa,IAAI,CAAEH,CAAO,CAAC,CAAD,CAA/B,CAAtB,CACAC,CAAQ,CAACN,CAAI,CAACJ,QAAN,CAAR,CAA0B,CAACW,IAAI,CAAEP,CAAI,CAACJ,QAAZ,CAAsBY,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACAC,CAAQ,CAACN,CAAI,CAACF,SAAN,CAAR,CAA2B,CAACS,IAAI,CAAEP,CAAI,CAACF,SAAZ,CAAuBU,IAAI,CAAEH,CAAO,CAAC,CAAD,CAApC,CAA3B,CACAC,CAAQ,CAACN,CAAI,CAACH,QAAN,CAAR,CAA0B,CAACU,IAAI,CAAEP,CAAI,CAACH,QAAZ,CAAsBW,IAAI,CAAEH,CAAO,CAAC,CAAD,CAAnC,CAA1B,CACA,MAAOC,CAAAA,CACV,CAZM,CAaV,CA5BmD,CAqCpDG,SAAS,CAAE,mBAASC,CAAT,CAAa,CACpB,GAAIV,CAAAA,CAAI,CAAG,IAAX,CACIW,CAAG,CAAGX,CAAI,CAACD,MAAL,EADV,CAGA,MAAOY,CAAAA,CAAG,CAACP,IAAJ,CAAS,SAASE,CAAT,CAAmB,CAC/B,GAA4B,WAAxB,QAAOA,CAAAA,CAAQ,CAACI,CAAD,CAAnB,CAAyC,CACrC,MAAOjB,CAAAA,CAAC,CAACmB,QAAF,GAAaC,MAAb,GAAsBC,OAAtB,EACV,CACD,MAAOR,CAAAA,CAAQ,CAACI,CAAD,CAAR,CAAaF,IACvB,CALM,CAMV,CA/CmD,CAkD3D,CA3DK,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 * Competency rule config.\n *\n * @package tool_lp\n * @copyright 2015 Frédéric Massart - FMCorz.net\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery',\n 'core/str'],\n function($, Str) {\n\n var OUTCOME_NONE = 0,\n OUTCOME_EVIDENCE = 1,\n OUTCOME_COMPLETE = 2,\n OUTCOME_RECOMMEND = 3;\n\n return /** @alias module:tool_lp/competency_outcomes */ {\n\n NONE: OUTCOME_NONE,\n EVIDENCE: OUTCOME_EVIDENCE,\n COMPLETE: OUTCOME_COMPLETE,\n RECOMMEND: OUTCOME_RECOMMEND,\n\n /**\n * Get all the outcomes.\n *\n * @return {Object} Indexed by outcome code, contains code and name.\n * @method getAll\n */\n getAll: function() {\n var self = this;\n return Str.get_strings([\n {key: 'competencyoutcome_none', component: 'tool_lp'},\n {key: 'competencyoutcome_evidence', component: 'tool_lp'},\n {key: 'competencyoutcome_recommend', component: 'tool_lp'},\n {key: 'competencyoutcome_complete', component: 'tool_lp'},\n ]).then(function(strings) {\n var outcomes = {};\n outcomes[self.NONE] = {code: self.NONE, name: strings[0]};\n outcomes[self.EVIDENCE] = {code: self.EVIDENCE, name: strings[1]};\n outcomes[self.RECOMMEND] = {code: self.RECOMMEND, name: strings[2]};\n outcomes[self.COMPLETE] = {code: self.COMPLETE, name: strings[3]};\n return outcomes;\n });\n },\n\n /**\n * Get the string for an outcome.\n *\n * @param {Number} id The outcome code.\n * @return {Promise} Resolved with the string.\n * @method getString\n */\n getString: function(id) {\n var self = this,\n all = self.getAll();\n\n return all.then(function(outcomes) {\n if (typeof outcomes[id] === 'undefined') {\n return $.Deferred().reject().promise();\n }\n return outcomes[id].name;\n });\n }\n };\n\n});\n"],"file":"competency_outcomes.min.js"}