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

    • MOODLE_38_STABLE
    • MOODLE_310_STABLE
    • 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

      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.

            davosmith Davo Smith
            davosmith Davo Smith
            Ferran Recio Ferran Recio
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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