[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm /interface lonpreferences.pm

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 20 May 2008 18:19:31 -0000


www		Tue May 20 14:19:31 2008 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
    /loncom/interface	lonpreferences.pm 
  Log:
  No course restrictions.
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.193 loncom/auth/lonroles.pm:1.194
--- loncom/auth/lonroles.pm:1.193	Mon May 19 13:55:38 2008
+++ loncom/auth/lonroles.pm	Tue May 20 14:19:28 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.193 2008/05/19 17:55:38 raeburn Exp $
+# $Id: lonroles.pm,v 1.194 2008/05/20 18:19:28 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -137,18 +137,6 @@
 # Is this an ad-hoc CC-role?
                 if (my ($domain,$coursenum) =
 		    ($envkey =~ m-^form\.cc\./($match_domain)/($match_courseid)$-)) {
-                   # See if that is even allowed
-                   my %crsenv=&Apache::lonnet::get('environment',['internal.courseowner'],$domain,$coursenum);
-                   # First find course owner
-                   my ($owneruser,$ownerdomain)=split(/\:/,$crsenv{'internal.courseowner'});
-                   # Check if course owner blocked cc-access
-                    if (($owneruser) && ($ownerdomain)) {
-                       my %blocked=&Apache::lonnet::get('environment',['domcoord.cc'],$ownerdomain,$owneruser);
-                       if ($blocked{'domcoord.cc'} eq 'blocked') {
-                          $env{'user.error.msg'}=':::1:Course owner '.$owneruser.' in domain '.$ownerdomain.' blocked domain coordinator access';
-                          last;
-                       }
-                    }
                     if ($dcroles{$domain}) {
                         &check_privs($domain,$coursenum,$then,$now,'cc');
                     }
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.119 loncom/interface/lonpreferences.pm:1.120
--- loncom/interface/lonpreferences.pm:1.119	Wed May 14 14:21:40 2008
+++ loncom/interface/lonpreferences.pm	Tue May 20 14:19:31 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.119 2008/05/14 18:21:40 www Exp $
+# $Id: lonpreferences.pm,v 1.120 2008/05/20 18:19:31 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -618,25 +618,19 @@
     my $user       = $env{'user.name'};
     my $domain     = $env{'user.domain'};
     my %userenv = &Apache::lonnet::get
-        ('environment',['domcoord.author','domcoord.cc']);
+        ('environment',['domcoord.author']);
     my $constchecked='';
-    my $courseschecked='';
     if ($userenv{'domcoord.author'} eq 'blocked') {
        $constchecked='checked="checked"';
     }
-    if ($userenv{'domcoord.cc'} eq 'blocked') {
-       $courseschecked='checked="checked"';
-    }
-    my $text=&mt('By default, the Domain Coordinator can enter your courses and construction space.');
+    my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
     my $construction=&mt('Block access to construction space');
-    my $courses=&mt('Block access to courses');
     my $change=&mt('Change');
     $r->print(<<ENDSCREEN);
 <form name="prefs" action="/adm/preferences" method="post">
 <input type="hidden" name="action" value="verify_and_change_domcoord" />
 $text<br />
 <label><input type="checkbox" name="construction" $constchecked />$construction</label><br />
-<label><input type="checkbox" name="courses" $courseschecked />$courses</label><br />
 <input type="submit" value="$change" />
 </form>
 ENDSCREEN
@@ -646,12 +640,10 @@
     my $r = shift;
     my $user       = $env{'user.name'};
     my $domain     = $env{'user.domain'};
-    my %domcoord=('domcoord.author' => '','domcoord.cc' => '');
+    my %domcoord=('domcoord.author' => '');
     if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; }
-    if ($env{'form.courses'}) { $domcoord{'domcoord.cc'}='blocked'; }
     &Apache::lonnet::put('environment',\%domcoord);
-    &Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'},
-                             'environment.domcoord.cc' => $domcoord{'domcoord.cc'}});
+    &Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}});
     $r->print(&mt('Registering Domain Coordinator access restrictions.'));
 }