Other: Navigation buttons

block_navbuttons
Maintained by DavoDavo Smith
Add customisable navigation buttons (next/prev/etc.) to the bottom of each activity page (Moodle 1.9/2.0+)
375 sites
292 downloads
22 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.

Installation:

  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:

Screenshots

Screenshot #0

Contributors

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

Comments RSS

Comments

  • Davo
    Wed, Dec 19, 2012, 4:00 PM
    @Nicolas - that is a possible solution, however it is only relevant to sites using a custom theme (if they are using a core theme, it is still a core hack), needs doing for every theme used on the site (especially if you allow users to choose 'per course' or 'per user' themes) and, potentially, requires slightly different instructions for every theme edited.
    Basically, if you know enough to have a custom theme on your site, you are probably capable of doing the necessary modification to make the navigation buttons work without further instructions. If you are not able to do this, then I've made the instructions as straightforward as they can be.
  • Picture of Rangga Wiratno
    Sat, Dec 29, 2012, 1:28 PM
    Nice block, been using it for the past 6 months. But since upgrading to Moodle 2.4, the Site Administration>Plugins>Blocks>Navigation Buttons link is missing. How do I manage the global setting for NavButtons now?
  • Davo
    Sat, Dec 29, 2012, 5:52 PM
    Ragga - the code for that part has not changed in the Moodle 2.4 and should be working exactly as before. If it isn't, then it is a bug that I need to investigate, when I am back at my computer again next week.
  • Davo
    Mon, Dec 31, 2012, 5:13 AM
    @Rangga - that should now be fixed. Not sure why it was ever working in 2.3 (must have been a bug!), but should work fine in all versions now.
  • Germán and temudgin
    Tue, Jan 1, 2013, 12:12 AM
    Hi Davo,
    I am afraid the navigation buttons plugin does not have the English strings available for translation in AMOS. Could you please check the code for a cause and/or ask David Mudrak about it?
    Thanks in advance for your help.
  • Davo
    Tue, Jan 1, 2013, 12:39 AM
    @German - I'm a bit mystified about this. The last couple of times I've updated this plugin, it's failed to pick up any of the automatic data from version.php, the README file or the English language strings (even though it works fine for all my other plugins).

    I've opened a tracker issue to see if anyone can figure out what is going wrong - https://tracker.moodle.org/browse/MDLSITE-2072
  • Picture of Rangga Wiratno
    Wed, Jan 2, 2013, 6:24 PM
    Thanks Davo, I've confirmed now that the Settings is now accessible ;)
  • Me, with my new 'slow explosion' hair!
    Wed, Mar 6, 2013, 11:43 PM
    Hi Davo.

    The powers that be that I report to have asked me to change some of the default settings, so that when the block is installed in a course, it's already set up exactly as we would like. This has been generally achieved through changing defaults in db/install.xml, however one of the options (which we're using the 'extra1' option for) is a link to /my/, and although I can set 'extra1show' and 'extra1openin' values appropriately, I cannot set a default for the URL or the title (Moodle complains about not allowing defaults for those columns). Any idea how this might be accomplished?

    What I could do for our situation is simply edit the defaults for those two columns directly in MySQL after the block has been installed, but this is a bit hacky and I would prefer not to do it like this. Any change we can make to our code, which is preserved in the repository, is preferable.

    Thanks, and keep up the good work.

    Paul. smile
  • Davo
    Wed, Mar 6, 2013, 11:48 PM
    Paul - I suggest you look at altering the 'instance_create()' function in blocks/navbuttons/block_navbuttons.php

    One of these days I'll find time to make a global settings page to set the defaults, but I've not done it so far.
  • Me, with my new 'slow explosion' hair!
    Thu, Mar 7, 2013, 12:13 AM
    Thanks, I see now what I have to do.
  • Picture of Jeffrey Pernitsky
    Thu, Mar 7, 2013, 12:46 AM
    I am having a problem where the Previous and Next buttons are showing up on Quizzes. Is this default behavior for this Block?

    If so, is there a way to have them not appear on pages that are designed to not allow users to navigating around the site? Thanks.
  • Davo
    Thu, Mar 7, 2013, 12:49 AM
    When you installed the plugin you should have been shown all the settings from 'Site admin > Plugins > Blocks > Navigation buttons' - if you selected 'Always show' for the quiz module at that point (the default action for all activities) then the navigation buttons will always be shown for quiz modules.

    If you want to change the navigation button display settings for any activity type, then go to the global settings page listed above and change it.
  • Picture of Jeffrey Pernitsky
    Thu, Mar 7, 2013, 1:03 AM
    Thanks for the quick reply. Works great now.
  • Picture of Brannon Carter
    Fri, Mar 15, 2013, 5:41 PM
    Love the navigation buttons. I'm running Moodle 2.4.2, tested in Moodle 2.4.1 and was having the same issue. Everything works fine until I add a custom image to any of the navigation buttons.

    With debugging turned on, I am getting the following error (I am running php vs 5.3.3):

    'Strict Standards: Only variables should be passed by reference in /home/leader/public_html/moodle/blocks/navbuttons/footer.php on line 258 Strict Standards: Only variables should be passed by reference in /home/leader/public_html/moodle/blocks/navbuttons/footer.php on line 258 Strict Standards: Only variables should be passed by reference in /home/leader/public_html/moodle/blocks/navbuttons/footer.php on line 258'

    Any thoughts? Thanks.
  • Davo
    Fri, Mar 15, 2013, 6:12 PM
    Brannon - please could you make sure you have the latest version of the code from Github - https://github.com/davosmith/moodle-navbuttons
    If you have, could you copy & paste the line of code that is causing the error, as line 258 in my version couldn't possibly produce that error.
Please login to post comments