version 1.238, 2007/08/09 01:05:15
|
version 1.239, 2008/08/13 09:10:44
|
Line 252 sub add_grading_button {
|
Line 252 sub add_grading_button {
|
my ($entries,$ready,$locks)=&get_queue_counts('gradingqueue'); |
my ($entries,$ready,$locks)=&get_queue_counts('gradingqueue'); |
$result.="\n\t".'<table>'."\n\t\t".'<tr>'; |
$result.="\n\t".'<table>'."\n\t\t".'<tr>'; |
if ($see_all || (!§ion_restricted())) { |
if ($see_all || (!§ion_restricted())) { |
$result.="\n\t\t\t".'<td rowspan="4">Specify a section: </td>'. |
$result.="\n\t\t\t".'<td rowspan="4">'.&mt('Specify a section:').' </td>'. |
"\n\t\t\t".'<td rowspan="4">'.$sec_select."\n\t\t\t".'</td>'; |
"\n\t\t\t".'<td rowspan="4">'.$sec_select."\n\t\t\t".'</td>'; |
} else { |
} else { |
$result.="\n\t\t\t".'<td rowspan="4">Grading section: </td>'. |
$result.="\n\t\t\t".'<td rowspan="4">'.&mt('Grading section:').' </td>'. |
"\n\t\t\t".'<td rowspan="4">'.$env{'request.course.sec'}."\n\t\t\t".'</td>'; |
"\n\t\t\t".'<td rowspan="4">'.$env{'request.course.sec'}."\n\t\t\t".'</td>'; |
} |
} |
$result.="\n\t\t\t".'<td>'.'<input type="submit" name="reviewagrading" value="'. |
$result.="\n\t\t\t".'<td>'.'<input type="submit" name="reviewagrading" value="'. |
Line 294 sub add_grading_button {
|
Line 294 sub add_grading_button {
|
|
|
sub add_request_another_attempt_button { |
sub add_request_another_attempt_button { |
my ($text)=@_; |
my ($text)=@_; |
if (!$text) { $text="Request another attempt"; } |
if (!$text) { $text=&mt('Request another attempt'); } |
my $result; |
my $result; |
my $symb=&Apache::lonnet::symbread(); |
my $symb=&Apache::lonnet::symbread(); |
# not a slot access based resource |
# not a slot access based resource |
Line 306 sub add_request_another_attempt_button {
|
Line 306 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="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); |
$result.=(<<STUFF); |
$result.='<p>' |
<p> Will be next available: $description </p> |
.&mt('Will be next available:') |
STUFF |
.' '.$description |
|
.'</p>'; |
} |
} |
|
|
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } |
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } |
Line 322 STUFF
|
Line 323 STUFF
|
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n\t\t". |
'<input type="hidden" name="symb" value="'.$symb.'" />'."\n\t\t". |
'<input type="hidden" name="command" value="'.$action.'" />'."\n\t\t". |
'<input type="hidden" name="command" value="'.$action.'" />'."\n\t\t". |
'<input type="submit" name="requestattempt" value="'. |
'<input type="submit" name="requestattempt" value="'. |
&mt($text).'" />'."\n\t". |
$text.'" />'."\n\t". |
'</form>'."\n"; |
'</form>'."\n"; |
return $result; |
return $result; |
} |
} |
Line 540 sub done_screen {
|
Line 541 sub done_screen {
|
foreach my $file (@files) { |
foreach my $file (@files) { |
my $url="/uploaded/$domain/$user/portfolio$file"; |
my $url="/uploaded/$domain/$user/portfolio$file"; |
if (! &Apache::lonnet::stat_file($url)) { |
if (! &Apache::lonnet::stat_file($url)) { |
$file = &mt('<span class="LC_error"> Nonexistent file:</span> '. |
$file = '<span class="LC_error">' |
'<span class="LC_filename">[_1]</span>',$file); |
.&mt('[_1]Nonexistent file:[_2]' |
$msg .= "<p>Submitted non-existant file $file</p>\n"; |
,'<span class="LC_error"> ' |
|
,'</span> <span class="LC_filename">'.$file.'</span>'); |
|
$msg .= "<p>".&mt('Submitted non-existant file [_1]',$file)."</p>\n"; |
} else { |
} else { |
$file = '<span class="LC_filename">'.$file.'</span>'; |
$file = '<span class="LC_filename">'.$file.'</span>'; |
$msg .= "<p>Submitted file $file</p>\n"; |
$msg .= "<p>".&mt('Submitted file [_1]',$file)."</p>\n"; |
} |
} |
$files .= '<li>'.$file.'</li>'; |
$files .= '<li>'.$file.'</li>'; |
} |
} |
$files.='</ul>'; |
$files.='</ul>'; |
my $subject = "Submission message for $title"; |
my $subject = &mt('Submission message for [_1]',$title); |
my ($message_status,$comment_status); |
my ($message_status,$comment_status); |
my $setting = $env{'course.'.$env{'request.course.id'}.'.task_messages'}; |
my $setting = $env{'course.'.$env{'request.course.id'}.'.task_messages'}; |
$setting =~ s/^\s*(\S*)\s*$/$1/; |
$setting =~ s/^\s*(\S*)\s*$/$1/; |
Line 569 sub done_screen {
|
Line 572 sub done_screen {
|
$comment_status = '<p>'.&mt('Message sent to instructor: [_1]', |
$comment_status = '<p>'.&mt('Message sent to instructor: [_1]', |
$comment_status).' </p>'; |
$comment_status).' </p>'; |
} |
} |
return <<DONESCREEN; |
return "<h2>$title</h2>" |
<h2>$title</h2> |
.'<p>'.&mt('Files submitted: [_1]',$files).'</p>' |
<p> Files submitted: $files </p> |
.'<p>'.&mt('You are now done with this Bridge Task').'</p>' |
<p> You are now done with this Bridge Task </p> |
.'<hr />' |
<hr /> |
.'<p><a href="/adm/logout">'.&mt('Logout').'</a></p>' |
<p> <a href="/adm/logout">Logout</a> </p> |
.'<p><a href="/adm/roles">'.&mt('Change to a different course').'</a></p>' |
<p> <a href="/adm/roles">Change to a different course</a> </p> |
.$message_status |
$message_status |
.$comment_status |
$comment_status |
|
DONESCREEN |
|
|
|
} |
} |
|
|
Line 1126 DONEBUTTON
|
Line 1127 DONEBUTTON
|
"</p>\n"; |
"</p>\n"; |
|
|
if ($bt_status eq 'pass') { |
if ($bt_status eq 'pass') { |
$status.='<h2>You passed the '.$title.' given on '. |
$status.='<h2>' |
$start_time.'</h2>'; |
.&mt('You passed the [_1] given on [_2].',$title,$start_time) |
|
.'</h2>'; |
$status.=$question_status; |
$status.=$question_status; |
} |
} |
if ($bt_status eq 'fail') { |
if ($bt_status eq 'fail') { |
$status.='<h2>You did not pass the '.$title.' given on '. |
$status.='<h2>' |
$start_time.'</h2>'; |
.&mt('You did not pass the [_1] given on [_2].',$title,$start_time) |
|
.'</h2>'; |
$status.=$question_status; |
$status.=$question_status; |
if (!$previous) { |
if (!$previous) { |
$status.=&add_request_another_attempt_button(); |
$status.=&add_request_another_attempt_button(); |
Line 1561 sub show_queue {
|
Line 1564 sub show_queue {
|
my $classlist = &get_limited_classlist(\@chosen_sections); |
my $classlist = &get_limited_classlist(\@chosen_sections); |
|
|
if (!(grep(/^all$/,@chosen_sections))) { |
if (!(grep(/^all$/,@chosen_sections))) { |
$result.='<p> Showing only sections <tt>'.join(', ',@chosen_sections). |
$result.='<p>' |
'</tt>.</p> '."\n"; |
.&mt('Showing only sections [_1].' |
|
,'<tt>'.join(', ',@chosen_sections).'</tt>') |
|
."</p>\n"; |
} |
} |
|
|
my ($view,$view_section); |
my ($view,$view_section); |
Line 1579 sub show_queue {
|
Line 1584 sub show_queue {
|
$result .= |
$result .= |
'<p><a href="/adm/flip?postdata=return:">'. |
'<p><a href="/adm/flip?postdata=return:">'. |
&mt('Return to resource').'</a></p><hr />'. |
&mt('Return to resource').'</a></p><hr />'. |
"\n<h3>Current Queue - $queue</h3>"; |
"\n<h3>".&mt('Current Queue - [_1]',$queue)."</h3>"; |
my $regexp="^$symb\0"; |
my $regexp="^$symb\0"; |
my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp); |
my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp); |
my ($tmp)=%queue; |
my ($tmp)=%queue; |
Line 1596 sub show_queue {
|
Line 1601 sub show_queue {
|
$result.= |
$result.= |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(); |
&Apache::loncommon::start_data_table_header_row(); |
if ($with_selects) { $result.="<th>Status</th><th></th>"; } |
if ($with_selects) { $result.='<th>'.&mt('Status').'</th><th></th>'; } |
$result.="<th>user</th><th>data</th>". |
$result.='<th>'.&mt('User').'</th><th>'.&mt('Data').'</th>'. |
&Apache::loncommon::end_data_table_header_row(); |
&Apache::loncommon::end_data_table_header_row(); |
foreach my $key (sort(keys(%queue))) { |
foreach my $key (sort(keys(%queue))) { |
my ($symb,$uname,$udom) = &decode_queue_key($key); |
my ($symb,$uname,$udom) = &decode_queue_key($key); |
Line 1644 sub show_queue {
|
Line 1649 sub show_queue {
|
'start'); |
'start'); |
} |
} |
my $me=$env{'user.name'}.':'.$env{'user.domain'}; |
my $me=$env{'user.name'}.':'.$env{'user.domain'}; |
$status=&mt('Locked by <tt>[_1]</tt> [_2]',$locker,$time); |
$status=&mt('Locked by [_1] [_2]','<tt>'.$locker.'</tt>',$time); |
if ($me eq $locker) { |
if ($me eq $locker) { |
($action,$description)=('resume',&mt('Resume')); |
($action,$description)=('resume',&mt('Resume')); |
} else { |
} else { |
Line 1679 FORM
|
Line 1684 FORM
|
} |
} |
$result.= "<td>".$classlist->{$uname.':'.$udom}[&Apache::loncoursedata::CL_FULLNAME()]. |
$result.= "<td>".$classlist->{$uname.':'.$udom}[&Apache::loncoursedata::CL_FULLNAME()]. |
" <tt>($uname:$udom)</tt> </td>"; |
" <tt>($uname:$udom)</tt> </td>"; |
$result.='<td>'.$slot_text.' End time: '. |
$result.='<td>'.$slot_text.' ' |
&Apache::lonlocal::locallocaltime($end_time). |
.&mt('End time: [_1]' |
"</td>".&Apache::loncommon::end_data_table_row(); |
,&Apache::lonlocal::locallocaltime($end_time)) |
|
.'</td>' |
|
.&Apache::loncommon::end_data_table_row(); |
} |
} |
} |
} |
$result.= &Apache::loncommon::end_data_table()."<hr />\n"; |
$result.= &Apache::loncommon::end_data_table()."<hr />\n"; |
Line 2034 sub select_user {
|
Line 2041 sub select_user {
|
|
|
my $result; |
my $result; |
if (!(grep(/^all$/,@chosen_sections))) { |
if (!(grep(/^all$/,@chosen_sections))) { |
$result.='<p> Showing only sections <tt>'.join(', ',@chosen_sections). |
$result.='<p>' |
'</tt>.</p> '."\n"; |
.&mt('Showing only sections [_1].' |
|
,'<tt>'.join(', ',@chosen_sections).'</tt>') |
|
.'</p> '."\n"; |
} |
} |
$result.=&Apache::loncommon::start_data_table(); |
$result.=&Apache::loncommon::start_data_table(); |
|
|
Line 2432 sub end_Dimension {
|
Line 2441 sub end_Dimension {
|
('sub' x $dimension{$dim}{'depth'}).'question'; |
('sub' x $dimension{$dim}{'depth'}).'question'; |
$ucquestion =~ s/^(.)/uc($1)/e; |
$ucquestion =~ s/^(.)/uc($1)/e; |
if ($dim_status eq 'pass') { |
if ($dim_status eq 'pass') { |
$dim_info.='<h3>'.$ucquestion.' : you passed this '.$mandatory.' '.$question.'</h3>'; |
$dim_info.='<h3>'.$ucquestion.' : ' |
|
.&mt('you passed this [_1] [_2]',$mandatory,$question) |
|
.'</h3>'; |
} |
} |
if ($dim_status eq 'fail') { |
if ($dim_status eq 'fail') { |
$dim_info.='<h3>'.$ucquestion.' : you did not pass this '.$mandatory.' '.$question.'</h3>'; |
$dim_info.='<h3>'.$ucquestion.' : ' |
|
.&mt('you did not pass this [_1] [_2]',$mandatory,$question) |
|
.'</h3>'; |
} |
} |
my %counts = &get_counts($dim,$instance,$parstack, |
my %counts = &get_counts($dim,$instance,$parstack, |
$safeeval); |
$safeeval); |
Line 2634 sub question_status_message {
|
Line 2647 sub question_status_message {
|
} |
} |
$status .= '.'; |
$status .= '.'; |
if ($counts->{'opt'}) { |
if ($counts->{'opt'}) { |
|
# FIXME &mt() missing! |
$status .= ' You were required to pass '.$counts->{'opt_req'}. |
$status .= ' You were required to pass '.$counts->{'opt_req'}. |
' optional '; |
' optional '; |
if ($counts->{'opt_dim'} + $counts->{'man_dim'} < 1) { |
if ($counts->{'opt_dim'} + $counts->{'man_dim'} < 1) { |
Line 3118 sub proctor_validation_screen {
|
Line 3132 sub proctor_validation_screen {
|
} |
} |
if (!$valid) { |
if (!$valid) { |
$msg.='<p><span class="LC_error">' |
$msg.='<p><span class="LC_error">' |
.&mt("No valid poctors are defined.") |
.&mt("No valid proctors are defined.") |
.'</span></p>'; |
.'</span></p>'; |
} |
} |
|
|
if (!$env{'form.proctordomain'}) { $env{'form.proctordomain'}=$domain; } |
if (!$env{'form.proctordomain'}) { $env{'form.proctordomain'}=$domain; } |
my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'}); |
my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'}); |
$uri = &HTML::Entities::encode($uri,'<>&"'); |
$uri = &HTML::Entities::encode($uri,'<>&"'); |
|
# FIXME &mt() missing! |
my $result= (<<ENDCHECKOUT); |
my $result= (<<ENDCHECKOUT); |
<h2>Proctor Validation</h2> |
<h2>Proctor Validation</h2> |
<p>Your room's proctor needs to validate your access to this resource.</p> |
<p>Your room's proctor needs to validate your access to this resource.</p> |