Interaction of Force Theme and Cohort Theme?

Interaction of Force Theme and Cohort Theme?

by Mathew Gancarz -
Number of replies: 4
Picture of Core developers

Hello,

We have several groups using a single moodle site and it looks like Cohort Themes are the proper way to give them seperate themes, but I am running into the challenge of the login page. We would like the login page to be cohort specific also, but I realise that's challenging given that Moodle doesn't know what cohort the user is in before they login.

However, the groups do have different URLs for logging in. I'm wondering if using the URL forced theme in combination with cohort themes would be appropriate here?

For example the below, using the 'boost' and 'clean' themes with two cohorts, called 'boost-cohort' and 'clean-cohort'

the boost-cohort gets told the url: ie: https://siteurl/login/index.php?theme=boost

and the clean-cohort gets told the url: https://siteurl/login/index.php?theme=clean

If I understand correctly though, the URL forcing override the cohort themeing, so if someone in the boost-cohort used the link https://siteurl/login/index.php?theme=clean to login, they would get the clean theme despite them being in the boost-cohort?

Average of ratings: -
In reply to Mathew Gancarz

Re: Interaction of Force Theme and Cohort Theme?

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

Please kindly read the forum rules as any advice given may contain line numbers pertaining to a specific Moodle version.

In reply to Gareth J Barnard

Re: Interaction of Force Theme and Cohort Theme?

by Mathew Gancarz -
Picture of Core developers

Sorry Gareth, I neglected to read the forum rules.

Moodle version is 3.5.3

The theme versions I think don't apply here.

Average of ratings: Useful (1)
In reply to Mathew Gancarz

Re: Interaction of Force Theme and Cohort Theme?

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I really don't think it is a good idea to give out that kind of url.  Clever students will quickly figure out that they can change the theme that way and then you will never know what theme they are looking at.  If you have separate companies, I don't think they will be happy either.  

One solution would be to set up urls in your webserver like company1.moodle.com and company2.moodle.com that point to a specific page that is a themed page with a login block.  It doesn't necessarily have to take on the theme of the site at this point, you could just apply css or design each page to match the theme of the company.  This would have the added bonus that you could add company specific information too here.

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Interaction of Force Theme and Cohort Theme?

by Mathew Gancarz -
Picture of Core developers

Thank you Emma, that sounds like a much better approach. Will try it out.