version 1.37, 2005/06/04 08:17:06
|
version 1.38, 2005/08/09 07:34:51
|
Line 165 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 ($slot_name,$slot)=&Apache::slotrequest::check_for_reservation($symb); |
|
my $action='get_reservation'; |
if ($slot_name) { |
if ($slot_name) { |
|
$text="Change reservation."; |
|
$action='change_reservation'; |
my $description=&Apache::slotrequest::get_description($slot_name, |
my $description=&Apache::slotrequest::get_description($slot_name, |
$slot); |
$slot); |
$result.=(<<STUFF); |
$result.=(<<STUFF); |
<p> Will be next available: $description </p> |
<p> Will be next available: $description </p> |
STUFF |
STUFF |
|
|
} else { |
|
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } |
|
$symb=&Apache::lonnet::escape($symb); |
|
$result.='<form method="POST" action="/adm/slotrequest">'. |
|
'<input type="hidden" name="symb" value="'.$symb.'" />'. |
|
'<input type="submit" name="requestattempt" value="'. |
|
&mt("Request another attempt").'" />'. |
|
'</form>'; |
|
} |
} |
|
|
|
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } |
|
$symb=&Apache::lonnet::escape($symb); |
|
$result.='<form method="POST" action="/adm/slotrequest">'. |
|
'<input type="hidden" name="symb" value="'.$symb.'" />'. |
|
'<input type="hidden" name="command" value="'.$action.'" />'. |
|
'<input type="submit" name="requestattempt" value="'. |
|
&mt($text).'" />'. |
|
'</form>'; |
return $result; |
return $result; |
} |
} |
|
|
Line 219 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 249 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); |