Current Path : C:/Users/Mahmood/Desktop/moodle8/search/amd/build/ |
Current File : C:/Users/Mahmood/Desktop/moodle8/search/amd/build/form-search-user-selector.min.js |
define ("core_search/form-search-user-selector",["jquery","core/ajax","core/templates"],function(a,b,c){return{processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.id,label:b._label})});return d},transport:function transport(d,e,f,g){var h,i={query:e},j=a(d).attr("withincourseid");if("undefined"!=typeof j&&""!==a("#id_searchwithin").val()){i.courseid=j}else{i.courseid=0}h=b.call([{methodname:"core_search_get_relevant_users",args:i}]);h[0].then(function(b){var d=[];a.each(b,function(a,b){d.push(c.render("core_search/form-user-selector-suggestion",b))});return a.when.apply(a.when,d).then(function(){var c=arguments,d=0;a.each(b,function(a,b){b._label=c[d++]});f(b)})}).fail(g)}}}); //# sourceMappingURL=form-search-user-selector.min.js.map