Jump to menu

Jump to menu

by Just Dave -
Number of replies: 29
Hi,

Is there any way to hide or disable the "Jump to.." menu which is displayed on the top right of some course pages?

Many thanks ! :D
Dave
Average of ratings: -
In reply to Just Dave

Re: Jump to menu

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi,

I personally think there are two problems with the Jump to... menu. It takes up valuable space and can conflict with longish course names. It allows the student to wander aimlessly to any part of the course and end up losing track. Accordingly, in my own orangechoc theme, I have removed the dropdown menu and replaced it with the login information (which I moved up from the footer).

In your own theme, in the header.html file,

<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header">
<div class="headermain"><?php echo $heading ?></div>
<div class="headermenu"><?php echo $menu ?></div>

replace above line with

<div class="headermenu"><?php echo user_login_string($usercourse, $USER) ?></div>

and in the footer.htm file you can delete the command in red

<div id="footer"><?php echo $loggedinas ?>

Hope that helps,

Joseph

Average of ratings: Useful (2)
In reply to Joseph Rézeau

Re: Jump to menu

by Patrick Malley -
For the record - I agree! Thanks Joseph - I never thought of deleting the script from the header to get rid of this. I hacked it out in the css before thinking of it.
In reply to Joseph Rézeau

Re: Jump to menu

by Just Dave -
Hi Joseph,

Thanks! That worked perfectly! I agree too, the "Jump to..." menu does seem to confuse alot of our users. So far I've found that a few simple header dropdown menu items in the header is usually understood better by our users.

Thanks big grin
Dave
In reply to Joseph Rézeau

Re: Jump to menu

by Anil Sharma -
Thanks, Joseph. This came in handy.

Hope this will work with 1.9 also
In reply to Anil Sharma

Re: Jump to menu

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Anil,
Yes, this hack also works with moodle 1.9.
Joseph
In reply to Joseph Rézeau

Re: Jump to menu

by Margaret Richards -
2 years later the instructions for getting rid of the jump to menu still work beautifully. THANKS!
In reply to Margaret Richards

Re: Jump to menu

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
In reply to Joseph Rézeau

Re: Jump to menu

by Margaret Richards -
Ok well several months later with my de-bugger on, I'm getting an error:

Notice: Undefined variable: usercourse in [deleted]/public_html/moodle/theme/formal_white_USAID/header.html on line 31

HELP? Where is usercourse originally defined? If I delete just $usercourse I get a whole new string of errors

Thanks.
In reply to Margaret Richards

Re: Jump to menu

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Sorry but I don't quite understand what you have done to trigger the error. Could you post your header.html file here (or send it to me by e-mail, address in my profile) so I can have a look?
Joseph
In reply to Margaret Richards

Re: Jump to menu

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

After private exchange with Margaret it appears that things have changed (maybe since moodle 1.9). Anyway, correct way to not display the jump to.. dropdown list menu in a moodle course is as follows. In your theme's header.html file

replace the line in red with the line in blue below

<?php } else if ($heading) { // This is what gets printed on any other page with a heading?>

<div id="header">

<div class="headermain"><?php echo $heading ?></div>

<div class="headermenu"><?php echo $menu ?></div>

</div>

<?php } ?>

change red line to:

<div class="headermenu"><?php echo user_login_string($COURSE) ?></div>

Joseph


Average of ratings: Useful (4)
In reply to Joseph Rézeau

Re: Jump to menu

by Tuya Myagmardorj -
Hello,
Is it possible to show Jump to menu in the footer? We want to show jump to menu twice(in the top and the bottom of the moodle site). How can I do?
In reply to Joseph Rézeau

Re: Jump to menu

by Thomas Hanley -
Hi Joseph,

Many thanks also for this useful post. I feel that having clear navigation is fundamentally important in order to make your learning content as easy as possible to move through and find. The greater the number of navigation mechanisms and the greater the varying types of navigation mechanism the more likely you are to confuse users. So I too have chosen to disable this jump menu.

Just a quick clarification about where to disable within header.html. I am using

Moodle 1.94+ (Build20090225)
Standard Theme

The line Joseph highlights in red which needs changing:

<div class="headermenu"><?php echo $menu ?></div>

...occurs in two places.

The first time it occurs it places a jump menu on the home page which controls language choice:

Jump menu home enabled

The second time it places a jump menu to resources / courses on all other pages:

jump menu all other pages enabled

So change the two lines (highlighted yellow below) within header.html

<div id="page">

<?php //Accessibility: 'headermain' is now H1, see theme/standard/styles_layout.css: .headermain
if ($home) { // This is what gets printed on the home page only
?>
<?php print_container_start(true, '', 'header-home'); ?>
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<?php print_container_end(); ?>
<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<?php print_container_start(true, '', 'header'); ?>
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<?php print_container_end(); ?>
<?php } ?>

~thomas


In reply to Thomas Hanley

Re: Jump to menu

by Deborah Delin -

Hi Thomas,

Thanks so much for taking the time to update these instructions for Moodle 1.9.  I couldn't understand why Joseph's clear instructions from 2006 were'nt working, and then realized you had updated them.  So problem solved thanks to you and of course to Joseph.

Deborah

In reply to Joseph Rézeau

Re: Jump to menu

by Angela Butterworth -

This is exactly what I want to do but cannot find the file header.html. Has this changed in Moodle 2 or am I looking in the wrong place? I have scoured several different theme folders without success.

I will be very grateful for some clarification.

In reply to Angela Butterworth

Re: Jump to menu

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Angela,

In answer to your question, yes themes have changed significantly in Moodle2. There is now no separate header.html, but it is part of the /layout/frontpage.php or /layout/default.php or layout general.php.

http://docs.moodle.org/dev/Themes_2.0

Richard

In reply to Angela Butterworth

Re: Jump to menu

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Angela,

Rather than delete the lines of code mentioned in the earlier discussion here why not just add

.headermenu {display: none}

at the very end of your theme's core.css.

Mary

In reply to Mary Evans

Re: Jump to menu

by Larry Elchuck -

Mary

Does this work in Moodle 2.2.1 for the sky_high theme? (Didn't for me)

The Jump to option is at the bottom of the page when in "show one" mode ...

I would like to hide it from (at least) the students ... but can live with it hidden for evryone

In reply to Larry Elchuck

Re: Hide "Jump to ... " menu for course topics

by Larry Elchuck -

Solved it .... so now a hint.

For an elementary grade-level project  I am working on, it is desireable to allow for student navigation to be done between topics using only labels that are images. To hide the "Jump to ..." menu at the bottom of the page when in topics format (view one mode) in Moodle 2.2.x, add :

.jumpmenu {display:none;}

at the very end of the course/format/topics/styles.css, so that it now looks like:
===========

.course-content ul.topics {margin:0;}
.course-content ul.topics li.section {list-style: none;margin:5px 0 0 0;padding:0;}
.course-content ul.topics li.section .content {margin:0 40px;}
.course-content ul.topics li.section .left {width:40px;float:left;text-align:center;}
.course-content ul.topics li.section .right {width:40px;float:right;text-align:center;}
.jumpmenu {text-align:center;}
.jumpmenu {display:none;}

============

The same can be done for the weeks format, if desired.

In reply to Larry Elchuck

Re: Hide "Jump to ... " menu for course topics

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Larry,

You should be able to add this to the end of your theme's core.css (or whatever the primary css file is in the theme) rather than making changes in the core files.

Richard

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Jump to menu

by Armando Duran -
Hi All,

I also agree that the jump to menu may confuse students and I think I'll disable it as well.

Does anybody know how could I disable it only for students but enable it for course creators and teachers, I think it is useful for them.

Thanks
-Armando
In reply to Armando Duran

Re: Jump to menu

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Armando,
I do not think it's a good idea to have the Jump to... menu enabled for teachers and disabled for students. A different interface might give the teachers the wrong impression of what the students actually see in their moodle courses.
Anyway, you cannot do it with CSS rules alone, you would need to hack the moodle core files, which is never a good idea in case of further updates.
Joseph
In reply to Joseph Rézeau

Re: Jump to menu

by Armando Duran -
Hi Joseph,

Yes it may be confusing and I agree is never a good idea to modify moodle core files.

Thanks!
-Armando
In reply to Joseph Rézeau

જઃ Re: Jump to menu

by Dr. Amitkumar Mali -

thanks .. This helped me a lot

I want to add my own menu, can I paste its codes here ( i.e. just after <?php echo user_login_string($usercourse, $USER) ?></div>) ?

In reply to Dr. Amitkumar Mali

Re: જઃ Re: Jump to menu

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The best thing to do is try it and see if it works.

Better enable debugging first though.

Cheers

Mary