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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 22 Jun 2007 22:30:45 -0000


albertel		Fri Jun 22 18:30:45 2007 EDT

  Modified files:              
    /rat	lonpage.pm 
  Log:
  - remove CAT button from enc'ed resources in a .page
  
  
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.80 rat/lonpage.pm:1.81
--- rat/lonpage.pm:1.80	Fri Jun 22 17:24:54 2007
+++ rat/lonpage.pm	Fri Jun 22 18:30:45 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.80 2007/06/22 21:24:54 albertel Exp $
+# $Id: lonpage.pm,v 1.81 2007/06/22 22:30:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -432,7 +432,10 @@
 				  $symb=&Apache::lonenc::encrypted($symb);
 				  $esrc=&Apache::lonenc::encrypted($esrc);
 			      }
-                              unless ($hash{'src_'.$rid} =~ m-^/uploaded/-) { 
+                              if ($hash{'src_'.$rid} !~ m-^/uploaded/-
+				  && !$env{'request.enc'}
+				  && ($env{'request.role.adv'}
+				      || !$hash{'encrypted_'.$rid})) { 
                                   $metainfo ='<a name="'.&escape($symb).'" />'.
                                   '<a href="'.$metalink{$rid}.'" target="LONcatInfo">'.
                                   '<img src="/adm/lonMisc/cat_button.'.$extension.'" class="LC_icon" />'.