Other: Navigation buttons

Maintained by DavoDavo Smith
Add customisable navigation buttons (next/prev/etc.) to the bottom of each activity page (Moodle 1.9/2.0+)
386 sites
24 fans
Current versions available: 4

Travis build status

Navigation buttons (for Moodle 1.9 / 2.0+)
This block adds customisable navigation buttons (first/previous/next/etc.) to the bottom of each activity/resource page in a course.

It is based on an idea from Penny Mondani: http://pennymondani.com
Thanks also to the US company that sponsored the development, who wish to remain anonymous.


  1. Download the file and unzip it somewhere convenient.
  2. On your server, in the 'blocks' folder, create a subfolder called 'navbuttons'
  3. Upload all the files inside the 'davosmith-moodle-navbuttons-???????' folder to this new 'navbuttons' folder on your server.
  4. Log in to your Moodle site as an administrator and click on the 'Notifications' option in the Admin settings block.
  5. You need to make a small change to one Moodle core file to make this work (the change is different between Moodle 1.9 & Moodle 2.0 - see the included README.txt for details).
  6. Add the block to a course (turn editing on, select 'Navigation Buttons' from the 'Blocks - Add' menu)
  7. Customise the button appearance by clicking on 'Edit the Navigation Button settings' in the newly created block.
  8. Check the message at the bottom of the screen (under the 'Save changes' button) - it should read "Navbuttons self-test: required core modifications have been completed successfully". If not, then go back to step 5 above and check carefully.

Note: The block is only visible to users who are able to edit courses modules. Deleting the block will remove the navigation buttons (they can also be disabled through the settings).

For a quick demo, there is a screencast available here:


Screenshot #0


Davo Smith (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Davo
    Thu, Apr 10, 2014, 6:46 PM
    David - please read through the instructions in the 'any problems' section of the README.txt file included in the plugin: https://github.com/davosmith/moodle-navbuttons/blob/master/README.txt#l52
  • Picture of Tom Crick
    Wed, May 21, 2014, 7:07 PM
    Hi Davo,
    I'm running Moodle 2.6+ (Build: 20131129)

    When I try and install this through the ADMIN > Plugins it fails validation and I get the following error message:

    Error Invalid add-on name: davosmith-moodle-navbuttons-b8f320e

    The help message says:

    "The name of the root directory in the ZIP package violates formal syntax requirements. Some ZIP packages, such as those generated by Github, may contain an incorrect root directory name. You need to fix the name of the root directory to match the add-on name."
  • Davo
    Wed, May 21, 2014, 7:18 PM
    Sorry - that is because Moodle.org won't let me upload it as a 'block' plugin (due to the required core modification).
    You must download the plugin manually, rename it to 'navbuttons', install it into the 'blocks/' directory on the server and make the required core code modification.

    There is no way to enable automatic installation of this plugin.
  • Picture of riddhi shah
    Sat, May 16, 2015, 9:21 PM

    I want to add navigation buttons to all the courses by default. Could you please guide me what to do?
  • Davo
    Sun, May 17, 2015, 2:01 AM
    Riddhi - adding navigation buttons to all courses by default would require some extra development work; the current plugin does not support doing that.
  • Picture of sandip patel
    Fri, Jul 31, 2015, 8:17 PM
    i have installed blocks_navbuttons plugin in my moodle application and follow the steps for the configuration and also change the code as per the README.txt file but still message is appeare

    "Navbutton self-test: The line "$output = draw_navbuttons().$this->container_end_all(true);" has not been correctly added to outputrenderers.php - see README.txt for further instructions"
  • Picture of sandip patel
    Fri, Jul 31, 2015, 9:47 PM
    when i change the clean them it is working fine
  • Picture of sandip patel
    Fri, Jul 31, 2015, 10:00 PM
    I have replaced the same code in this file and its working fine "theme/uikit/renderers/core_renderer.php
  • Picture of Inter Jos
    Wed, Aug 5, 2015, 3:08 AM
    Hi, I installed the plugin and changed the /lib/outputrenders.php file as described. The navigation buttons come up perfectly!!
    But... in the backend, when I click on 'courses' to go to a specific course, I get the following error:

    Debug info:
    Error code: codingerror
    Stack trace:

    line 5721 of /lib/accesslib.php: coding_exception thrown
    line 7338 of /lib/accesslib.php: call to context->get_course_context()
    line 48 of /blocks/navbuttons/block_navbuttons.php: call to context_block->get_course_context()
    line 288 of /blocks/moodleblock.class.php: call to block_navbuttons->get_content()
    line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 971 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1023 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 473 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
    line 52 of /theme/mytheme/layout/columns3.php: call to core_renderer->standard_head_html()
    line 1015 of /lib/outputrenderers.php: call to include()
    line 945 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 59 of /course/index.php: call to core_renderer->header()

    If I go back and click on ' courses' again, the error is gone. This happens every time I click on 'courses'. I use Moodle 2.9.1+
    I really love and need this navigation buttons, can someone help me on this?

  • Davo
    Thu, Aug 6, 2015, 4:49 AM
    In case anyone else sees this comment - the issue was the block being added to a page outside of a course. The latest code on github now treats this as a non-fatal error (it is not a useful thing to do, but it is no longer an actively harmful thing to do). I'll release a new official version at some point.
  • Pimenko
    Fri, Jan 22, 2016, 7:38 AM

    Thank you for your plug-in. I have looked to integrate this kind of navigation during a long time. It works fine with my Moodle 3.0.

    Best regards.
  • Picture of Aniket Sankpal
    Tue, Feb 2, 2016, 6:08 PM
    Hi anyone knows Which database files will get affect with this plugin?
  • Davo
    Tue, Feb 2, 2016, 6:12 PM
    There are no database files affected by this plugin, as the database does not have any files in it.
    The table the plugin stores its data is defined here: https://github.com/davosmith/moodle-navbuttons/blob/master/db/install.xml
  • Picture of Usman Asar
    Fri, Mar 4, 2016, 7:25 AM
    Davo, as people have mentioned this working with Moodle 3.0, can you as well update the plug-in showing Moodle 3.0+ supported?
  • Picture of Kostas St
    Tue, Aug 2, 2016, 7:45 PM
    I have successfully installed the plugins and everything works just fine. I have replaced the default icons with my own but there is a blue colored background behind them and I would like to remove it. Do you have any ideas about how I could do that?
Please login to post comments