Merge branch 'MDL-51117-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
David Monllao 2016-02-16 13:26:37 +08:00
commit b018aec5da
4 changed files with 11 additions and 7 deletions

View File

@ -743,7 +743,7 @@ M.course_dndupload = {
var self = this;
if (file.size > this.maxbytes) {
alert("'"+file.name+"' "+M.util.get_string('filetoolarge', 'moodle'));
new M.core.alert({message: M.util.get_string('namedfiletoolarge', 'moodle', {filename: file.name})});
return;
}
@ -777,11 +777,11 @@ M.course_dndupload = {
} else {
// Error - remove the dummy element
resel.parent.removeChild(resel.li);
alert(result.error);
new M.core.alert({message: result.error});
}
}
} else {
alert(M.util.get_string('servererror', 'moodle'));
new M.core.alert({message: M.util.get_string('servererror', 'moodle')});
}
}
};
@ -1002,11 +1002,11 @@ M.course_dndupload = {
} else {
// Error - remove the dummy element
resel.parent.removeChild(resel.li);
alert(result.error);
new M.core.alert({message: result.error});
}
}
} else {
alert(M.util.get_string('servererror', 'moodle'));
new M.core.alert({message: M.util.get_string('servererror', 'moodle')});
}
}
};

View File

@ -61,7 +61,7 @@ function dndupload_add_to_course($course, $modnames) {
array('dndworkingtextlink', 'moodle'),
array('dndworkingtext', 'moodle'),
array('dndworkinglink', 'moodle'),
array('filetoolarge', 'moodle'),
array('namedfiletoolarge', 'moodle'),
array('actionchoice', 'moodle'),
array('servererror', 'moodle'),
array('upload', 'moodle'),

View File

@ -27,3 +27,4 @@ othertags,core_tag
tagtype,core_tag
manageofficialtags,core_tag
settypeofficial,core_tag
filetoolarge,core

View File

@ -775,7 +775,6 @@ $string['feedback'] = 'Feedback';
$string['file'] = 'File';
$string['fileexists'] = 'There is already a file called {$a}';
$string['filemissing'] = '{$a} is missing';
$string['filetoolarge'] = 'is too large to upload';
$string['files'] = 'Files';
$string['filesanduploads'] = 'Files and uploads';
$string['filesfolders'] = 'Files/folders';
@ -1226,6 +1225,7 @@ $string['myhome'] = 'Dashboard';
$string['mymoodledashboard'] = 'My Moodle dashboard';
$string['myprofile'] = 'My profile';
$string['name'] = 'Name';
$string['namedfiletoolarge'] = 'The file \'{$a->filename}\' is too large and cannot be uploaded';
$string['nameforlink'] = 'What do you want to call this link?';
$string['nameforpage'] = 'Name';
$string['navigation'] = 'Navigation';
@ -2052,3 +2052,6 @@ $string['yourself'] = 'yourself';
$string['yourteacher'] = 'your {$a}';
$string['yourwordforx'] = 'Your word for \'{$a}\'';
$string['zippingbackup'] = 'Zipping backup';
// Deprecated since Moodle 3.1.
$string['filetoolarge'] = 'is too large to upload';