Collapsed Topics course format
The Collapsed Topics course format is a contributed code module. The format is similar to the standard Topics format except that all topics (except '0') can be 'toggled' on and off. This reduces clutter in courses that have a large number of topics, lots of content in the topics or a combination of the two.
You can download the format from the Modules and Plugins Database or by going to GitHub and cloning the repository alternatively by selecting one of the downloads for your version of Moodle if the database is unavailable. Full installation instructions are in the included 'Readme.txt' file.
Please follow the instructions in the supplied 'Readme.txt' file and if desired, follow this video: 'Installing the Collapsed Topics Course Format'
To select the format, simply choose it from the list of course formats in the course settings. To show / hide a topic just click on its toggle.
Setting the Toggle Text
Tick off 'Use default section name' and type in the 'Section name' box. This allows the summary to be shown as it normally is in the Topics course format (Course_homepage#Topic_format_example).
When refreshing the page, the state of the 'toggles' is remembered. This is on a per browser session per course basis for as long as the browser remains open. If you would like it to persist longer, please follow the instructions in the included 'Readme.txt' file.
Fine tuning the look
Most of the formatting is contained within the file 'topics_collapsed.css' which is fully commented to facilitate easy manipulation of specific elements. For example, if you found that in your particular web browser the 'Topic x ' text was too big...
Then you can add an addtional 'font-size:0.6em;' to the 'tr.cps td.cps_centre' class.
Per Theme Changes
You can set a different look globally or on a per theme basis by changing the following css in 'collapsed_topics.css'. Non-standard colours used to illustrate the point.
If you want a per theme look for when you allow your users to choose their own theme, move the css shown and place in your theme's css files and change as desired.
If you want to change the look and style of the arrow, simply change 'arrow_down.png' and 'arrow_up.png'.
Q. How do I report an issue with Collapsed Topics?
- A. Yes. It incorporates a change where the section name of the topic summary is used instead of the summary itself to form the words on the toggle.
Collapsed Topics has been developed by and is maintained by Gareth Barnard with invaluable input from:
- Anthony Borrow
- Frank Ralf, Matt Gibson, Howard Miller and Tim Hunt who commented on the Developer Forum
- Craig Grannell - Snub Communications who wrote the article 'Collapsed Tables' in .Net Magazine Issue 186
- Collapsed Topics is the Modules and plugins database page for downloads and more information on this module. There are versions for Moodle 1.9, 2.0, 2.1 and 2.2. The Moodle 1.8 version for reference and legacy use is available from GitHub and in the downloads.
- Discussions: please create or find a discussion topic in the Moodle Course Formats Forum
- Bugs can be reported on Moodle Tracker
- Collapsed Weeks course format is a similar contributed code module.