Best practice forum (Archived)

Collapsed Topics

 
Mikael Salonen
Collapsed Topics
بواسطة Thursday, 21 March 2019, 12:54 AM - Mikael Salonen
 

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
بواسطة Thursday, 21 March 2019, 2:29 PM - Craig Eves (Totara Support)
مجموعة 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
بواسطة Thursday, 21 March 2019, 11:15 PM - Mikael Salonen
 

Thanks, Craig!


I will try this :-)

David Dunn
Re: Collapsed Topics
بواسطة Sunday, 20 October 2019, 3:01 PM - David Dunn
 

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
بواسطة Monday, 28 October 2019, 2:20 PM - Craig Eves (Totara Support)
مجموعة 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