'."\n";
- $Str .= '
'. + &mt('There are no currently enrolled students in the course.'). + ' '; + } elsif (lc($env{'form.Status'}) eq 'expired') { + $Str .= ''. + &mt('There are no previously enrolled students in the course.'). + ' '; + } elsif (lc($env{'form.Status'}) eq 'future') { + $Str .= ''. + &mt('There are no students with future access in the course.'). + ' '; + } else { # 'any' and any others + $Str .= ''. + &mt('There are no students in the course.'). + ' '; + } + } else { + if (lc($env{'form.Status'}) eq 'active') { + $Str .= ''. + &mt('There are no currently enrolled students in the selected sections.'). + ' '; + } elsif (lc($env{'form.Status'}) eq 'expired') { + $Str .= ''. + &mt('There are no previously enrolled students in the selected sections.'). + ' '; + } elsif (lc($env{'form.Status'}) eq 'future') { + $Str .= ''. + &mt('There are no students with future access in the selected sections.'). + ' '; + } else { # 'any' and any others + $Str .= ''. + &mt('There are no students in the selected sections.'). + ' '; + } } - $alternate = ($alternate + 1) % 2; - foreach my $data (@$studentInformation) { + $Str.= '' + .'' + .&mt('Return to the chart').'' + .' '; + $r->print($Str); + $r->rflush(); + return; + } + + $Str .= ''.&mt('Select One Student').'' + .''.&mt("Click on a student's name or username to view their chart").' ' + .&Apache::loncommon::start_data_table() + .&Apache::loncommon::start_data_table_header_row(); + foreach my $field (@Fields) { + $Str .= ''.&mt($field).
+ ' | ';
+ }
+ $Str .= &Apache::loncommon::end_data_table_header_row();
+ #
+ foreach my $student (@Students) { # @Students is a package variable
+ my $sname = $student->{'username'}.':'.$student->{'domain'};
+ $Str .= &Apache::loncommon::start_data_table_row();
+ #
+ foreach my $field (@Fields) {
$Str .= '';
- if($data eq 'fullname') {
+ if ($field eq 'fullname' || $field eq 'username') {
$Str .= '';
- $Str .= $cache{$_.':'.$data}.' ';
+ $Str .= &escape('student_assessment');
+ $Str .= '&sort='.&escape($env{'form.sort'});
+ $Str .= '&SelectedStudent=';
+ $Str .= &escape($sname).'">';
+ $Str .= $student->{$field}.' ';
$Str .= '';
- } elsif($data eq 'updateTime') {
- $Str .= '';
- $Str .= $cache{$_.':'.$data}.' ';
- $Str .= ' ';
+ } elsif ($field eq 'status') {
+ $Str .= &mt($student->{$field});
} else {
- $Str .= $cache{$_.':'.$data}.' ';
+ $Str .= $student->{$field};
}
-
- $Str .= ' | '."\n";
+ $Str .= '';
}
+ $Str .= &Apache::loncommon::end_data_table_row();
}
+ $Str .= &Apache::loncommon::end_data_table();
+ #
+ $r->print($Str);
+ $r->rflush();
+ #
+ return;
+}
- $Str .= ' |
'.&mt('Aggregate test performance data will be available after the Concept Test end date: [_1].', + &Apache::lonlocal::locallocaltime($duedate)).'
'); + } else { + $r->print(''. + &mt('Aggregate test performance data unavailable without definition of an end date for the Concept Test.').'
'); + } + $r->print(&Apache::loncommon::end_page()); + return OK; + } + } - $r->print(&Apache::lonhtmlcommon::Title('LON-CAPA Statistics')); + # + # Extract form elements from query string + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['sort','reportSelected', + 'SelectedStudent']); + # + # Give the LON-CAPA page header + my $style = <' + .&mt('Please notify the server administrator [_1]', + ,''.$serveradmin.'') + .'
'); + $r->print(''. + &mt('Course Statistics and Charts cannot be '. + 'retrieved until the database is restarted. '. + 'Your data is intact but cannot be displayed '. + 'at this time.').'
'); + $r->print(&Apache::loncommon::end_page()); + return; + } + # + # Clean out the caches + if (exists($env{'form.ClearCache'})) { + &Apache::loncoursedata::delete_caches($env{'requres.course.id'}); + } + # + # Begin form output $r->print('\n"); } - - $r->print(''."\n"); - $r->print("\n".'