Moodle
  1. Moodle
  2. MDL-33720

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      41727

      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.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          When this issue is resolved, a deprecation issue should be added to MDL-31207.

          Show
          Michael de Raadt added a comment - When this issue is resolved, a deprecation issue should be added to MDL-31207 .
          Hide
          Sam Hemelryk added a comment -

          Putting this up for peer-review now.

          Show
          Sam Hemelryk added a comment - Putting this up for peer-review now.
          Hide
          Sam Hemelryk added a comment -

          I've created MDL-34041 to see the deprecated callback removed after the release of 2.4 and have provided a patch.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - I've created MDL-34041 to see the deprecated callback removed after the release of 2.4 and have provided a patch. Cheers Sam
          Hide
          Michael de Raadt added a comment -

          I love it when a plan comes together.

          Show
          Michael de Raadt added a comment - I love it when a plan comes together.
          Hide
          Andrew Davis added a comment -

          Looks simple enough. You are go for integration.

          Show
          Andrew Davis added a comment - Looks simple enough. You are go for integration.
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew, up for integration now.

          Show
          Sam Hemelryk added a comment - Thanks Andrew, up for integration now.
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Thanks Sam, i've integrated this now.

          Show
          Dan Poltawski added a comment - Thanks Sam, i've integrated this now.
          Hide
          Frédéric Massart added a comment -

          Test successfully passed on master \o/!

          Show
          Frédéric Massart added a comment - Test successfully passed on master \o/!
          Hide
          Dan Poltawski added a comment -

          *Notice*: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26

          Congratulations

          {tracker.user.name}

          !

          You've made into Moodle

          {tracker.fixversion-1}

          +

          I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world.

          cheers!

          {tracker.friendlyintegrator}
          Show
          Dan Poltawski added a comment - * Notice *: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26 Congratulations {tracker.user.name} ! You've made into Moodle {tracker.fixversion-1} + I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world. cheers! {tracker.friendlyintegrator}

            People

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

              Dates

              • Created:
                Updated:
                Resolved: