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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Administration, Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/May/08