Permalink
Browse files

previous fix now also works in weekly format

  • Loading branch information...
1 parent 61cc70a commit a69a27868468e85444c4b975078feca2bd7375cd gustav_delius committed May 29, 2004
Showing with 3 additions and 1 deletion.
  1. +3 −1 blocks/section_links/block_section_links.php
@@ -33,10 +33,12 @@ function get_content() {
if ($this->course->format == 'weeks') {
$highlight = ceil((time()-$this->course->startdate)/604800);
$linktext = get_string('jumptocurrentweek', 'block_section_links');
+ $sectionname = 'week';
}
else if ($this->course->format == 'topics') {
$highlight = $this->course->marker;
$linktext = get_string('jumptocurrenttopic', 'block_section_links');
+ $sectionname = 'topic';
}
$inc = 1;
if ($this->course->numsections > 22) {
@@ -47,7 +49,7 @@ function get_content() {
}
$courseid = $this->course->id;
if ($display = get_field('course_display', 'display', 'course', $courseid, 'userid', $USER->id)) {
- $link = "$CFG->wwwroot/course/view.php?id=$courseid&topic=";
+ $link = "$CFG->wwwroot/course/view.php?id=$courseid&$sectionname=";
} else {
$link = '#';
}

0 comments on commit a69a278

Please sign in to comment.