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

www lon-capa-cvs@mail.lon-capa.org
Mon, 26 Apr 2004 19:16:45 -0000


www		Mon Apr 26 15:16:45 2004 EDT

  Modified files:              
    /rat	lonuserstate.pm 
  Log:
  Hiding and encrypting complete folder trees by making the respective
  settings recursive.
  
  
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.76 rat/lonuserstate.pm:1.77
--- rat/lonuserstate.pm:1.76	Fri Apr 23 19:01:35 2004
+++ rat/lonuserstate.pm	Mon Apr 26 15:16:45 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.76 2004/04/23 23:01:35 albertel Exp $
+# $Id: lonuserstate.pm,v 1.77 2004/04/26 19:16:45 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -329,10 +329,16 @@
 # -------------------------------------------------------- Build condition hash
 
 sub traceroute {
-    my ($sofar,$rid,$beenhere)=@_;
+    my ($sofar,$rid,$beenhere,$encflag,$hdnflag)=@_;
     $sofar=simplify($sofar);
     unless ($beenhere=~/\&$rid\&/) {
        $beenhere.=$rid.'&';  
+       if ($hdnflag) {
+	   $hiddenurl{$rid}=1;
+       }
+       if ($encflag) {
+	   $encurl{$rid}=1;
+       }
        if (($retfurl eq '') && ($hash{'src_'.$rid})
         && ($hash{'src_'.$rid}!~/\.sequence$/)) {
            my ($mapid,$resid)=split(/\./,$rid);
@@ -351,7 +357,9 @@
        }
        if (defined($hash{'is_map_'.$rid})) {
            if (defined($hash{'map_start_'.$hash{'src_'.$rid}})) {
-	       &traceroute($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},'&');
+	       &traceroute($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},'&',
+			   $encflag || $encurl{$rid},
+			   $hdnflag || $hiddenurl{$rid});
                if (defined($hash{'map_finish_'.$hash{'src_'.$rid}})) {
 		   $sofar=
                   $hash{'conditions_'.$hash{'map_finish_'.$hash{'src_'.$rid}}};
@@ -370,7 +378,7 @@
                                  .$hash{'undercond_'.$_}.'. ';
                    }
                 }
-                &traceroute($further,$hash{'goesto_'.$_},$beenhere);
+                &traceroute($further,$hash{'goesto_'.$_},$beenhere,$encflag,$hdnflag);
           }
        }
     }