--- /Users/daniele/Sites/moodle18/lib/pagelibORIG.php 2007-02-25 03:32:03.000000000 +0100 +++ /Users/daniele/Sites/moodle18/lib/pagelib.php 2007-06-11 16:40:04.000000000 +0200 @@ -367,7 +367,7 @@ // This function prints out the common part of the page's header. // You should NEVER print the header "by hand" in other code. function print_header($title, $morebreadcrumbs=NULL, $meta='', $bodytags='') { - global $USER, $CFG; + global $USER, $CFG, $SESSION; $this->init_full(); $replacements = array( @@ -381,7 +381,14 @@ $breadcrumbs = array(); } else { - $breadcrumbs = array($this->courserecord->shortname => $CFG->wwwroot.'/course/view.php?id='.$this->courserecord->id); + if($SESSION->parent) { + $parentlink = array($SESSION->parent => $SESSION->parentlink); + } + if($parentlink) { + $breadcrumbs = array_merge($parentlink, array($this->courserecord->shortname => $CFG->wwwroot.'/course/view.php?id='.$this->courserecord->id)); + } else { + $breadcrumbs = array($this->courserecord->shortname => $CFG->wwwroot.'/course/view.php?id='.$this->courserecord->id); + } } if(!empty($morebreadcrumbs)) {