mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Merge branch 'MDL-46600_import_failed_26' of git://github.com/andyjdavis/moodle into MOODLE_26_STABLE
This commit is contained in:
commit
a17f12e801
2 changed files with 6 additions and 4 deletions
|
@ -299,7 +299,7 @@ if ($formdata = $mform2->get_data()) {
|
|||
// had to pick mapping
|
||||
$status = false;
|
||||
import_cleanup($importcode);
|
||||
echo $OUTPUT->notification(get_string('importfailed', 'grades'));
|
||||
// Relying on the default import failed message below.
|
||||
break 3;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ if ($formdata = $mform2->get_data()) {
|
|||
// had to pick mapping
|
||||
$status = false;
|
||||
import_cleanup($importcode);
|
||||
echo $OUTPUT->notification(get_string('importfailed', 'grades'));
|
||||
// Relying on the default import failed message below.
|
||||
break 3;
|
||||
}
|
||||
|
||||
|
@ -445,9 +445,11 @@ if ($formdata = $mform2->get_data()) {
|
|||
/// at this stage if things are all ok, we commit the changes from temp table
|
||||
if ($status) {
|
||||
grade_import_commit($course->id, $importcode);
|
||||
} else {
|
||||
echo $OUTPUT->notification(get_string('importfailed', 'grades'));
|
||||
}
|
||||
} else {
|
||||
// If data hasn't been submitted then display the data mapping form.
|
||||
$mform2->display();
|
||||
echo $OUTPUT->footer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ $string['import'] = 'Import';
|
|||
$string['importcsv'] = 'Import CSV';
|
||||
$string['importcustom'] = 'Import as custom outcomes (only this course)';
|
||||
$string['importerror'] = 'An error occurred, this script wasn\'t called with the right parameters.';
|
||||
$string['importfailed'] = 'Import failed';
|
||||
$string['importfailed'] = 'Import failed. No data was imported.';
|
||||
$string['importfeedback'] = 'Import feedback';
|
||||
$string['importfile'] = 'Import file';
|
||||
$string['importfilemissing'] = 'No file was received, go back to the form and make sure to upload a valid file.';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue