]> git.mjollnir.org Git - moodle.git/commitdiff
Interactive plugins (authorize and paypal ) must use 'manual'.
authorethem <ethem>
Thu, 29 Jun 2006 10:38:34 +0000 (10:38 +0000)
committerethem <ethem>
Thu, 29 Jun 2006 10:38:34 +0000 (10:38 +0000)
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

Merged from 16 stable.

enrol/authorize/enrol.php
enrol/authorize/locallib.php

index 15ed30bcaba3cd59f7bce68df982f0a894e9af57..2d633fe7db54b5774e604c4caf530b8ff2fa8f57 100755 (executable)
@@ -220,7 +220,7 @@ class enrolment_plugin_authorize
             else {
                 $timestart = $timenow;
                 $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");
             }
             return;
@@ -270,7 +270,7 @@ class enrolment_plugin_authorize
             $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);
             if (!empty($CFG->enrol_mailstudents)) {
                 $a = new stdClass;
@@ -762,7 +762,7 @@ class enrolment_plugin_authorize
                     $timestart = $timenow;
                     $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";
                     if (!empty($CFG->enrol_mailstudents)) {
                         $sendem[] = $order->id;
index 6b34ec9c2fe937125fce5ffd67c27156b31b05e1..411b42622f801cb360c33b4afd660340540a2c11 100644 (file)
@@ -235,7 +235,7 @@ function authorize_print_order_details($orderno)
                         $timestart = time(); // early start
                         $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);
                         $teacher = get_teacher($order->courseid);
                         $a = new stdClass;