Best practice forum (Archived)

Collapsed Topics

 
Mikael Salonen
Collapsed Topics
de Mikael Salonen - Thursday, 21 de March de 2019, 00:54
 

Hi!

I am wondering how to get the "Collapsed Topics" in functionality (in course sections), as seen here in the Academy and on https://demo.totaralearning.com/

Anyone who has an input on this?

Craig Eves
Re: Collapsed Topics
de Craig Eves (Totara Support) - Thursday, 21 de March de 2019, 14:29
Grupo Totara

Hi Mikael

There is some information on this https://totara.community/mod/forum/discuss.php?d=23047 as below - we are also evaluating whether the collapsed topic course format is suitable for including in Totara.

The accordion was developed as part of a custom theme for the community and academy site, which turns each topic on a course page into an accordion.

Attached is a snippet that you should be able to drop into an existing theme. If you don’t have a theme, we have a guide on how to set one up: https://help.totaralearning.com/display/DEV/Creating+a+Theme

You’ll need to do a couple of things on a non-production site:

  1. Open “format-topics.js" and “format_topics_renderer.php” and change every occurrence of {theme_name} with your theme’s name
  2. Add “format_topics.less” into their theme’s “less/totara.less” file.
  3. You need to follow the setup steps of https://help.totaralearning.com/display/DEV/Working+With+LESS+in+Themes
    1. Install Node and NPM: https://nodejs.org/en/
    2. Open up your Totara Installation in a command line
    3. Run "npm install -g grunt-cli" — this installs grunt, our build tool
    4. Run "npm install" — this installs Totara’s local dependencies
  4. Run “grunt" — This creates the build (this is where it diverges from the above document, which recommends runnings "grunt css". We need to build javascript as well)

After that, you can copy your theme directory onto a live site, and use it.

regards


Mikael Salonen
Re: Collapsed Topics
de Mikael Salonen - Thursday, 21 de March de 2019, 23:15
 

Thanks, Craig!


I will try this :-)

David Dunn
Re: Collapsed Topics
de David Dunn - Sunday, 20 de October de 2019, 15:01
 

Hi Craig,

This is something we are interested in doing. Is this something which could be implemented into TotaraCloud?

Thanks,

Dave

Craig Eves
Re: Collapsed Topics
de Craig Eves (Totara Support) - Monday, 28 de October de 2019, 14:20
Grupo Totara

Hi David

Unfortunately Totara Cloud does not allow custom themes - as upgrading may break the customisations made.

There is a course navigation block that can be used that provides a quick way of going to the required sections of the course.



Regards