--- loncom/xml/lonxml.pm	2013/05/12 13:32:16	1.531.2.8
+++ loncom/xml/lonxml.pm	2013/11/20 02:38:26	1.531.2.12
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.531.2.8 2013/05/12 13:32:16 raeburn Exp $
+# $Id: lonxml.pm,v 1.531.2.12 2013/11/20 02:38:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -745,7 +745,7 @@ sub init_safespace {
   my ($target,$safeeval,$safehole,$safeinit) = @_;
   $safeeval->reval('use LaTeX::Table;');
   $safeeval->deny_only(':dangerous');
-  $safeeval->reval('use Math::Complex;');
+  $safeeval->reval('use LONCAPA::LCMathComplex;');
   $safeeval->permit_only(":default");
   $safeeval->permit("entereval");
   $safeeval->permit(":base_math");
@@ -1604,7 +1604,7 @@ sub renderingoptions {
 }
 
 sub inserteditinfo {
-      my ($filecontents,$filetype,$filename,$symb,$itemtitle,$folderpath,$uri) = @_;
+      my ($filecontents,$filetype,$filename,$symb,$itemtitle,$folderpath,$uri,$action) = @_;
       $filecontents = &HTML::Entities::encode($filecontents,'<>&"');
       my $xml_help = '';
       my $initialize='';
@@ -1690,7 +1690,7 @@ FULLPAGE
       my $editfooter=(<<ENDFOOTER);
 $initialize
 <a name="editsection" />
-<form $form_events method="post" name="xmledit">
+<form $form_events method="post" name="xmledit" action="$action">
   <div class="LC_edit_problem_editxml_header">
     <table class="LC_edit_problem_header_title"><tr><td>
         $filename
@@ -1714,7 +1714,6 @@ $initialize
     $titledisplay
   </div>
 </form>
-</body>
 ENDFOOTER
       return ($editfooter,$add_to_onload,$add_to_onresize);;
 }
@@ -1905,7 +1904,7 @@ ENDNOTFOUND
                 my $brcrum;
                 if ($env{'request.state'} eq 'construct') {
                     $brcrum = [{'href' => &Apache::loncommon::authorspace($request->uri),
-                                'text' => 'Construction Space'},
+                                'text' => 'Authoring Space'},
                                {'href' => '',
                                 'text' => $breadcrumbtext}];
                 } else {
@@ -1928,7 +1927,7 @@ ENDNOTFOUND
     unless ($env{'request.state'} eq 'published') {
 	if ($env{'form.editmode'} && (!($env{'form.viewmode'})) && (!($env{'form.discardview'})))
 	{
-            my ($displayfile,$url,$symb,$itemtitle);
+            my ($displayfile,$url,$symb,$itemtitle,$action);
 	    $displayfile=$request->uri;
             if ($request->uri =~ m{^/uploaded/}) {
                 if ($env{'request.course.id'}) {
@@ -1939,6 +1938,7 @@ ENDNOTFOUND
                         my $filename = $1;
                         if ($1 eq 'loncapa.html') {
                             $displayfile = &mt('Syllabus (minimal template)');
+                            $action = $request->uri.'?forceedit=1';
                         } else {
                             $displayfile = &mt('Syllabus file: [_1]',$1);
                         }
@@ -1957,7 +1957,7 @@ ENDNOTFOUND
 
 	    my ($edit_info, $add_to_onload, $add_to_onresize)=
 		&inserteditinfo($filecontents,$filetype,$displayfile,$symb,
-                                $itemtitle,$env{'form.folderpath'},$request->uri);
+                                $itemtitle,$env{'form.folderpath'},$request->uri,$action);
 
 	    my %options = 
 		('add_entries' =>
@@ -1967,7 +1967,7 @@ ENDNOTFOUND
             if ($env{'request.state'} eq 'construct') {
                 $options{'bread_crumbs'} = [{
                             'href' => &Apache::loncommon::authorspace($request->uri),
-                            'text' => 'Construction Space'},
+                            'text' => 'Authoring Space'},
                            {'href' => '',
                             'text' => $breadcrumbtext}];
                 $header = &Apache::loncommon::head_subbox(
@@ -2002,7 +2002,7 @@ sub display_title {
 	    $title = substr($title, rindex($title, '/') + 1);
 	}
         $result = "<script type='text/javascript'>top.document.title = '$title - LON-CAPA "
-                  .&mt('Construction Space')."';</script>";
+                  .&mt('Authoring Space')."';</script>";
     }
     return $result;
 }