diff --git a/blocks/section_links/block_section_links.php b/blocks/section_links/block_section_links.php index 106c00aaa5a..cdcdf04e8d7 100644 --- a/blocks/section_links/block_section_links.php +++ b/blocks/section_links/block_section_links.php @@ -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 = '
    '; 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 .= "$i "; + $text .= "
  1. $i
  2. \n"; } else { - $text .= "$i "; + $text .= "
  3. $i
  4. \n"; } } + $text .= '
'; 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 .= "
$linktext"; + $text .= "\n$linktext"; } } @@ -98,4 +99,5 @@ class block_section_links extends block_base { return $this->content; } } -?> + +?> \ No newline at end of file