course-format MDL-22071 Added clearfix class to section lis
authorSam Hemelryk <sam@moodle.com>
Thu, 15 Apr 2010 02:04:28 +0000 (02:04 +0000)
committerSam Hemelryk <sam@moodle.com>
Thu, 15 Apr 2010 02:04:28 +0000 (02:04 +0000)
course/format/topics/format.php
course/format/weeks/format.php

index 87bf9e4..460e513 100644 (file)
@@ -93,7 +93,7 @@ if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing())
 
     // Note, no need for a 'left side' cell or DIV.
     // Note, 'right side' is BEFORE content.
-    echo '<li id="section-0" class="section main" >';
+    echo '<li id="section-0" class="section main clearfix" >';
     echo '<div class="left side">&nbsp;</div>';
     echo '<div class="right side" >&nbsp;</div>';
     echo '<div class="content">';
@@ -136,7 +136,7 @@ while ($section <= $course->numsections) {
         $thissection = $sections[$section];
 
     } else {
-        unset($thissection);
+        $thissection = new stdClass;
         $thissection->course  = $course->id;   // Create a new section structure
         $thissection->section = $section;
         $thissection->summary  = '';
@@ -174,7 +174,7 @@ while ($section <= $course->numsections) {
             $sectionstyle = '';
         }
 
-        echo '<li id="section-'.$section.'" class="section main'.$sectionstyle.'" >'; //'<div class="left side">&nbsp;</div>';
+        echo '<li id="section-'.$section.'" class="section main clearfix'.$sectionstyle.'" >'; //'<div class="left side">&nbsp;</div>';
 
             echo '<div class="left side">'.$currenttext.$section.'</div>';
         // Note, 'right side' is BEFORE content.
index 51ce50e..f1d0fa4 100644 (file)
@@ -82,7 +82,7 @@
     if ($thissection->summary or $thissection->sequence or $PAGE->user_is_editing()) {
 
         // Note, 'right side' is BEFORE content.
-        echo '<li id="section-0" class="section main" >';
+        echo '<li id="section-0" class="section main clearfix" >';
         echo '<div class="left side">&nbsp;</div>';
         echo '<div class="right side" >&nbsp;</div>';
         echo '<div class="content">';
                 $sectionstyle = '';
             }
 
-            echo '<li id="section-'.$section.'" class="section main'.$sectionstyle.'" >';
+            echo '<li id="section-'.$section.'" class="section main clearfix'.$sectionstyle.'" >';
 
             echo '<div class="left side">&nbsp;'.$currenttext.'</div>';