version 1.246, 2009/03/27 00:20:39
|
version 1.251, 2010/04/01 00:37:15
|
Line 315 sub add_request_another_attempt_button {
|
Line 315 sub add_request_another_attempt_button {
|
my ($slot_name,$slot)=&Apache::slotrequest::check_for_reservation($symb); |
my ($slot_name,$slot)=&Apache::slotrequest::check_for_reservation($symb); |
my $action='get_reservation'; |
my $action='get_reservation'; |
if ($slot_name) { |
if ($slot_name) { |
$text=&mt('Change reservation.'); |
$text=&mt('Change reservation'); |
$action='change_reservation'; |
$action='change_reservation'; |
my $description=&Apache::slotrequest::get_description($slot_name, |
my $description=&Apache::slotrequest::get_description($slot_name, |
$slot); |
$slot); |
Line 698 sub start_Task {
|
Line 698 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."); |
$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); |
Line 714 sub start_Task {
|
Line 714 sub start_Task {
|
} |
} |
$result.=$msg.'<br />'; |
$result.=$msg.'<br />'; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$result.='\begin{document}\noindent \vskip 1 mm \begin{minipage}{\textwidth}\vskip 0 mm'; |
$result.='\noindent \vskip 1 mm \begin{minipage}{\textwidth}\vskip 0 mm'; |
if ($status eq 'UNAVAILABLE') { |
if ($status eq 'UNAVAILABLE') { |
$result.=&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'\vskip 0 mm '; |
$result.=&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'\vskip 0 mm '; |
} else { |
} else { |
Line 1308 DONEBUTTON
|
Line 1308 DONEBUTTON
|
$Apache::lonhomework::results{"resource.$version.0.solved"}; |
$Apache::lonhomework::results{"resource.$version.0.solved"}; |
} |
} |
&minimize_storage(); |
&minimize_storage(); |
&Apache::structuretags::finalize_storage(); |
my $canstore; |
|
if ($env{'form.gradingkey'}) { |
|
my ($symb,$courseid,$domain,$name) = |
|
&Apache::lonnet::whichuser(); |
|
my $todo=&unescape($env{'form.gradingkey'}); |
|
my ($keysymb,$uname,$udom)=&decode_queue_key($todo); |
|
if ($symb eq $keysymb) { |
|
if (($domain eq $udom) && ($name eq $uname)) { |
|
$canstore = 1; |
|
} |
|
} |
|
} |
|
if ($canstore) { |
|
&Apache::structuretags::finalize_storage(); |
|
} else { |
|
$result .= '<br /><div class="LC_error">'. |
|
&mt('Information extracted from the current gradingkey was for a different BT or user from those for which grading data are to be stored.').' '.&mt('No grading changes stored.').'</div><br />'; |
|
} |
|
|
# data stored, now handle queue |
# data stored, now handle queue |
if ($review) { |
if ($review) { |
if ($env{'form.queue'} eq 'reviewqueue') { |
if ($env{'form.queue'} eq 'reviewqueue') { |
Line 1395 DONEBUTTON
|
Line 1412 DONEBUTTON
|
} |
} |
&Apache::structuretags::reset_problem_globals('Task'); |
&Apache::structuretags::reset_problem_globals('Task'); |
undef($Apache::lonhomework::parsing_a_task); |
undef($Apache::lonhomework::parsing_a_task); |
|
if ( ($target eq 'grade' && $env{'form.webgrade'}) || |
|
$target eq 'webgrade') { |
|
delete($env{'form.grade_symb'}); |
|
delete($env{'form.grade_domain'}); |
|
delete($env{'form.grade_username'}); |
|
delete($env{'form.grade_courseid'}); |
|
} |
return $result; |
return $result; |
} |
} |
|
|
Line 3007 sub layout_webgrade_Criteria {
|
Line 3031 sub layout_webgrade_Criteria {
|
$comment = &HTML::Entities::encode($comment,'<>"&'); |
$comment = &HTML::Entities::encode($comment,'<>"&'); |
my %checked; |
my %checked; |
foreach my $which ('ungraded','fail','pass','review') { |
foreach my $which ('ungraded','fail','pass','review') { |
if ($status eq $which) { $checked{$which} = 'checked="checked"'; } |
if ($status eq $which) { $checked{$which} = ' checked="checked"'; } |
} |
} |
if (!%checked) { $checked{'ungraded'} = 'checked="checked"'; } |
if (!%checked) { $checked{'ungraded'} = ' checked="checked"'; } |
my $buttons; |
my $buttons; |
foreach my $which ('ungraded','fail','pass','review') { |
foreach my $which ('ungraded','fail','pass','review') { |
$buttons .= <<END_BUTTON; |
$buttons .= <<END_BUTTON; |
<label class="LC_GRADING_$which"> |
<label class="LC_GRADING_$which"> |
<input type="radio" name="HWVAL_$link" value="$which" $checked{$which} /> |
<input type="radio" name="HWVAL_$link" value="$which"$checked{$which} /> |
$lt{$which} |
$lt{$which} |
</label> |
</label> |
END_BUTTON |
END_BUTTON |
Line 3157 sub proctor_validation_screen {
|
Line 3181 sub proctor_validation_screen {
|
'vali' => 'Validate', |
'vali' => 'Validate', |
'stui' => "Student who should be logged in is:", |
'stui' => "Student who should be logged in is:", |
'name' => "Name:", |
'name' => "Name:", |
'sid' => "Student/Employee ID:", |
'sid' => "Student/Employee ID", |
'unam' => "Username:", |
'unam' => "Username:", |
); |
); |
my $result= (<<ENDCHECKOUT); |
my $result= (<<ENDCHECKOUT); |