Collapsed Topics

Course formats ::: format_topcoll
Maintained by Gareth J BarnardGareth J Barnard
An interchangeable topic or week based format that solves the issue of the 'Scroll of Death' when a course has many topics.
Latest release:
5186 sites
2k downloads
160 fans
Current versions available: 28

An interchangeable topic or week (day for 2.3.1+) based format that solves the issue of the 'Scroll of Death' when a course has many topics / weeks. All sections except zero have a toggle that displays that section. One or more sections can be displayed at any given time. Toggles are persistent on a per browser session per course basis but can be made to persist longer by a small code change. Full installation instructions, code adapt-ions and credits are included in the 'Readme.md' file.

If you have a course with more than fifty two sections then currently the toggle persistence will not work for the fifty third section and above.  Then you need to upgrade to the Moodle 2.5 version+.

Support:

The format comes with NO support.  Please see the 'Support' section in 'Readme.md' file that comes with the format.  This is because the format is complex and I regret that I don't have the time / resources to freely assist with questions pertaining to specific enhancements / changes / knowledge improvement.

I will investigate genuine bugs and issue fixes in a timescale set by myself.  When reporting issues you MUST clearly state the full version and release of both Moodle and the Collapsed Topics format as contained within their 'version.php' files - if not it takes me longer to figure out, often resulting in me asking for the details anyway and slowing the process of solving your problem down.  It really helps to read the 'Reporting Issues' section in the 'Readme.md' file and upload and describe in detail the issue you are having on the 'Course formats' forum.

Book:

NEW: 'The Complete Guide to Collapsed Topics' (and 'Blurb') book is now available, covering: installation, upgrade, uninstallation, course and global features, resetting, capabilities, language strings, overriding icons / styles in a theme and adding a new icon set.

The Complete Guide to Collapsed Topics book


The Complete Guide to Collapsed Topics book on a book stand


Inside the Complete Guide to Collapsed Topics.


NOTE: The latest version incorporates functionality to support new UK / EU Cookie Law which is implemented as a user acceptance in the 1.9 version and no 'cookie' is used at all in 2.x versions.

Screen casts:




Privacy API support starts with V3.3.1.2 for M3.3 and V3.4.0.2 for M3.4 where the API has been implemented in the minor release of Moodle.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7

Contributors

Gareth J Barnard
Gareth J Barnard (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Gareth J Barnard
    Fri, 18 Jan 2013, 6:35 PM
    Dear Iain,

    Ok, for me it works, therefore there must be something in your configuration. The symptoms that you describe indicate that either JavaScript is turned off (yes, I know that it should work without it in the coding guidelines and yes I have coded it such that all sections are open in this case and no there is no other solution) or something in JavaScript in any module / component that is being loaded on the page is causing it to fail as the ECMAScript thread in the browser is single threaded and therefore any script that dies causes them all to fail. Please could you provide more information about your set up with additional plugin's / browser / theme and screen shots on the course formats forum - https://moodle.org/mod/forum/view.php?id=47 - so that I can have a go at understanding the issue. If it is an unexpected / testable on vanilla Moodle problem with CT or if it is my conflict with another component that I could not anticipate then I will fix it.

    Cheers,

    Gareth
  • My son
    Mon, 21 Jan 2013, 7:58 PM
    Hi Gareth,

    I've noticed a problem with version 2013011100 (2.4.1.7). If the number of sections is set to 0 or 1, then "Add an activity or resource" is just text and not a link as it should be. If the number of sections is set to 2 or more then it's correctly a link.

    Is this a bug or is this just something strange with my installation?

    Regards,
    Aylwin
  • Gareth J Barnard
    Mon, 21 Jan 2013, 8:29 PM
    Dear Aylwin,

    Thanks for letting me know. It's a totally unexpected bug because I recently removed the 'Open / Close all sections' functionality when only 0 or 1 sections were displayed. It makes no sense in the code why this is happening as it's just another section. I'll look into it.

    Cheers,

    Gareth

  • Gareth J Barnard
    Mon, 21 Jan 2013, 9:26 PM
    Dear Aylwin,

    The issue is to do with a bug in module.js where it causes JavaScript to fall over thus causing the link not to be created by YUI in Moodle core. To fix, please edit 'module.js' and replace the 'Event handlers code for all opened / closed' in the method 'M.format_topcoll.init':

    // Event handlers for all opened / closed.
    var allopen = Y.one("#toggles-all-opened");
    if (allopen) {
    allopen.on('click',function(e){
    e.preventDefault();
    all_opened();
    });
    }
    var allclosed = Y.one("#toggles-all-closed");
    if (allclosed) {
    allclosed.on('click',function(e){
    e.preventDefault();
    all_closed();
    });
    }

    I'll do a formal release soon.

    Kind regards,

    Gareth
  • Gareth J Barnard
    Mon, 21 Jan 2013, 9:30 PM
    P.S. You will need to do a 'Purge all caches' as documented in the Readme.txt
  • My son
    Tue, 22 Jan 2013, 2:56 PM
    Hi Gareth,

    Thanks very much for the quick fix! As usual, excellent work!

    Cheers,
    Aylwin
  • Elyes TR
    Thu, 31 Jan 2013, 4:45 PM
    Hi Gareth, thank you very much for your extremely useful course format.
    Would it be possible to reduce the couse format height , or text Size ?
    Thanks

  • Gareth J Barnard
    Thu, 31 Jan 2013, 5:13 PM
    Dear Elyes TR,

    The latest version for Moodle 2.4 uses the 'h3' tag which is styled in terms of font size by the theme. The tag is the same to be consistent with section headings in other formats. I tend to only add new functionality to the latest version (in line with Moodle's new feature policy - http://docs.moodle.org/dev/Integration_Review#Backporting) - which for me is the Moodle 2.4 branch until I release a stable Moodle 2.5 branch. More details in the 'Reporting Issues' in the format's Readme.txt.

    Cheers,

    Gareth
  • Gareth J Barnard
    Thu, 31 Jan 2013, 6:05 PM
    Dear Elyes TR,

    Sorry, realised I was in techy mode. In a nutshell the text size can be changed by adjusting the styles in the theme (details on how to do this are technical) in the latest version for Moodle 2.4.

    By 'course format height' what do you mean exactly?

    Would you post a screen shot (perhaps annotated with a graphics program) indicating what you would like in the Course Format's forum - https://moodle.org/mod/forum/view.php?id=47.

    Cheers,

    Gareth
  • Jamie Burgess
    Wed, 3 Apr 2013, 10:26 AM
    Hi Garreth, Is there a way of having all weekly sections opened by default for first-time users of a course? I tried the method modifying module.js and the 53 characters there, but with the latest version, this did not seem to work. (I also purged all caches.) Is there something else that could be modified to get this to work?
  • Gareth J Barnard
    Wed, 3 Apr 2013, 5:44 PM
    Dear Jamie,

    The solution all depends on the version you are using. I will PM you.

    Cheers,

    Gareth
  • Jorge Villalon
    Mon, 29 Apr 2013, 6:59 AM
    Dear Garret,
    First of all I wanted to say thanks for you contribution. I started coding a format myself and just discovered it's a HUGE load of work.

    Well, I just wanted to know if there's any problem with Moodle 2.4.1+ (20130131), I'm using topcoll version 2013041101 and I get a js error as soon as the page loads, therefore nothing works later.

    The error is: Uncaught TypeError: Cannot call method 'substring' of null in module.js
  • Gareth J Barnard
    Mon, 29 Apr 2013, 7:41 AM
    Dear Jorge,

    There appears to be a coding fault with a last minute clean up which was not reported on the console when trying to access a non-existent variable.

    I've withdrawn the latest version to fix later today - it's early morning where I am.

    In the mean time, edit module.js line 59 and replace the 'this.toggleState' with 'theToggleState', then do a 'Purge all caches' as described in the Readme.

    Cheers,

    Gareth
  • Jorge Villalon
    Mon, 29 Apr 2013, 7:46 AM
    Dear Gareth,
    Firstly, sorry for misspelling your name before. And thanks heaps for the quick fix, it worked perfectly!
  • Gareth J Barnard
    Mon, 29 Apr 2013, 5:37 PM
    Dear Jorge,

    No worries, official fixed version for M2.4 now from https://moodle.org/plugins/pluginversion.php?id=2875

    Cheers,

    Gareth
Please login to post comments