Saturday, January 7, 2012

An adaptation of Gareth Barnard's excellent Collapsible Weeks course format for Moodle 1.9.x.

Today I decided to adapt the Collapsed Weeks course format, originally developed, and copyrighted by the talented Gareth Barnard. The result of the adaptation is that the course format can now be organised by week, and you can display the topic title for any week.

Here's a screenshot:

Screen 1: Adapted Coursepage format from Garath Barnard's Collapsible Weekly format.
Student / Normal mode view.

  1. The toggle bars are organised by week number.
  2. The week duration dates are shown when the Section is opened.
  3. The toggle bar may show the topic for that week (appended to the Week number).
  4. There is no Weekly Outline text at the top of the page

It shows the Week number when the toggle bar is closed. The week duration dates are shown when you click  the toggle bar. For example, "Week 1". You can now opt to show just the Week number - leave the Section text empty - or, you could show a topic on the toggle bar. You do this by typing a section text! For example, typing "All about MindMaps" in the section text, will display "Week 2: All about MindMaps" on the toggle bar.

The next screen shows all this detail very clearly.

Screen 2: Hybrid Coursepage format.
With Turn Editing On

Here's some background to the adaptation of Gareth's work. One of my favourite course formats for Moodle 1.9 is the Collapsed Topics format, also the brainchild of Gareth. It also comes in the Moodle 2.x flavour. It reduces the Scroll-Of-Death for course pages with almost-endless activities.

Screen 3: A colour-modified Collapsed Topics Format.
But alas! No date information.

However, because the Collapsed Topics format does not display any week dates, at times I would change to the Weekly Format. But that wouldn't stop the Scroll-Of-Death. I would then also try the Collapsible Weekly format.

Screen 4: Collapsible Weekly Format in its original colour scheme.

If one wishes to adapt the orginal format, Gareth was gracious enough to leave information on line 266 of format.php. With the adaptation, I no longer need to switch between the, already excellent, two course formats by Gareth. So that's the reason for this adaptation.  I leave you with just one more screenshot from one of my activity-rich production course pages:

Screen 5. What the "new" course format looks like on my production site.
"Loving it,....loving it!"

You can download the adapted Collapsible Weekly format from here. Be sure to backup your server's weekcoll folder first! Extract the contents of the zip file and copy the weekcoll folder to yourMoodleSite/course/format/weekcoll. You can change the colours of the course format. Just modify the weeks_collapsed.css file. 

So what do you think of this adaptation of Gareth's Collapsible Weeks course format? Do you think it could be useful for your own Moodle 1.9 coursepage? If you're running on Moodle 2.x, then I am sure that the code for Moodle 2.x's weekcoll format could also be modified to suit your need.


Important Footnote: 
In the original post, I commited the cardinal sin of not attributing the Collapsible Weekly course format to its rightful owner -  Gareth Barnard. Worse, I had said that the work to result in a hybrid which I claimed to be mine. All this without obtaining prior permission from Gareth. I apologize to Gareth for this oversight which was committed in my excitement of the coding work. I have learnt an important lesson, and I want to set the record straight that both the Collapsed Topic and Collapsible Weekly formats are the result of hard work by Gareth Barnard. He alone deserves the FULL CREDIT for these two formats that greatly reduce the Scroll-Of-Death in Moodle course pages.

If this post appears on my blog, it is only because I have obtained permission from the original author, Gareth, and have made sure that I have fulfilled the requirements the GNU GPL v3. Meaning  I am free to build upon the work, but MUST attribute the original author (Gareth Barnard) and acknowledge his copyright over the plugin. 

If you like this post or site
a small donation would be nice but would last only a day,
otherwise leaving a comment (or a compliment) below will last me a month!

Ratings and Recommendations by outbrain