Skip to content

Commit

Permalink
V2.9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jun 20, 2015
1 parent 4969409 commit 4f10266
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*/
.course-content ul.ctopics {
margin: 0px;
padding-left: 0px;
padding-right: 0px;
}

.course-content ul.ctlayout {
Expand Down

0 comments on commit 4f10266

Please sign in to comment.