--- loncom/interface/loncommon.pm 2005/01/25 00:27:59 1.247 +++ loncom/interface/loncommon.pm 2005/02/25 05:54:01 1.252 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.247 2005/01/25 00:27:59 albertel Exp $ +# $Id: loncommon.pm,v 1.252 2005/02/25 05:54:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -687,6 +687,7 @@ sub help_open_menu { "". "
$text"; } + my $html=&Apache::lonxml::xmlbegin(); my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif"); $template .= <<"ENDTEMPLATE"; '."\n". + ''."\n"; + } + my $upperleft=''.$function.''; if ($bodyonly) { @@ -2749,6 +2757,40 @@ ENDBODY } ############################################### +############################################### + +=pod + +=back + +=head1 HTTP Helpers + +=over 4 + +=item * &endbodytag() + +Returns a uniform footer for LON-CAPA web pages. + +Inputs: + +=over 4 + +=back + +Returns: A uniform footer for LON-CAPA web pages. + +=cut + +sub endbodytag { + my $endbodytag=''; + if ($ENV{'environment.texengine'} eq 'jsMath') { + $endbodytag=''. + "\n".$endbodytag; + } + return $endbodytag; +} + +############################################### =pod @@ -3105,7 +3147,12 @@ needs $ENV{'form.upfile'} and $ENV{'form sub upfile_record_sep { if ($ENV{'form.upfiletype'} eq 'xml') { } else { - return split(/\n/,$ENV{'form.upfile'}); + my @records; + foreach my $line (split(/\n/,$ENV{'form.upfile'})) { + if ($line=~/^\s*$/) { next; } + push(@records,$line); + } + return @records; } } @@ -3914,7 +3961,7 @@ sub icon { $curfext.".gif"; } } - return $iconname; + return &lonhttpdurl($iconname); } sub lonhttpdurl {