version 1.207, 2005/05/10 20:29:26
|
version 1.210, 2005/06/04 07:47:51
|
Line 168 sub send_footer {
|
Line 168 sub send_footer {
|
sub proctor_checked_in { |
sub proctor_checked_in { |
my ($slot_name,$slot)=@_; |
my ($slot_name,$slot)=@_; |
my @allowed=split(",",$slot->{'proctor'}); |
my @allowed=split(",",$slot->{'proctor'}); |
|
my $version=$Apache::lonhomework::history{'resource.version'}; |
foreach my $possible (@allowed) { |
foreach my $possible (@allowed) { |
if ($Apache::lonhomework::history{'resource.checkedin'} eq $possible && |
if ($Apache::lonhomework::history{"resource.$version.checkedin"} eq |
$Apache::lonhomework::history{'resource.checkedin.slot'} eq |
$possible && |
$slot_name ) { |
$Apache::lonhomework::history{"resource.$version.checkedin.slot"} |
|
eq $slot_name) { |
return 1; |
return 1; |
} |
} |
} |
} |
Line 239 sub check_task_access {
|
Line 241 sub check_task_access {
|
if ($env{'request.state'} eq "construct") { |
if ($env{'request.state'} eq "construct") { |
return ($status,$datemsg); |
return ($status,$datemsg); |
} |
} |
|
my $version=$Apache::lonhomework::history{'resource.version'}; |
if ($Apache::lonhomework::history{'resource.checkedin'}) { |
if ($Apache::lonhomework::history{"resource.$version.checkedin"} && |
if ($Apache::lonhomework::history{'resource.status'} eq 'pass' || |
$Apache::lonhomework::history{"resource.$version.status"} eq 'pass') { |
$Apache::lonhomework::history{'resource.status'} eq 'fail') { |
return ('SHOW_ANSWER'); |
return ('SHOW_ANSWER'); |
|
} |
|
} |
} |
my ($id)=@_; |
my ($id)=@_; |
my @slots=split(':',&Apache::lonnet::EXT("resource.$id.available")); |
my @slots= |
|
(split(':',&Apache::lonnet::EXT("resource.$id.availablestudent")), |
|
split(':',&Apache::lonnet::EXT("resource.$id.available"))); |
|
|
# if (!@slots) { |
# if (!@slots) { |
# return ($status,$datemsg); |
# return ($status,$datemsg); |
# } |
# } |
my $slotstatus='NOT_IN_A_SLOT'; |
my $slotstatus='NOT_IN_A_SLOT'; |
my ($returned_slot,$slot_name); |
my ($returned_slot,$slot_name); |
foreach my $slot (sort(@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); |
&Apache::lonhomework::showhash(%slot); |
&Apache::lonhomework::showhash(%slot); |
Line 272 sub check_task_access {
|
Line 275 sub check_task_access {
|
&Apache::lonxml::debug("protoctor checked in"); |
&Apache::lonxml::debug("protoctor checked in"); |
$slotstatus='CAN_ANSWER'; |
$slotstatus='CAN_ANSWER'; |
} |
} |
if ( ($slotstatus eq 'NOT_IN_A_SLOT' || $slotstatus eq 'NEEDS_CHECKIN') && |
if ( $slotstatus eq 'NOT_IN_A_SLOT' && |
$Apache::lonhomework::history{'resource.checkedin'}) { |
$Apache::lonhomework::history{"resource.$version.checkedin"}) { |
return ('WAITING_FOR_GRADE'); |
if ($Apache::lonhomework::history{"resource.$version.status"} eq 'fail') { |
|
return ('SHOW_ANSWER'); |
|
} else { |
|
return ('WAITING_FOR_GRADE'); |
|
} |
} |
} |
return ($slotstatus,$datemsg,$slot_name,$returned_slot); |
return ($slotstatus,$datemsg,$slot_name,$returned_slot); |
} |
} |