What is a "Session" Theme?

What is a "Session" Theme?

by Lucia Siochi -
Number of replies: 5

Hello, All,

I am trying out the different levels of themes: course, user, site.  I've been able to use these 3, but in the Administration>>Configuration>>Variables page (ie, admin/config.php, where you turn on/off user or course themes), it mentions a fourth level called "session":

"If you enable this, then courses will be allowed to set their own themes. Course themes override all other theme choices (site, user, or session themes)"

I've looked around and ran some searches but did not see any other mention of session themes.  What are they? Are they a future/planned feature?  (It sounds like something that allows one to use a specific theme when logged in, but doesn't "stick" after one logs out.  Or maybe it's how a guest can specify what theme to use?)

Any information on this or pointers to where I should look will be appreciated! smile

Thanks,
Lucia

Average of ratings: -
In reply to Lucia Siochi

Re: What is a "Session" Theme?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
There's actually no interface for it yet, but when this is enabled, you can change your theme from any page by adding a parameter to the URL:

   http://yourmoodlesite/index.php?theme=standardwhite

The reason it's not on by default is that anyone could make a link to change themes for other people.
In reply to Martin Dougiamas

Re: What is a "Session" Theme?

by Christine Rosalia -
So then, a "session" theme then would let, for example, a teacher (who is not also the admin of the moodle site) to set how their page looks for all of its users? My understanding of the theme settings now is that only 2 options are now available:

Option 1: An admin sets the theme (lets say blue ocean) for the entire site
Option 2: An admin lets each user choose individually how they and only they see all pages. For example, if I am a student taking 3 different courses with 3 different teachers, I could choose to see all of those courses in standard white, but no one else would see the courses in standard white unless they too choose standard white as their theme?

Is this correct? And if yes, will there be an added feature soon that would allow teachers who are not admins to have different themes than other teachers or other admins for just their pages with an extension that they could control how the users of the pages they create see those pages? In my current teaching situation where I share a moodle site with some 40 different teachers we would like such freedom of design...We want our pages to look different from other teachers' pages, BUT we want to lock in the theme (not allow students, at least initially) to take off the theme. That is because some students in our context would get confused if their version of moodle looked different from the version the teacher was modeling.Yet we as teachers want to be able to diversify or to individualize our designs.
In reply to Christine Rosalia

Re: What is a "Session" Theme?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
No, not correct.

Currently there are already:
  1. site themes
  2. user themes
  3. course themes  (this is what you are talking about)
Currently course themes override user themes and user themes override site themes.

A session theme just sets the user theme FOR THAT login session (the user setting is not actually changed).   It's not for changing other people - what I was referring to was that if this is enabled then people could potentially give each other links that would change the theme.  For example, if you clicked on some link like http://moodle.org/?theme=standardwhite that I made then your theme would get changed to standardwhite.  Don't worry about this, it's not enabled by default,is not usually wanted and is probably just confusing.  smile
In reply to Martin Dougiamas

Re: What is a "Session" Theme?

by Ger Tielemans -

If I send people with a direct link to a course (with a different theme), can I use this for keeping the theme, when they are draw back to the login screen? 

Other question: (if people use a PDA): is it possible to overrule the ruling theme with a user PDA-theme? 

In reply to Ger Tielemans

Re: What is a "Session" Theme?

by Chad Outten -

Hi Ger,

im not sure if this thread is still alive, BUT...

the session theme sets a theme that remains until the user logs out. When the users next logs in, the site/course/user themes are active again.

I'm currently managing a site with about 1300 users, 200 of which are PocketPC users. So the session theme is particularly useful for our PocketPC users who need to view Moodle at a different resolution.

What to do:

1. Go to config.php located in moodle base directory, add URL parameter:

$CFG->allowthemechangeonurl = true;

now lets assume your parameter is &theme=orangewhitepda

2. You can provide a URL [containing a course wildcard '*'] for them on the main page of the site eg.

http://mymoodlesite.org/course/view.php?id=*&theme=orangewhitepda

3. You may also provide a specific URL to a course eg.

 http://mymoodlesite.org/course/view.php?id=25&theme=orangewhitepda

this will take the user directly to course id = 25 using orangewhitepda theme

i hope this helps somebody! cheers, Chad big grin