mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-50834' of https://github.com/danielneis/moodle
This commit is contained in:
commit
8b56685253
@ -56,6 +56,7 @@ class grade_import_form extends moodleform {
|
||||
$mform->addElement('text', 'url', get_string('fileurl', 'gradeimport_xml'), 'size="80"');
|
||||
$mform->setType('url', PARAM_URL);
|
||||
$mform->disabledIf('url', 'userfile', 'noteq', '');
|
||||
$mform->addHelpButton('url', 'fileurl', 'gradeimport_xml');
|
||||
|
||||
if (!empty($CFG->gradepublishing)) {
|
||||
$mform->addElement('header', 'publishing', get_string('publishing', 'grades'));
|
||||
|
@ -51,7 +51,8 @@ if ($data = $mform->get_data()) {
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
|
||||
if ($text = $mform->get_file_content('userfile')) {
|
||||
print_grade_page_head($COURSE->id, 'import', 'xml', get_string('importxml', 'grades'));
|
||||
print_grade_page_head($COURSE->id, 'import', 'xml',
|
||||
get_string('importxml', 'grades'), false, false, true, 'importxml', 'gradeimport_xml');
|
||||
|
||||
$error = '';
|
||||
$importcode = import_xml_grades($text, $course, $error);
|
||||
@ -74,7 +75,8 @@ if ($data = $mform->get_data()) {
|
||||
$data->key = create_user_key('grade/import', $USER->id, $course->id, $data->iprestriction, $data->validuntil);
|
||||
}
|
||||
|
||||
print_grade_page_head($COURSE->id, 'import', 'xml', get_string('importxml', 'grades'));
|
||||
print_grade_page_head($COURSE->id, 'import', 'xml',
|
||||
get_string('importxml', 'grades'), false, false, true, 'importxml', 'gradeimport_xml');
|
||||
|
||||
echo '<div class="gradeexportlink">';
|
||||
$link = $CFG->wwwroot.'/grade/import/xml/fetch.php?id='.$id.'&feedback='.(int)($data->feedback).'&url='.urlencode($data->url).'&key='.$data->key;
|
||||
@ -85,10 +87,9 @@ if ($data = $mform->get_data()) {
|
||||
}
|
||||
}
|
||||
|
||||
print_grade_page_head($COURSE->id, 'import', 'xml', get_string('importxml', 'grades'));
|
||||
print_grade_page_head($COURSE->id, 'import', 'xml',
|
||||
get_string('importxml', 'grades'), false, false, true, 'importxml', 'gradeimport_xml');
|
||||
|
||||
$mform->display();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
|
@ -32,6 +32,10 @@ $string['errincorrectuseridnumber'] = 'Error - idnumber \'{$a}\' from the import
|
||||
$string['error'] = 'Errors occur';
|
||||
$string['errorduringimport'] = 'An error occurred when trying to import: {$a}';
|
||||
$string['fileurl'] = 'Remote file URL';
|
||||
$string['fileurl_help'] = 'The remote file URL field is for fetching data from a remote server, such as a student information system.';
|
||||
$string['pluginname'] = 'XML file';
|
||||
$string['xml:publish'] = 'Publish import grades from XML';
|
||||
$string['xml:view'] = 'Import grades from XML';
|
||||
$string['importxml'] = 'XML import';
|
||||
$string['importxml_help'] = 'Grades can be imported via an XML file containing user ID numbers and activity ID numbers. To obtain the correct format, first export some grades to XML file then view the file.';
|
||||
$string['importxml_link'] = 'grade/import/xml/index';
|
||||
|
@ -385,6 +385,7 @@ $string['importcsv_help'] = 'Grades can be imported via a CSV file with format a
|
||||
* A fieldname containing user identity data is required - either username or ID number or email address
|
||||
|
||||
A file of the correct format can be obtained by first exporting some grades. The file can then be edited and saved as a CSV file.';
|
||||
$string['importcsv_link'] = 'grade/import/csv/index';
|
||||
$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. No data was imported.';
|
||||
|
Loading…
x
Reference in New Issue
Block a user