Your Moodle version

Blocks: Jump To Navigation

block_jumpto_menu
Maintained by Me ! Tim Williams
Adds a Moodle 1.x style "Jump To" menu to Moodle 2.x

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

Contributors

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

Comments RSS

Show comments
  • Capt. Moodle
    Tue, Nov 29, 2011, 9:55 PM
    This plugin seems to have the option for being a patch - I've asked for some clarification from Tim before approving. Peace - Anthony
  • Picture of Diljith Kannan
    Mon, Aug 6, 2012, 5:43 PM
    In our server we have got this Follwing error due to this erro..

    textlib_get_instance() is deprecated. Please use static calling textlib::functioname() instead.
    line 2939 of \lib\deprecatedlib.php: call to debugging()
    line 122 of \blocks\jumpto_menu\lib.php: call to textlib_get_instance()
    line 34 of \blocks\jumpto_menu\block_jumpto_menu.php: call to block_jumpto_menu_navmenu()
    line 281 of \blocks\moodleblock.class.php: call to block_jumpto_menu->get_content()
    line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
    line 929 of \lib\blocklib.php: call to block_base->get_content_for_output()
    line 981 of \lib\blocklib.php: call to block_manager->create_block_contents()
    line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created()
    line 6 of \theme\afterburner\layout\default.php: call to block_manager->region_has_content()
    line 765 of \lib\outputrenderers.php: call to include()
    line 712 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
    line 36 of \admin\search.php: call to core_renderer->header()
    textlib_get_instance() is deprecated. Please use static calling textlib::functioname() instead.
    line 2939 of \lib\deprecatedlib.php: call to debugging()
    line 122 of \blocks\jumpto_menu\lib.php: call to textlib_get_instance()
    line 34 of \blocks\jumpto_menu\block_jumpto_menu.php: call to block_jumpto_menu_navmenu()
    line 281 of \blocks\moodleblock.class.php: call to block_jumpto_menu->get_content()
    line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
    line 929 of \lib\blocklib.php: call to block_base->get_content_for_output()
    line 981 of \lib\blocklib.php: call to block_manager->create_block_contents()
    line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created()
    line 6 of \theme\afterburner\layout\default.php: call to block_manager->region_has_content()
    line 765 of \lib\outputrenderers.php: call to include()
    line 712 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
    line 36 of \admin\search.php: call to core_renderer->header()
    textlib_get_instance() is deprecated. Please use static calling textlib::functioname() instead.
    line 2939 of \lib\deprecatedlib.php: call to debugging()
    line 122 of \blocks\jumpto_menu\lib.php: call to textlib_get_instance()
    line 34 of \blocks\jumpto_menu\block_jumpto_menu.php: call to block_jumpto_menu_navmenu()
    line 281 of \blocks\moodleblock.class.php: call to block_jumpto_menu->get_content()
    line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
    line 929 of \lib\blocklib.php: call to block_base->get_content_for_output()
    line 981 of \lib\blocklib.php: call to block_manager->create_block_contents()
    line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created()
    line 6 of \theme\afterburner\layout\default.php: call to block_manager->region_has_content()
    line 765 of \lib\outputrenderers.php: call to include()
    line 712 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
    line 36 of \admin\search.php: call to core_renderer->header()
    textlib_get_instance() is deprecated. Please use static calling textlib::functioname() instead.
    line 2939 of \lib\deprecatedlib.php: call to debugging()
    line 122 of \blocks\jumpto_menu\lib.php: call to textlib_get_instance()
    line 34 of \blocks\jumpto_menu\block_jumpto_menu.php: call to block_jumpto_menu_navmenu()
    line 281 of \blocks\moodleblock.class.php: call to block_jumpto_menu->get_content()
    line 232 of \blocks\moodleblock.class.php: call to block_base->formatted_contents()
    line 929 of \lib\blocklib.php: call to block_base->get_content_for_output()
    line 981 of \lib\blocklib.php: call to block_manager->create_block_contents()
    line 352 of \lib\blocklib.php: call to block_manager->ensure_content_created()
    line 6 of \theme\afterburner\layout\default.php: call to block_manager->region_has_content()
    line 765 of \lib\outputrenderers.php: call to include()
    line 712 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
    line 36 of \admin\search.php: call to core_renderer->header()

    Notice: Undefined property: stdClass::$framename in C:\xampp\htdocs\iph\blocks\jumpto_menu\lib.php on line 282

    Notice: Undefined property: stdClass::$framename in C:\xampp\htdocs\iph\blocks\jumpto_menu\lib.php on line 203
  • My ugly mug
    Fri, Nov 2, 2012, 8:14 AM
    I am still noticing the deprecation warnings shown above. With debugging turned off, the block functions normally. However when these deprecated functions are removed in a future Moodle version, the block will no longer function.
  • Me !
    Fri, Nov 2, 2012, 8:10 PM
    I've not had time to deal with this yet, it will be sorted once I have some time spare from my other projects.
  • Picture of Mathew Gancarz
    Tue, Nov 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.
  • Picture of Daniel Kaelin
    Wed, Feb 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 !
    Fri, Feb 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.
  • Picture of MIke Buchanon
    Fri, Apr 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 !
    Tue, Apr 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.
  • Picture of Naveen Nayak
    Tue, Apr 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 !
    Wed, Apr 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.
Please login to post comments