version 1.36, 2005/05/31 21:11:56
|
version 1.38, 2005/08/09 07:34:51
|
Line 36 use Apache::File();
|
Line 36 use Apache::File();
|
use Apache::lonmenu; |
use Apache::lonmenu; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonxml; |
use Apache::lonxml; |
|
use Apache::slotrequest(); |
use Time::HiRes qw( gettimeofday tv_interval ); |
use Time::HiRes qw( gettimeofday tv_interval ); |
|
|
BEGIN { |
BEGIN { |
Line 164 sub add_grading_button {
|
Line 165 sub add_grading_button {
|
} |
} |
|
|
sub add_request_another_attempt_button { |
sub add_request_another_attempt_button { |
|
my ($text)=@_; |
|
if (!$text) { $text="Request another attempt"; } |
my $result; |
my $result; |
my $symb=&Apache::lonnet::symbread(); |
my $symb=&Apache::lonnet::symbread(); |
|
my ($slot_name,$slot)=&Apache::slotrequest::check_for_reservation($symb); |
|
my $action='get_reservation'; |
|
if ($slot_name) { |
|
$text="Change reservation."; |
|
$action='change_reservation'; |
|
my $description=&Apache::slotrequest::get_description($slot_name, |
|
$slot); |
|
$result.=(<<STUFF); |
|
<p> Will be next available: $description </p> |
|
STUFF |
|
} |
|
|
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } |
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } |
$symb=&Apache::lonnet::escape($symb); |
$symb=&Apache::lonnet::escape($symb); |
$result.='<form method="POST" action="/adm/slotrequest">'. |
$result.='<form method="POST" action="/adm/slotrequest">'. |
'<input type="hidden" name="symb" value="'.$symb.'" />'. |
'<input type="hidden" name="symb" value="'.$symb.'" />'. |
|
'<input type="hidden" name="command" value="'.$action.'" />'. |
'<input type="submit" name="requestattempt" value="'. |
'<input type="submit" name="requestattempt" value="'. |
&mt("Request another attempt").'" />'. |
&mt($text).'" />'. |
'</form>'; |
'</form>'; |
return $result; |
return $result; |
} |
} |
Line 208 sub start_Task {
|
Line 224 sub start_Task {
|
my $uri=$env{'request.uri'}; |
my $uri=$env{'request.uri'}; |
if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); } |
if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); } |
$body_tag_start.=$uri.'">'.&add_grading_button()."</form>"; |
$body_tag_start.=$uri.'">'.&add_grading_button()."</form>"; |
|
my $symb=&Apache::lonnet::symbread(); |
|
$body_tag_start.='<form method="POST" action="/adm/slotrequest">'. |
|
'<input type="hidden" name="symb" value="'.$symb.'" />'. |
|
'<input type="hidden" name="command" value="showslots" />'. |
|
'<input type="submit" name="requestattempt" value="'. |
|
&mt('Show Slot list').'" />'. |
|
'</form>'; |
|
|
} |
} |
} |
} |
if ($target eq 'web' || ($target eq 'grade' && !$env{'form.webgrade'}) || $target eq 'answer' || |
if ($target eq 'web' || ($target eq 'grade' && !$env{'form.webgrade'}) || $target eq 'answer' || |
Line 238 sub start_Task {
|
Line 262 sub start_Task {
|
$msg.='<h1>'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</h1>'; |
$msg.='<h1>'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</h1>'; |
} elsif ($status eq 'NOT_IN_A_SLOT') { |
} elsif ($status eq 'NOT_IN_A_SLOT') { |
$msg.='<h1>'.&mt('You are not currently signed up to work at this time and/or place.').'</h1>'; |
$msg.='<h1>'.&mt('You are not currently signed up to work at this time and/or place.').'</h1>'; |
|
$msg.=&add_request_another_attempt_button("Sign up for time to work."); |
} elsif ($status eq 'NEEDS_CHECKIN') { |
} elsif ($status eq 'NEEDS_CHECKIN') { |
$msg.='<h1>'.&mt('You need the Proctor to validate you.'). |
$msg.='<h1>'.&mt('You need the Proctor to validate you.'). |
'</h1>'.&proctor_validation_screen($slot); |
'</h1>'.&proctor_validation_screen($slot); |