[LON-CAPA-cvs] cvs: loncom /interface londocs.pm /publisher lonpublisher.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 04 Apr 2005 23:51:54 -0000


albertel		Mon Apr  4 19:51:54 2005 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
    /loncom/interface	londocs.pm 
  Log:
  -likely should specifiy a target when doing an ssi, as it was by default wpicking grade, then web which meant it thatought there where 00 rather that 0 warnings.
  - inhibit the ok if nothing is wrong, it just looks odd where it is
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.189 loncom/publisher/lonpublisher.pm:1.190
--- loncom/publisher/lonpublisher.pm:1.189	Tue Mar 15 11:09:20 2005
+++ loncom/publisher/lonpublisher.pm	Mon Apr  4 19:51:54 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.189 2005/03/15 16:09:20 albertel Exp $
+# $Id: lonpublisher.pm,v 1.190 2005/04/04 23:51:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -852,9 +852,11 @@
     my ($r,$source)=@_;
     my $uri=&Apache::lonnet::hreflocation($source);
     $uri=~s/\/$//;
-    my ($errorcount,$warningcount)=split(/:/,
-	       &Apache::lonnet::ssi_body($uri,
-				('return_only_error_and_warning_counts' => 1)));
+    my ($errorcount,$warningcount);
+    my $result=&Apache::lonnet::ssi_body($uri,
+					 ('grade_target'=>'web',
+					  'return_only_error_and_warning_counts' => 1));
+    my ($errorcount,$warningcount)=split(':',$result);
     if (($errorcount) || ($warningcount)) {
         $r->print('<br /><tt>'.$uri.'</tt>: ');
 	if ($errorcount) {
@@ -868,7 +870,7 @@
 		      &mt('warning(s)').'</font>');
 	}
     } else {
-	$r->print('<font color="green">'.&mt('ok').'</font>');
+	#$r->print('<font color="green">'.&mt('ok').'</font>');
     }
     $r->rflush();
     return ($warningcount,$errorcount);
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.172 loncom/interface/londocs.pm:1.173
--- loncom/interface/londocs.pm:1.172	Wed Mar 16 16:35:17 2005
+++ loncom/interface/londocs.pm	Mon Apr  4 19:51:54 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.172 2005/03/16 21:35:17 raeburn Exp $
+# $Id: londocs.pm,v 1.173 2005/04/04 23:51:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1515,7 +1515,8 @@
                  $r->print('- '.&mt('Rendering').': ');
 		 my ($errorcount,$warningcount)=split(/:/,
 	       &Apache::lonnet::ssi_body($url,
-			       ('return_only_error_and_warning_counts' => 1)));
+			       ('grade_target'=>'web',
+				'return_only_error_and_warning_counts' => 1)));
                  if (($errorcount) ||
                      ($warningcount)) {
 		     if ($errorcount) {