Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Quick fix for bug 1303 ... but I'll come back to this today
  • Loading branch information
moodler committed May 4, 2004
1 parent bf5c2e8 commit 8a3cfc4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions calendar/event.php
Expand Up @@ -176,10 +176,14 @@

// Let's see if we are supposed to provide a referring course link
// but NOT for the front page
if($SESSION->cal_course_referer > 1 &&
($shortname = get_field('course', 'shortname', 'id', $SESSION->cal_course_referer)) !== false) {
// If we know about the referring course, show a return link
$nav = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$SESSION->cal_course_referer.'">'.$shortname.'</a> -> '.$nav;

if (!empty($SESSION->cal_course_referer)) {
if ($course = get_record('course', 'id', $SESSION->cal_course_referer)) {
$shortname = $course->shortname;
$nav = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$SESSION->cal_course_referer.'">'.$shortname.'</a> -> '.$nav;
}
} else {
$nav = '';
}

print_header(get_string('calendar', 'calendar').': '.$title, $site->fullname, $nav.' -> '.$title,
Expand Down

0 comments on commit 8a3cfc4

Please sign in to comment.