]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes MDL-6838, uses 'inline-list' class (label with ordered list <ol> not redendered...
authornfreear <nfreear>
Fri, 1 Dec 2006 15:54:46 +0000 (15:54 +0000)
committernfreear <nfreear>
Fri, 1 Dec 2006 15:54:46 +0000 (15:54 +0000)
blocks/section_links/block_section_links.php

index 106c00aaa5a26d5fb51a9b8641f53ff093faf523..cdcdf04e8d7301911c33c08bb170ee04f25bee66 100644 (file)
@@ -34,7 +34,7 @@ class block_section_links extends block_base {
             return $this->content;
         }
 
-        $this->content = New stdClass;
+        $this->content = new stdClass;
         $this->content->footer = '';
         $this->content->text   = '';
 
@@ -71,7 +71,7 @@ class block_section_links extends block_base {
         } else {
             $link = '#section-';
         }
-        $text = '';
+        $text = '<ol class="inline-list">';
         for ($i = $inc; $i <= $course->numsections; $i += $inc) {
             $isvisible = get_field('course_sections', 'visible', 'course', $this->instance->pageid, 'section', $i);
             if (!$isvisible and !has_capability('moodle/course:update', $context)) {
@@ -79,16 +79,17 @@ class block_section_links extends block_base {
             }
             $style = ($isvisible) ? '' : ' class="dimmed"';
             if ($i == $highlight) {
-                $text .= "<a href=\"$link$i\"$style><b>$i</b></a> ";
+                $text .= "<li><a href=\"$link$i\"$style><b>$i</b></a></li>\n";
             } else {
-                $text .= "<a href=\"$link$i\"$style>$i</a> ";
+                $text .= "<li><a href=\"$link$i\"$style>$i</a></li>\n";
             }
         }
+        $text .= '</ol>';
         if ($highlight) {
             $isvisible = get_field('course_sections', 'visible', 'course', $this->instance->pageid, 'section', $highlight);
             if ($isvisible or has_capability('moodle/course:update', $context)) {
                 $style = ($isvisible) ? '' : ' class="dimmed"';
-                $text .= "<br /><a href=\"$link$highlight\"$style>$linktext</a>";
+                $text .= "\n<a href=\"$link$highlight\"$style>$linktext</a>";
             }
         }
 
@@ -98,4 +99,5 @@ class block_section_links extends block_base {
         return $this->content;
     }
 }
-?>
+
+?>
\ No newline at end of file