Commit 2de4c9e2 authored by Camille Tardy's avatar Camille Tardy
Browse files

readme : detail the categories color edition process.

parent f3a409f8
......@@ -5,7 +5,7 @@
Boost Child theme for Moodle 3.5.
A related Mahara theme can be found [in our Gitlab](https://gitlab.unige.ch/tardyc/Theme-Mahara)
A related Mahara theme can be found [in our Gitlab](https://gitlab.unige.ch/portfolio/Theme-Mahara)
### Installation
......@@ -14,13 +14,14 @@ Copy under the following path [MyMoodle]/theme/unige
###How to
To change colors for the top categories :
* edit function : color_fac_category($id_category) in classes/output/core/course_renderer.php
* edit list in : scss/style_post_scss.scss
* edit list in : scss/style_post_scss.scss. You can edit or add faculties varibles here. Be careful to edit at the top of the file the variable name or its color and around ligne 866 where the variables are used (the name must match).
* edit the function : color_fac_category($id_category) in classes/output/core/course_renderer.php. The case number must match the top categories id form your database. All sub categories inherit the color from its parent. The categories class name must match the ones used in the scss file around ligne 866.
* Purge Moodle caches in administration to see the results. --> http://mymoodle.com/admin/purgecaches.php
To change links in menus :
* use the setting view for the theme to update the urls
* use the lanuage files in the source code to edit the links label
* use the language files in the source code to edit the links label
......@@ -325,6 +325,8 @@ class course_renderer extends \core_course_renderer {
// Category name
// $category_name = $DB->get_field('course_categories', 'name', array('id' => $id_category));
//case number must match top categories ID from your database. the css class name must match those defined in the style_post_scsss.scss file.
// Category color
$color_fac = '';
switch ($id_category) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment