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.

ok, thanks
I cannot offer any advice about removing the default navigation - that is something you'll have to post on the forums or figure out for yourself (my plugin long predates the default navigation, so I've never looked into it).
hi davo, thanks, the navigation buttons are now available, but what do we need to do to remove the default navigation, next activity, previous activity. currently we have a double navigation displayed.
As it says in the instructions, replace the line:
$output = $this->container_end_all(true);
With the lines:
require_once($CFG->dirroot.'/blocks/navbuttons/footer.php');
$output = draw_navbuttons().$this->container_end_all(true);
in the renderers.php, there is the line $output = $this->container_end_all(true); in the function public function footer() {global $CFG;
i have to replace $output = $this->container_end_all(true); with $output = draw_navbuttons().$this->container_end_all(true);
where do i have to add? require_once($CFG->dirroot.'/blocks/navbuttons/footer.php');
is this correct?
As stated in the README, you need to change the line $this->container_end_all(true). I don't know where that occurs in theme_adaptable, but it will be in a function called footer(), not get_footer_blocks(). If there is no footer() function in theme_adaptable, then you need to make the change to the core version of footer() instead.
hi,
in our moodle with adaptable as theme, the plugin isn't working properly. as i understand the readme file correctly, we have to change the file renderers.php from the theme folder. in this file the lines connected to the footer are:
public function get_footer_blocks($layoutrow = 'footerlayoutrow') {
global $PAGE, $OUTPUT;
$fields = array();
$blockcount = 0;
$style = '';
if (!$this->get_footer_visibility()) {
return '';
}
$output = '
' . $OUTPUT->course_footer() . '
';
for ($i = 1; $i <= 3; $i++) {
$footerrow = $layoutrow . $i;
$footerrow = $PAGE->theme->settings->$footerrow;
if ($footerrow != '0-0-0-0') {
$fields[] = $footerrow;
}
}
foreach ($fields as $field) {
$output .= '
';
$vals = explode('-', $field);
foreach ($vals as $val) {
if ($val > 0) {
$blockcount ++;
$footerheader = 'footer' . $blockcount . 'header';
$footercontent = 'footer' . $blockcount . 'content';
if (!empty($PAGE->theme->settings->$footercontent)) {
$output .= '
';
if (!empty($PAGE->theme->settings->$footerheader)) {
$output .= '

';
$output .= $OUTPUT->get_setting($footerheader, 'format_text');
$output .= '

';
}
$output .= $OUTPUT->get_setting($footercontent, 'format_html');
$output .= '
';
}
}
}
$output .= '
';
}
$output .= '
';
return $output;
}
which line do we need to change to put these lines:
require_once($CFG->dirroot.'/blocks/navbuttons/footer.php');
$output = draw_navbuttons().$this->container_end_all(true);
thanks for any support!
Checks suggest this is still working fine with Moodle 3.9.
Antonio - you could probably open up the file footer.php in the plugin and remove the lines: if (!$mod->uservisible) { continue; }
That would mean that the next activity in the course is linked to, even if it is hidden or not available due to conditional restrictions, but that will lead to lots of error screens if the activity is still not available to the user after they've clicked on the link (so hiding an activity in the course would lead to everyone getting an error when reaching it, rather than just skipping over it to get to the next activity).
An alternative might be more complex code that refreshes the buttons via javascript once the activity is complete, but that is beyond the scope of what I'd be able to do in my spare time (maybe could be tackled in work time, if you had a budget to pay for it).
Hello, great block plugin, would it be possible to show "next activity" button even if next activity is not yet accessible? i have SCORM packages as activities and even if student complete the SCORM activity, he doens't get the "next activity" button
I am running moodle 3.7+ and have installed the latest download of this plugin and followed each step in the readme file but the red message when I go to add the block will not disappear. I modified the /moodle/lib/outputrenders.php file with the code you provided but it is just not working for me. What am I missing?
Sorry about that. I will pull a request in GitHub. Thanks
Dinis - because of the necessary small core change, Moodle HQ has recategorised the plugin as 'Other', rather than 'Block'. This breaks just about all of the automated systems associated with the plugins database (automatic filling-in of details from version.php, integration with AMOS, etc.)
There is nothing I can do about it as long as the plugin is still in the 'Other' category (I had hoped to remove the core change when some new hooks were added a to the Moodle footer a couple of years back, but those hooks were implemented in a way that doesn't allow extra output to be inserted, so I'm still stuck with the core change).
Thanks for the plugin.
Why it's not in AMOS for translation? I'm PT-PT translator. Only in GitHub?
Seems to be working with Moodle 3.8, without any changes (new version released with mod_questionnaire compatibility fix).