--- rat/lonuserstate.pm 2022/01/02 16:30:29 1.149.2.5.2.1 +++ rat/lonuserstate.pm 2021/08/10 15:28:14 1.166 @@ -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.149.2.5.2.1 2022/01/02 16:30:29 raeburn Exp $ +# $Id: lonuserstate.pm,v 1.166 2021/08/10 15:28:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,7 +42,7 @@ use Safe::Hole; use Opcode; use Apache::lonenc; use Fcntl qw(:flock); -use LONCAPA qw(:DEFAULT :match); +use LONCAPA qw(:DEFAULT :match); use File::Basename; @@ -256,9 +256,9 @@ sub loadmap { push(@map_ids, $resource_id); if ($hash{'src_'.$lpc.'.'.$resource_id}) { $rescount{$lpc} ++; - if (($hash{'src_'.$lpc.'.'.$resource_id}=~/\.sequence$/) || + if (($hash{'src_'.$lpc.'.'.$resource_id}=~/\.sequence$/) || ($hash{'src_'.$lpc.'.'.$resource_id}=~/\.page$/)) { - $mapcount{$lpc} ++; + $mapcount{$lpc} ++; } } unless ($codechecked) { @@ -950,7 +950,7 @@ sub traceroute { @deeplink = &Apache::lonnet::EXT('resource.0.deeplink',$symb,'','','','',$cid,\@recurseup); } unless (@deeplink < 2) { - $hash{'deeplinkonly_'.$rid}=join(':',map { &escape($_); } @deeplink); + $hash{'deeplinkonly_'.$rid}=join(':',@deeplink); } if (defined($hash{'conditions_'.$rid})) { @@ -1495,7 +1495,7 @@ sub readmap { if ($redirect) { $retfurl = $url; } - } + } return ($retfurl,$errtext); } @@ -1613,10 +1613,7 @@ sub build_tmp_hashes { } my $deeplink; if ($hash{'deeplinkonly_'.$loginrid} ne '') { - my @deeplinkinfo = map { &unescape($_); } split(/:/,$hash{'deeplinkonly_'.$loginrid}); - unless (@deeplinkinfo < 2) { - $deeplink = $deeplinkinfo[0]; - } + $deeplink = $hash{'deeplinkonly_'.$loginrid}; } if ($deeplink) { my $disallow; @@ -1809,6 +1806,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.'.$item.'___(rec).'.$what; + if (defined($$useropt{$recursechk})) { + return $$useropt{$recursechk}; + } } } @@ -1830,6 +1831,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.['.$cgroup.'].'.$item.'___(rec).'.$what; + if (defined($$courseopt{$recursechk})) { + return $$courseopt{$recursechk}; + } } } @@ -1851,6 +1856,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.['.$csec.'].'.$item.'___(rec).'.$what; + if (defined($$courseopt{$recursechk})) { + return $$courseopt{$recursechk}; + } } } @@ -1894,6 +1903,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.'.$item.'___(rec).'.$what; + if (defined($$courseopt{$recursechk})) { + return $$courseopt{$recursechk}; + } } } }