Current Path : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/ |
Current File : C:/xampp/htdocs/moodle/admin/tool/lp/amd/build/form-user-selector.min.js |
define ("tool_lp/form-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=a(d).data("capability");if("undefined"==typeof i){i=""}h=b.call([{methodname:"tool_lp_search_users",args:{query:e,capability:i}}]);h[0].then(function(b){var d=[],e=0;a.each(b.users,function(b,e){var f=e,g=[];a.each(["idnumber","email","phone1","phone2","department","institution"],function(a,b){if("undefined"!=typeof e[b]&&""!==e[b]){f.hasidentity=!0;g.push(e[b])}});f.identity=g.join(", ");d.push(c.render("tool_lp/form-user-selector-suggestion",f))});return a.when.apply(a.when,d).then(function(){var c=arguments;a.each(b.users,function(a,b){b._label=c[e];e++});f(b.users)})}).catch(g)}}}); //# sourceMappingURL=form-user-selector.min.js.map