Navigation buttons icon

Navigation buttons

Maintained by Davo Smith
Add customisable navigation buttons (next/prev/etc.) to the bottom of each activity page (Moodle 1.9/2.0+)
Price option: Free

Supports Moodle 1.9-5.2 See all versions
Latest release: 3 months ago
Installations: 850
Downloads (last 90 days): 348

Frankenstyle name: block_navbuttons
Blocks

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hi Joanne. The 'Mark complete' button now toggles correctly in Moodle 4.0. It does _not_ update the new 'Mark as done' button, that is also shown on the page in Moodle 4.0 (you need to refresh the page to see that update), nor does it get updated when the 'Mark as done' button is clicked (again, you need to refresh the page to see that update).
It does, however, correctly update the completion state and doesn't show an error popup, so hopefully that is a good enough fix (I'd be happy to review a patch from anyone keen to produce a more complete fix).
Hi Davo, Sorry about that! I'm not used to using the Moodle forum. I've described the fix and end result so maybe that is sufficient for now. Many thanks for your reply.
Hi Joanne - if you want to report a bug, please use the 'bug tracker' link in the plugin details, as that's a lot easier for me to keep track of than comments here.
It looks like you are correct that there is a bug in that particular button type - it's not part of the original development (it was contributed by another developer), so it's not directly on my radar for testing during upgrades. However, if it has stopped working, then I'll try to find a bit of spare time to investigate / fix.
Well, I can answer my own question: the error in completion.js is resolved by removing the first 'if' clause. With that change the script does correctly update completion status of a task, however, it does not trigger update of the completion icon on the course index, as does the official Mark as Done button. So, I don't think the completion button, as is, is suitable for use in 4.0.
This plugin is great for adding navigation buttons to Moodle 4.0. The navigation buttons work fine but I'm getting an error message when clicking on the completion button: "An error occurred when attempting to mark your activity complete". This happens using Boost and at least 2 other Moodle 4 ready themes. Nothing in server log. Has anyone else experienced this? Any hints as to how to narrow down the problem? Thanks!
Just to confirm, I quickly installed a fresh copy of Moodle 3.11, then installed the navbuttons block. The install worked without any problems. Maybe you could check your server error logs and see if there is a specific error message to investigate?
Thanks so much Davo for your quick response. Yes, actually, I am using non-standard theme and trying to fix a navigation issue with the theme itself. If this plugin works for me, that would be great.
Thanks a lot
It is correct that Moodle 3.11 does not need any core changes to work with this plugin (certainly with the standard core theme, it is possible that a non-standard theme might override the footer code and might prevent this plugin from working).
I've not seen any issues installing the plugin on Moodle 3.11 - it really doesn't do anything much during install (adds 2 standard capabilities + 1 DB table), so I would be very surprised if it could cause an issue. I'll see if I can double-check when I have a moment.
I installed it on Moodle 3.11.4, but once the database is updated Moodle did not work and responded with a message that it is under upgrading. At this moment, I had to remove navbuttons manually.
The readme file says that this version does not need to have core changes.
What a fantastic service, Davo! And on a Sunday. smile Now the buttons work perfectly, also on a page with embedded questions. Thanks x1000!
Hi Christian - I've pushed a quick fix that should solve the problem (it certainly stops the buttons from appearing on embedded questions with my local install of Moodle). Please can you install the version from the 'Source control URL', above?
... one more try to give you relevant portions of the iframe code generated by the embed_question plugin:
iframe class="filter_embedquestion-iframe" ..."" title="Embedded question" src="https://.../filter/embedquestion/showquestion.php?...
Thanks for your reply, Davo! I think your navigation buttons make the user interface so much simpler, so I am (more!) willing to drop the use of embedded questions. smile
But I really like the embedded question plugin as well, as it allows to just use ONE question from the question bank to reinforce the learning on a specific page, without the somewhat complex user interface of running a quiz (several steps: starting the quiz, submitting the quiz, confirming that you want to submit etc.).
A problem vs. the navigation buttons is that the embedded question (to my knowledge!) does not 'behave' like a quiz or any other activity type, so it is not possible to use the functionality for behavior of the navigation buttons for specific activity types. It 'just' generates portions of a web page.
I have access to the blocks/navbuttons/footer.php code, but adjusting this code is far beyond my competence in PHP. And regarding the embed_question plugin, I really do not know how use the tags that it generates in order to NOT generate nav buttons for this kind of (sub-)pages.
In the HTML code the plugin generates an iframe with recognizable contents, like
Christian, there aren't currently any settings for disabling the navigation buttons on a specific page. You can turn them off for an activity type, or you can set them to only show once the activity is marked as 'complete' (for a quiz, you can set them to only show once an attempt has been submitted, if that helps at all).
It is probably fairly straightforward to add a specific exception to not show using embed_question, but I've not tried that plugin, so I would need to find some time to try it out and see what happens (in the meantime, I'm happy to accept a simple patch that solves this problem, if you are able to look at the code in blocks/navbuttons/footer.php).
This seems like a great plugin!
But I have one question: Is there a way to DISABLE the rendering with the navigation buttons on a SPECIFIC page? I have a problem with the embed_question plugin, which generates an embedded page based upon a quiz question. Then the buttons are rendered twice, both for the embedded page and 'real' page. And the buttons for the embedded pages do not work as wanted, as they change the contents only of the embedded section.