Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{"version":3,"file":"scalevalues.min.js","sources":["../src/scalevalues.js"],"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 get the scale values.\n *\n * @module     tool_lp/scalevalues\n * @copyright  2016 Serge Gauthier\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['jquery', 'core/ajax'], function($, ajax) {\n    var localCache = [];\n\n    return {\n\n        /**\n         * Return a promise object that will be resolved into a string eventually (maybe immediately).\n         *\n         * @method get_values\n         * @param {Number} scaleid The scale id\n         * @return [] {Promise}\n         */\n        // eslint-disable-next-line camelcase\n        get_values: function(scaleid) {\n\n            var deferred = $.Deferred();\n\n            if (typeof localCache[scaleid] === 'undefined') {\n                ajax.call([{\n                    methodname: 'core_competency_get_scale_values',\n                    args: {scaleid: scaleid},\n                    done: function(scaleinfo) {\n                        localCache[scaleid] = scaleinfo;\n                        deferred.resolve(scaleinfo);\n                    },\n                    fail: (deferred.reject)\n                }]);\n            } else {\n                deferred.resolve(localCache[scaleid]);\n            }\n\n            return deferred.promise();\n        }\n    };\n});\n"],"names":["define","$","ajax","localCache","get_values","scaleid","deferred","Deferred","call","methodname","args","done","scaleinfo","resolve","fail","reject","promise"],"mappings":";;;;;;;AAsBAA,6BAAO,CAAC,SAAU,cAAc,SAASC,EAAGC,UACpCC,WAAa,SAEV,CAUHC,WAAY,SAASC,aAEbC,SAAWL,EAAEM,uBAEkB,IAAxBJ,WAAWE,SAClBH,KAAKM,KAAK,CAAC,CACPC,WAAY,mCACZC,KAAM,CAACL,QAASA,SAChBM,KAAM,SAASC,WACXT,WAAWE,SAAWO,UACtBN,SAASO,QAAQD,YAErBE,KAAOR,SAASS,UAGpBT,SAASO,QAAQV,WAAWE,UAGzBC,SAASU"}