gjbarnard / moodle-format_topcoll

Collapsed Topics course format for Moodle.
http://docs.moodle.org/en/Collapsed_Topics_course_format
GNU General Public License v3.0
35 stars 60 forks source link

format_topcoll: Treat themes using Boost as a parent the same as Boost #42

Closed tonyjbutler closed 6 years ago

tonyjbutler commented 6 years ago

Currently the layout is broken if using a custom theme based on Boost (and using it as a parent).

gjb2048 commented 6 years ago

Interesting for contributed themes. But.... might be an issue of functional conflict if the child theme overrides the get_row_class and get_column_class as intended and find they don't work. The actual solution looks as if it could be more efficient.

gjb2048 commented 6 years ago

Ok, $THEME->parents in a theme config.php file is an array, e.g.

$THEME->parents = array('bootstrapbase');

so why are you not using the PHP 'in_array' function if '$page->theme->parents' is not empty? Then use the '===' comparitor. Ok, I need to change things too.

Please improve and re-submit as a single commit.

tonyjbutler commented 6 years ago

OK, I've improved the efficiency as per your suggestion.

gjb2048 commented 6 years ago

Thanks Tony.