--- loncom/homework/structuretags.pm 2024/01/13 12:07:13 1.583 +++ loncom/homework/structuretags.pm 2024/02/27 22:09:40 1.585 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.583 2024/01/13 12:07:13 raeburn Exp $ +# $Id: structuretags.pm,v 1.585 2024/02/27 22:09:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1451,10 +1451,15 @@ sub needs_linkprot_passback { $pbscope = 'nonrec'; } } elsif ($scope eq 'rec') { - my @recurseup = &get_map_hierarchy($map,$env{'request.course.id'}); - if (grep(/^\Q$deeplink_map\E$/,@recurseup)) { + if (&Apache::lonnet::clutter($deeplink_map) eq $map) { $passback = 1; $pbscope = 'map'; + } else { + my @recurseup = &Apache::lonnet::get_map_hierarchy($map,$env{'request.course.id'}); + if (grep(/^\Q$deeplink_map\E$/,@recurseup)) { + $passback = 1; + $pbscope = 'map'; + } } } return ($passback,$pbscope,$deeplink_map,$deeplink_symb,$crsdef,$itemnum,$lti_in_use); @@ -1647,10 +1652,13 @@ sub access_status_msg { $msg ='\noindent \vskip 1 mm '. $startminipage.'\vskip 0 mm'; if ($status eq 'UNAVAILABLE') { - $msg.=&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'\vskip 0 mm '; + $msg.=&mt('Unable to determine if this resource is open due to network problems. Please try again later.'); + } elsif ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') { + $msg.=&mt('Problem is not open to be viewed. It')." $accessmsg"; } else { - $msg.=&mt('Problem is not open to be viewed. It')." $accessmsg \\vskip 0 mm "; + $msg.=&mt('Problem is not open to be viewed.'); } + $msg .= " \\vskip 0 mm "; } return $msg; }