Merge branch 'MDL-46600_import_failed_26' of git://github.com/andyjdavis/moodle into MOODLE_26_STABLE

This commit is contained in:
Marina Glancy 2014-08-12 15:02:51 +08:00
commit a17f12e801
2 changed files with 6 additions and 4 deletions

View file

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

View file

@ -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.';