--- loncom/interface/loncommon.pm 2005/02/25 04:56:05 1.251 +++ 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.251 2005/02/25 04:56:05 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) { @@ -2776,6 +2785,10 @@ Returns: A uniform footer for LON-CAPA w sub endbodytag { my $endbodytag=''; + if ($ENV{'environment.texengine'} eq 'jsMath') { + $endbodytag=''. + "\n".$endbodytag; + } return $endbodytag; } @@ -2999,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; } @@ -3299,7 +3313,7 @@ sub csv_print_select_table { $r->print(''); foreach (sort({$a <=> $b} keys(%sone))) { $r->print(''); } $r->print(''."\n"); @@ -3343,7 +3357,7 @@ sub csv_samples_select_table { foreach (@$d) { my ($value,$display,$defaultcol)=@{ $_ }; $r->print(''); } $r->print('');