".
"$text";
}
+ my $html=&Apache::lonxml::xmlbegin();
my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif");
$template .= <<"ENDTEMPLATE";
@@ -1044,7 +1047,7 @@ sub multiple_select_form {
$output.="\n\n";
@@ -1075,7 +1078,7 @@ sub select_form {
}
foreach (@keys) {
$selectform.="\n";
}
$selectform.="";
@@ -1112,7 +1115,7 @@ sub select_level_form {
my $selectform = "";
@@ -1142,7 +1145,7 @@ sub select_dom_form {
my $selectdomain = "";
@@ -2631,6 +2634,13 @@ a:focus { color: red; background: yellow
END
+ if ($ENV{'environment.texengine'} eq 'jsMath') {
+ $bodytag.=''."\n".
+ ''."\n";
+ }
+
my $upperleft=' ';
if ($bodyonly) {
@@ -2749,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
@@ -2968,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;
}
@@ -3105,7 +3150,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;
}
}
@@ -3263,7 +3313,7 @@ sub csv_print_select_table {
$r->print('');
foreach (sort({$a <=> $b} keys(%sone))) {
$r->print('');
}
$r->print(' |
'."\n");
@@ -3307,7 +3357,7 @@ sub csv_samples_select_table {
foreach (@$d) {
my ($value,$display,$defaultcol)=@{ $_ };
$r->print('