--- loncom/interface/loncommon.pm 2005/02/17 08:29:42 1.250 +++ loncom/interface/loncommon.pm 2005/03/10 00:21:48 1.255 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.250 2005/02/17 08:29:42 albertel Exp $ +# $Id: loncommon.pm,v 1.255 2005/03/10 00:21:48 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -547,7 +547,7 @@ END $result .= "\n"; @@ -557,7 +557,7 @@ END my $seconddefault = $hashref->{$firstdefault}->{'default'}; foreach my $value (sort(keys(%select2))) { $result.=" \n"; } $selectform.=""; @@ -1113,7 +1159,7 @@ sub select_level_form { my $selectform = ""; @@ -1143,7 +1189,7 @@ sub select_dom_form { my $selectdomain = ""; @@ -2353,7 +2399,7 @@ sub submlink { &Apache::lonxml::whichuser($symb); if (!$symb) { $symb=$cursymb; } } - if (!$symb) { $symb=&symbread(); } + if (!$symb) { $symb=&Apache::lonnet::symbread(); } $symb=&Apache::lonnet::escape($symb); if ($target) { $target="target=\"$target\""; } return ' END + if ($ENV{'environment.texengine'} eq 'jsMath') { + $bodytag.=''."\n". + ''."\n"; + } + my $upperleft=''.$function.''; if ($bodyonly) { @@ -2750,6 +2803,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 @@ -2969,6 +3056,7 @@ sub no_cache { sub content_type { my ($r,$type,$charset) = @_; + if ($ENV{'browser.mathml'} && $type eq 'text/html') { $type='text/xml'; } unless ($charset) { $charset=&Apache::lonlocal::current_encoding; } @@ -3269,7 +3357,7 @@ sub csv_print_select_table { $r->print(''); foreach (sort({$a <=> $b} keys(%sone))) { $r->print(''); } $r->print(''."\n"); @@ -3313,7 +3401,7 @@ sub csv_samples_select_table { foreach (@$d) { my ($value,$display,$defaultcol)=@{ $_ }; $r->print(''); } $r->print('');