Navigation buttons

Blocks ::: 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+)
Latest release:
722 sites
223 downloads
44 fans
Current versions available: 4

badge.svg

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. If you are running a version of Moodle earlier than 3.10, 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
    Fri, 1 Sept 2017, 1:13 AM
    Derick, please scroll up slightly and read the answer I already gave to this on 6th June
  • Robbie Forrest
    Mon, 25 Sept 2017, 7:49 AM
    Great block! It would be good if you wrapped the button input in a label or made it a button so that pseudo selectors could be used with it. It would also be helpful to put settings in the configuration to add custom css classes to the elements such as bootstrap btn. Finally, it would be really awesome if instead of being able to turn it on only for every page, if you could actually show or hide the buttons at the page level. Hiding the block doesn't hide the buttons.
  • Davo
    Wed, 27 Sept 2017, 2:09 AM
    Robbie - if you have a suggestion for a code change, you are welcome to open a pull request on the github repo. The function you'll want to look at modifying to change to button output is the 'make_navbutton()' function in footer.php.

    I'm not sure what you mean by 'hide the buttons at the page level' instead of 'being able to turn it on only for every page'. Adding the block to a course works as a flag to turn on nav buttons for the course, removing the block from the course turns it off again. Not the best design ever and I wouldn't do it this way if I was writing the plugin today. However, I'm not planning on a major rewrite anytime soon.
  • Derick Turner
    Fri, 6 Oct 2017, 5:09 PM
    Hi Davo, the latest version downloadable from the link extract into a folder called davosmith-moodle-navbuttons-c0aff46 and not navbuttons.
  • Davo
    Fri, 6 Oct 2017, 5:11 PM
    Yes, Derick - you already told me this on the 31st August, and had already answered this question on the 6th June.
  • Davo
    Fri, 10 Nov 2017, 3:37 AM
    Seems to be working fine with Moodle 3.4
  • Ketan Chandaria
    Fri, 24 Nov 2017, 7:23 AM
    Hi Davo
    Thank you for this great plugin. I was hoping to achieve something different and possibly you could guide me.
    I have created a program (meta course) which is grouped with 4 courses ( using sub-course plugin). Now the navigation buttons appear only within the pages of a particular sub-course and from there the options of going back to the course main page (sub-course) or back to the program (meta course) main page works well. My challenge is how can i show the navigation button on the course (sub-course) main page so the learner has an option to go back to the program (meta course) main page without the need to again go into another page within this course.
    Thanks
  • Davo
    Sat, 25 Nov 2017, 12:04 AM
    Hi Ketan, I've never used the sub-course plugin, so this isn't something i can give you an easy answer to, off the top of my head.

    It sounds like it's probably a situation that would require some changes to the block code, but I can't really give you any clear guidance on that, without first spending some time trying to replicate your situation (which is something I'm unlikely to be able to do in the near future).
  • Ketan Chandaria
    Mon, 27 Nov 2017, 4:27 PM
    No worries Davo
    If you have any documentation then i can help look into it and let you know if i succeed so you can then add it to the plugin.
    Thanks
  • Davo
    Mon, 27 Nov 2017, 4:30 PM
    Ketan, I'm not quite sure what documentation you are after - there's developer docs over at: https://docs.moodle.org/dev/Main_Page . My plugin code has some comments in it, but I've not got a full range of technical documentation for it.
  • Sheila Owen
    Fri, 1 Dec 2017, 6:55 PM
    Hi Davo. Great plugin! Is there any way to place the nav buttons at the top of the page, within the navbar section, rather than the footer?
  • Davo
    Fri, 1 Dec 2017, 6:58 PM
    Sheila, I guess you could insert the core hack to output the buttons into a different place in the code to output them to a different place on the page. Probably somewhere in the header() function, but I couldn't tell you exactly where.
  • Sheila Owen
    Fri, 1 Dec 2017, 7:42 PM
    Cool. Thanks. I'll give that a go.
  • Sheila Owen
    Fri, 1 Dec 2017, 9:13 PM
    I haven't found where to put the code yet. I tried a few places but it didn't render. It's late here now, so I'll try again tomorrow. In the meantime, if anyone can think of how I can get the buttons in the top navbar area (in course pages only) I'd be happy for your input ...
  • Inter Jos
    Tue, 5 Dec 2017, 1:04 AM
    Hi Davo, I want to delete the plugin but when I do that (remove the navbutton map or remove it from the plugin page within moodle) i get this error:

    Warning: require_once(/.../moodledir/blocks/navbuttons/footer.php): failed to open stream: No such file or directory in /.../moodledir/lib/outputrenderers.php on line 1283

    Fatal error: require_once(): Failed opening required '/.../moodledir/blocks/navbuttons/footer.php' (include_path='/.../moodledir/lib/pear:.:/usr/local/php70/pear') in /.../moodledir/lib/outputrenderers.php on line 1283

    How can I safely uninstall the navigation buttons?

    thanks,
    jose
Please login to post comments