Skip to content

Commit

Permalink
Set default enrolment plugin to manual if the previous default is not…
Browse files Browse the repository at this point in the history
… an interactive enrolment plugin
  • Loading branch information
patrickslee committed Mar 14, 2006
1 parent f182aaf commit cd9afe2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/db/mysql.php
Expand Up @@ -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;
}

Expand Down
8 changes: 8 additions & 0 deletions lib/db/postgres7.php
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -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
Expand Down

0 comments on commit cd9afe2

Please sign in to comment.