[LON-CAPA-cvs] cvs: loncom /publisher lonrights.pm

taceyjo1 lon-capa-cvs@mail.lon-capa.org
Tue, 18 May 2004 13:44:56 -0000


taceyjo1		Tue May 18 09:44:56 2004 EDT

  Modified files:              
    /loncom/publisher	lonrights.pm 
  Log:
  Started hacking on the rights files, to make them handle source and access rights so we don't have to have 2 
  different rights files running around.
  
  
  
Index: loncom/publisher/lonrights.pm
diff -u loncom/publisher/lonrights.pm:1.13 loncom/publisher/lonrights.pm:1.14
--- loncom/publisher/lonrights.pm:1.13	Tue Jan 20 18:03:18 2004
+++ loncom/publisher/lonrights.pm	Tue May 18 09:44:56 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to show and edit custom distribution rights
 #
-# $Id: lonrights.pm,v 1.13 2004/01/20 23:03:18 albertel Exp $
+# $Id: lonrights.pm,v 1.14 2004/05/18 13:44:56 taceyjo1 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -178,12 +178,14 @@
 				     'do' => 'Domain',
 				     'co' => 'Course',
 				     'se' => 'Section/Group',
-				     'ro' => 'Role');
+				     'ro' => 'Role',
+				     'ua' => 'Use Access',
+				     'sa' => 'Source Access');
 # ---------------------------------------------------------- Start table output
   $r->print(<<ENDSTARTTABLE);
 <table border="2">
     <tr><th>$colzero</th><th>$lt{'ef'}</th><th>$lt{'do'}</th><th>$lt{'co'}</th>
-<th>$lt{'se'}</th><th>$lt{'ro'}</th></tr>
+<th>$lt{'se'}</th><th>$lt{'ro'}</th><th>$lt{'ua'}</th><th>$lt{'sa'}</th></tr>
 ENDSTARTTABLE
 # --------------------------------------------------------------------- Default
 # Fast forward to first rule
@@ -208,7 +210,7 @@
   } else {
       $r->print($token->[2]->{'effect'});
   }
-  $r->print('</td><td colspan="4">Default');
+  $r->print('</td><td colspan="6">Default');
   if (($token->[2]->{'realm'}) || ($token->[2]->{'role'})) {
       $r->print(' - <font color="red">'.&mt('Error! No default set.').
 		'</font>');
@@ -287,6 +289,12 @@
           } else {
               $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'}));
           }
+# use access
+        #  if ($constructmode) {
+	     # 
+        #  } else {
+        #      $r->print(&Apache::lonnet::plaintext($token->[2]->{'role'}));
+        #  }
 # course selection link
           $r->print('</td></tr><tr><td colspan="3" align="right">');
           if ($rcourse) {