Diff for /loncom/homework/lonhomework.pm between versions 1.201 and 1.202

version 1.201, 2005/03/21 18:53:51 version 1.202, 2005/03/31 15:56:13
Line 163  sub send_footer { Line 163  sub send_footer {
 }  }
   
 sub proctor_checked_in {  sub proctor_checked_in {
       my ($slot)=@_;
       my @allowed=split(",",$slot->{'proctor'});
       foreach my $possible (@allowed) { 
    if ($Apache::lonhomework::history{'resource.checkedin'} eq $possible) {
       return 1;
    }
       }
     return 0;      return 0;
 }  }
   
Line 231  sub check_task_access { Line 238  sub check_task_access {
 # return ($status,$datemsg);  # return ($status,$datemsg);
 #    }  #    }
     my $slotstatus='NOT_IN_A_SLOT';      my $slotstatus='NOT_IN_A_SLOT';
       my $returned_slot;
     foreach my $slot (@slots) {      foreach my $slot (@slots) {
  &Apache::lonxml::debug("getting $slot");   &Apache::lonxml::debug("getting $slot");
  my %slot=&Apache::lonnet::get_slot($slot);   my %slot=&Apache::lonnet::get_slot($slot);
Line 238  sub check_task_access { Line 246  sub check_task_access {
  if ($slot{'starttime'} < time &&   if ($slot{'starttime'} < time &&
     $slot{'endtime'} > time &&      $slot{'endtime'} > time &&
     &check_ip_acc($slot{'ip'})) {      &check_ip_acc($slot{'ip'})) {
     $slotstatus='IN_A_SLOT';      &Apache::lonxml::debug("$slot is good");
       $slotstatus='NEEDS_CHECKIN';
       $returned_slot=\%slot;
     last;      last;
  }   }
     }      }
     if ($slotstatus eq 'IN_A_SLOT' &&      if ($slotstatus eq 'NEEDS_CHECKIN' &&
  &proctor_checked_in()) {   &proctor_checked_in($returned_slot)) {
    &Apache::lonxml::debug("protoctor checked in");
  $slotstatus='CAN_ANSWER';   $slotstatus='CAN_ANSWER';
     }      }
     return ($slotstatus,$datemsg);      return ($slotstatus,$datemsg,$returned_slot);
 }  }
   
 # JB, 9/24/2002: Any changes in this function may require a change  # JB, 9/24/2002: Any changes in this function may require a change

Removed from v.1.201  
changed lines
  Added in v.1.202


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