MDL-46548 grades: Add warning to export form when users with no idnumber are excluded.

This commit is contained in:
Damyon Wiese 2014-07-31 15:35:28 +08:00
parent 97908a2225
commit 6c6d05a651
3 changed files with 6 additions and 1 deletions

View File

@ -37,6 +37,11 @@ class grade_export_form extends moodleform {
if (empty($features['simpleui'])) {
debugging('Grade export plugin needs updating to support one step exports.', DEBUG_DEVELOPER);
}
if (!empty($features['idnumberrequired'])) {
$mform->addElement('header', 'warnings', get_string('warning', 'moodle'));
$mform->setExpanded('warnings', true);
$mform->addElement('static', 'idnumberwarning', get_string('useridnumberwarning', 'grades'));
}
$mform->addElement('header', 'options', get_string('exportformatoptions', 'grades'));
if (!empty($features['simpleui'])) {

View File

@ -26,4 +26,3 @@
$string['pluginname'] = 'XML file';
$string['xml:publish'] = 'Publish XML grade export';
$string['xml:view'] = 'Use XML grade export';
$string['useridnumberwarning'] = 'User\'s without an ID number are excluded from the XML export as they cannot be imported';

View File

@ -683,6 +683,7 @@ $string['usepercent'] = 'Use percent';
$string['user'] = 'User';
$string['usergrade'] = 'User {$a->fullname} ({$a->useridnumber}) on item {$a->gradeidnumber}';
$string['userid'] = 'User ID';
$string['useridnumberwarning'] = 'Users without an ID number are excluded from the export as they cannot be imported';
$string['usermappingerror'] = 'User mapping error: Could not find user with {$a->field} of "{$a->value}".';
$string['usermappingerrorusernotfound'] = 'User mapping error. Could not find user.';
$string['usermappingerrorcurrentgroup'] = 'User is not a member of current group.';