diff --git a/Readme.md b/Readme.md index 6351e3ed..e923cbab 100644 --- a/Readme.md +++ b/Readme.md @@ -246,7 +246,7 @@ Version Information =================== Version 2.9.0.2. 1. Added the capability to delete a section. - 2. Tidy up column padding after testing with Shoehorn. + 2. Tidy up column padding after testing with Shoehorn. TODO: Decide if colomn padding is needed now. 3. Removed out of date development test code. Version 2.9.0.1. diff --git a/renderer.php b/renderer.php index bd611a18..6fe48c48 100644 --- a/renderer.php +++ b/renderer.php @@ -40,7 +40,7 @@ class format_topcoll_renderer extends format_section_renderer_base { private $tccolumnwidth = 100; // Default width in percent of the column(s). - private $tccolumnpadding = 20; // Default padding in pixels of the column(s). + private $tccolumnpadding = 0; // Default padding in pixels of the column(s). private $mobiletheme = false; // As not using a mobile theme we can react to the number of columns setting. private $tablettheme = false; // As not using a tablet theme we can react to the number of columns setting. private $courseformat = null; // Our course format object as defined in lib.php; @@ -96,7 +96,7 @@ protected function start_toggle_section_list() { if ($this->mobiletheme === false) { $classes .= ' ctlayout'; } - $style .= ' padding: ' . $this->tccolumnpadding . 'px;'; + $style .= ' padding-left: ' . $this->tccolumnpadding . 'px; padding-right: ' . $this->tccolumnpadding . 'px;'; $attributes = array('class' => $classes); $attributes['style'] = $style; return html_writer::start_tag('ul', $attributes); @@ -622,10 +622,11 @@ public function print_multiple_section_page($course, $sections, $mods, $modnames $this->tccolumnwidth = 100 / $this->tcsettings['layoutcolumns']; if ($this->tcsettings['layoutcolumnorientation'] == 2) { // Horizontal column layout. $this->tccolumnwidth -= 0.5; + $this->tccolumnpadding = 0; // In 'px'. } else { $this->tccolumnwidth -= 0.2; - } - $this->tccolumnpadding = 20; // In 'px'. + $this->tccolumnpadding = 0; // In 'px'. + } } else if ($this->tcsettings['layoutcolumns'] < 1) { // Distributed default in plugin settings (and reset in database) or database has been changed incorrectly. $this->tcsettings['layoutcolumns'] = 1; diff --git a/styles.css b/styles.css index 454931a0..2b39e737 100644 --- a/styles.css +++ b/styles.css @@ -29,6 +29,8 @@ */ .course-content ul.ctopics { margin: 0px; + padding-left: 0px; + padding-right: 0px; } .course-content ul.ctlayout {