--- rat/lonuserstate.pm 2017/09/03 18:52:23 1.153 +++ rat/lonuserstate.pm 2018/03/29 19:59:08 1.155 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Construct and maintain state and binary representation of course for user # -# $Id: lonuserstate.pm,v 1.153 2017/09/03 18:52:23 raeburn Exp $ +# $Id: lonuserstate.pm,v 1.155 2018/03/29 19:59:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1209,7 +1209,7 @@ sub readmap { } @cond=('true:normal'); - unless (open(LOCKFILE,">$fn.db.lock")) { + unless (open(LOCKFILE,">","$fn.db.lock")) { # # Most likely a permissions problem on the lockfile or its directory. # @@ -1227,6 +1227,8 @@ sub readmap { &unlink_tmpfiles($fn); } undef %randompick; + undef %randompickseed; + undef %randomorder; undef %hiddenurl; undef %encurl; $retfrid=''; @@ -1370,6 +1372,8 @@ sub readmap { $lock=1; } undef %randompick; + undef %randompickseed; + undef %randomorder; undef %hiddenurl; undef %encurl; $errtext=''; @@ -1522,7 +1526,7 @@ sub build_tmp_hashes { # ---------------------------------------------------- Store away initial state { my $cfh; - if (open($cfh,">$fn.state")) { + if (open($cfh,">","$fn.state")) { print $cfh join("\n",@cond); $gotstate = 1; } else { @@ -1559,7 +1563,7 @@ sub evalstate { if (-e $fn) { my @conditions=(); { - open(my $fh,"<$fn"); + open(my $fh,"<",$fn); @conditions=<$fh>; close($fh); }