Skip to content

Commit

Permalink
[multienrol]enrol/authorize: fix references to 'internal' method
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlanghoff committed Mar 9, 2006
1 parent a60952d commit 7ce85a1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions enrol/authorize/enrol.php
Expand Up @@ -36,10 +36,10 @@ function print_entry($course)
{ {
global $CFG, $USER, $form; global $CFG, $USER, $form;


if ($this->zero_cost($course) || isguest()) { if ($this->zero_cost($course) || isguest()) { // No money for guests ;)
$manual = enrolment_factory::factory('manual'); $internal = enrolment_factory::factory('internal');
$manual->print_entry($course); $internal->print_entry($course);
return; // No money for guests ;) return;
} }


$this->prevent_double_paid($course); $this->prevent_double_paid($course);
Expand All @@ -64,7 +64,7 @@ function print_entry($course)
if ($course->password) { if ($course->password) {
print_simple_box(get_string('choosemethod', 'enrol_authorize'), 'center'); print_simple_box(get_string('choosemethod', 'enrol_authorize'), 'center');
$password = ''; $password = '';
include $CFG->dirroot.'/enrol/manual/enrol.html'; include $CFG->dirroot.'/enrol/internal/enrol.html';
} }


print_simple_box_start('center'); print_simple_box_start('center');
Expand All @@ -83,9 +83,9 @@ function print_entry($course)
* @access public * @access public
*/ */
function check_entry($form, $course) { function check_entry($form, $course) {
if ((!empty($form->password)) || isguest() || $this->zero_cost($course)) { if ($this->zero_cost($course) || isguest() || (!empty($form->password))) {
$manual = enrolment_factory::factory('manual'); $internal = enrolment_factory::factory('internal');
$manual->check_entry($form, $course); $internal->print_entry($course);
} elseif ((!empty($form->ccsubmit)) && $this->validate_enrol_form($form)) { } elseif ((!empty($form->ccsubmit)) && $this->validate_enrol_form($form)) {
$this->cc_submit($form, $course); $this->cc_submit($form, $course);
} }
Expand Down Expand Up @@ -373,8 +373,9 @@ function get_course_cost($course)
*/ */
function get_access_icons($course) { function get_access_icons($course) {


$manual = enrolment_factory::factory('manual');
$str = $manual->get_access_icons($course); $internal = enrolment_factory::factory('internal');
$str = $internal->get_access_icons($course);
$curcost = $this->get_course_cost($course); $curcost = $this->get_course_cost($course);


if (abs($curcost['cost']) > 0.00) { if (abs($curcost['cost']) > 0.00) {
Expand Down Expand Up @@ -573,6 +574,8 @@ function check_openssl_loaded() {
function cron() function cron()
{ {
global $CFG; global $CFG;
$internal = enrolment_factory::factory('internal');
$internal->cron();
require_once $CFG->dirroot.'/enrol/authorize/action.php'; require_once $CFG->dirroot.'/enrol/authorize/action.php';


$oneday = 86400; $oneday = 86400;
Expand Down

0 comments on commit 7ce85a1

Please sign in to comment.