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+)
407 sites
20 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, 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?
  • Picture of I V
    Thu, Feb 23, 2017, 6:48 PM
    Hi Dave,

    Firstly good job on the plugin.

    We have various Moodle installs, all v3+ (3.0, 3.2, etc). Would your this plugin work for these versions?

    If it will work for v3+, then in order to have previous/next buttons across activities of all course, would we need to the block for each course/activity or is there a setting that could be configured for all activities across all courses?

    Your earliest response is greatly appreciated.

  • Davo
    Thu, Feb 23, 2017, 7:26 PM
    Ishani, I'm not aware of any problems with running this plugin on Moodle 3.2 (although I've not tested it with that version). It certainly works with 3.0 & 3.1 (as indicated at the top of this page).

    This block only works on a per-course level, in theory it would not be that hard to extend it to work across the entire site, but I've never sat down and rewritten the code to work that way.

  • Picture of I V
    Thu, Feb 23, 2017, 8:38 PM
    Thanks for the quick response @Davo Smith, appreciate it.

    I will give it a go and see how it turns out. All we need is for students to scroll through activities using "Prev/Next" links from within the activity and not go to the Course front page every now and then to move to the next activity.
  • Picture of I V
    Tue, Feb 28, 2017, 1:16 AM
    Hi Davo,

    Thanks for the plugin, it works brilliantly on 3.1. Haven't tried on 3.2 but should work hopefully.

    Just a thing I was wondering, is there any way the core code change for outputrenderes.php could be hooked as part of a plugin instead of doing it post installation?

    (This is just to make it upgrade-safe and avoid doing code change for every install we do)

    Let me know, thanks!
  • Davo
    Tue, Feb 28, 2017, 1:19 AM
    Hi Ishani,

    I've not re-checked recently, but I am not aware of any hook that would avoid the core change (otherwise I would have used it, instead of the core change).

    If you have a custom theme, you could make a change there, instead of in outputrenderers.php
  • Picture of Sarah Fahlesson
    Wed, Mar 1, 2017, 4:22 PM
    Is there a way to get the button to update when a requirement has been met? Currently we have modules that are not accessible until the student has passed a quiz on the previous module.

    The student enters a module. The next button does not point to the next module since they don't yet have access to it. Instead the next button skips the module. (We'd ideally like an option to just gray out the next button so that the student knows that they need to accomplish something before moving on).

    Once the student has passed the quiz in the scorm module, we would ideally like the button to update. Now the student has met the requirements for the next module, but the 'next' button still skips the next module since it was created when the module was not available.

    Are there any settings that fix this that I'm missing?
  • Davo
    Wed, Mar 1, 2017, 4:45 PM
    Sarah - there's certainly not any built-in functionality to do what you are asking. The option to disable the next button if the next activity is unavailable might be possible to implement (but it would need to be an option, as other sites might use availability settings to provide different students with different resources - so having the navigation stop just because the next activity is unavailable would be undesirable).

    For the other part, making the next button detect that the next activity was not available, the only way I can think of working that would be to have each of the buttons call a special re-routing script that would take the current activity and then work out the next activity to go to at the point where the button was clicked - but that would have the problem that I wouldn't ever be able to remove the next / previous buttons when I didn't think there was a next / previous activity to go to.

    Anyway, either of these will require extra development, something I'm can discuss if you have a budget for me to undertake during my day job, but which is unlikely to be done in my spare time.
  • Picture of Marcel Saraiva
    Thu, Mar 9, 2017, 2:44 AM
    Hi Davo,

    I have been trying to install the navigator plugin in moodle 3.1, but when I tried to install this, the activity_modules and activity_results is missing in disk. And the plugin don't installed.

    Check this error message:

    The plugin "block_activity_results" is mistakenly installed in "$CFG->dirroot/blocks/navbuttons", The correct location is "$CFG->dirroot/blocks/activity_results"

    Debug info:
    Error code: detectedmisplacedplugin

    Stack trace:
    line 812 of /lib/upgradelib.php: plugin_misplaced_exception thrown
    line 429 of /lib/upgradelib.php: call to upgrade_plugins_blocks()
    line 1641 of /lib/upgradelib.php: call to upgrade_plugins()
    line 677 of /admin/index.php: call to upgrade_noncore()

    Can you help me about this problem?

    Thank you!
  • Picture of Abdul Ghaffar
    Tue, May 16, 2017, 3:41 PM
    I am unable install/download latest version 2.2+ (Build: 2017051200) for moodle 3.2.3. .zip contains another zip, and that contain 1st zip. Please fix this issue.
Please login to post comments