--- loncom/xml/lonxml.pm 2013/07/15 16:13:36 1.542 +++ loncom/xml/lonxml.pm 2013/09/21 14:33:13 1.543 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.542 2013/07/15 16:13:36 bisitz Exp $ +# $Id: lonxml.pm,v 1.543 2013/09/21 14:33:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1510,7 +1510,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=''; @@ -1596,7 +1596,7 @@ FULLPAGE my $editfooter=(< -
+
$filename @@ -1620,7 +1620,6 @@ $initialize $titledisplay - ENDFOOTER return ($editfooter,$add_to_onload,$add_to_onresize);; } @@ -1834,7 +1833,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'}) { @@ -1845,6 +1844,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); } @@ -1863,7 +1863,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' =>