Skip to content

Commit

Permalink
Merge branch 'MDL-83653' of https://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
HuongNV13 committed Nov 28, 2024
2 parents d3a0d5c + 09aacaf commit 9bfa5c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/form/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ M.form_filemanager.init = function(Y, options) {
var data = null;
try {
data = Y.JSON.parse(o.responseText);
if (data.error) {
Y.use('moodle-core-notification-ajaxexception', function() {
return new M.core.ajaxException(data);
});
return;
}
} catch(e) {
scope.print_msg(M.util.get_string('invalidjson', 'repository'), 'error');
Y.error(M.util.get_string('invalidjson', 'repository')+":\n"+o.responseText);
Expand Down

0 comments on commit 9bfa5c2

Please sign in to comment.