--- loncom/xml/lonxml.pm	2006/12/28 03:00:24	1.430.2.1
+++ 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.430.2.1 2006/12/28 03:00:24 albertel 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');
@@ -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(/:/, $_);
@@ -1576,7 +1586,7 @@ sub error {
                     my $title = &Apache::lonnet::gettitle($symb);
                     my $sentmessage;
 		    &Apache::lonmsg::user_normal_msg($user,$domain,
-		        "Error [$title]",$msg,'','','','',
+		        "Error [$title]",$msg,'',$baseurl,'','',
                         \$sentmessage,$symb,$title,1);
 		    &Apache::lonnet::put('nohist_xmlerrornotifications',
 					 {$key => $now},