-
Bug
-
Resolution: Done
-
Minor
-
3.4.7, 3.5.7, 3.6.3
-
2017042203
-
MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
-
MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
The theme plugin that inherit boost theme doesn't get booststrap style like boost theme.
Since we have a lot of themes that inherit from the Boost theme.
It's impractical to override the format_topcoll method(as Gareth suggest in the comment in issue CONTRIB-6954) in every single themes.
Reproduce step:
- Install theme that inherit from boost theme.
- Use the theme from step 1.
- Create a course with "Collapsed Topic" course format.
- Go to the course.
- Compare difference between two theme in course collapse sections by switch theme between Boost and child theme.
- Inspect <ul class="ctopics topics row"> element in browser.
- List element in Boosts theme classes like <li class="section main clearfix col-sm-12 col-md-12 col-lg-12">
- List element in child theme have the classes like <li class=""section main clearfix span12">
renderer.php: 81
if (strcmp($page->theme->name, 'boost') === 0) { |
$this->bsnewgrid = true; |
}
|
The use of format_topcoll_renderer::$bsnewgrid
protected function get_column_class($columns) { |
if ($this->bsnewgrid) { |
$colclasses = array(
|
1 => 'col-sm-12 col-md-12 col-lg-12', |
2 => 'col-sm-6 col-md-6 col-lg-6', |
3 => 'col-md-4 col-lg-4', |
4 => 'col-lg-3'); |
} else { |
$colclasses = array(1 => 'span12', 2 => 'span6', 3 => 'span4', 4 => 'span3'); |
}
|
|
return $colclasses[$columns]; |
}
|
Suggest fix at renderer.php: 81
if (strcmp($page->theme->name, 'boost') === 0 || (isset($page->theme->parents) && in_array('boost', $page->theme->parents))) { |
$this->bsnewgrid = true; |
}
|