Diff for /loncom/automation/Autocreate.pl between versions 1.14 and 1.16

version 1.14, 2010/08/13 16:37:30 version 1.16, 2010/09/26 02:29:55
Line 149 Line 149
                     }                      }
                 }                  }
                 if ($settings->{'req'}) {                  if ($settings->{'req'}) {
                     my $output = &Apache::process_official_reqs('auto',$dom);                      my $output = &Apache::loncoursequeueadmin::process_official_reqs('auto',$dom);
                     if ($output) {                      if ($output) {
                         print $fh $output;                          print $fh $output;
                     }                      }
Line 219  sub process_xml { Line 219  sub process_xml {
   
 sub check_activedc {  sub check_activedc {
     my ($dcdom,$dcname,$defdom) = @_;      my ($dcdom,$dcname,$defdom) = @_;
     my %dumphash=      my %roleshash = 
             &Apache::lonnet::dump('roles',$dcdom,$dcname);          &Apache::lonnet::get_my_roles($dcname,$dcdom,'userroles',undef,['dc'],[$defdom]);
     my $now=time;      if (keys(%roleshash) > 0) {
     my $activedc = 0;          return 1;
     foreach my $item (keys %dumphash) {  
         my ($domain,$role) = ($item =~ m-^/([^/]+)/[^_]*_(\w+)$-);  
         if ($role eq 'dc' && $domain eq $defdom) {  
             my ($trole,$tend,$tstart)=split(/_/,$dumphash{$item});  
             if (($tend) && ($tend<$now)) { next; }  
             if (($tstart) && ($now<$tstart)) { next; }  
             $activedc = 1;  
             last;  
         }  
     }      }
     return $activedc;      return 0;
 }  }
   
 sub set_permissions {  sub set_permissions {

Removed from v.1.14  
changed lines
  Added in v.1.16


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>