Moodle plugins directory: Navigation buttons | Moodle.org
Navigation buttons
Blocks ::: block_navbuttons
Maintained by Davo Smith
Add customisable navigation buttons (next/prev/etc.) to the bottom of each activity page (Moodle 1.9/2.0+)
Latest release:
715 sites
186 downloads
44 fans
Current versions available: 4
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:
- Download the file and unzip it somewhere convenient.
- On your server, in the 'blocks' folder, create a subfolder called 'navbuttons'
- Upload all the files inside the 'davosmith-moodle-navbuttons-???????' folder to this new 'navbuttons' folder on your server.
- Log in to your Moodle site as an administrator and click on the 'Notifications' option in the Admin settings block.
- 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).
- Add the block to a course (turn editing on, select 'Navigation Buttons' from the 'Blocks - Add' menu)
- Customise the button appearance by clicking on 'Edit the Navigation Button settings' in the newly created block.
- 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:
Useful links
Contributors
Davo Smith (Lead maintainer)
Please login to view contributors details and/or to contact them
I modified the outputrenders.php file as instructed in the readme file but mine still does not work. I am running Moodle 3.3 with the Adaptable 1.5.3 theme.
The output says 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
This is what I put in the php file:
public function footer() {
global $CFG, $DB, $PAGE;
// Give plugins an opportunity to touch the page before JS is finalized.
$pluginswithfunction = get_plugins_with_function('before_footer', 'lib.php');
foreach ($pluginswithfunction as $plugins) {
foreach ($plugins as $function) {
$function();
}
}
require_once ($CFG->dirroot.'/blocks/navbuttons/footer.php');
$output = draw_navbuttons().$this->container_end_all(true); {
// Change this line to enable the navigation buttons
}
$footer = $this->opencontainers->pop('header/footer');
Am I missing something? Please help. Thanks!
I have a question about the plugin. When I click on Navigation Button settings, I see this message: 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.
Can you helpme to fix this? I really want to use your plugin.
Thanks!
Have you read through the README.txt file included with this plugin (as it suggests in the error message)? If so, is there a particular bit of the instructions that you are struggling with?
/moodle/theme/adaptable/renderers.php
It's on line 1467 (but obviously this may change as the theme version changes).
since weve updated our test-system to moodle 3.5 we have some trouble with the Plugin.
Our problem is, that we get an error when we try to change the "Buttons-type" to "Text" or "Simplified text:
Fehler: Argument 1 passed to file_get_all_files_in_draftarea() must be of the type integer, null given, called in [dirroot]/lib/form/filemanager.php on line 336
All the other settings can be edited without getting that error...
Is there a solution for this error?
Thanks in advance!
I've had a quick look at this, but I've not been able to reproduce the error with my plugin and Moodle 3.5. Looking at the code, I can't find a function file_get_all_files_in_draftarea() - the closet I can see is file_get_draftarea_files().
I'm afraid that without being to reproduce this locally, I can't really offer any insight as to what might be going wrong. If you were able to offer any extra details or some step-by-step instructions about how to reproduce this on a clean installation of Moodle 3.5, then I might be able to offer a fix.
Davo
i haven't tried to reproduce this error on a clean moodle yet, but i can find the function "file_get_all_files_in_draftarea()" in my "filemanager.php".
Here is the class with the function/error inside (line 302):
https://codeshare.io/2jrLJg
Maybe this helps you to understand what the problem is.
But I guess this error is caused by one or more updated plugins which don't like each other...
On the live-system, which runs moodle 3.4 and the same plugins, you're plugin works well.
Sebastian
the Plugin works now!
After the moodle update from 3.5.1 to 3.5.2+ it works.
Sebastian