Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14637

allow activity modules to add sub menus of settings pages to admin menu

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.1
    • 1.9
    • Administration, Quiz
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      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.

        1. pluginspatch.txt
          2 kB
        2. ScreenShot004.gif
          ScreenShot004.gif
          32 kB
        3. settingstree.php
          2 kB

            skodak Petr Skoda (Inactive)
            jamiesensei Jamie Pratt
            Petr Skoda Petr Skoda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.