diff --git a/lib.php b/lib.php index 91c19828..2e02d97c 100644 --- a/lib.php +++ b/lib.php @@ -71,7 +71,7 @@ public function get_settings() { foreach ($this->settings as $settingname => $settingvalue) { if (isset($settingvalue)) { $settingvtype = gettype($settingvalue); - if ((($settingvtype == 'string') && ($settingvalue === '-')) || + if ((($settingvtype == 'string') && ($settingvalue === '-')) || (($settingvtype == 'integer') && ($settingvalue === 0))) { // Default value indicator is a hyphen or a number equal to 0. $this->settings[$settingname] = get_config('format_topcoll', 'default'.$settingname); @@ -1317,7 +1317,7 @@ public function update_course_format_options($data, $oldcourse = null) { $maxsection = $DB->get_field_sql('SELECT max(section) from {course_sections} WHERE course = ?', array($this->courseid)); if ($maxsection) { - // If there are no sections, or just default 0-section, 'numsections' will be set to default + // If there are no sections, or just default 0-section, 'numsections' will be set to default. $data['numsections'] = $maxsection; } } diff --git a/renderer.php b/renderer.php index 1bdb86c6..ee71d736 100644 --- a/renderer.php +++ b/renderer.php @@ -41,7 +41,7 @@ class format_topcoll_renderer extends format_section_renderer_base { protected $tccolumnpadding = 0; // Default padding in pixels of the column(s). protected $mobiletheme = false; // As not using a mobile theme we can react to the number of columns setting. protected $tablettheme = false; // As not using a tablet theme we can react to the number of columns setting. - protected $courseformat = null; // Our course format object as defined in lib.php; + protected $courseformat = null; // Our course format object as defined in lib.php. protected $tcsettings; // Settings for the format - array. protected $defaulttogglepersistence; // Default toggle persistence. protected $defaultuserpreference; // Default user preference when none set - bool - true all open, false all closed.