version 1.258, 2012/01/03 00:28:17
|
version 1.264.4.1, 2017/06/21 19:55:00
|
Line 252 sub add_grading_button {
|
Line 252 sub add_grading_button {
|
$size=scalar(keys(%sections))+2; |
$size=scalar(keys(%sections))+2; |
} |
} |
my $sec_select = "\n".'<select multiple="multiple" name="chosensections" size="'.$size.'">'."\n"; |
my $sec_select = "\n".'<select multiple="multiple" name="chosensections" size="'.$size.'">'."\n"; |
$sec_select .= "\t<option value='all' selected='selected'>all</option>\n"; |
$sec_select .= "\t".'<option value="all" selected="selected">'.&mt('all')."</option>\n"; |
foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) { |
foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) { |
$sec_select .= "\t<option value=\"$sec\">$sec</option>\n"; |
$sec_select .= "\t<option value=\"$sec\">$sec</option>\n"; |
} |
} |
$sec_select .= "\t<option value='none'>none</option>\n</select>\n"; |
$sec_select .= "\t".'<option value="none">'.&mt('none')."</option>\n</select>\n"; |
|
|
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); } |
Line 681 sub start_Task {
|
Line 681 sub start_Task {
|
$target eq 'tex') { |
$target eq 'tex') { |
if ($env{'form.markaccess'}) { |
if ($env{'form.markaccess'}) { |
my @interval=&Apache::lonnet::EXT("resource.0.interval"); |
my @interval=&Apache::lonnet::EXT("resource.0.interval"); |
&Apache::lonnet::set_first_access($interval[1]); |
my ($timelimit) = ($interval[0] =~ /^(\d+)/); |
|
&Apache::lonnet::set_first_access($interval[1],$timelimit); |
} |
} |
} |
} |
|
|
Line 719 sub start_Task {
|
Line 720 sub start_Task {
|
'slot' => $slot_name}); |
'slot' => $slot_name}); |
($version,$previous)=&get_version(); |
($version,$previous)=&get_version(); |
} |
} |
|
if (($target eq 'web') && ($version ne '') && ($slot_name ne '')) { |
|
if (ref($slot) eq 'HASH') { |
|
if ($slot->{'endtime'} > time()) { |
|
$result .= |
|
&Apache::lonhtmlcommon::set_due_date($slot->{'endtime'}); |
|
} |
|
} |
|
} |
|
|
my $status_id = 'LC_task_take'; |
my $status_id = 'LC_task_take'; |
if ($previous && $target eq 'answer') { |
if ($previous && $target eq 'answer') { |
$status_id = 'LC_task_answer'; |
$status_id = 'LC_task_answer'; |
Line 743 sub start_Task {
|
Line 752 sub start_Task {
|
} |
} |
my $msg; |
my $msg; |
if ($status eq 'UNAVAILABLE') { |
if ($status eq 'UNAVAILABLE') { |
$msg.='<h1>'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</h1>'; |
$msg.='<p class="LC_error">'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</p>'; |
} 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.='<p class="LC_warning">'.&mt('You are not currently signed up to work at this time and/or place.').'</p>'; |
$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.='<p class="LC_warning">'.&mt('You need the Proctor to validate you.'). |
'</h1>'.&proctor_validation_screen($slot); |
'</p>'.&proctor_validation_screen($slot); |
} elsif ($status eq 'WAITING_FOR_GRADE') { |
} elsif ($status eq 'WAITING_FOR_GRADE') { |
$msg.='<h1>'.&mt('Your submission is in the grading queue.').'</h1>'; |
$msg.='<p class="LC_info">'.&mt('Your submission is in the grading queue.').'</p>'; |
} elsif ($env{'form.donescreen'}) { |
} elsif ($env{'form.donescreen'}) { |
$result .= &done_screen($version); |
$result .= &done_screen($version); |
} elsif ($status eq 'NOT_YET_VIEWED') { |
} elsif ($status eq 'NOT_YET_VIEWED') { |
my $symb=&Apache::lonnet::symbread(); |
my $symb=&Apache::lonnet::symbread(); |
$msg.=&Apache::structuretags::firstaccess_msg($accessmsg,$symb); |
$msg.=&Apache::structuretags::firstaccess_msg($accessmsg,$symb); |
} else { |
} else { |
$msg.='<h1>'.&mt('Not open to be viewed').'</h1>'; |
$msg.='<p class="LC_warning">'.&mt('Not open to be viewed').'</p>'; |
} |
} |
if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') { |
if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') { |
$msg.='The problem '.$accessmsg; |
$msg.='The problem '.$accessmsg; |
Line 988 sub get_key_todo {
|
Line 997 sub get_key_todo {
|
my $classlist=&get_limited_classlist(); |
my $classlist=&get_limited_classlist(); |
if (!&allow_grade_user($classlist->{$uname.':'.$udom})) { |
if (!&allow_grade_user($classlist->{$uname.':'.$udom})) { |
return (undef,'not_allowed', |
return (undef,'not_allowed', |
&mt('Requested student ([_1]) is in a section you aren\'t allowed to grade.',$uname.':'.$udom)); |
&mt("Requested student ([_1]) is in a section you aren't allowed to grade.",$uname.':'.$udom)); |
} |
} |
} |
} |
my $gradingkey=&encode_queue_key($symb,$udom,$uname); |
my $gradingkey=&encode_queue_key($symb,$udom,$uname); |
Line 1399 DONEBUTTON
|
Line 1408 DONEBUTTON
|
if ($canstore) { |
if ($canstore) { |
&Apache::structuretags::finalize_storage(); |
&Apache::structuretags::finalize_storage(); |
my @interval = &Apache::lonnet::EXT("resource.0.interval"); |
my @interval = &Apache::lonnet::EXT("resource.0.interval"); |
if ($interval[0] =~ /^\d+$/ && $interval[1] eq 'resource') { |
if ($interval[0] =~ /^\d+/ && $interval[1] eq 'resource') { |
my $key=$courseid."\0".$symb; |
my $key=$courseid."\0".$symb; |
my %times=&Apache::lonnet::get('firstaccesstimes', |
my %times=&Apache::lonnet::get('firstaccesstimes', |
[$key],$domain,$name); |
[$key],$domain,$name); |
Line 1788 sub show_queue {
|
Line 1797 sub show_queue {
|
$result.=(<<FORM); |
$result.=(<<FORM); |
<td>$status</td> |
<td>$status</td> |
<td> |
<td> |
<form style="display: inline" method="post"> |
<form style="display: inline" method="post" action=""> |
<input type="hidden" name="gradingkey" value="$ekey" /> |
<input type="hidden" name="gradingkey" value="$ekey" /> |
<input type="hidden" name="queue" value="$queue" /> |
<input type="hidden" name="queue" value="$queue" /> |
<input type="hidden" name="gradingaction" value="$action" /> |
<input type="hidden" name="gradingaction" value="$action" /> |
Line 2207 sub select_user {
|
Line 2216 sub select_user {
|
$result.=&Apache::loncommon::start_data_table_row(); |
$result.=&Apache::loncommon::start_data_table_row(); |
$result.=<<RESULT; |
$result.=<<RESULT; |
<td> |
<td> |
<form style="display: inline" method="post"> |
<form style="display: inline" method="post" action=""> |
<input type="hidden" name="gradingkey" value="$todo" /> |
<input type="hidden" name="gradingkey" value="$todo" /> |
<input type="hidden" name="queue" value="$queue" /> |
<input type="hidden" name="queue" value="$queue" /> |
<input type="hidden" name="webgrade" value="no" /> |
<input type="hidden" name="webgrade" value="no" /> |