[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 03 Dec 2004 21:37:29 -0000


albertel		Fri Dec  3 16:37:29 2004 EDT

  Modified files:              
    /loncom/interface	lonmeta.pm 
  Log:
  - BUG#3673, there was a 'Wrte metadata' meesage hidden at the bottom, move it to top and changed font color for the heck of it.
  
  
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.86 loncom/interface/lonmeta.pm:1.87
--- loncom/interface/lonmeta.pm:1.86	Tue Aug 24 17:40:00 2004
+++ loncom/interface/lonmeta.pm	Fri Dec  3 16:37:29 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Metadata display handler
 #
-# $Id: lonmeta.pm,v 1.86 2004/08/24 21:40:00 albertel Exp $
+# $Id: lonmeta.pm,v 1.87 2004/12/03 21:37:29 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -916,6 +916,7 @@
                   &Apache::loncommon::browser_and_searcher_javascript().
                   '</script>');
         my %lt=&fieldnames();
+	my $output;
         foreach ('author','title','subject','keywords','abstract','notes',
                  'copyright','customdistributionfile','language',
                  'standards',
@@ -929,17 +930,17 @@
                 $Apache::lonpublisher::metadatafields{'copyright'}=
                     'default';
             }
-            $r->print('<p>'.$lt{$_}.': '.
-                      &prettyinput
-                      ($_,$Apache::lonpublisher::metadatafields{$_},
-                       'new_'.$_,'defaultmeta').'</p>');
+            $output.=('<p>'.$lt{$_}.': '.
+                      &prettyinput($_,
+				   $Apache::lonpublisher::metadatafields{$_},
+				   'new_'.$_,'defaultmeta').'</p>');
         }
         if ($ENV{'form.store'}) {
             my $mfh;
             if (!  ($mfh=Apache::File->new('>'.$fn))) {
-                $r->print('<p><font color=red>'.
+                $r->print('<p><font color="red">'.
                           &mt('Could not write metadata').', '.
-                          &mt('FAIL').'</font>');
+                          &mt('FAIL').'</font></p>');
             } else {
                 foreach (sort keys %Apache::lonpublisher::metadatafields) {
                     next if ($_ =~ /\./);
@@ -962,10 +963,12 @@
                          '<>&"').
                          '</'.$tag.'>';
                 }
-                $r->print('<p>'.&mt('Wrote Metadata'));
+                $r->print('<p><font color="blue">'.&mt('Wrote Metadata').
+			  ' '.&Apache::lonlocal::locallocaltime(time).
+			  '</font></p>');
             }
         }
-        $r->print('<br /><input type="submit" name="store" value="'.
+	$r->print($output.'<br /><input type="submit" name="store" value="'.
                   &mt('Store Catalog Information').'">');
     }
     $r->print('</form>');