This commit is contained in:
Huong Nguyen 2024-11-28 10:21:07 +07:00
commit 9bfa5c2b65
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -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);