Small bug in course_menu block needing fix.

Re: Small bug in course_menu block needing fix.

by Tim Allen -
Number of replies: 5
Thanks a lot, I followed your simple instructions. Now it is working! smile There are a couple of small problems though:


1. In the configuration --> blocks --> course_menu screen there are a couple of empty screen strings like so:

block_course_menu_teachermanual_url:

teachermanualurl

block_course_menu_studentmanual_url:

studentmanualurl

2. When the block is added to the front page, strange things are happening to the icons:

problem

Thanks in advance for any more help,
Tim.
In reply to Tim Allen

Re: Small bug in course_menu block needing fix.

by L. Vandijck -
The two strings are indeed missing in the language file supplied with the block. I tried adding them manually to the language file block_course_menu.php, something like:
$string['teachermanualurl'] = 'URL of the Teacher's manual';
$string['studentmanualurl'] = 'URL of the Student's manual';
but that only resulted in parsing errors. As am I perfect stranger to PHP and its intricacies I've given up, and am hoping and waiting for the developers to include them.

As for the icons: is the folder "icons" present in the blocks folder, so blocks\course_menu\icons ?
Have you tried refreshing the page? Maybe your browser's cache is playing tricks with you?
Regards,
Leo

In reply to L. Vandijck

Re: Small bug in course_menu block needing fix.

by Tim Allen -
Thanks Leo, I tried emptying the browser cache but it didn't solve the problem.   I'm not sure if it is a bug or a problem with my own installation. 

If anyone could try adding this block to their Moodle site front page I'd be interested to hear whether the same problem occurs or not.

I will look into it further.

Regards,
Tim.  smile
In reply to Tim Allen

Re: Small bug in course_menu block needing fix.

by L. Vandijck -
Just as I was rereading my previous post I realised the mistake I made and that caused the parsing error: it was my careless use of the '-sign.
So if you add the following lines somewhere to the file block_course_menu.php in your language folder all texts should show correctly:
$string['teachermanualurl'] = 'URL of the Teacher manual';
$string['studentmanualurl'] = 'URL of the Student manual';
Of course this does not solve your disappearing icons.
Maybe you are using a custom theme with the setting $THEME->custompix = true;  in its config.php
If so, then you should heed the warning:
/// If true, then this theme must have a "pix"
/// subdirectory that contains copies of all
/// files from the moodle/pix directory, plus a
/// "pix/mod" directory containing all the icons
/// for all the activity modules.
Just a shot in the dark...


In reply to L. Vandijck

Re: Small bug in course_menu block needing fix.

by Tim Allen -
Thanks again, I fixed the language string problem by adding those lines as you suggested.

I am pretty sure the broken icons on the frontpage are caused by a bug.  There are in fact two symtpoms:

  1. It messes with the default encoding of the frontpage.  Even though my default encoding is UTF8, it causes the default to be ISO-8859-1 (my browser default?).  This causes all the screen text to appear broken until I login, after which it looks OK.  This happens in both IE and Firefox.  After I delete the block from the site frontpage this problem goes away.
  2. The icons are doubled up and broken as shown in the screenshot aboveHowever, this only occurs in IE; in Firefox all the links and icons seem to be displayed correctly.  wink
My guess is that this is some kind of javascript conflict with other javascript included in the frontpage header, but I'm not sure because I am hopeless at reading, let alone writing, code.

Maybe the developers will have a look at this for me when they have time.  smile It's not really a serious problem because I don't really need to use this block on the site frontpage. 

Thanks to the developers for this block and to Leo for helping out with the trouble-shooting.  approve

Tim.
In reply to L. Vandijck

Re: Small bug in course_menu block needing fix.

by Nasha Jiang -

Hi Leo,

Your solution has resolved my problem.

Thank you very much,smile