Permalink
Browse files

Added capability for Moodle to upgrade activity submodules automatically

  • Loading branch information...
1 parent 7827589 commit 1ef5fb388699bdd6060329cc29e0d173487afea2 moodler committed Jul 15, 2005
Showing with 13 additions and 1 deletion.
  1. +13 −1 lib/adminlib.php
View
@@ -214,7 +214,19 @@ function upgrade_activity_modules($return) {
error($module->name .' tables could NOT be set up successfully!');
}
}
-
+
+ /// Check submodules of this module if necessary
+
+ include_once($fullmod.'/lib.php'); // defines upgrading function
+
+ $submoduleupgrade = $module->name.'_upgrade_submodules';
+ if (function_exists($submoduleupgrade)) {
+ $submoduleupgrade();
+ }
+
+
+ /// Run any defaults or final code that is necessary for this module
+
if ( is_readable($fullmod .'/defaults.php')) {
// Insert default values for any important configuration variables
unset($defaults);

0 comments on commit 1ef5fb3

Please sign in to comment.