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

Deprecate support for local plugin navigation callback without the local_ prefix.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide
      1. Install a local plugin (I recommend Marina's moodlecheck)
      2. Create a lib.php file within the local plugin if there isn't already one.
      3. Do one of the following:
        • If local_pluginname_extends_navigation exists rename it to pluginname_extends_navigation
        • Create a function in lib.php called pluginname_extends_navigation with no args that does nothing.
      4. Browse to your site (any page with navigation block)
      5. Check you get a debug notice.
      Show
      Install a local plugin (I recommend Marina's moodlecheck) Create a lib.php file within the local plugin if there isn't already one. Do one of the following: If local_pluginname_extends_navigation exists rename it to pluginname_extends_navigation Create a function in lib.php called pluginname_extends_navigation with no args that does nothing. Browse to your site (any page with navigation block) Check you get a debug notice.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-33720-m24

      Description

      Presently we have the following two navigation callbacks:

      function local_nicehack_extends_navigation(global_navigation $nav);
      function local_nicehack_extends_settings_navigation(settings_navigation $nav, context $context);

      We also support mapping the following to the first callback above:

      function nicehack_extends_navigation(global_navigation $nav);

      After the release of 2.3 I think it is in our best interests to add a debugging call to the old alternative so that in 2.4 people get advised to upgrade and in 2.5 we can remove it.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12