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
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
Dave
Hope this will work with 1.9 also
Yes, this hack also works with moodle 1.9.
Joseph
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.
Joseph
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
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?
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:
The second time it places a jump menu to resources / courses on all other pages:
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
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
You're welcome, nice to feel appreciated : )
~thomas
your hack works brilliantly. Thanks.
Eric
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.
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
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
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
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.
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
Larry,
You could go one step further, with this, and create your very own course format.
http://docs.moodle.org/dev/Course_Format
How exciting!
Mary
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
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
Yes it may be confusing and I agree is never a good idea to modify moodle core files.
Thanks!
-Armando
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>) ?
The best thing to do is try it and see if it works.
Better enable debugging first though.
Cheers
Mary