[LON-CAPA-cvs] cvs: loncom /interface lonmeta.pm
bisitz
bisitz@source.lon-capa.org
Sat, 21 Mar 2009 21:37:13 -0000
bisitz Sat Mar 21 21:37:13 2009 EDT
Modified files:
/loncom/interface lonmeta.pm
Log:
Optimized metadata messages:
Replaced hardcoded and outdated styles by standard LON-CAPA styles
Index: loncom/interface/lonmeta.pm
diff -u loncom/interface/lonmeta.pm:1.226 loncom/interface/lonmeta.pm:1.227
--- loncom/interface/lonmeta.pm:1.226 Tue Mar 17 20:07:45 2009
+++ loncom/interface/lonmeta.pm Sat Mar 21 21:37:13 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Metadata display handler
#
-# $Id: lonmeta.pm,v 1.226 2009/03/17 20:07:45 schulted Exp $
+# $Id: lonmeta.pm,v 1.227 2009/03/21 21:37:13 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1467,26 +1467,26 @@
$output .= $result;
} else {
if (! ($mfh=Apache::File->new('>'.$fn))) {
- $output .= '<p><font color="red">';
+ $output .= '<p class="LC_error">';
if ($caller eq 'transfer') {
$output .= &mt('Could not transfer data in added fields to notes');
} else {
$output .= &mt('Could not write metadata');
}
- $output .= ', '.&mt('FAIL').'</font></p>';
+ $output .= ', '.&mt('FAIL').'</p>';
$outcome = 'fail';
} else {
print $mfh ($file_content);
close($mfh);
&update_metadata_table($uri);
- $output .= '<p><font color="blue">';
+ $output .= '<p class="LC_success">';
if ($caller eq 'transfer') {
$output .= &mt('Transferred data in added fields to notes');
} else {
$output .= &mt('Wrote Metadata');
}
$output .= ' '.&Apache::lonlocal::locallocaltime(time).
- '</font></p>';
+ '</p>';
$outcome = 'ok';
}
}
@@ -1514,25 +1514,25 @@
$env{'form.'.$formname.'.filename'}=$new_fn;
my $result =&Apache::lonnet::userfileupload($formname,'',$path);
if ($result =~ /(error|notfound)/) {
- $output = '<p><font color="red">';
+ $output = '<p class="LC_error">';
if ($caller eq 'transfer') {
$output .=
&mt('Could not transfer data in added fields to notes');
} else {
$output .= &mt('Could not write metadata');
}
- $output .= ', '.&mt('FAIL').'</font></p>';
+ $output .= ', '.&mt('FAIL').'</p>';
$outcome = 'fail';
} else {
&update_metadata_table($uri);
- $output = '<p><font color="blue">';
+ $output = '<p class="LC_success">';
if ($caller eq 'transfer') {
$output .= &mt('Transferred data in added fields to notes');
} else {
$output .= &mt('Wrote Metadata');
}
$output .= ' '.&Apache::lonlocal::locallocaltime(time).
- '</font></p>';
+ '</p>';
$outcome = 'ok';
}
return ($outcome,$output);