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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 05 Jan 2006 20:57:55 -0000


albertel		Thu Jan  5 15:57:55 2006 EDT

  Modified files:              
    /rat	lonsequence.pm 
  Log:
  - adv users can see randomout things BUG#4061
  
  
Index: rat/lonsequence.pm
diff -u rat/lonsequence.pm:1.24 rat/lonsequence.pm:1.25
--- rat/lonsequence.pm:1.24	Thu Apr  7 02:56:27 2005
+++ rat/lonsequence.pm	Thu Jan  5 15:57:55 2006
@@ -2,7 +2,7 @@
 #
 # Sequence Handler
 #
-# $Id: lonsequence.pm,v 1.24 2005/04/07 06:56:27 albertel Exp $
+# $Id: lonsequence.pm,v 1.25 2006/01/05 20:57:55 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -268,7 +268,9 @@
            if ($disid) {
 	       $disurl=$bighash{'src_'.$disid};
                $dismapid=(split(/\./,$disid))[1];
-               $randomout = $bighash{'randomout_'.$disid};
+	       if (!$env{'request.role.adv'}) {
+		   $randomout = $bighash{'randomout_'.$disid};
+	       }
            } elsif (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db',
                     &GDBM_READER(),0640)) {
                $last=$hash{'last_known'};
@@ -285,7 +287,9 @@
                if ($disid) {
 	           $disurl=$bighash{'src_'.$disid};
                    $dismapid=(split(/\./,$disid))[1];
-                   $randomout = $bighash{'randomout_'.$disid};
+		   if (!$env{'request.role.adv'}) {
+		       $randomout = $bighash{'randomout_'.$disid};
+		   }
                }
  	   }
            $exitdisid = $disid;