From 3246428b95815c76cfeefb3e6c9fe7347458d8ee Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 30 Apr 2012 15:05:02 +0800 Subject: [PATCH] MDL-32505/MDL-32508 course: fix section_links block Now course_display has gone --- blocks/section_links/block_section_links.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/blocks/section_links/block_section_links.php b/blocks/section_links/block_section_links.php index 4fcde0f7c0d..734e6242e38 100644 --- a/blocks/section_links/block_section_links.php +++ b/blocks/section_links/block_section_links.php @@ -102,15 +102,6 @@ class block_section_links extends block_base { } } - if (isloggedin()) { - $display = $DB->get_field('course_display', 'display', array('course'=>$this->page->course->id, 'userid'=>$USER->id)); - } - if (!empty($display)) { - $link = $CFG->wwwroot.'/course/view.php?id='.$this->page->course->id.'&'.$sectionname.'='; - } else { - $link = '#section-'; - } - $sql = "SELECT section, visible FROM {course_sections} WHERE course = ? AND @@ -129,9 +120,9 @@ class block_section_links extends block_base { } $style = ($isvisible) ? '' : ' class="dimmed"'; if ($i == $highlight) { - $text .= "
  • $i
  • \n"; + $text .= '
  • $i
  • \n"; } else { - $text .= "
  • $i
  • \n"; + $text .= '
  • $i
  • \n"; } } $text .= ''; @@ -139,7 +130,7 @@ class block_section_links extends block_base { $isvisible = $sections[$highlight]->visible; if ($isvisible or has_capability('moodle/course:update', $context)) { $style = ($isvisible) ? '' : ' class="dimmed"'; - $text .= "\n$linktext"; + $text .= "\n$linktext"; } } }