--- loncom/xml/lonxml.pm 2013/08/08 12:47:13 1.531.2.10 +++ loncom/xml/lonxml.pm 2013/09/22 02:41:23 1.531.2.11 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.531.2.10 2013/08/08 12:47:13 raeburn Exp $ +# $Id: lonxml.pm,v 1.531.2.11 2013/09/22 02:41:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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=(< -
+
$filename @@ -1714,7 +1714,6 @@ $initialize $titledisplay - ENDFOOTER return ($editfooter,$add_to_onload,$add_to_onresize);; } @@ -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' =>