[LON-CAPA-cvs] cvs: rat / lonratedt.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 02 Sep 2004 13:21:53 -0000


www		Thu Sep  2 09:21:53 2004 EDT

  Modified files:              
    /rat	lonratedt.pm 
  Log:
  Bug #3183: "Saved" instead of "Saving," &mt(), and error message.
  
  
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.59 rat/lonratedt.pm:1.60
--- rat/lonratedt.pm:1.59	Sun Jul  4 01:43:12 2004
+++ rat/lonratedt.pm	Thu Sep  2 09:21:53 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.59 2004/07/04 05:43:12 albertel Exp $
+# $Id: lonratedt.pm,v 1.60 2004/09/02 13:21:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -706,14 +706,18 @@
    my $tmpfn=&Apache::lonnet::filelocation('',$url).'.tmp';
    my $targetmsg='';
    if ($ENV{'form.save'}) {
-       $targetmsg='<b>Saving ...</b><br>';
        copy($tmpfn,&Apache::lonnet::filelocation('',$url));
        unlink($tmpfn);
        my ($errtext,$fatal)=
                            &mapread(&Apache::lonnet::filelocation('',$url),'');
+       unless ($fatal) {
+	   $targetmsg='<b>'.&mt('Saved.').'</b><br />';
+       } else {
+	   $targetmsg='<b>'.&mt('An error occured while saving.').'</b><br />';
+       }
    }
    if ($ENV{'form.revert'}) {
-       $targetmsg='<b>Reverting ...</b><br>';
+       $targetmsg='<b>'.&mt('Reverted.').'</b><br />';
        unlink($tmpfn);
        my ($errtext,$fatal)=
                            &mapread(&Apache::lonnet::filelocation('',$url),'');