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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Thu, 05 Sep 2002 19:47:29 -0000


bowersj2		Thu Sep  5 15:47:29 2002 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Try to fix bug #176 to only complain about network errors when actual
  network errors are ocurring, not just any errors at all in retreiving
  the class information.
  
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.47 loncom/interface/lonnavmaps.pm:1.48
--- loncom/interface/lonnavmaps.pm:1.47	Tue Sep  3 16:46:30 2002
+++ loncom/interface/lonnavmaps.pm	Thu Sep  5 15:47:29 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.47 2002/09/03 20:46:30 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.48 2002/09/05 19:47:29 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -464,7 +464,7 @@
 	my $userprefix=$uname.'_'.$udom.'_';
 	
 	unless ($uhome eq 'no_host') { 
-# -------------------------------------------------------------- Get coursedata
+# ------------------------------------------------- Get coursedata (if present)
 	    unless ((time-$courserdatas{$cid.'.last_cache'})<240) {
 		my $reply=&Apache::lonnet::reply('dump:'.$cdom.':'.$cnum.
 						 ':resourcedata',$chome);
@@ -472,7 +472,8 @@
 		    $courserdatas{$cid}=$reply;
 		    $courserdatas{$cid.'.last_cache'}=time;
 		}
-		else
+		# check to see if network failed
+		elsif ( $reply=~/no.such.host/i || $reply=~/con.*lost/i )
 		{
 		    $networkFailedFlag = 1;
 		}