Skip to content

Commit

Permalink
MDL-72488 lang: Fix hard-coded English string at grades import form
Browse files Browse the repository at this point in the history
Also adding a help tooltip as this seems to be the most important field
in the form and yet it was the only one without a help.
  • Loading branch information
mudrd8mz committed Sep 6, 2021
1 parent 206023c commit 2a1a00d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grade/import/direct/classes/import_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public function definition() {

$mform->addElement('header', 'general', get_string('pluginname', 'gradeimport_direct'));
// Data upload from copy/paste.
$mform->addElement('textarea', 'userdata', 'Data', array('rows' => 10, 'class' => 'gradeimport_data_area'));
$mform->addElement('textarea', 'userdata', get_string('importdata', 'core_grades'),
array('rows' => 10, 'class' => 'gradeimport_data_area'));
$mform->addHelpButton('userdata', 'importdata', 'core_grades');
$mform->addRule('userdata', null, 'required');
$mform->setType('userdata', PARAM_RAW);

Expand Down
9 changes: 9 additions & 0 deletions lang/en/grades.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,15 @@
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['importdata'] = 'Data';
$string['importdata_help'] = 'Grades may be pasted directly from an OpenDocument or Excel spreadsheet with format as follows:
* At least one column should contain user identity data - username, email address or ID number.
* Other columns should have headings as for existing activities or grade items.
A correctly formatted spreadsheet can be obtained by first exporting some grades. The spreadsheet can then be edited to add more grades and saved.
Select and copy the columns you want to import from the spreadsheet and then paste them into this field.';
$string['importerror'] = 'An error occurred, this script wasn\'t called with the right parameters.';
$string['importfailed'] = 'Import failed. No data was imported.';
$string['importfeedback'] = 'Import feedback';
Expand Down

0 comments on commit 2a1a00d

Please sign in to comment.