--- rat/lonuserstate.pm 2004/04/23 15:23:35 1.73 +++ rat/lonuserstate.pm 2004/04/23 15:43:41 1.74 @@ -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.73 2004/04/23 15:23:35 www Exp $ +# $Id: lonuserstate.pm,v 1.74 2004/04/23 15:43:41 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -289,10 +289,14 @@ sub loadmap { $randompick{$referid}=$token->[2]->{'value'}; } if ($token->[2]->{'name'} eq 'parameter_encrypturl') { - $encurl{$referid}=$token->[2]->{'value'}; + if ($token->[2]->{'value'}=~/^yes$/i) { + $encurl{$referid}=1; + } } if ($token->[2]->{'name'} eq 'parameter_hiddenresource') { - $hiddenurl{$referid}=$token->[2]->{'value'}; + if ($token->[2]->{'value'}=~/^yes$/i) { + $hiddenurl{$referid}=1; + } } } @@ -571,10 +575,17 @@ sub readmap { $hash{$_}=&putinversion($hash{$_}); } } +# ---------------------------------------------------------------- Encrypt URLs + foreach (keys %encurl) { + $hash{'src_'.$_}=&Apache::lonenc::encrypted($hash{'src_'.$_}); + } +# ----------------------------------------------- Close hashes to finally store +# --------------------------------- Routine must pass this point, no early outs unless ((untie(%hash)) && (untie(%parmhash))) { &Apache::lonnet::logthis("WARNING: ". "Could not untie coursemap $fn for $uri."); } +# ---------------------------------------------------- Store away initial state { my $cfh; if ($cfh=Apache::File->new(">$fn.state")) {