Custom theme is not reflected on user profile page

Custom theme is not reflected on user profile page

by cedric guindon -
Number of replies: 7

Hello.  i have a problem regarding a custom theme that i have created.

I'm trying to force my theme to the profile page and to prevent student from changing it but it does not seems to be working.

As seen on the image, the top part is the theme at the course level, but on the bottom part, the theme is not applied to the profile page for some reason.

Options i verified:

Allow user theme is set to default no, so it can't be changed.

Allow course theme is set to yes.

But this still did not work.


I know that i can put the option: Allow user theme to yes and select my custom theme, but this will also allow the student to change the theme and go back to the default one and i would like to prevent that.

I also tryed to force the user theme in the mdl_user database but if the allow user theme option is set to no, the theme does not appear.

Is there anyway of setting a custom theme to every student profile page and preventing them to change it?

Thank you!

Attachment moodle_img.jpg
Average of ratings: -
In reply to cedric guindon

Re: Custom theme is not reflected on user profile page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

You can't expect us to tell you why your custom theme is not working like you think it should, without letting us have access to the theme to see where the problem stems from. There could be a 100 things not working right for all we know.

If I send you my email can you email me the theme so I can test it?

That said, have you actually set another similar theme as a User theme? If you have well you can restrice this to only one that one and the Default theme. So if both are similar then they should work, if both are coded to style the mypublic and mydashboard layouts?

Thanks

Mary

In reply to Mary Evans

Re: Custom theme is not reflected on user profile page

by cedric guindon -

I don't have any problem sending it to you.  I appreciate your help.

The theme is working fine, i can set it up in the profile page and the custom theme i created will display, i simply would like to block student from changing the theme and go back to the default one.  I know you can set the option to prevent student from changing it, but if i remove the option to change the theme for the user, my custom theme goes back to the default moodle theme and not the one that was set in the mdl_user db.

My question is mainly regarding the default behavior on the user profile theme.

Thank you for your help!

In reply to cedric guindon

Re: Custom theme is not reflected on user profile page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

In Site Administration > Appearance > Themes > Theme settings there is a setting on that page that allows you to either Enable or Disable User themes. If you deselect this option and SAVE your settings, then the theme you have for your site will, or should show the theme as the one you select as your default theme.

At the end of the day, it is the settings you have made that will determine which theme a student sees. Also there may be a predefined setting in the Moodle root config.php that sets the order of themes hierarchy.

http://docs.moodle.org/23/en/Theme_settings#Change_default_hierarchy

Cheers

Mary

In reply to Mary Evans

Re: Custom theme is not reflected on user profile page

by cedric guindon -

You just made me realize that what i'm trying to accomplish will not be possible unless i apply my custom theme to the site level and therefore becoming the default one.


For some reason, i thought the profile was part of the course and not outside of it. lol duh!  it's friday!!!


Thank you for the answer!

In reply to cedric guindon

Re: Custom theme is not reflected on user profile page

by Danny Wahl -

if you want that theme in the courses but not the site home then use it as the category theme, or set it as all the course level themes.

In reply to cedric guindon

Re: Custom theme is not reflected on user profile page

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
I don't think you can specify a different theme just for the user profile page. But I'm not sure why you would need to - why not just add the styling that you want to your main theme in such a way that it applies just to the profile page.

You can create a layout file for the profile page and create a css file to go with that, all within your main theme.

In reply to Richard Oelmann

Re: Custom theme is not reflected on user profile page

by cedric guindon -

This is something i thought about, but the main theme will also be used for other courses, and each courses have a different theme.


In a perfect scenario i would have a way to set a different theme in the user profile depending on which course they are currently doing.  Keeping in mind that the navigation is disabled so no student can't go back to the main site level with all the courses unless they go back to the main portal and select another course.  I'm using a single sign-on between a portal, moodle and saba iLMS.


My alternative at this point is creating another profile page outside of moodle (in my portal) and disabling the one from moodle.

Thank you for your help, we learn something new everyday smile