Collapsed Topics - Rest Settings

Collapsed Topics - Rest Settings

by Richard Clay -
Number of replies: 8

Hi, Could anyone please clarify the difference between the "reset" and "reset all" options in the Collapsed Topics settings (shown below)?


I'm a bit unsure as to whether the "reset all" option affects other courses other than the one you're currently in.

Thanks

Richard

Average of ratings: -
In reply to Richard Clay

Re: Collapsed Topics - Rest Settings

by Richard Clay -

Just to answer myself, the "reset all" option does reset options for all courses but it's an option that seems only available to admins. I was a bit worried that teachers could use the reset all option and undo others' customisation. It's still an option that an admin needs to be wary of. I've used it in the past without realising the full consequences of what it does. 

An idea might be to hide the reset all option away a bit more so admins have to make a more conscious decision to change all.    



In reply to Richard Clay

Re: Collapsed Topics - Rest Settings

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

Hi Richard,

Where do you suggest I put it?  I always assumed that admins should know what they are doing and not be tempted with 'What does this button do'?

There is information when you click on question mark that explains things.

Gareth

In reply to Gareth J Barnard

Re: Collapsed Topics - Rest Settings

by Richard Clay -

Hi Gareth

I was probably tempted to experiment because the option is in the context of "edit course settings". I would normally presume that changing something at this level wouldn't have an affect site wide. I also wasn't aware that the option was an extra admin setting as I always saw it and just considered it as standard. It was only by logging in as a teacher today that I realised it was for admin only. I did finally read the question marks and that's why I posted here. I was OK as it was on a test system that I made the error. 

If you were to move the option I would say that it should go in the global settings for the plugin -  yourmoodle//admin/settings.php?section=formatsettingtopcoll

By the way, good work on this plugin. I do like and promote it. If you're interested I've been testings some tweaks with the CSS and using Font Awesome for icons to try and get a simple, clean look (see below).



I think a Font Awesome pointer option would be good  as a future development.

Thanks
Richard 

In reply to Richard Clay

Re: Collapsed Topics - Rest Settings

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

Thanks Richard.

The reset all functionality was implemented before the plugin settings functionality in Moodle (or at least I was aware of it) and should be moved there rather on each course.  Not sure how to yet but would have to see.

I like the FontAwesome idea but it does imply that FontAwesome is installed with the theme.  And even though I think you can add fonts to a course format I would not want a clash.

Would you be willing to share the CSS you have please?  It has been said that the format does not sit well with the Essential theme, although I cannot see that yet, but perhaps your styles would, so could be implemented as an alternative.  Perhaps even in future having different 'swatches' for the format.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Collapsed Topics - Rest Settings

by Richard Clay -

Hi Gareth 

Thanks for the info. For now we've changed the language pack and added a warning to the global reset option, which seems to be a decent workaround. 

I'm attaching the CSS for the amends I did although it's a little bit of bit of a hack job. I have no access to core code files so I has to override everything via CSS and I chose do this on the "point" toggle option. Might be useful though and if something similar could be implemented cleanly into the plugin it would be great. I think it would be good if you could choose start and end points for a gradient and perhaps have a border colour option.   

FontAwesome (FA) would have to be installed to have an FA option but this is really easy to add to Moodle. You just need to link to the FA stylesheet (<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">) in the <head> using the Additional HTML option in Moodle.

Cheers
Richard


In reply to Richard Clay

Re: Collapsed Topics - Rest Settings

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

Hi Richard,

I don't like hack jobs but rather prefer complete and well thought out solutions.  Ok, I did look into moving the reset options into 'settings.php' but the mechanism is a 'latch' and need to investigate how to make this work as the values for the reset tick boxes are not actually saved in the database.

With the FontAwesome option, that solution will not work for several reasons:

  1. CDN's only work if your Moodle installation has access to the internet.  So it will not work for intranet only installations.  The theme font loading mechanism has to be used.
  2. FontAwesome is updated regularly, so what happens when a theme implements a different version?
  3. I don't want the situation where the font is loaded twice (as in the jQuery issue which is why that was resolved in core).

I'd be happy to consider individual icons as they are svg's and can be extracted.

Indeed the CSS is a bit of a hack job and has several issues:

  1. I don't like the use of !important as it can cause other problems.  I would rather work out the specific selector / get the order right.
  2. Fixing font size will break theme design.
  3. Specifying "Arial" as a font will break theme design and not work on some operating systems.
  4. Specifying the FontAwesome icon replacements breaks the whole icon choice functionality.  This needs to be thought out.

If you need access to the source code of Collapsed Topics, please see: https://github.com/gjb2048/moodle-format_topcoll

Gareth

In reply to Gareth J Barnard

Re: Collapsed Topics - Rest Settings

by Richard Clay -

Hi Gareth

I too don't like hack jobs but I had to write the CSS like this as I don't have access to the source code or Plugins directory on my install, one of the downsides of outsourced hosting.  I only made the changes and posted here because of feedback from users and I was just sharing what I've done for my particular situation instead of suggesting that it was a complete and well thought out solution for all. The CSS changes were a quick fix designed to please our users, which sometimes has to be done.

As I said it would be good if "something similar could be implemented cleanly into the plugin" and my solution, which I know is far from perfect, was only given to perhaps take some specific ideas from, e.g. gradients and scalable icons.

I could respond to your numbered points (e.g. I've set a font-family not a font which is fine) but I think I've lost the appetite to continue this discussion much further. I get the impression that my ideas are not very welcome and I think you've missed some of the context of my posts.

Richard

In reply to Richard Clay

Re: Collapsed Topics - Rest Settings

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

Hi Richard,

Oh indeed not.  All ideas are welcome, but I hope you can see that I am wary of Collapsed Topics becoming over the top with more options and switches than the Space Shuttle.  The more things that are added the further away from the elegance of the original solution you become and the closer you are to separation of functionality into other modules that enhance the original solution.

For instance I have just added a new option to allow three different sizes of icon.

In my last post I stated the technical issues of implementing FontAwsome as a solution.  Yes it is a 'font-family' but what happens when you have two versions of the same font that implement the same font family on the same page?

If you or anybody want more icons of a different type then say, I'll happily consider adding them.

Quick fixes can be great for particular installations, but they are specific to the installation.  Even with outsourced hosted solutions you could still request that they use your particular fork of the code.

I have been working on Collapsed Topics since Moodle 1.8 so I hope that you understand that I have committed a reasonable amount of time to it and by nature would be protective of it.  I know you are in a difficult situation to change the source code, but the code is there for you in full for you to change if desired.

Gareth