--- loncom/interface/loncommon.pm 2005/02/17 08:29:42 1.250 +++ loncom/interface/loncommon.pm 2005/02/28 07:59:42 1.253 @@ -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.253 2005/02/28 07:59:42 albertel 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 +1115,7 @@ sub select_level_form { my $selectform = ""; @@ -1143,7 +1145,7 @@ sub select_dom_form { my $selectdomain = ""; @@ -2632,6 +2634,13 @@ a:focus { color: red; background: yellow END + if ($ENV{'environment.texengine'} eq 'jsMath') { + $bodytag.=''."\n". + ''."\n"; + } + my $upperleft=''.$function.''; if ($bodyonly) { @@ -2750,6 +2759,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 +3012,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 +3313,7 @@ sub csv_print_select_table { $r->print(''); foreach (sort({$a <=> $b} keys(%sone))) { $r->print(''); } $r->print(''."\n"); @@ -3313,7 +3357,7 @@ sub csv_samples_select_table { foreach (@$d) { my ($value,$display,$defaultcol)=@{ $_ }; $r->print(''); } $r->print('');