// 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, $morenavlinks=NULL, $meta='', $bodytags='') {
+ function print_header($title, $morenavlinks=NULL, $meta='', $bodytags='', $extrabuttons='') {
global $USER, $CFG;
$this->init_full();
}
$buttons = empty($morenavlinks) ? $buttons : ' ';
+ // Add any extra buttons requested (by the resource module, for example)
+ if ($extrabuttons != '') {
+ $buttons = ($buttons == ' ') ? $extrabuttons : $buttons.$extrabuttons;
+ }
+
print_header($title, $this->courserecord->fullname, $navigation,
'', $meta, true, $buttons, user_login_string($this->courserecord, $USER), false, $bodytags);
}
$morenavlinks = array($this->strresources => 'index.php?id='.$this->course->id,
$this->resource->name => '');
- $PAGE->print_header($this->course->shortname.': %fullname%', $morenavlinks);
+ $PAGE->print_header($this->course->shortname.': %fullname%', $morenavlinks, "", "",
+ update_module_button($this->cm->id, $this->course->id, $this->strresource));
echo '<table id="layout-table"><tr>';