version 1.85, 2003/02/25 21:54:14
|
version 1.86, 2003/03/03 13:03:58
|
Line 1530 Inputs:
|
Line 1530 Inputs:
|
$addentries, extra parameters for the <body> tag. |
$addentries, extra parameters for the <body> tag. |
$bodyonly, if defined, only return the <body> tag. |
$bodyonly, if defined, only return the <body> tag. |
$domain, if defined, force a given domain. |
$domain, if defined, force a given domain. |
|
$forcereg, if page should register as content page (relevant for |
|
text interface only) |
|
|
Returns: A uniform header for LON-CAPA web pages. |
Returns: A uniform header for LON-CAPA web pages. |
If $bodyonly is nonzero, a string containing a <body> tag will be returned. |
If $bodyonly is nonzero, a string containing a <body> tag will be returned. |
Line 1543 other decorations will be returned.
|
Line 1545 other decorations will be returned.
|
|
|
############################################### |
############################################### |
sub bodytag { |
sub bodytag { |
my ($title,$function,$addentries,$bodyonly,$domain)=@_; |
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg)=@_; |
unless ($function) { |
unless ($function) { |
$function='student'; |
$function='student'; |
if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) { |
if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) { |
Line 1587 END
|
Line 1589 END
|
if ($bodyonly) { |
if ($bodyonly) { |
return $bodytag; |
return $bodytag; |
} elsif ($ENV{'browser.interface'} eq 'textual') { |
} elsif ($ENV{'browser.interface'} eq 'textual') { |
return $bodytag.&Apache::lonmenu::menubuttons(undef,'web'). |
return $bodytag.&Apache::lonmenu::menubuttons($forcereg,'web', |
|
$forcereg). |
'<h1>LON-CAPA: '.$title.'</h1>'; |
'<h1>LON-CAPA: '.$title.'</h1>'; |
} else { |
} else { |
return(<<ENDBODY); |
return(<<ENDBODY); |