[LON-CAPA-cvs] cvs: rat / lonuserstate.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 11 May 2004 06:28:23 -0000


albertel		Tue May 11 02:28:23 2004 EDT

  Modified files:              
    /rat	lonuserstate.pm 
  Log:
  - leave the /uploaded URLs of ssi able documents alone
  
  
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.77 rat/lonuserstate.pm:1.78
--- rat/lonuserstate.pm:1.77	Mon Apr 26 15:16:45 2004
+++ rat/lonuserstate.pm	Tue May 11 02:28:23 2004
@@ -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.77 2004/04/26 19:16:45 www Exp $
+# $Id: lonuserstate.pm,v 1.78 2004/05/11 06:28:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -162,7 +162,9 @@
                         } elsif ($turi=~/^\/*uploaded\//) { # uploaded
 			    if (($embstyle eq 'img') || ($embstyle eq 'emb')) {
                                 $turi='/adm/wrapper'.$turi;
-                            } elsif ($turi!~/\.(sequence|page)$/) {
+			    } elsif ($embstyle eq 'ssi') {
+				#do nothing with these
+			    } elsif ($turi!~/\.(sequence|page)$/) {
 				$turi='/adm/coursedocs/showdoc'.$turi;
                             }
                         } elsif ($turi=~/\S/) { # normal non-empty internal resource
@@ -447,9 +449,9 @@
                    /(\&\Q$urifile\E\:[^\&]*)/) {
 		    my $replace=$1;
                     my $regexp=$replace;
-                    $regexp=~s/\|/\\\|/g;
+                    #$regexp=~s/\|/\\\|/g;
                     $acchash{'acc.res.'.$short.'.'.$uripath}
-                     =~s/$regexp/$replace\|$uricond/;
+                     =~s/\Q$regexp\E/$replace\|$uricond/;
                 } else {
 		   $acchash{'acc.res.'.$short.'.'.$uripath}.=
                      $urifile.':'.$uricond.'&';