</td>
</tr>
+<tr>
+ <td align="right">enrol_manual_showhint:</td>
+ <td>
+<?php
+ $choices = array();
+ $choices['0'] = get_string('no');
+ $choices['1'] = get_string('yes');
+ choose_from_menu ($choices, 'enrol_manual_showhint', $frm->enrol_manual_showhint, '');
+?>
+ </td><td>
+ <?php print_string('enrol_manual_showhint', 'enrol_manual') ?>
+ </td>
+</tr>
+
</table>
redirect($destination);
+ } else if (!isset($CFG->enrol_manual_showhint) or $CFG->enrol_manual_showhint) {
+ $this->errormsg = get_string('enrolmentkeyhint', '', substr($course->password, 0, 1));
+
} else {
- $this->errormsg = get_string('enrolmentkeyhint', '', substr($course->password,0,1));
+ $this->errormsg = get_string('enrolmentkeyerror', 'enrol_manual');
}
}
$frm->enrol_manual_keyholderrole = '';
}
+ if (!isset($frm->enrol_manual_showhint)) {
+ $frm->enrol_manual_showhint = 1;
+ }
+
include ("$CFG->dirroot/enrol/manual/config.html");
}
<li>A course can have a password defined, known as an \"enrolment key\". Anyone who knows this key is
able to add themselves to a course.</li>
</ul>';
+$string['enrolmentkeyerror'] = 'That enrolment key was incorrect, please try again.';
$string['enrolname'] = 'Internal Enrolment';
+$string['enrol_manual_showhint'] = 'Enable this setting to reveal the first character of the enrolment key as a hint if one enters an incorrect key.';
$string['keyholderrole' ] = 'The role of the user that holds the enrolment key for a course. Displayed to students attempting to enrol on the course.';
?>