version 1.1385, 2018/09/21 03:38:44
|
version 1.1386, 2018/10/19 16:54:58
|
Line 5241 sub set_first_access {
|
Line 5241 sub set_first_access {
|
} |
} |
$cachedkey=''; |
$cachedkey=''; |
my $firstaccess=&get_first_access($type,$symb,$map); |
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 $start = time; |
my $putres = &put('firstaccesstimes',{"$courseid\0$res"=>$start}, |
my $putres = &put('firstaccesstimes',{"$courseid\0$res"=>$start}, |
$udom,$uname); |
$udom,$uname); |
Line 5257 sub set_first_access {
|
Line 5262 sub set_first_access {
|
if (($cachedtime) && (abs($start-$cachedtime) < 5)) { |
if (($cachedtime) && (abs($start-$cachedtime) < 5)) { |
$cachedtimes{"$courseid\0$res"} = $start; |
$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; |
return $putres; |
} |
} |