--- loncom/xml/lonxml.pm 2003/06/10 18:17:03 1.262 +++ loncom/xml/lonxml.pm 2003/08/07 19:31:16 1.266.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.262 2003/06/10 18:17:03 matthew Exp $ +# $Id: lonxml.pm,v 1.266.2.1 2003/08/07 19:31:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -70,6 +70,7 @@ use Math::Cephes(); use Math::Random(); use Opcode(); + sub register { my ($space,@taglist) = @_; foreach my $temptag (@taglist) { @@ -95,6 +96,8 @@ use Apache::run(); use Apache::londefdef(); use Apache::scripttag(); use Apache::edit(); +use Apache::inputtags(); +use Apache::outputtags(); use Apache::lonnet(); use Apache::File(); use Apache::loncommon(); @@ -386,7 +389,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 +1142,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 +1246,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, @@ -1442,7 +1443,7 @@ sub whichuser { my ($symb,$courseid,$domain,$name,$publicuser); if (defined($ENV{'form.grade_symb'})) { my $tmp_courseid=$ENV{'form.grade_courseid'}; - my $allowed=&Apache::lonnet::allowed('mgr',$tmp_courseid); + my $allowed=&Apache::lonnet::allowed('vgr',$tmp_courseid); if ($allowed) { $symb=$ENV{'form.grade_symb'}; $courseid=$ENV{'form.grade_courseid'};