HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.0.30
System: Linux multiplicar 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64
User: root (0)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /var/www/html/sudameris.sumar.com.py/admin/tool/lp/amd/build/form-cohort-selector.min.js
/**
 * Cohort selector module.
 *
 * @module     tool_lp/form-cohort-selector
 * @copyright  2015 Frédéric Massart - FMCorz.net
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
define("tool_lp/form-cohort-selector",["jquery","core/ajax","core/templates"],(function($,Ajax,Templates){return{processResults:function(selector,results){var cohorts=[];return $.each(results,(function(index,cohort){cohorts.push({value:cohort.id,label:cohort._label})})),cohorts},transport:function(selector,query,success,failure){var contextid=parseInt($(selector).data("contextid"),10),includes=$(selector).data("includes");Ajax.call([{methodname:"tool_lp_search_cohorts",args:{query:query,context:{contextid:contextid},includes:includes}}])[0].then((function(results){var promises=[],i=0;return $.each(results.cohorts,(function(index,cohort){promises.push(Templates.render("tool_lp/form-cohort-selector-suggestion",cohort))})),$.when.apply($.when,promises).then((function(){var args=arguments;$.each(results.cohorts,(function(index,cohort){cohort._label=args[i],i++})),success(results.cohorts)}))})).catch(failure)}}}));

//# sourceMappingURL=form-cohort-selector.min.js.map