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:
@@ -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)) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user