--- loncom/xml/lonxml.pm 2003/06/10 14:33:32 1.261 +++ loncom/xml/lonxml.pm 2003/06/20 14:45:48 1.265 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.261 2003/06/10 14:33:32 albertel Exp $ +# $Id: lonxml.pm,v 1.265 2003/06/20 14:45:48 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -386,7 +386,7 @@ sub fontsettings() { if (($ENV{'browser.os'} eq 'mac') && (!$ENV{'browser.mathml'})) { $headerstring.= '<meta Content-Type="text/html; charset=x-mac-roman">'; - } elsif (!$ENV{'browser.mathml'}) { + } elsif (!$ENV{'browser.mathml'} && $ENV{'browser.unicode'}) { $headerstring.= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; } @@ -1139,13 +1139,7 @@ sub inserteditinfo { my ($result,$filecontents)=@_; $filecontents = &HTML::Entities::encode($filecontents); # my $editheader='<a href="#editsection">Edit below</a><hr />'; - my $xml_help = '<table><tr><td>'. - &Apache::loncommon::help_open_topic("Greek_Symbols",'Greek Symbols', - undef,undef,600) - .'</td><td>'. - &Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols', - undef,undef,600) - .'</td></tr></table>'; + my $xml_help = Apache::loncommon::helpLatexCheatsheet(); my $titledisplay=&display_title(); my $buttons=(<<BUTTONS); <input type="submit" name="attemptclean" @@ -1249,6 +1243,10 @@ ENDNOTFOUND if ($ENV{'form.attemptclean'}) { $filecontents=&htmlclean($filecontents,1); } +# +# we are in construction space, see if edit mode forced + &Apache::loncommon::get_unprocessed_cgi + ($ENV{'QUERY_STRING'},['editmode']); } if (!$ENV{'form.editmode'} || $ENV{'form.viewmode'}) { $result = &Apache::lonxml::xmlparse($request,$target,$filecontents, @@ -1438,6 +1436,7 @@ sub description { # calls to lonnet functions for this setup. # - looks for form.grade_ parameters sub whichuser { + my ($passedsymb)=@_; my ($symb,$courseid,$domain,$name,$publicuser); if (defined($ENV{'form.grade_symb'})) { my $tmp_courseid=$ENV{'form.grade_courseid'}; @@ -1449,7 +1448,11 @@ sub whichuser { $name=$ENV{'form.grade_username'}; } } else { - $symb=&Apache::lonnet::symbread(); + if (!$passedsymb) { + $symb=&Apache::lonnet::symbread(); + } else { + $symb=$passedsymb; + } $courseid=$ENV{'request.course.id'}; $domain=$ENV{'user.domain'}; $name=$ENV{'user.name'};