Skip to content
Browse files

Set default enrolment plugin to manual if the previous default is not…

… an interactive enrolment plugin
  • Loading branch information...
1 parent f182aaf commit cd9afe2ff6fdd0b669acf64a2d88b01b7d678bf9 patrickslee committed Mar 14, 2006
Showing with 17 additions and 1 deletion.
  1. +8 −0 lib/db/mysql.php
  2. +8 −0 lib/db/postgres7.php
  3. +1 −1 version.php
View
8 lib/db/mysql.php
@@ -1722,6 +1722,14 @@ function main_upgrade($oldversion=0) {
) TYPE=MyISAM COMMENT ='tag instance for blogs.';");
}
+ if ($oldversion < 2006031400) {
+ require_once("$CFG->dirroot/enrol/enrol.class.php");
+ $defaultenrol = enrolment_factory::factory($CFG->enrol);
+ if (!method_exists($defaultenrol, 'print_entry')) {
+ set_config('enrol', 'manual');
+ }
+ }
+
return $result;
}
View
8 lib/db/postgres7.php
@@ -1463,6 +1463,14 @@ function main_upgrade($oldversion=0) {
);");
}
+ if ($oldversion < 2006031400) {
+ require_once("$CFG->dirroot/enrol/enrol.class.php");
+ $defaultenrol = enrolment_factory::factory($CFG->enrol);
+ if (!method_exists($defaultenrol, 'print_entry')) {
+ set_config('enrol', 'manual');
+ }
+ }
+
return $result;
}
View
2 version.php
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2006031000; // YYYYMMDD = date
+ $version = 2006031400; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.6 development'; // Human-friendly version name

0 comments on commit cd9afe2

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