mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-59365 eslint: Noop changes for eslint
This commit is contained in:
parent
a78ed71c11
commit
2e1615f2c0
@ -1 +1 @@
|
||||
define(["jquery","core/ajax","core/templates"],function(a,b,c){return{processResults:function(b,c){var d=[];return a.each(c,function(a,b){d.push({value:b.id,label:b._label})}),d},transport:function(d,e,f,g){var h,i=a(d).attr("courseid");"undefined"==typeof i&&(i="1");var j=a(d).attr("enrolid");"undefined"==typeof j&&(j=""),h=b.call([{methodname:"core_enrol_get_potential_users",args:{courseid:i,enrolid:j,search:e,searchanywhere:!0,page:0,perpage:30}}]),h[0].then(function(b){var d=[],e=0;return a.each(b,function(b,e){var f=e,g=[];a.each(["idnumber","email","phone1","phone2","department","institution"],function(a,b){"undefined"!=typeof e[b]&&""!==e[b]&&(f.hasidentity=!0,g.push(e[b]))}),f.identity=g.join(", "),d.push(c.render("enrol_manual/form-user-selector-suggestion",f))}),a.when.apply(a.when,d).then(function(){var c=arguments;a.each(b,function(a,b){b._label=c[e],e++}),f(b)})},g)}}});
|
||||
define(["jquery","core/ajax","core/templates"],function(a,b,c){return{processResults:function(b,c){var d=[];return a.each(c,function(a,b){d.push({value:b.id,label:b._label})}),d},transport:function(d,e,f,g){var h,i=a(d).attr("courseid");"undefined"==typeof i&&(i="1");var j=a(d).attr("enrolid");"undefined"==typeof j&&(j=""),h=b.call([{methodname:"core_enrol_get_potential_users",args:{courseid:i,enrolid:j,search:e,searchanywhere:!0,page:0,perpage:30}}]),h[0].then(function(b){var d=[],e=0;return a.each(b,function(b,e){var f=e,g=[];a.each(["idnumber","email","phone1","phone2","department","institution"],function(a,b){"undefined"!=typeof e[b]&&""!==e[b]&&(f.hasidentity=!0,g.push(e[b]))}),f.identity=g.join(", "),d.push(c.render("enrol_manual/form-user-selector-suggestion",f))}),a.when.apply(a.when,d).then(function(){var c=arguments;a.each(b,function(a,b){b._label=c[e],e++}),f(b)})}).fail(g)}}});
|
@ -87,9 +87,10 @@ define(['jquery', 'core/ajax', 'core/templates'], function($, Ajax, Templates) {
|
||||
i++;
|
||||
});
|
||||
success(results);
|
||||
return;
|
||||
});
|
||||
|
||||
}, failure);
|
||||
}).fail(failure);
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -34,6 +34,7 @@ define(['core/templates',
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param {Object} options Object containing options. The only valid option at this time is contextid.
|
||||
* Each call to templates.render gets it's own instance of this class.
|
||||
*/
|
||||
var QuickEnrolment = function(options) {
|
||||
@ -82,6 +83,7 @@ define(['core/templates',
|
||||
* This triggers a form submission, so that any mform elements can do final tricks before the form submission is processed.
|
||||
*
|
||||
* @method submitForm
|
||||
* @param {Event} e Form submission event.
|
||||
* @private
|
||||
*/
|
||||
QuickEnrolment.prototype.submitForm = function(e) {
|
||||
@ -94,7 +96,7 @@ define(['core/templates',
|
||||
*
|
||||
* @method submitForm
|
||||
* @private
|
||||
* @return Promise
|
||||
* @param {Event} e Form submission event.
|
||||
*/
|
||||
QuickEnrolment.prototype.submitFormAjax = function(e) {
|
||||
// We don't want to do a real form submission.
|
||||
@ -126,6 +128,7 @@ define(['core/templates',
|
||||
}
|
||||
window.location.reload();
|
||||
}
|
||||
return;
|
||||
})
|
||||
.fail(Notification.exception);
|
||||
};
|
||||
@ -135,7 +138,7 @@ define(['core/templates',
|
||||
*
|
||||
* @method getBody
|
||||
* @private
|
||||
* @return Promise
|
||||
* @return {Promise}
|
||||
*/
|
||||
QuickEnrolment.prototype.getBody = function() {
|
||||
return Fragment.loadFragment('enrol_manual', 'enrol_users_form', this.contextid, {}).fail(Notification.exception);
|
||||
@ -146,7 +149,7 @@ define(['core/templates',
|
||||
*
|
||||
* @method getFooter
|
||||
* @private
|
||||
* @return Promise
|
||||
* @return {Promise}
|
||||
*/
|
||||
QuickEnrolment.prototype.getFooter = function() {
|
||||
return Template.render('enrol_manual/enrol_modal_footer', {});
|
||||
|
@ -59,7 +59,7 @@ define(['core/ajax', 'jquery'], function(ajax, $) {
|
||||
includes: 'parents',
|
||||
limitfrom: 0,
|
||||
limitnum: 100,
|
||||
context: { contextid: contextid }
|
||||
context: {contextid: contextid}
|
||||
};
|
||||
|
||||
var calls = [{
|
||||
|
Loading…
x
Reference in New Issue
Block a user