Skip to content

Commit

Permalink
previous fix now also works in weekly format
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed May 29, 2004
1 parent 61cc70a commit a69a278
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blocks/section_links/block_section_links.php
Expand Up @@ -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) {
Expand All @@ -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 = '#';
}
Expand Down

0 comments on commit a69a278

Please sign in to comment.