version 1.200, 2005/03/17 21:56:04
|
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"); |
my %slot=&Apache::lonnet::get_slot($slot); |
my %slot=&Apache::lonnet::get_slot($slot); |
|
&Apache::lonhomework::showhash(%slot); |
if ($slot{'starttime'} < time && |
if ($slot{'starttime'} < time && |
$slot{'endtime'} > time && |
$slot{'endtime'} > time && |
&check_ip_access($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 |