Patch submitted by Ethem:

Error message isn't shown when user clicked without key.
Multienrol is enabled (course enrol key with authorize)

This patch allows showing error message when user clicked button without key.
This commit is contained in:
stronk7
2006-09-03 20:16:24 +00:00
parent 71c143f41e
commit afc36fdf2e
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ class enrolment_plugin_authorize
{
global $CFG;
if (zero_cost($course) || (!empty($course->password) && !empty($form->password))) {
if (zero_cost($course) || (!empty($course->password) && !empty($form->password) && $form->enrol == 'manual')) {
$manual = enrolment_factory::factory('manual');
$manual->check_entry($form, $course);
if (!empty($manual->errormsg)) {
+1
View File
@@ -20,6 +20,7 @@
<td>
<input type="password" name="password" size="20" value="<?php p($password) ?>" />
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
<input type="hidden" name="enrol" value="manual" />
<input type="submit" value="<?php print_string("enrolme") ?>" />
</td>
</tr>