version 1.35, 2005/11/21 21:20:06
|
version 1.37, 2005/12/14 22:26:10
|
Line 626 sub show_table {
|
Line 626 sub show_table {
|
'endtime' => 'End Time', |
'endtime' => 'End Time', |
'startreserve' => 'Time students can start reserving', |
'startreserve' => 'Time students can start reserving', |
'secret' => 'Secret Word', |
'secret' => 'Secret Word', |
'maxspace' => 'Maxium # of students', |
'maxspace' => 'Maximum # of students', |
'ip' => 'IP or DNS restrictions', |
'ip' => 'IP or DNS restrictions', |
'symb' => 'Resource slot is restricted to.', |
'symb' => 'Resource slot is restricted to.', |
'uniqueperiod' => 'Period of time slot is unique', |
'uniqueperiod' => 'Period of time slot is unique', |
Line 1129 sub handler {
|
Line 1129 sub handler {
|
} else { |
} else { |
my $symb=&Apache::lonnet::unescape($env{'form.symb'}); |
my $symb=&Apache::lonnet::unescape($env{'form.symb'}); |
my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb); |
my (undef,undef,$res)=&Apache::lonnet::decode_symb($symb); |
if ($res !~ /\.task$/) { |
my $useslots = &Apache::lonnet::EXT("resource.0.useslots",$symb); |
|
if ($useslots ne 'resource') { |
&fail($r,'not_valid'); |
&fail($r,'not_valid'); |
return OK; |
return OK; |
} |
} |
$env{'request.symb'}=$symb; |
$env{'request.symb'}=$symb; |
my ($status) = &Apache::lonhomework::check_task_access('0'); |
my $type = ($res =~ /\.task$/) ? 'Task' |
|
: 'problem'; |
|
my ($status) = &Apache::lonhomework::check_slot_access('0',$type); |
if ($status eq 'CAN_ANSWER' || |
if ($status eq 'CAN_ANSWER' || |
$status eq 'NEEDS_CHECKIN' || |
$status eq 'NEEDS_CHECKIN' || |
$status eq 'WAITING_FOR_GRADE') { |
$status eq 'WAITING_FOR_GRADE') { |