--- loncom/xml/lonxml.pm 2006/11/30 01:07:09 1.428 +++ loncom/xml/lonxml.pm 2006/12/28 17:20:36 1.435 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.428 2006/11/30 01:07:09 banghart Exp $ +# $Id: lonxml.pm,v 1.435 2006/12/28 17:20:36 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -88,6 +88,7 @@ use Apache::loncommon(); use Apache::lonfeedback(); use Apache::lonmsg(); use Apache::loncacc(); +use Apache::lonmaxima(); use Apache::lonlocal; #================================================== Main subroutine: xmlparse @@ -674,6 +675,14 @@ sub init_safespace { '&chem_standard_order'); $safehole->wrap(\&Apache::response::check_status,$safeeval,'&check_status'); + $safehole->wrap(\&Apache::lonmaxima::maxima_eval,$safeeval,'&maxima_eval'); + $safehole->wrap(\&Apache::lonmaxima::maxima_check,$safeeval,'&maxima_check'); + $safehole->wrap(\&Apache::lonmaxima::maxima_cas_formula_fix,$safeeval, + '&maxima_cas_formula_fix'); + + $safehole->wrap(\&Apache::caparesponse::capa_formula_fix,$safeeval, + '&capa_formula_fix'); + $safehole->wrap(\&Math::Cephes::asin,$safeeval,'&asin'); $safehole->wrap(\&Math::Cephes::acos,$safeeval,'&acos'); $safehole->wrap(\&Math::Cephes::atan,$safeeval,'&atan'); @@ -780,8 +789,8 @@ sub init_safespace { $safehole->wrap(\&Apache::lonnet::logthis,$safeeval,'&LONCAPA_INTERNAL_LOGTHIS'); $safehole->wrap(\&Apache::inputtags::finalizeawards,$safeeval,'&LONCAPA_INTERNAL_FINALIZEAWARDS'); $safehole->wrap(\&Apache::caparesponse::get_sigrange,$safeeval,'&LONCAPA_INTERNAL_get_sigrange'); - use Data::Dumper; - $safehole->wrap(\&Data::Dumper::Dumper,$safeeval,'&LONCAPA_INTERNAL_Dumper'); +# use Data::Dumper; +# $safehole->wrap(\&Data::Dumper::Dumper,$safeeval,'&LONCAPA_INTERNAL_Dumper'); #need to inspect this class of ops # $safeeval->deny(":base_orig"); $safeeval->permit("require"); @@ -1422,8 +1431,8 @@ sub handler { # if (!($env{'request.state'} eq 'published')) { if ($env{'form.savethisfile'} || $env{'form.viewmode'} || $env{'form.Undo'}) { - my $problem=&Apache::lonnet::getfile($file); - my $error = &Apache::lonhomework::handle_save_or_undo($request, \$problem, \$env{'form.filecont'}); + my $html_file=&Apache::lonnet::getfile($file); + my $error = &Apache::lonhomework::handle_save_or_undo($request, \$html_file, \$env{'form.filecont'}); } } my %mystyle; @@ -1563,6 +1572,7 @@ sub error { my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'}; my (undef,%users)=&Apache::lonfeedback::decide_receiver(undef,0,1,1,1); my $declutter=&Apache::lonnet::declutter($env{'request.filename'}); + my $baseurl = &Apache::lonnet::clutter($declutter); my @userlist; foreach (keys %users) { my ($user,$domain) = split(/:/, $_); @@ -1573,8 +1583,11 @@ sub error { $cdom,$cnum); my $now=time; if ($now-$lastnotified{$key}>86400) { + my $title = &Apache::lonnet::gettitle($symb); + my $sentmessage; &Apache::lonmsg::user_normal_msg($user,$domain, - "Error [$declutter]",$msg); + "Error [$title]",$msg,'',$baseurl,'','', + \$sentmessage,$symb,$title,1); &Apache::lonnet::put('nohist_xmlerrornotifications', {$key => $now}, $cdom,$cnum);