Activities Block disappears when moved to left

Activities Block disappears when moved to left

by Sean Moley -
Number of replies: 7
I've just started with moodle and I've added a few things to my first site, including an activities block. However, when i try to move the activities block to the left with the left arrow it collapses.

When I expand it the entries are gone, and when I turn off editing it disappears completly

Any ideas?
 
Average of ratings: -
In reply to Sean Moley

Re: Activities Block disappears when moved to left

by Colin McQueen -
I've just discovered this today. Moodle 1.53 and saw your post. Also if you return it to the right the entries reappear BUT on turning editing off the block totally disappears. This is a standard install on with only 2 additional modules (slideshow and feedback).
Not tested yet but this is happening on the front page for me not on other course pages. We had removed the Main menu block.
In reply to Sean Moley

Re: Activities Block disappears when moved to left

by John Papaioannou -
This was a bug, but it's now dead. wink

Please upgrade your Moodle to the latest 1.5.x+ to fix the problem. It is also fixed in current 1.6 development versions. You will know that you have the fixed block if it reports its version as 2004041001 (for 1.5.x) or 2006011300 (for 1.6 dev).

If you cannot update, here is the do-it-yourself fix:

Open /blocks/activity_modules/block_activity_modules.php with a text editor.

Find:

global $modnamesused, $modnamesplural;

Replace with:

get_all_mods($this->instance->pageid,
    $mods, $modnames, $modnamesplural, $modnamesused);


The final patch is more sophisticated and offers better performance, but this is enough to just make it work correctly.

Cheers!
Jon
In reply to John Papaioannou

Re: Activities Block disappears when moved to left

by Colin McQueen -
Well our block for Activities says 2004041001  and we have for 1.5.3 but it still shows the bug. Not fixed here then?

Any ideas?
In reply to Colin McQueen

Re: Activities Block disappears when moved to left

by John Papaioannou -
There was a slight hiccup with the fix (my fault blush) which caused it to not work as expected. However "not as expected" means an error message under some conditions, and not "just like before". The latest versions now include the correct fix, without any hiccups.

If you still have the problem, please open block_activity_modules.php and paste the first line here (it includes a version and date/time identifier); if you have the very latest everything should be fine.

Jon
In reply to John Papaioannou

Re: Activities Block disappears when moved to left

by Colin McQueen -
OK I have

<?PHP //$Id: block_activity_modules.php,v 1.6 2005/03/02 19:22:20 defacer Exp $

which is probably an old version.

It has:-

        // This is really NOT pretty, but let's do it simple for now...
        global $modnamesused, $modnamesplural;

So I could do the fix mentioned but would prefer to get the full file. Any chance you could post it here. It's quite short no?

Ta

In reply to Colin McQueen

Re: Activities Block disappears when moved to left

by John Papaioannou -
Colin, I think your block's version is 2004041000 and not 2004041001, so we might have had a miscommunication here. Your version is 10 months or so old, so obviously it doesn't have the fix.

In any case, you can download the very latest block from the 1.5.x branch from here.