mechanism to install events

This commit is contained in:
toyomoyo
2007-04-19 08:45:30 +00:00
parent c3af90961c
commit 0856223c50
5 changed files with 165 additions and 1 deletions
+6
View File
@@ -114,6 +114,8 @@ function upgrade_plugins($type, $dir, $return) {
if (!update_capabilities($type.'/'.$plug)) {
error('Could not set up the capabilities for '.$module->name.'!');
}
events_update_definition($type.'/'.$plug);
notify(get_string('modulesuccess', '', $plugin->name), 'notifysuccess');
} else {
notify('Installing '. $plugin->name .' FAILED!');
@@ -151,6 +153,7 @@ function upgrade_plugins($type, $dir, $return) {
if (!update_capabilities($type.'/'.$plug)) {
error('Could not update '.$plugin->name.' capabilities!');
}
events_update_definition($type.'/'.$plug);
notify(get_string('modulesuccess', '', $plugin->name), 'notifysuccess');
} else {
notify('Upgrading '. $plugin->name .' from '. $CFG->$pluginversion .' to '. $plugin->version .' FAILED!');
@@ -303,6 +306,7 @@ function upgrade_activity_modules($return) {
if (!update_capabilities('mod/'.$module->name)) {
error('Could not update '.$module->name.' capabilities!');
}
events_update_definition('mod/'.$module->name);
$updated_modules = true;
@@ -337,6 +341,8 @@ function upgrade_activity_modules($return) {
if (!update_capabilities('mod/'.$module->name)) {
error('Could not set up the capabilities for '.$module->name.'!');
}
events_update_definition('mod/'.$module->name);
notify(get_string('modulesuccess', '', $module->name), 'notifysuccess');
echo '<hr />';
} else {