Affects Version/s: 1.9.1
Fix Version/s: None
Component/s: Theme: Customisable theme
Update the basic prototype to allow user with the following features:-
- Option of user to provide parent theme (See note below).
- Option of user to provide his/her own CSS file.
- Option of user to choose his own favicon.
- Option of user to include his/her own Moodle Logo.
The form where the user enters values of CSS elements (settings.php) was recreated using formslib.php.
The way the final page looks after applying the custom_theme is decided by the following hierarchy:
1) Standard Theme.
2) Parent theme selected by the user (if any).
3) CSS file uploaded by the user (if any).
4) Favicon uploaded supersedes that of parent theme (if any).
5) Moodle Logo uploaded supersedes that of parent theme (if any).
6) CSS element values entered by the user (if the user selects to use them).
Note - The parent theme feature has been included. However, it relies on Moodle cookies to work as it needs information about the currently logged user to extract the parent theme specified by him/her from the database. However, currently all Moodle Themes block cookies by setting $nomoodlecookie as true. Therefore, for the parent theme feature to work, the following line in styles.php of the theme that we have selected as parent must be commented out.
$nomoodlecookie = true;
When this line is commented out in the style.php the parent theme, the feature works. This is a one-time task and I suggest this line be left out in future theme releases to account for usability of parent theme feature of custom_theme.