What about additional records such as mnet services and RPC entries ? Would they be removed at uninstall time ?
Someone knows a code path to plugin some kind of "finalize()" feature in a module ?
Thanks.
// Perform any custom uninstall tasks if (file_exists($CFG->dirroot . '/mod/' . $module->name . '/lib.php')) { require_once($CFG->dirroot . '/mod/' . $module->name . '/lib.php'); $uninstallfunction = $module->name . '_uninstall'; if (function_exists($uninstallfunction)) { if (! $uninstallfunction() ) { notify('Encountered a problem running uninstall function for '. $module->name.'!'); } } }
Great !
just what I needed.
Thanks Tim.
Tim, I do not kown why (well, it is me ), but when we restore an old course, we sometimes see Phantom modules in the course: you see modules but when you click on them they do not exist.
(By deleting the module with instance 0 in the table course_modules, I can clean the interface, but is that enough?)