From afc36fdf2ee2bc3be7215d2f3cb9c58f10550740 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 3 Sep 2006 20:16:24 +0000 Subject: [PATCH] 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. --- enrol/authorize/enrol.php | 2 +- enrol/manual/enrol.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index d7986156f5..a3a6a8b63a 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -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)) { diff --git a/enrol/manual/enrol.html b/enrol/manual/enrol.html index b2f34aad2d..c3f563d45c 100644 --- a/enrol/manual/enrol.html +++ b/enrol/manual/enrol.html @@ -20,6 +20,7 @@ + " /> -- 2.39.5