MDL-72450 theme: Allow themes to specify whether they use course index

Introduces a new theme config 'usecourseindex' which allows themes to
specify whether they implement and use course index.
This commit is contained in:
Mihail Geshoski 2021-09-07 13:13:29 +08:00
parent 9145d80b0b
commit 3372adddb3
2 changed files with 10 additions and 1 deletions

View File

@ -677,6 +677,12 @@ class theme_config {
*/
public $precompiledcsscallback = null;
/**
* Whether the theme uses course index.
* @var bool
*/
public $usescourseindex = false;
/**
* Load the config.php file for a particular theme, and return an instance
* of this class. (That is, this is a factory method.)
@ -754,7 +760,7 @@ class theme_config {
'rendererfactory', 'csspostprocess', 'editor_sheets', 'editor_scss', 'rarrow', 'larrow', 'uarrow', 'darrow',
'hidefromselector', 'doctype', 'yuicssmodules', 'blockrtlmanipulations', 'blockrendermethod',
'scss', 'extrascsscallback', 'prescsscallback', 'csstreepostprocessor', 'addblockposition',
'iconsystem', 'precompiledcsscallback', 'haseditswitch');
'iconsystem', 'precompiledcsscallback', 'haseditswitch', 'usescourseindex');
foreach ($config as $key=>$value) {
if (in_array($key, $configurable)) {

View File

@ -1,6 +1,9 @@
This files describes API changes in /theme/* themes,
information provided here is intended especially for theme designer.
=== 4.0 ===
* A new theme config 'usescourseindex' allows a theme to specify whether it implements and uses course index.
=== 3.11 ===
* The classname 'viewmode-cobmined' in course/management.php has been changed to 'viewmode-combined'