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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 15 Apr 2005 21:08:37 -0000


albertel		Fri Apr 15 17:08:37 2005 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - this isn't actually caching the data, so I'm not sure why it is pretending too
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.323 loncom/interface/lonnavmaps.pm:1.324
--- loncom/interface/lonnavmaps.pm:1.323	Mon Apr 11 11:33:46 2005
+++ loncom/interface/lonnavmaps.pm	Fri Apr 15 17:08:37 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.323 2005/04/11 15:33:46 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.324 2005/04/15 21:08:37 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2122,16 +2122,14 @@
     my %courserdatas; my %useropt; my %courseopt; my %userrdatas;
     unless ($uhome eq 'no_host') { 
 # ------------------------------------------------- Get coursedata (if present)
-	unless ((time-$courserdatas{$cid.'.last_cache'})<240) {
-	    my $reply=&Apache::lonnet::reply('dump:'.$cdom.':'.$cnum.
-					     ':resourcedata',$chome);
-	    # Check for network failure
-	    if ( $reply =~ /no.such.host/i || $reply =~ /con_lost/i) {
-		$self->{NETWORK_FAILURE} = 1;
-	    } elsif ($reply!~/^error\:/) {
-		$courserdatas{$cid}=$reply;
-		$courserdatas{$cid.'.last_cache'}=time;
-	    }
+	my $reply=&Apache::lonnet::reply('dump:'.$cdom.':'.$cnum.
+					 ':resourcedata',$chome);
+	# Check for network failure
+	if ( $reply =~ /no.such.host/i || $reply =~ /con_lost/i) {
+	    $self->{NETWORK_FAILURE} = 1;
+	} elsif ($reply!~/^error\:/) {
+	    $courserdatas{$cid}=$reply;
+	    $courserdatas{$cid.'.last_cache'}=time;
 	}
 	foreach (split(/\&/,$courserdatas{$cid})) {
 	    my ($name,$value)=split(/\=/,$_);
@@ -2139,17 +2137,15 @@
 		&Apache::lonnet::unescape($value);
 	}
 # --------------------------------------------------- Get userdata (if present)
-	unless ((time-$userrdatas{$uname.'___'.$udom.'.last_cache'})<240) {
-	    my $reply=&Apache::lonnet::reply('dump:'.$udom.':'.$uname.':resourcedata',$uhome);
-	    if ($reply!~/^error\:/) {
-		$userrdatas{$uname.'___'.$udom}=$reply;
-		$userrdatas{$uname.'___'.$udom.'.last_cache'}=time;
-	    }
-	    # check to see if network failed
-	    elsif ( $reply=~/no.such.host/i || $reply=~/con.*lost/i )
-	    {
-		$self->{NETWORK_FAILURE} = 1;
-	    }
+	my $reply=&Apache::lonnet::reply('dump:'.$udom.':'.$uname.':resourcedata',$uhome);
+	if ($reply!~/^error\:/) {
+	    $userrdatas{$uname.'___'.$udom}=$reply;
+	    $userrdatas{$uname.'___'.$udom.'.last_cache'}=time;
+	}
+	# check to see if network failed
+	elsif ( $reply=~/no.such.host/i || $reply=~/con.*lost/i )
+	{
+	    $self->{NETWORK_FAILURE} = 1;
 	}
 	foreach (split(/\&/,$userrdatas{$uname.'___'.$udom})) {
 	    my ($name,$value)=split(/\=/,$_);