--- loncom/interface/londocs.pm 2022/10/27 20:30:11 1.685 +++ loncom/interface/londocs.pm 2022/10/27 21:35:30 1.686 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.685 2022/10/27 20:30:11 raeburn Exp $ +# $Id: londocs.pm,v 1.686 2022/10/27 21:35:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4368,6 +4368,17 @@ END } $nomodal = 1; } + } elsif (($uploaded) && (!$allowed) && ($url ne '/adm/supplemental?')) { + my $embstyle=&Apache::loncommon::fileembstyle($extension); + unless ($embstyle eq 'ssi') { + if (($embstyle eq 'img') + || ($embstyle eq 'emb') + || ($embstyle eq 'wrp')) { + $url='/adm/wrapper'.$url; + } elsif ($url !~ /\.(sequence|page)$/) { + $url='/adm/coursedocs/showdoc'.$url; + } + } } unless ($allowed && $env{'request.role.adv'}) { if ($ishidden || (&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {