Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-7800

Collapsed topics (format_topcoll) apply bootstrap class style to the list only for Boost theme and not child theme of the Boost.

XMLWordPrintable

    • 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:

      1. Install theme that inherit from boost theme.
      2. Use the theme from step 1.
      3. Create a course with "Collapsed Topic" course format.
      4. Go to the course.
      5. Compare difference between two theme in course collapse sections by switch theme between Boost and child theme. 
      6. Inspect <ul class="ctopics topics row"> element in browser.
      7. List element in Boosts theme classes like <li class="section main clearfix col-sm-12 col-md-12 col-lg-12">
      8. 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;
      }
      

       

       

       

            gb2048 Gareth J Barnard
            smo@praxis.dk Sam Møller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.