%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/ava/admin/tool/lp/amd/build/
Upload File :
Create Path :
Current File : /home/vacivi36/ava/admin/tool/lp/amd/build/form-cohort-selector.min.js.map

{"version":3,"file":"form-cohort-selector.min.js","sources":["../src/form-cohort-selector.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 * Cohort selector module.\n *\n * @module     tool_lp/form-cohort-selector\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', 'core/ajax', 'core/templates'], function($, Ajax, Templates) {\n\n    return /** @alias module:tool_lp/form-cohort-selector */ {\n\n        processResults: function(selector, results) {\n            var cohorts = [];\n            $.each(results, function(index, cohort) {\n                cohorts.push({\n                    value: cohort.id,\n                    label: cohort._label\n                });\n            });\n            return cohorts;\n        },\n\n        transport: function(selector, query, success, failure) {\n            var promise,\n                contextid = parseInt($(selector).data('contextid'), 10),\n                includes = $(selector).data('includes');\n\n            promise = Ajax.call([{\n                methodname: 'tool_lp_search_cohorts',\n                args: {\n                    query: query,\n                    context: {contextid: contextid},\n                    includes: includes\n                }\n            }]);\n            promise[0].then(function(results) {\n                var promises = [],\n                    i = 0;\n\n                // Render the label.\n                $.each(results.cohorts, function(index, cohort) {\n                    promises.push(Templates.render('tool_lp/form-cohort-selector-suggestion', cohort));\n                });\n\n                // Apply the label to the results.\n                return $.when.apply($.when, promises).then(function() {\n                    var args = arguments;\n                    $.each(results.cohorts, function(index, cohort) {\n                        cohort._label = args[i];\n                        i++;\n                    });\n                    success(results.cohorts);\n                    return;\n                });\n\n            }).catch(failure);\n        }\n\n    };\n\n});\n"],"names":["define","$","Ajax","Templates","processResults","selector","results","cohorts","each","index","cohort","push","value","id","label","_label","transport","query","success","failure","contextid","parseInt","data","includes","call","methodname","args","context","then","promises","i","render","when","apply","arguments","catch"],"mappings":";;;;;;;AAuBAA,sCAAO,CAAC,SAAU,YAAa,mBAAmB,SAASC,EAAGC,KAAMC,iBAEP,CAErDC,eAAgB,SAASC,SAAUC,aAC3BC,QAAU,UACdN,EAAEO,KAAKF,SAAS,SAASG,MAAOC,QAC5BH,QAAQI,KAAK,CACTC,MAAOF,OAAOG,GACdC,MAAOJ,OAAOK,YAGfR,SAGXS,UAAW,SAASX,SAAUY,MAAOC,QAASC,aAEtCC,UAAYC,SAASpB,EAAEI,UAAUiB,KAAK,aAAc,IACpDC,SAAWtB,EAAEI,UAAUiB,KAAK,YAEtBpB,KAAKsB,KAAK,CAAC,CACjBC,WAAY,yBACZC,KAAM,CACFT,MAAOA,MACPU,QAAS,CAACP,UAAWA,WACrBG,SAAUA,aAGV,GAAGK,MAAK,SAAStB,aACjBuB,SAAW,GACXC,EAAI,SAGR7B,EAAEO,KAAKF,QAAQC,SAAS,SAASE,MAAOC,QACpCmB,SAASlB,KAAKR,UAAU4B,OAAO,0CAA2CrB,YAIvET,EAAE+B,KAAKC,MAAMhC,EAAE+B,KAAMH,UAAUD,MAAK,eACnCF,KAAOQ,UACXjC,EAAEO,KAAKF,QAAQC,SAAS,SAASE,MAAOC,QACpCA,OAAOK,OAASW,KAAKI,GACrBA,OAEJZ,QAAQZ,QAAQC,eAIrB4B,MAAMhB"}

Zerion Mini Shell 1.0