[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Thu Nov 1 14:57:30 EDT 2018


raeburn		Thu Nov  1 18:57:30 2018 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - For 2.11
    - Backport 1.1386
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.101 loncom/lonnet/perl/lonnet.pm:1.1172.2.102
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.101	Sat Sep 22 03:11:40 2018
+++ loncom/lonnet/perl/lonnet.pm	Thu Nov  1 18:57:29 2018
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1172.2.101 2018/09/22 03:11:40 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.102 2018/11/01 18:57:29 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4893,7 +4893,12 @@
     }
     $cachedkey='';
     my $firstaccess=&get_first_access($type,$symb,$map);
-    if (!$firstaccess) {
+    if ($firstaccess) {
+        &logthis("First access time already set ($firstaccess) when attempting ".
+                 "to set new value (type: $type, extent: $res) for $uname:$udom ".
+                 "in $courseid");
+        return 'already_set';
+    } else {
         my $start = time;
 	my $putres = &put('firstaccesstimes',{"$courseid\0$res"=>$start},
                           $udom,$uname);
@@ -4909,6 +4914,9 @@
             if (($cachedtime) && (abs($start-$cachedtime) < 5)) {
                 $cachedtimes{"$courseid\0$res"} = $start;
             }
+        } elsif ($putres ne 'refused') {
+            &logthis("Result: $putres when attempting to set first access time ".
+                     "(type: $type, extent: $res) for $uname:$udom in $courseid");
         }
         return $putres;
     }




More information about the LON-CAPA-cvs mailing list