Dear Kyle,
Assuming you are using the latest version for Moodle 2.x+ and not using persistent cookies to store the toggle state beyond the session. Then edit 'module.js' and change all of the '0's to '1's for the variable 'toggleBinaryGlobal' around line 32. This should give you:
var toggleBinaryGlobal = "11111111111111111111111111111111111111111111111111111";
where the string is 53 '1's.
Cheers,
Gareth
That's Awesome! Cheers!
On a more complicated level - is it possible to set it so the current topic is expanded?
Dear Kyle,
Not complicated ;) - the code already does it. Just make sure you designate the current topic with the 'light bulb' and upon refresh it will open. Please let me know if yours is not working - if so as much info about your installation would be useful.
Cheers,
Gareth
Hey Gareth,
I'm looking for an option very close to this but I'm looking to have specifically only 2 topics by default open at the top. I changed the global topic binary global numbers the first 2 from 0 to 1 hoping that the first two topics would then change to toggle. No luck. Am I missing something with cookies?
Dear Brad,
Nope! The snag is that as the code is JavaScript it is cached by Moodle and you need to do a 'Site Administration' -> 'Development' -> 'Purge All Caches' for any changes to have an effect (This only needs to be done once after a change).
However, if you are using a Moodle 2 version you may have to remove some user preferences in the database and change some code in 'renderer.php'. If you could tell me what version of CT you are using '$plugin->version' value in 'version.php' then I could tell you the specific changes.
Cheers,
Gareth
Our version is $plugin->version = 2011120914
I would appreciate if you could point me to where exactly in renderer.php I would have to make some changes.
Dear Brad,
My bad, but I made several releases on that version, please could you tell me the value of '$plugin->release' as that is really unique!
Cheers,
Gareth
$plugin->release = '2.2.1.1'
Dear Brad,
Make the '111000...' change at the very beginning of 'lib_min.js'. 'lib.js' is there for reference. If you want to use 'lib.js' and make the changes there you can but you need to change line 31 of 'format.php' too.
Cheers,
Gareth