mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-48008 gradeimport_xml: report errors usefully
This commit is contained in:
parent
9ebee5df8e
commit
b4a40e451d
@ -48,7 +48,8 @@ raise_memory_limit(MEMORY_EXTRA);
|
||||
|
||||
$text = download_file_content($url);
|
||||
if ($text === false) {
|
||||
print_error('cannotreadfile');
|
||||
print_error('cannotreadfile', 'error',
|
||||
$CFG->wwwroot . '/grade/import/xml/index.php?id=' . $id, $url);
|
||||
}
|
||||
|
||||
$error = '';
|
||||
@ -75,7 +76,6 @@ if ($importcode !== false) {
|
||||
}
|
||||
|
||||
} else {
|
||||
print_error('error', 'gradeimport_xml');
|
||||
print_error('errorduringimport', 'gradeimport_xml',
|
||||
$CFG->wwwroot . '/grade/import/xml/index.php?id=' . $id, $error);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,6 +30,7 @@ $string['errincorrectgradeidnumber'] = 'Error - idnumber \'{$a}\' from the impor
|
||||
$string['errincorrectidnumber'] = 'Error - incorrect idnumber';
|
||||
$string['errincorrectuseridnumber'] = 'Error - idnumber \'{$a}\' from the import file does not match any user.';
|
||||
$string['error'] = 'Errors occur';
|
||||
$string['errorduringimport'] = 'An error occurred when trying to import: {$a}';
|
||||
$string['fileurl'] = 'Remote file URL';
|
||||
$string['pluginname'] = 'XML file';
|
||||
$string['xml:publish'] = 'Publish import grades from XML';
|
||||
|
Loading…
x
Reference in New Issue
Block a user