|
|
The new hook in 1.9 that allows a module to do some stuff post db install is awesome. However it would be more useful if the call was done later in the install process, once the site course is set-up.
Doing the call post site course set-up would allow module to make role overrides and on the site course and other such things and would basically maximise the usefulness of the hook.
I know nothing in core is using the hook, so unless there's a contrib module relying on the call it should be safe to move without breaking anything.
Any feedback is welcome.
|
|
Description
|
The new hook in 1.9 that allows a module to do some stuff post db install is awesome. However it would be more useful if the call was done later in the install process, once the site course is set-up.
Doing the call post site course set-up would allow module to make role overrides and on the site course and other such things and would basically maximise the usefulness of the hook.
I know nothing in core is using the hook, so unless there's a contrib module relying on the call it should be safe to move without breaking anything.
Any feedback is welcome. |
Show » |
|
What about to add two new hooks to modules, say:
newmodule_after_course_creation($course)
newmodule_before_course_deletion($course)
(I've added both just to have them balanced, you can safely ignore the 2nd one)
The cause for this alternative, is that I really think the current newmodule_install() and newmodule_uninstall() are being executed in the correct place now. And moving them after site creation sounds really too much specific for me (while the proposal above sounds more general).
Also, I think we should start introducing the "after/before" or "post/pre" nomenclature to all hooks (plus documenting them) ASAP. It really helps understanding when they are executed.
Just my opinion. Also... suggesting this for 1.9.1... MD has the last word. Ciao