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

    • MOODLE_32_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • master_MDL-56886
    • 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.

      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).

            mikhailgolenkov Misha Golenkov
            philipp.hager Philipp Hager
            Jun Pataleta Jun Pataleta
            Gladys Basiana Gladys Basiana
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.