[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

banghart lon-capa-cvs@mail.lon-capa.org
Thu, 23 Nov 2006 02:26:43 -0000


banghart		Wed Nov 22 21:26:43 2006 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  	Bug 5081. HTML editor now has "Save and Edit" and "Save and View"
  		  buttons.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.425 loncom/xml/lonxml.pm:1.426
--- loncom/xml/lonxml.pm:1.425	Fri Nov 10 14:41:34 2006
+++ loncom/xml/lonxml.pm	Wed Nov 22 21:26:43 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.425 2006/11/10 19:41:34 albertel Exp $
+# $Id: lonxml.pm,v 1.426 2006/11/23 02:26:43 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1332,8 +1332,8 @@
       my $cleanbut = '';
 
       my $titledisplay=&display_title();
-      my %lt=&Apache::lonlocal::texthash('st' => 'Save this',
-					 'vi' => 'View',
+      my %lt=&Apache::lonlocal::texthash('st' => 'Save and Edit',
+					 'vi' => 'Save and View',
 					 'ed' => 'Edit');
       my $buttons=(<<BUTTONS);
 $cleanbut
@@ -1417,7 +1417,7 @@
 # Edit action? Save file.
 #
     unless ($env{'request.state'} eq 'published') {
-	if ($env{'form.savethisfile'}) {
+	if ($env{'form.savethisfile'} || $env{'form.viewmode'}) {
 	    if (&storefile($file,$env{'form.filecont'})) {
 		&Apache::lonxml::info("<font COLOR=\"#0000FF\">".
 				      &mt('Updated').": ".