--- rat/lonuserstate.pm 2002/08/31 00:43:13 1.39 +++ rat/lonuserstate.pm 2002/09/02 15:27:08 1.40 @@ -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.39 2002/08/31 00:43:13 www Exp $ +# $Id: lonuserstate.pm,v 1.40 2002/09/02 15:27:08 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -118,12 +118,19 @@ sub loadmap { unless ($ispage) { $turi=~/\.(\w+)$/; my $embstyle=&Apache::loncommon::fileembstyle($1); - if ($token->[2]->{'external'} eq 'true') { + if ($token->[2]->{'external'} eq 'true') { # external $turi=~s/^http\:\/\//\/adm\/wrapper\/ext\//; - } else { - my $embstyle=&Apache::loncommon::fileembstyle($1); + } elsif ($turi=~/^\/*uploaded\//) { # uploaded + if (($embstyle eq 'img') || ($embstyle eq 'emb') + || ($embstyle eq 'ssi')) { + $turi='/adm/wrapper'.$turi; + } else { + $turi='/adm/coursedocs?showdoc='.$turi; + } + } else { # normal internal resource if (($embstyle eq 'img') || ($embstyle eq 'emb') - || ($turi=~/\/syllabus$/) || ($turi=~/\/aboutme$/)) { + || ($turi=~/\/syllabus$/) || ($turi=~/\/aboutme$/) + || ($turi=~/\/navmaps$/)) { $turi='/adm/wrapper'.$turi; } }