Jump To Navigation

Blocks ::: block_jumpto_menu
Maintained by Me !Tim Williams
Adds a Moodle 1.x style "Jump To" menu to Moodle 2.x
Latest release:
8 sites
1 downloads
7 fans
Current versions available: 3

This block will provide a 'jump to' menu within Moodle 2.x, similar to that used by Moodle 1.x (much of the code has been borrowed from 1.x).

Once installed, the block can operate in a number of different ways :

  1. By default, the block will use some clever javascript to display the jump to menu below the login/out link, while hiding the actual block on the page when not in editing mode. If you place the block on a part of the page with no other blocks, you will probably find that you get an empty column. Users without javascript will see the menu inside a normal Moodle block.
  2. If you prefer to have the menu displayed inside a normal Moodle block, then change the global config setting.
  3. If you want the menu to appear on content pages which can't display blocks (eg framed HTML), or would prefer not to use javascript to place the menu, then you will need to modify your layout templates in order to display the Jump to Menu in the correct place. You can find out how to do this by looking at the instructions on our website.

Please check our website for the latest plugin releases.

Screenshots

Screenshot #0

Contributors

Me !
Tim Williams (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Mathew Gancarz
    મંગળ, 20 નવે 2012, 8:07 AM
    Hello Tim, I kept getting the Undefined property $framename errors in my logs, so I patched lib.php on lines 215 and 283, adding:
    if (empty($CFG->framename)) {
    $CFG->framename = '_top';
    }

    It looks like the $CFG->framename property was removed at some point, and atleast the _top value seems to work for me to replace it.
  • Daniel Kaelin
    બુધ, 6 ફેબ્રુ 2013, 5:26 AM
    I installed this on Moodle 2.2.5 and the block was empty on the front page and on course pages. Has anyone else experienced this?

    I installed the version for Moodle 2.0-2.3.

    Unless I'm missing something here...
  • Me !
    શુક્ર, 8 ફેબ્રુ 2013, 5:14 PM
    The plugin relies on Javascript to move the menu to the point below the login menu link, so the block will normally show up blank. However, if you are not now seeing the menu below the login link then it is possible that your theme has had the code that the Javascript is looking for to do the insert in removes/modified. Does this work with one of the standard Moodle Themes? I

    You can also switch off the javascrpt and have the menu displayed inside the block by changing the option on the blocks config page in the Admin settings.

    Alternatively, if you download the plugin from my website instead of here, you'll find some additional instructions in the readme.txt which might help with your problem.
  • MIke Buchanon
    શુક્ર, 5 એપ્રિલ 2013, 3:22 AM
    really like the idea...added a quick patch on gist to fix course objects with quotes in their name and to fade it a bit until you hover over it https://gist.github.com/anonymous/5313335
  • Me !
    મંગળ, 16 એપ્રિલ 2013, 2:11 AM
    Hi Mike, the patch looks usefull, when I next have a moment I'll incorporate it into the official release.
  • Naveen Nayak
    મંગળ, 23 એપ્રિલ 2013, 10:42 PM
    Tim,

    i was using the block and ran into problems with quotes. The javascript sent to the browser is not properly encoded/escaped and the script breaks if it encounters quotes. The menu would show for some courses and not for others.

    I fixed it and thought would inform you to update the code.

    Its a very simple - one line fix - just json_encode() the text you are sending to the browser

    file: block_jumpto_menu.php
    function: get_navmenu()

    after you build the divtext variable, just json_encode() it - hope this helps

  • Me !
    બુધ, 24 એપ્રિલ 2013, 2:43 AM
    Hi Naveen, thanks for the fix. I suspect there was a character included in some of the menus of your courses which needed to be escaped in the JavaScript to work. I'll include the fix in the next release.
  • Mathew Gancarz
    બુધ, 28 મે 2014, 10:30 PM
    Hi Tim, I'm hoping to do #3 in the readme: "If you want the menu to appear on content pages which can't display blocks (eg framed HTML), or would prefer not to use javascript to place the menu, then you will need to modify your layout templates in order to display the Jump to Menu in the correct place. You can find out how to do this by looking at the instructions on our website."

    But it looks like the website for it: http://www.autotrain.org/misc/source/moodle2/jump_to/ is gone.

    Do you have the instructions somewhere else?
  • Mathew Gancarz
    બુધ, 28 મે 2014, 10:32 PM
    Ignore my previous message, was able to find it at:
    http://autoview.autotrain.org/mod/folder/view.php?id=278
  • Eric Hartley
    ગુરુ, 4 સપ્ટે 2014, 7:12 PM
    Has this been tested on Moodle 2.7? I'm looking to upgrade a 2.5 site which uses the plugin (which I love!) but am wary of losing the menu. Thanks.
  • Me !
    શનિ, 6 સપ્ટે 2014, 1:03 AM
    Hi Eric, I've just uploaded a version of the plugin which supports Moodle 2.7, some changes were necessary because of changes to the page structure.
  • Stuart Vaughan-Williams
    બુધ, 25 મે 2016, 5:58 PM
    Is a 3.1 version on the horizon soon? Miss not being able to still use this. Cheers.
  • Mathew Gancarz
    શનિ, 4 જૂન 2016, 3:46 AM
    Hi Stuart, We're migrating to 3.1 and I manually made some changes to make it work. All you need to do is edit version.php, and add
    $plugin->component = 'block_jumpto_menu';

    jsut above the $plugin->version .... line

    It appears to work fine once that change is made, though I am still doing testing.
  • Me !
    મંગળ, 7 જૂન 2016, 6:18 PM
    Thanks Mathew. I'll incorporate the fix into the next release. A Moodle 3.1 release is planned, but my schedule is very busy at the moment so I can't say when.
  • Davo
    સોમ, 5 સપ્ટે 2016, 11:03 PM
    Just a small note that the file lib.php in this plugin contains a closing tag '?>' with a space after it. This breaks page redirects when debugging is on (due to the output of the space character, whenever the lib.php file is included). Deleting the closing tag fixes the problem.
1 2
Please login to post comments