'."\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}.' ';
+ if ($student->{$field} eq 'none') {
+ $Str .= &mt('none')
+ } else {
+ $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('Unable to connect to database!'). + '
'); + $r->print('' + .&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'}); + } + # + my $GoToPage = $env{'form.reportSelected'}; + # + # Begin form output $r->print('\n"); } - - if($GoToPage eq 'Activity Log') { - &Apache::lonproblemstatistics::Activity(); - } elsif($GoToPage eq 'Problem Statistics') { - $r->print( - &Apache::lonproblemstatistics::BuildProblemStatisticsPage($cacheDB, - $students, - $courseID, - $c,$r, - \%color)); - } elsif($GoToPage eq 'Problem Analysis') { - $r->print( - &Apache::lonproblemanalysis::BuildProblemAnalysisPage($cacheDB)); - } elsif($GoToPage eq 'Student Assessment') { - $r->print( - &Apache::lonstudentassessment::BuildStudentAssessmentPage($cacheDB, - $students, - $courseID, - 'Statistics', - \@headings, - $spacing, - \@studentInformation, - $r, $c)); - } elsif($GoToPage eq 'Analyze') { - $r->print(&Apache::lonproblemanalysis::BuildAnalyzePage($cacheDB, - $students, - $courseID)); - } elsif($GoToPage eq 'DoDiffGraph') { - &Apache::lonproblemstatistics::BuildDiffGraph($r); - } elsif($GoToPage eq 'PercentWrongGraph') { - &Apache::lonproblemstatistics::BuildWrongGraph($r); - } elsif($GoToPage eq 'Class list') { - $r->print(&BuildClasslist($cacheDB, $students, \@studentInformation, - \@headings)); - } - - $r->print(''."\n"); - $r->print("\n".'