Plugin: Navigation buttons

Plugin: Navigation buttons

by Davo Smith -
Number of replies: 22
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Just posted up a new plugin to the M&P database, called 'Navigation Buttons' (it can be found here http://moodle.org/mod/data/view.php?d=13&rid=4575 ).

It adds customisable buttons to the bottom of each activity page, taking you to the next/previous activity, as well as first/last/home pages.

You can customise the colour of the buttons, upload your own icons and choose what is meant by 'home' (course/front page) and 'first'/'last' (in current section or in current course), as well as adding a couple of optional buttons that link to a URL of your choosing.

Screenshot included in the above link.

Sadly, one slight core modification is needed (two for Moodle 1.9), but full instructions are included in the README.txt file.

Let me know what you think.

Average of ratings: -
In reply to Davo Smith

Re: Plugin: Navigation buttons

by Joachim Vogelgesang -

Hi Davo,

nifty piece of work! In 1.9.9 working perfectly.

Regards,

Joachim

For those which need quickly German translation

In reply to Joachim Vogelgesang

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks for the translation - I've uploaded it to github.

Could you double-check that it is all OK?

In reply to Davo Smith

Re: Plugin: Navigation buttons

by Joachim Vogelgesang -

I notice, even with student´s login I can see navigation buttons in corresponding courses by default, even after overriding block permissions to 'Prevent' (1.9.9, test environment, MAMP).

In reply to Joachim Vogelgesang

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There is currently no setting to allow navigation buttons to be turned off for a specific user - they are either there for everyone, or not there at all.

The 'blocks' permission is not relevant, as the block is only there to edit the settings, rather than to directly display the buttons.

Are there particular situations in which you want navigation buttons to only be visible for teachers and not students? If there is, then I can add a new capability to control it. If not, I'll not bother doing so.

In reply to Davo Smith

Re: Plugin: Navigation buttons

by Joachim Vogelgesang -

ok, not visible is only referred to the controlling block; for me it is good as it is.

tks. Davo

In reply to Davo Smith

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

For anyone who is interested, there is now a short screencast of the buttons in action here:

In reply to Davo Smith

Re: Plugin: Navigation buttons

by Claire Browne -

Excellent Idea Davo!

Cannot wait for the link to be approved.

Thanks for your hard work.

In reply to Claire Browne

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It was approved, but then I added the video to the page, so now I'm waiting for it to be re-approved.

In the meantime, you can get at the code here:

https://github.com/davosmith/moodle-navbuttons

or for Moodle 1.9

https://github.com/davosmith/moodle-navbuttons/tree/MOODLE_19_STABLE

(Download button is on the right of the page, near the top)

In reply to Davo Smith

Re: Plugin: Navigation buttons

by david southern -

This works great in 2.0.2! Thank you!

I've made some new buttons if anyone wants them? I have other colours available.

In reply to david southern

Re: Plugin: Navigation buttons

by david southern -
In reply to david southern

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks for the buttons.

For future reference, files less than 100kb can be attached to the forum, which makes for an easier download than having to step through 3 pages of adverts and a CAPATCHA to download the file.

In reply to Davo Smith

Re: Plugin: Navigation buttons

by david southern -

Yes, there was method in my madness! I wanted to check demand - Mediafire logs the downloads! If people are keen I'll make some more up and link them direct to here!

In reply to Davo Smith

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

For anyone using this plugin, there was a bug that would cause problems when deleting a course with a navigation buttons block in it.

The latest version of the plugin fixes this problem (download link above).

In reply to Davo Smith

Re: Plugin: Navigation buttons

by E. L. Cooper -

Does this give buttons in activities and resources or just activities? I am playing with it in my sand box and curios about that bit.

In reply to E. L. Cooper

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Both activities and resources gain navigation buttons at the bottom of their page - basically it allows you to navigate up & down the items you have placed within your course (it is based off the code for the drop-down menu in the top-right corner of the page in Moodle 1.9).

In reply to Davo Smith

Re: Plugin: Navigation buttons

by Daniel Wright -

Very nice plugin!  Using it in a 2.0.3 instance and it works very well.  One question - could I make it so the nav buttons are not displayed in a Quiz activity?

Thanks!
Dan 

In reply to Davo Smith

Re: Plugin: Navigation buttons

by John Kendzior -

Is there anyway to turn these NavButtons off while inside a Quiz? I can't seem to figure out how this is possible. Thanks.

In reply to John Kendzior

Re: Plugin: Navigation buttons

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

John - assuming you have the latest Moodle 2.2 version of the Navbuttons code (2012031600), then visit 'Site admin > Plugins > Blocks > Navigation buttons' and you should be able to control when the buttons appear.


In reply to Davo Smith

Navigation buttons - not quite appearing

by Matt Huston -

Great plugin, Davo. On a Moodle 2.2.1 installation, nav buttons show up for 2-4 weeks -- and then, suddenly, they don't. Have looked at source code, and there's no indication they're turned off at site, course, or any other level. No buttons are appearing across 20+ courses.

The result is this at the bottom of every page -- the button title, as live links, where the button images are expected.

button text no images

Have re-uploaded images to an external images folder, to a repository, and as simple uploads. Have also turned off buttons, turned them back on, addressed an error log php extension issue, rebooted Apache -- nothing in this vein seems to help.

Suggestions?

In reply to Matt Huston

Re: Navigation buttons - not quite appearing

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Sorry Mat, I'm not really sure what the answer is.

If you use Chrome browser (or firefox + firebug extension), can you right-click on the text and select 'inspect element'? Are the images listed in the HTML code at all? If they are, what happens if you copy + paste the image link into a new tab?

If that doesn't help - could you view the source code for the page, then search for <!-- Navbuttons start -->, then copy everything from there until <!-- Navbuttons end --> into a forum post and I'll have a look at it.

In reply to Davo Smith

Re: Navigation buttons - not quite appearing

by Matt Huston -

Thanks Davo -- the HTML code-pasting generates this:

This Moodle site has had image-error problems, including 'incorrect pool type' stuff. What's worked when image-issues appear has been to delete and re-upload in /moodledata

I'm suspecting that if I were to find the location /2775/block_navbuttons/icons/0 and delete the file, then re-upload it, it might work.

But I'm striking out on finding that location within /moodledata (or wherever).

Any thoughts on navbutton image-file physical locations so I can attempt a delete and re-upload?

Best,

Matt

In reply to Matt Huston

Re: Navigation buttons - not quite appearing

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Search mdl_files for a record with:

contextid = 2775
component = block_navbuttons
filearea = icons
itemid = 0
filepath = /
filename = HOME BTN.png

That should be the file you are looking for.

Could you try deleting and replacing with a file without a space in the name (just in case that is the problem)?