MDL-56585 tool_lpimportcsv: adjust help popups

This commit is contained in:
Dan Poltawski 2016-11-09 16:11:41 +00:00
parent 258d07d37e
commit 2c212753fe
2 changed files with 3 additions and 4 deletions

View File

@ -52,6 +52,7 @@ class import extends moodleform {
$mform = $this->_form;
$element = $mform->createElement('filepicker', 'importfile', get_string('importfile', 'tool_lpimportcsv'));
$mform->addElement($element);
$mform->addHelpButton('importfile', 'importfile', 'tool_lpimportcsv');
$mform->addRule('importfile', null, 'required');
$mform->addElement('hidden', 'confirm', 0);
$mform->setType('confirm', PARAM_BOOL);
@ -65,12 +66,10 @@ class import extends moodleform {
} else {
$mform->setDefault('delimiter_name', 'comma');
}
$mform->addHelpButton('delimiter_name', 'csvdelimiter', 'tool_lpimportcsv');
$choices = core_text::get_encodings();
$mform->addElement('select', 'encoding', get_string('encoding', 'tool_lpimportcsv'), $choices);
$mform->setDefault('encoding', 'UTF-8');
$mform->addHelpButton('encoding', 'encoding', 'tool_lpimportcsv');
$this->add_action_buttons(false, get_string('import', 'tool_lpimportcsv'));
}

View File

@ -27,16 +27,16 @@ $string['competencyscaledescription'] = 'Competency scale created by import';
$string['confirmcolumnmappings'] = 'Confirm the column mappings';
$string['confirm'] = 'Confirm';
$string['csvdelimiter'] = 'CSV delimiter';
$string['csvdelimiter_help'] = 'The CSV delimiter is normally a comma.';
$string['description'] = 'Description';
$string['descriptionformat'] = 'Description format';
$string['encoding'] = 'Encoding';
$string['encoding_help'] = 'The CSV file encoding is usually UTF-8.';
$string['export'] = 'Export';
$string['exportid'] = 'Exported ID (optional)';
$string['exportnavlink'] = 'Export competency framework';
$string['idnumber'] = 'ID number';
$string['importfile'] = 'CSV framework description file';
$string['importfile_help'] = 'A competency framework may be imported via text file. The format of the file can be determined by creating a new competency framework on the site and then exporting it.';
$string['importfile_link'] = 'admin/tool/lpimportcsv';
$string['import'] = 'Import';
$string['invalidimportfile'] = 'File format is invalid.';
$string['isframework'] = 'Is framework';