Custom moodle theme

Custom moodle theme

by Igor Crnković -
Number of replies: 4

Hi!

I have a problem, or more, a question.

I have to design custom theme for course but server is configured to have only one theme for all courses.

How to apply custom moodle theme when server is configured to have predefined theme and not allowing users ( highest role is Assistant wich I have ) to choose themes.

Is there something like child themes or if browser is not finding custom CSS file it will apply standard theme ...

How can I install custom theme on such server.

Thank you very much.

Igor

 

Average of ratings: -
In reply to Igor Crnković

Re: Custom moodle theme

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Igor,

If you do not have access to the server itself to upload a new theme, and your role does not allow you to choose themes then does the theme you are using as your main theme have a customcss box on it's own theme settings page and are you able to access that? I'm afraid if you can't do any of those things (or get someone else who does have access to do them) then I can't think of any other way - but in that case I would suggest you would need to talk to the people who have asked you to do this and the people who set the permissions which are preventing you from doing it smile

If you can get at the customcss for the single theme (or get someone with permissions to do so) then you may be able to add some custom css there which targets your course specifically, without affecting the others - it really depends how much you need to be able to change. If you are making small css only changes then that will probably work, if you need major changes including changes to the layout (normally in the php files) then it wont.

Moodle adds a bodyclass identifier for both the course and the category, so you could use those to add some course specific styling e.g. If the url for my course page is http://mymoodlesite/course/view.php?id=1679 I could add some customcss such as

body.course-1679 {               
    background-color:red;
}

You can target other specific selectors in a similar way, depnding on just how much you need to change

HTH

Richard


In reply to Igor Crnković

Re: Custom moodle theme

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

Hi Igor,

You need to go to Settings > Site Administration > Appearance > Theme settings and enable the setting so that your Moodle site can Allow Course themes. Don't forget to SAVE your settings.

Next create a course and in the course settings page you can decide which theme you want to FORCE as a course theme from the dropdown list.

Read these two documents they explain how to do this in Moodle 2.x.x

Theme settings

Course settings

HTH

Mary

In reply to Igor Crnković

Re: Custom moodle theme

by Igor Crnković -

Thank you for your help.

Your answers are helping to make a solution smile

Moodle is ver. 1.9.17

Problem is that I should do a theme redesign for one course, but I don't have permissions to alter theme settings or any apperance settings of the course.

Its univeristy server. All courses have same theme, and themes cannot be changed. Sys admin is willing to help, but he is just techie and doesnt know much about designing themes.

Is there possibility for admins to make exception like, assign a theme to only one course, without giving permissions to other users on the server to change themes? 

Thank you smile