[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /xml lonxml.pm
raeburn
raeburn at source.lon-capa.org
Sat Sep 21 22:41:23 EDT 2013
raeburn Sun Sep 22 02:41:23 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/xml lonxml.pm
Log:
- For 2.11
- Backport 1.543.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.531.2.10 loncom/xml/lonxml.pm:1.531.2.11
--- loncom/xml/lonxml.pm:1.531.2.10 Thu Aug 8 12:47:13 2013
+++ loncom/xml/lonxml.pm Sun Sep 22 02:41:23 2013
@@ -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 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 @@
my $editfooter=(<<ENDFOOTER);
$initialize
<a name="editsection" />
-<form $form_events method="post" name="xmledit" action="">
+<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 @@
$titledisplay
</div>
</form>
-</body>
ENDFOOTER
return ($editfooter,$add_to_onload,$add_to_onresize);;
}
@@ -1928,7 +1927,7 @@
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 @@
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 @@
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' =>
More information about the LON-CAPA-cvs
mailing list