--- loncom/interface/loncommon.pm 2006/02/18 01:27:07 1.303 +++ loncom/interface/loncommon.pm 2006/03/15 19:37:55 1.306 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.303 2006/02/18 01:27:07 raeburn Exp $ +# $Id: loncommon.pm,v 1.306 2006/03/15 19:37:55 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2787,6 +2787,7 @@ table.thinborder { border-collapse: coll table.thinborder tr th, table.thinborder tr td { border-style: solid; border-width: 1px} form, .inline { display: inline; } .center { text-align: center; } +.filename {font-family: monospace;} @@ -2892,6 +2893,8 @@ ENDROLE $dc_info.= $cid.' '.$env{'course.'.$cid.'.internal.coursecode'}; $dc_info = '('.$dc_info.')'; } + # Explicit link to get inline menu + my $menu='
 '.&mt('Switch to Inline Menu Mode').''; # return(< -$titleinfo $dc_info +$titleinfo $dc_info $menu $env{'environment.firstname'} @@ -2928,7 +2931,7 @@ ENDBODY =back -=head1 HTTP Helpers +=head1 HTML Helpers =over 4 @@ -2936,14 +2939,10 @@ ENDBODY Returns a uniform footer for LON-CAPA web pages. -Inputs: - -=over 4 +Inputs: none =back -Returns: A uniform footer for LON-CAPA web pages. - =cut sub endbodytag { @@ -2952,10 +2951,117 @@ sub 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 = ''; + + if (!defined($title)) { + $title = 'The LearningOnline Network with CAPA'; + } + + $result .= ''.&mt($title).''; + + return $result; +} + +=pod + +=over 4 + +=item * &endheadtag() + +Returns a uniform for LON-CAPA web pages. + +Inputs: none + +=back + +=cut + +sub endheadtag { + return ''; +} + +=pod + +=over 4 + +=item * &head() + +Returns a uniform complete .. 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 .. section for LON-CAPA web pages. + +Inputs: $title - optional title for the page + $head_extra - optional extra HTML to incude inside the + +=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 section for LON-CAPA web pages. + +Inputs: None + +=back + +=cut + +sub end_page { + return &endbodytag."\n"; +} ############################################### =pod +=over 4 + =item get_users_function Used by &bodytag to determine the current users primary role.