We want to allow quiz reports to add settings pages to the tree of admin settings pages.
- We think the pages should be sub pages of module / activity / quiz page.
- Unfortunately the current settings.php module hook does not allow us to do more than add fields to one page for a module.
- Don't want to interfere with how api currently works. So we introduce a new hook : settingstree.php and check for that before settings.php
Thoroughly tested :
- Links on module activity page to module settings still work.
- If module is disabled then the sub menu and general settigngs are all made invisible.
I attach :
- a patch to plugins.php to enable the new hook.
- and an example settingstree.php that scans quiz/report/ sub directories for settings.php files to add sub pages to menu for.
- and a screen shot of the menu with a sub menu for quiz report settings pages. The quiz module settings page is 'General Settings' under the main Quiz folder.