topics and weeks formats question

topics and weeks formats question

by Stuart Lamour -
Number of replies: 3
Picture of Plugin developers

just a quick question -

as far as i can see, the only difference the end user sees is the default section title as either Topic X or Week X/Date.

Seems a lot of code scattered around for changing a single string?

Anyone know why these are separate formats?

 

 

 

Average of ratings: -
In reply to Stuart Lamour

Re: topics and weeks formats question

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Stuart,

Looking at the configuration management log it appears that since the dawn of time (13th June 2003) that topics and weeks have been separate from a formats point of view.  The person to answer this will be the man himself, Martin.

For the most part the code is the same only with subtle differences dotted around the place.  A while back I merged the Collapsed Weeks functionality into Collapsed Topics as noticed this very same thing.  This saves a shed load of maintenance for the sake of a little switching based on a setting.

Cheers,

Gareth

Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: topics and weeks formats question

by Stuart Lamour -
Picture of Plugin developers

If you wanted to go further could replace those collapsed formats with some simple css ?

http://jsbin.com/ihOleqa/2/edit?html,css,output

(currently you'd still have to add some minimal js .focus() and aria expanded etc for screen readers)

 

 

In reply to Stuart Lamour

Re: topics and weeks formats question

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Yes and no!

Nice use of target pseudo selector.  But CT already does the display none / block switching in CSS for the core functionality.  Its all the other bits like AJAX toggle state, columns and colours.... that take up the bulk of the coding.

G