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

Implement a hook to dinamically add/handle new tabs...

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Other
    • Labels:
    • Environment:
      any
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE

      Description

      Currently (<=1.8), display of tabs across modules/blocks... is handled, mainly by admin/roles/tabs.php.

      With some more subsystems arriving (gradebook, conditional activities...) I would suggest to:

      1) Add one simple hack to current admin/roles/tabs.php in order to allow new tabs to be used (based in some $CFG->extratabs variable). It would allow to display some custom tabs is a easy a safe way. I've attached the required patch to hack admin/roles/tabs.php. Also, I've attached one silly module (for now) that could take advantage of the hook. In order to see how it works:

      • Install the metalom module (standard way).
      • Define $CFG->extratabs = 'mod/metalom/tabs.php'; in config.php
      • Go to any module configure page, you'll see a perfectly integrated new "metadata" tab (that does nothing but handling the tabs).

      2) I would move that entire admin/roles/tabs.php to a more centric place in fact it not only controls role tabs but any context tabs.

      So:

      a) Could be (1) hacked for 18_STABLE? Doesn't seems to be risky at all and it could help me to further develop the metalom module.
      b) Should 2 be performed under HEAD? It's not critical to be moved but perhaps its place should be another one. Any alternative?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: