version 1.305, 2006/03/04 21:32:30
|
version 1.306, 2006/03/15 19:37:55
|
Line 2931 ENDBODY
|
Line 2931 ENDBODY
|
|
|
=back |
=back |
|
|
=head1 HTTP Helpers |
=head1 HTML Helpers |
|
|
=over 4 |
=over 4 |
|
|
Line 2939 ENDBODY
|
Line 2939 ENDBODY
|
|
|
Returns a uniform footer for LON-CAPA web pages. |
Returns a uniform footer for LON-CAPA web pages. |
|
|
Inputs: |
Inputs: none |
|
|
=over 4 |
|
|
|
=back |
=back |
|
|
Returns: A uniform footer for LON-CAPA web pages. |
|
|
|
=cut |
=cut |
|
|
sub endbodytag { |
sub endbodytag { |
Line 2955 sub endbodytag {
|
Line 2951 sub endbodytag {
|
return $endbodytag; |
return $endbodytag; |
} |
} |
|
|
|
=pod |
|
|
|
=over 4 |
|
|
|
=item * &headtag() |
|
|
|
Returns a uniform footer for LON-CAPA web pages. |
|
|
|
Inputs: $title - optinal title for the head |
|
|
|
=back |
|
|
|
=cut |
|
|
|
sub headtag { |
|
my ($title) = @_; |
|
|
|
my $result = '<head>'; |
|
|
|
if (!defined($title)) { |
|
$title = 'The LearningOnline Network with CAPA'; |
|
} |
|
|
|
$result .= '<title>'.&mt($title).'</title>'; |
|
|
|
return $result; |
|
} |
|
|
|
=pod |
|
|
|
=over 4 |
|
|
|
=item * &endheadtag() |
|
|
|
Returns a uniform </head> for LON-CAPA web pages. |
|
|
|
Inputs: none |
|
|
|
=back |
|
|
|
=cut |
|
|
|
sub endheadtag { |
|
return '</head>'; |
|
} |
|
|
|
=pod |
|
|
|
=over 4 |
|
|
|
=item * &head() |
|
|
|
Returns a uniform complete <head>..</head> section for LON-CAPA web pages. |
|
|
|
Inputs: $title - optional title for the page |
|
|
|
=back |
|
|
|
=cut |
|
|
|
sub head { |
|
my ($title) = @_; |
|
return &headtag($title).&endheadtag(); |
|
} |
|
|
|
=pod |
|
|
|
=over 4 |
|
|
|
=item * &start_page() |
|
|
|
Returns a complete <html> .. <body> section for LON-CAPA web pages. |
|
|
|
Inputs: $title - optional title for the page |
|
$head_extra - optional extra HTML to incude inside the <head> |
|
|
|
=back |
|
|
|
=cut |
|
|
|
sub start_page { |
|
my ($title,$head_extra) = @_; |
|
return |
|
&Apache::lonxml::xmlbegin(). |
|
&headtag($title).$head_extra.&endheadtag(). |
|
&bodytag($title); |
|
} |
|
|
|
=pod |
|
|
|
=over 4 |
|
|
|
=item * &head() |
|
|
|
Returns a complete </body></html> section for LON-CAPA web pages. |
|
|
|
Inputs: None |
|
|
|
=back |
|
|
|
=cut |
|
|
|
sub end_page { |
|
return &endbodytag."\n</html>"; |
|
} |
############################################### |
############################################### |
|
|
=pod |
=pod |
|
|
|
=over 4 |
|
|
=item get_users_function |
=item get_users_function |
|
|
Used by &bodytag to determine the current users primary role. |
Used by &bodytag to determine the current users primary role. |