--- rat/lonuserstate.pm 2022/01/02 16:30:29 1.149.2.5.2.1 +++ rat/lonuserstate.pm 2022/05/29 12:10:17 1.168 @@ -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.168 2022/05/29 12:10:17 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) { @@ -1495,7 +1495,7 @@ sub readmap { if ($redirect) { $retfurl = $url; } - } + } return ($retfurl,$errtext); } @@ -1635,6 +1635,9 @@ sub build_tmp_hashes { } if ($disallow) { &Apache::lonnet::delenv('request.deeplink.login'); + if ($env{'request.deeplink.target'} ne '') { + &Apache::lonnet::delenv('request.deeplink.target'); + } } else { if ($others eq 'hide') { my @recfolders; @@ -1809,6 +1812,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.'.$item.'___(rec).'.$what; + if (defined($$useropt{$recursechk})) { + return $$useropt{$recursechk}; + } } } @@ -1830,6 +1837,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.['.$cgroup.'].'.$item.'___(rec).'.$what; + if (defined($$courseopt{$recursechk})) { + return $$courseopt{$recursechk}; + } } } @@ -1851,6 +1862,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.['.$csec.'].'.$item.'___(rec).'.$what; + if (defined($$courseopt{$recursechk})) { + return $$courseopt{$recursechk}; + } } } @@ -1894,6 +1909,10 @@ sub get_mapparam { last; } } + my $recursechk=$usercourseprefix.'.'.$item.'___(rec).'.$what; + if (defined($$courseopt{$recursechk})) { + return $$courseopt{$recursechk}; + } } } }