Can't remove 'skip' feature from block headers

Can't remove 'skip' feature from block headers

Mike Forshaw發表於
Number of replies: 15

Hi,

I have just recently upgraded to Moodle 1.7+ and can't get rid of the Skip Main Menu, Skip Course Categories etc from the top of my blocks. It is causing big problems with my theme. Also, strange black dots seem to appear next to every resource placed in a course which is also quite annoying.

If anyone knows hwo to fix them it would be grately appreciated, thanks.

Mike

評比平均分數: -
In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Mauno Korpelainen發表於

Is your site looking like this: http://moodle.org/mod/forum/discuss.php?d=62434

There have been some other messages like this so let's try to find the reason. Could you tell me what kind of server/PC you have and version of mysql and php installed. If you can attach your config.php it may help solving this.

Possible reasons are last character in config.php, wrong version of mysql or php, safe mode on, firewall, virus scanner, some corrupted file (not edited with notepad), extra signs or missing signs in theme files, wrong wwwroot or dirroot, permissions and so on.

You could also tell how did you upgrade. If you just copy new files over old ones upgrading may fail...

In reply to Mauno Korpelainen

Re: Can't remove 'skip' feature from block headers

Dave Jones發表於
Hi  we are running a HP server dual 3.0ghz xeon processors 2 gb ram and windows server 2003 standard, php version 4.4.2 mysql version 4.1.20.  I have attached a copy of our config.php.  Permissions are identical on the old moodle folder and the new moodle folder, wwwroot hasn't changed as hasn't the dirroot.  The upgrade was carried out into a new folder not over writing the old folder
In reply to Dave Jones

Re: Can't remove 'skip' feature from block headers

Mauno Korpelainen發表於

One line is missing from your config.php:

at the end you should have

require_once("$CFG->dirroot/lib/setup.php");
// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?>

(If you have utf8 database you could also have before it

$CFG->unicodedb = true;  // Database is utf8

but I guess this is not a problem)

In reply to Mauno Korpelainen

Re: Can't remove 'skip' feature from block headers

Mauno Korpelainen發表於
There is another possible reason too: is you have removed Standard theme or parent theme those "skips and bullets" may appear.
In reply to Mauno Korpelainen

Re: Can't remove 'skip' feature from block headers

Mike Forshaw發表於
Thanks for your response, I still have the Standard theme installed within the Moodle Themes folder. I'm not sure what you mean by parent theme though. I changed my theme to the standard one and it didn't make a difference, still getting the skips and bullets. It's bizarre, I didn't think the upgrade would cause so much trouble. My moodle interface looks horrible now.
In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Mike Forshaw發表於

Please can anyone help, here is a screenshot...

附件 skip_navigation_problem.jpg
In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Mauno Korpelainen發表於

OK. Now I know what is the problem. This skip block feature came to moodle 1.6 and your theme must be from moodle 1.5. Also this theme needs upgrading ( http://docs.moodle.org/en/1.6_theme_upgrade ). Most likely it can be repaired by editing styles_layout.css

Check that your standard theme is also moodle 1.7 version.

In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Hi Mike,

So you upgraded your Moodle straight from 1.5 to 1.7 (i.e. you skipped the 1.6 version). A certain number of changes have been introduced in Moodle themes behaviour with version 1.6, for better accessibility compliance.

Also you have transferred your "old" customized theme from 1.5 to 1.7 and were hoping it to work straight away... Unfortunately, this is not the case, as you have found out.sad

You might try to fix your old 1.5 customized theme to make it work with 1.7, but I would strongly recommend basing a new customized theme on 1.7 standard. If you don't want to do this, the minimum you'll have to do is make the necessary "accessibility" changes to your customized theme's header.html file (located in your customized folder, i.e. http://www.cardinal-heenan.org.uk/moodle/theme/college15_fixed/header.html).

Have a look at moodle 1.7 \theme\standard\header.html file and compare it with your own header.html file. You will see that you have to incorporate the changes in red in the extract below.

<?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
?>
<div id="header-home" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
<?php } ?>
<?php //Accessibility: breadcrumb trail/navbar now a DIV, not a table.
if ($navigation) { // This is the navigation bar with breadcrumbs ?>
<div class="navbar clearfix">

All the best,

Joseph

PS.- Please avoid cross-posting on these forums.wink

In reply to Joseph Rézeau

Re: Can't remove 'skip' feature from block headers

Mike Forshaw發表於

Great reply thanks. I made sure I had standard theme 1.7 and updated the header.html which successfully removed the skip feature above headers. However, there are still a few minor tweaks like all the blocks on the front page are pushed over slightly. The name of our Moodle (Cardinal Heenan VLE) also appears on the left of my main header image.

I have attached my header.html if you be so kind as to have a look.

PS - Sorry for cross-posting, I got desperate.

In reply to Joseph Rézeau

Re: Can't remove 'skip' feature from block headers

Mike Forshaw發表於

Great reply thanks. I made sure I had standard theme 1.7 and updated the header.html which successfully removed the skip feature above headers. However, there are still a few minor tweaks like all the blocks on the front page are pushed over slightly. The name of our Moodle (Cardinal Heenan VLE) also appears on the left of my main header image.

I have attached my header.html if you be so kind as to have a look.

PS - Sorry for cross-posting, I got desperate.

In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Mike Forshaw發表於

Here's a pic of the front page with the two problems mentioned above

附件 front_page_problems.jpg
In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片

Hi Mike,

When you include in an HTML block any object (usually a picture, but could also be a table, etc.) whose width exceeds the default width of the left or right blocks, FireFox and MSIE differ in their display behaviour.

Firefox will automatically extend the width of all the blocks in that column in order to accomodate the wider object existing in one of the blocks. MSIE will display the over-wide object in its HTML block but will not extend the width of the blocks, hence the unpleasant "pushover" resulting effect.

Reason: a difference in the interpretation of the CSS rules between those two browsers.

In the case a hand, it is the Match Up "game" which you have included in one HTML block on the right hand side of your site's front page which is the culprit. When you included it (from http://www.thefreedictionary.com/) you selected as width: 225px. But the default width of blocks in Moodle is min. 160px and max. 210px (for the front page).

Remedy: I have not found a way to do this by tweaking the CSS in your theme. However, there is a solution which is only valid for the front page of your site (not if you have the same problem inside courses themselves).

You'll have to hack file \moodle\index.php, right at the beginning of the file, locate:

/// Bounds for block widths on this page
define('BLOCK_L_MIN_WIDTH', 160);
define('BLOCK_L_MAX_WIDTH', 210);
define('BLOCK_R_MIN_WIDTH', 160);
define('BLOCK_R_MAX_WIDTH', 210);

Change e.g. define('BLOCK_R_MIN_WIDTH', 235);

and... your Match Up block now fits inside its HTML block and all the other blocks take up the same width (in MSIE). This hack does not change anything to the (desired) display in FireFox.

QED,

Joseph

In reply to Mike Forshaw

Re: Can't remove 'skip' feature from block headers

Joseph Rézeau發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片 Translators的相片
1- all the blocks on the front page are pushed over slightly.

Don't know what you mean by "pushed over" in this context, sorry.

2- The name of our Moodle (Cardinal Heenan VLE) also appears on the left of my main header image.

in file header.html remove the striked-out bit, that's what prints your site's name.

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

It would help if one could have access at least to your site's home page without loggin in. If you can, you can give me temporary access so I can help you better.

Joseph

In reply to Joseph Rézeau

Re: Can't remove 'skip' feature from block headers

Mike Forshaw發表於

Joseph, I have sent a message to you with login details. I think the blocks being pushed over might be an IE issue as it is fine in FF. Maybe there is a hack? I removed the line you said and that worked for the site's name. Thanks for the help.

Mike