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

local plugins are not able to inject navigation nodes in branches loaded via AJAX via local_PLUGINNAME_extend_navigation() callback

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Note: Easier to test on Boost

      1. Log in as admin to your Moodle instance.
      2. Go to Site administration / Plugins / Install plugins
      3. Download local_mdl56886.zip and install this plugin into your Moodle instance.
      4. Create a course
      5. Turn editing on
      6. Create an Assignment activity in the course.
      7. Add a Navigation block
      8. Turn editing off
      9. Check the navigation panel on the left.
      10. Confirm that Calendar link's icon has been replaced with a red "X" mark.
      11. Check the navigation block
      12. Expand the course section that contains the assignment.
      13. Confirm that assignment icon has been changed to a red "X" icon.
      Show
      Note: Easier to test on Boost Log in as admin to your Moodle instance. Go to Site administration / Plugins / Install plugins Download local_mdl56886.zip and install this plugin into your Moodle instance. Create a course Turn editing on Create an Assignment activity in the course. Add a Navigation block Turn editing off Check the navigation panel on the left. Confirm that Calendar link's icon has been replaced with a red "X" mark. Check the navigation block Expand the course section that contains the assignment. Confirm that assignment icon has been changed to a red "X" icon.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull from Repository:
    • Pull 3.7 Branch:
      MOODLE_37_MDL-56886
    • Pull 3.8 Branch:
      MOODLE_38_MDL-56886
    • Pull Master Branch:
      master_MDL-56886

      Description

      Due to the callback for local plugins (namely local_PUGINNAME_extend_navigation) only being called in global_navigation::initialise() and not in global_navigation_for_ajax::initialise() it's not possible for local plugins to extend for example course branches with nodes - except for the current course.

      The current course is handled via global_navigation class, other courses via global_navigation_for_ajax.

      In addition: Having callback in `global_navigation_for_ajax` class allows to modify navigation elements for the current course received by ajax call (received when user expands collapsed navigation element).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mikhailgolenkov Mikhail Golenkov
              Reporter:
              philipp.hager Philipp Hager
              Integrator:
              Jun Pataleta
              Tester:
              Gladys Basiana
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 10 minutes
                  1h 10m