[LON-CAPA-cvs] cvs: loncom /build expire_DC_role.pl

raeburn raeburn at source.lon-capa.org
Fri Oct 12 08:29:00 EDT 2012


raeburn		Fri Oct 12 12:29:00 2012 EDT

  Modified files:              
    /loncom/build	expire_DC_role.pl 
  Log:
  - Remove some debugging.
  
  
Index: loncom/build/expire_DC_role.pl
diff -u loncom/build/expire_DC_role.pl:1.4 loncom/build/expire_DC_role.pl:1.5
--- loncom/build/expire_DC_role.pl:1.4	Fri Aug 17 22:43:03 2012
+++ loncom/build/expire_DC_role.pl	Fri Oct 12 12:29:00 2012
@@ -6,7 +6,7 @@
 # a user who currently has such a role in a domain for which current server is
 # a library server for the domain.
 # 
-# $Id: expire_DC_role.pl,v 1.4 2012/08/17 22:43:03 raeburn Exp $
+# $Id: expire_DC_role.pl,v 1.5 2012/10/12 12:29:00 raeburn Exp $
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
 #
@@ -205,14 +205,11 @@
 my $subdir = $domconfiguser;
 $subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/;
 
-print "Looking to tie $dompath/$subdir/nohist_rolelog.db\n";
-
 my $rolelogref = &LONCAPA::locking_hash_tie("$dompath/$subdir/$domconfiguser/nohist_rolelog.db",&GDBM_WRCREAT());
 
-if (ref($rolelogref) eq 'HASH') {
-    foreach my $key (keys(%{$rolelogref})) {
-        print "found $key\n";
-    }
+if (!$rolelogref) {
+    print(&mt('unable to tie [_1]',"nohist_rolelog db: $dompath/$subdir/$domconfiguser/nohist_rolelog.db")."\n");
+    exit;
 }
 
 my $domlogkey = &LONCAPA::escape($now.'00000'.$$.'000000');
@@ -238,7 +235,6 @@
  system('/bin/chown',"www:www","$dompath/$subdir/nohist_rolelog.db"); # Must be writeable by httpd process.
  system('/bin/chown',"www:www","$dompath/$subdir/nohist_rolelog.db.lock");
 
-
 # Output success message.
 print(&mt('User: [_1], domain coordinator role expired in domain: [_2].',$user,$role_domain)."\n");
 




More information about the LON-CAPA-cvs mailing list