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

Update before_footer hook to allow for output to be added to the page

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      This cannot really be tested directly using core Moodle, only by installing my plugin.

      Setup

      1. Download block_navbuttons plugin from GitHub: https://github.com/davosmith/moodle-navbuttons. You might run the following command from your Moodle folder:

        git clone https://github.com/davosmith/moodle-navbuttons.git navbuttons

      2. Login as admin
      3. Install the plugin, but do not make the core change outlined in the README.txt
      4. Create a course
      5. Add the block "Navigation Button" to the course
      6. Ad, at least, a couple of activities to the course

      Testing instructions

      1. Access to "Edit the Navigation Button settings" link in the "Navigation Button" block
      2. Check the following text appears at the bottom of the page: "Navbuttons self-test: required core modifications have been completed successfully"
      3. Go to some of the activities in the course
      4. Check the navigation buttons appear at the bottom of the page and allow you to navigate between activities
      Show
      This cannot really be tested directly using core Moodle, only by installing my plugin. Setup Download block_navbuttons plugin from GitHub: https://github.com/davosmith/moodle-navbuttons . You might run the following command from your Moodle folder: git clone https://github.com/davosmith/moodle-navbuttons.git navbuttons Login as admin Install the plugin, but do not make the core change outlined in the README.txt Create a course Add the block "Navigation Button" to the course Ad, at least, a couple of activities to the course Testing instructions Access to "Edit the Navigation Button settings" link in the "Navigation Button" block Check the following text appears at the bottom of the page: "Navbuttons self-test: required core modifications have been completed successfully" Go to some of the activities in the course Check the navigation buttons appear at the bottom of the page and allow you to navigate between activities
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull 3.10 Branch:
      MDL-68564_before_footer

      Description

      I may be the only person interested in this, but I would love to update my block_navbuttons plugin to not need a core change to make it work.

      The before_footer hook introduced in MDL-53978 very nearly achieves this, but is limited because it does not allow any content to be injected into the page (it is only useful for initialising javascript).

      I'm going to propose a simple patch that allows before_footer to return a value, which is then added to the end of the page.

        Attachments

          Activity

            People

            Assignee:
            davosmith Davo Smith
            Reporter:
            davosmith Davo Smith
            Peer reviewer:
            Ferran Recio
            Integrator:
            Sara Arjona (@sarjona)
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Nov/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m