Page Format Drop Down Menu

Re: Page Format Drop Down Menu

by Tim Chubb -
Number of replies: 0
I have fixed the issue i was experiencing on my moodle, i was running the latest stable build of moodle 1.9 (1.9.2) with no other blocks, modules or other extensions installed.

After digging arround the generated markup of the page i was satisfied that the markup was being generated correctly, so i set about debugging the javascript, almost immediatly i spotted a discrepancy between the markup and the expected id of a tab used to call the menu functions. The JavaScript lib was expecting tabs to have an id of 'tabmenutreen' (with n being an integer), instead it was getting an id of 'menutreen'

the solution was to add a string of 'tab' to be concatenated with the menu's id on line 28 of the file /theme/page/lib.php

Before
if ($tabmenu->active) {
 $activated[] = $tabmenu->id;
}

After

if ($tabmenu->active) {
 $activated[] = 'tab'.$tabmenu->id;
}

Hope this helps put other people using this excellent course format

Tim.