Skip to content

Commit

Permalink
Merge branch 'MDL-61177-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Jan 11, 2018
2 parents 197672e + 57e226b commit 9b49ac2
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions badges/backpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,22 @@ function check_site_access() {
var callback = {
method: "GET",
on: {
success: function(id, o, args) {
var data = Y.JSON.parse(o.responseText);
if (data.code == 'http-unreachable') {
add.setHTML(data.response);
add.removeClass('hide');
}
},
failure: function(o) { }
success: function(id, o) {
var data = Y.JSON.parse(o.responseText);
if (data.code == 'http-unreachable') {
add.setHTML(data.response);
add.removeClass('hide');
}
M.util.js_complete('badge/backpack::check_site_access');
},
failure: function() {
M.util.js_complete('badge/backpack::check_site_access');
}
}
};

Y.use('io-base', function(Y) {
M.util.js_pending('badge/backpack::check_site_access');
Y.io('ajax.php', callback);
});

Expand Down

0 comments on commit 9b49ac2

Please sign in to comment.