[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm
bisitz
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 01 Aug 2008 17:29:57 -0000
bisitz Fri Aug 1 13:29:57 2008 EDT
Modified files:
/loncom/publisher lonpublisher.pm
Log:
Optimized display of warnings and errors
- Added headline
- Use LON-CAPA standard style
- output as list instead of one after the other
- optimized &mt() usage
- Changed order: first warnings, then errors
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.241 loncom/publisher/lonpublisher.pm:1.242
--- loncom/publisher/lonpublisher.pm:1.241 Sat Jul 26 15:05:27 2008
+++ loncom/publisher/lonpublisher.pm Fri Aug 1 13:29:57 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.241 2008/07/26 19:05:27 raeburn Exp $
+# $Id: lonpublisher.pm,v 1.242 2008/08/01 17:29:57 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -887,17 +887,21 @@
'return_only_error_and_warning_counts' => 1));
my ($errorcount,$warningcount)=split(':',$result);
if (($errorcount) || ($warningcount)) {
- $r->print('<br /><tt>'.$uri.'</tt>: ');
- if ($errorcount) {
- $r->print('<img src="/adm/lonMisc/bomb.gif" /><span class="LC_error"><b>'.
- $errorcount.' '.
- &mt('error(s)').'</b></span> ');
- }
- if ($warningcount) {
- $r->print('<font color="blue">'.
- $warningcount.' '.
- &mt('warning(s)').'</font>');
- }
+ $r->print('<h3>'.&mt('Warnings and Errors').'</h3>');
+ $r->print('<tt>'.$uri.'</tt>:');
+ $r->print('<ul>');
+ if ($warningcount) {
+ $r->print('<li><div class="LC_warning">'
+ .&mt('[quant,_1,warning]',$warningcount)
+ .'</div></li>');
+ }
+ if ($errorcount) {
+ $r->print('<li><div class="LC_error">'
+ .&mt('[quant,_1,error]',$errorcount)
+ .' <img src="/adm/lonMisc/bomb.gif" />'
+ .'</div></li>');
+ }
+ $r->print('</ul>');
} else {
#$r->print('<font color="green">'.&mt('ok').'</font>');
}