Skip to content

Commit

Permalink
Interactive plugins (authorize and paypal ) must use 'manual'.
Browse files Browse the repository at this point in the history
Some patches must be applied to lib/db.
http://moodle.org/bugs/bug.php?op=show&bugid=5941
Look: version.patch, lib_db.patch

Eloy, your question about enrol fields for interactive plugins were solved.
Now, we sure we never use authorize and paypal field for backup and restore.
Because manual is active and cannot be disabled when restoring.
Bug #5358 - Add support for enrol systems in backup/restore
http://moodle.org/bugs/bug.php?op=show&bugid=5358&pos=0
  • Loading branch information
ethem committed Jun 29, 2006
1 parent a395180 commit e99b6fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions enrol/authorize/enrol.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function cc_submit($form, $course)
else { else {
$timestart = $timenow; $timestart = $timenow;
$timeend = $timestart + (3600 * 24); // just enrol for 1 days :) $timeend = $timestart + (3600 * 24); // just enrol for 1 days :)
enrol_student($USER->id, $course->id, $timestart, $timeend, 'authorize'); enrol_student($USER->id, $course->id, $timestart, $timeend, 'manual');
redirect("$CFG->wwwroot/course/view.php?id=$course->id"); redirect("$CFG->wwwroot/course/view.php?id=$course->id");
} }
return; return;
Expand Down Expand Up @@ -270,7 +270,7 @@ function cc_submit($form, $course)
$timestart = $timeend = 0; $timestart = $timeend = 0;
} }


if (enrol_student($USER->id, $course->id, $timestart, $timeend, 'authorize')) { if (enrol_student($USER->id, $course->id, $timestart, $timeend, 'manual')) {
$teacher = get_teacher($course->id); $teacher = get_teacher($course->id);
if (!empty($CFG->enrol_mailstudents)) { if (!empty($CFG->enrol_mailstudents)) {
$a = new stdClass; $a = new stdClass;
Expand Down Expand Up @@ -762,7 +762,7 @@ function cron()
$timestart = $timenow; $timestart = $timenow;
$timeend = $order->settletime + $order->enrolperiod; $timeend = $order->settletime + $order->enrolperiod;
} }
if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'authorize')) { if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')) {
$this->log .= "User($order->userid) has been enrolled to course($order->courseid).\n"; $this->log .= "User($order->userid) has been enrolled to course($order->courseid).\n";
if (!empty($CFG->enrol_mailstudents)) { if (!empty($CFG->enrol_mailstudents)) {
$sendem[] = $order->id; $sendem[] = $order->id;
Expand Down
2 changes: 1 addition & 1 deletion enrol/authorize/locallib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function authorize_print_order_details($orderno)
$timestart = time(); // early start $timestart = time(); // early start
$timeend = $order->settletime + $order->enrolperiod; // lately end $timeend = $order->settletime + $order->enrolperiod; // lately end
} }
if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'authorize')) { if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')) {
$user = get_record('user', 'id', $order->userid); $user = get_record('user', 'id', $order->userid);
$teacher = get_teacher($order->courseid); $teacher = get_teacher($order->courseid);
$a = new stdClass; $a = new stdClass;
Expand Down

0 comments on commit e99b6fb

Please sign in to comment.