mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-33842_antivirus_message' of git://github.com/davosmith/moodle
This commit is contained in:
commit
f189c540b9
@ -717,14 +717,6 @@ M.form_dndupload.init = function(Y, options) {
|
||||
this.callback(lastresult);
|
||||
},
|
||||
|
||||
/**
|
||||
* Log any errors generated
|
||||
*/
|
||||
add_error: function(text, errorlevel) {
|
||||
// TODO
|
||||
console.log(text);
|
||||
},
|
||||
|
||||
/**
|
||||
* Upload a single file via an AJAX call to the 'upload' repository. Automatically
|
||||
* calls do_upload as each upload completes.
|
||||
@ -748,7 +740,8 @@ M.form_dndupload.init = function(Y, options) {
|
||||
var result = JSON.parse(xhr.responseText);
|
||||
if (result) {
|
||||
if (result.error) {
|
||||
self.add_error(result.error); // TODO add filename?
|
||||
self.print_msg(result.error, 'error'); // TODO add filename?
|
||||
self.uploadfinished();
|
||||
} else {
|
||||
// Only update the filepicker if there were no errors
|
||||
if (result.event == 'fileexists') {
|
||||
@ -760,11 +753,10 @@ M.form_dndupload.init = function(Y, options) {
|
||||
result.client_id = self.options.clientid;
|
||||
}
|
||||
}
|
||||
self.processedfiles++;
|
||||
self.do_upload(result); // continue uploading
|
||||
} else {
|
||||
self.add_error(M.util.get_string('serverconnection', 'error'));
|
||||
this.uploadfinished();
|
||||
self.print_msg(M.util.get_string('serverconnection', 'error'), 'error');
|
||||
self.uploadfinished();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user