Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Interactive plugins (authorize and paypal ) must use 'manual'.

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
commit e99b6fb404769d04fa134c7c520a9e37e5c32d0a 1 parent a395180
ethem authored
6 enrol/authorize/enrol.php
@@ -220,7 +220,7 @@ function cc_submit($form, $course)
220 220 else {
221 221 $timestart = $timenow;
222 222 $timeend = $timestart + (3600 * 24); // just enrol for 1 days :)
223   - enrol_student($USER->id, $course->id, $timestart, $timeend, 'authorize');
  223 + enrol_student($USER->id, $course->id, $timestart, $timeend, 'manual');
224 224 redirect("$CFG->wwwroot/course/view.php?id=$course->id");
225 225 }
226 226 return;
@@ -270,7 +270,7 @@ function cc_submit($form, $course)
270 270 $timestart = $timeend = 0;
271 271 }
272 272
273   - if (enrol_student($USER->id, $course->id, $timestart, $timeend, 'authorize')) {
  273 + if (enrol_student($USER->id, $course->id, $timestart, $timeend, 'manual')) {
274 274 $teacher = get_teacher($course->id);
275 275 if (!empty($CFG->enrol_mailstudents)) {
276 276 $a = new stdClass;
@@ -762,7 +762,7 @@ function cron()
762 762 $timestart = $timenow;
763 763 $timeend = $order->settletime + $order->enrolperiod;
764 764 }
765   - if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'authorize')) {
  765 + if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')) {
766 766 $this->log .= "User($order->userid) has been enrolled to course($order->courseid).\n";
767 767 if (!empty($CFG->enrol_mailstudents)) {
768 768 $sendem[] = $order->id;
2  enrol/authorize/locallib.php
@@ -235,7 +235,7 @@ function authorize_print_order_details($orderno)
235 235 $timestart = time(); // early start
236 236 $timeend = $order->settletime + $order->enrolperiod; // lately end
237 237 }
238   - if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'authorize')) {
  238 + if (enrol_student($order->userid, $order->courseid, $timestart, $timeend, 'manual')) {
239 239 $user = get_record('user', 'id', $order->userid);
240 240 $teacher = get_teacher($order->courseid);
241 241 $a = new stdClass;

0 comments on commit e99b6fb

Please sign in to comment.
Something went wrong with that request. Please try again.