mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
enrol MDL-23384 fixed issue with cohort sync JavaScript not redirecting after successfully enrolling a cohort
This commit is contained in:
parent
690aa229c5
commit
57e8a9361f
@ -57,9 +57,7 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
this.set('centered', true);
|
||||
this.show();
|
||||
}, panel);
|
||||
this.on('hide', function() {
|
||||
this.hide();
|
||||
}, panel);
|
||||
this.on('hide', panel.hide, panel);
|
||||
this.on('performingaction', function(){
|
||||
this.get('boundingBox').append(Y.Node.create('<div class="performing-action"></div>').append(Y.Node.create('<img alt="loading" />').setAttribute('src', M.cfg.loadingicon)).setStyle('opacity', 0.5));
|
||||
}, panel);
|
||||
@ -198,9 +196,14 @@ YUI.add('moodle-enrol-quickcohortenrolment', function(Y) {
|
||||
if (result.error) {
|
||||
new M.core.ajaxException(result);
|
||||
} else {
|
||||
var redirect = function() {
|
||||
if (result.response.users) {
|
||||
window.location.href = this.get(URL);
|
||||
var redirecturl = this.get(URL), redirect = function() {
|
||||
if (!usersonly || result.response.users) {
|
||||
Y.one(document.body).append(
|
||||
Y.Node.create('<div class="corelightbox"></div>')
|
||||
.setStyle('height', Y.one(document.body).get('docHeight')+'px')
|
||||
.setStyle('opacity', '0.4')
|
||||
.append(Y.Node.create('<img alt="loading" />').setAttribute('src', M.cfg.loadingicon)));
|
||||
window.location.href = redirecturl;
|
||||
}
|
||||
}
|
||||
if (result.response && result.response.message) {
|
||||
|
@ -633,3 +633,6 @@ body.tag .managelink {padding: 5px;}
|
||||
.dir-rtl .mform .fitem .fitemtitle {float:right;}
|
||||
.dir-rtl .loginbox .loginform .form-label {float:right;text-align:left;}
|
||||
.dir-rtl .loginbox .loginform .form-input {text-align: right;}
|
||||
|
||||
.corelightbox {background-color:#CCC;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;}
|
||||
.corelightbox img {position:fixed;top:50%;}
|
Loading…
x
Reference in New Issue
Block a user