'."\n";
$Str .= ''."\n";
foreach my $field (@Fields) {
- $Str .= ''.$field.
+ $Str .= ' | '.&mt($field).
' | ';
}
$Str .= ' '."\n";
@@ -827,7 +882,7 @@ sub DisplayClasslist {
#
foreach my $field (@Fields) {
$Str .= '';
- if ($field eq 'fullname') {
+ if ($field eq 'fullname' || $field eq 'username') {
$Str .= '';
$Str .= $student->{$field}.' ';
$Str .= '';
+ } elsif ($field eq 'status') {
+ $Str .= &mt($student->{$field});
} else {
$Str .= $student->{$field};
}
@@ -853,38 +910,58 @@ sub DisplayClasslist {
##############################################
##############################################
sub CreateMainMenu {
- my ($status,$reports,$current)=@_;
#
- my $Str = '';
+ # Define menu data
+ my @reports = ({ internal_name => 'problem_statistics',
+ name => &mt('Overall Problem Statistics'),
+ short_description =>
+ &mt('Student performance statistics on all problems.'),
+ },
+ { internal_name => 'problem_analysis',
+ name => &mt('Detailed Problem Analysis'),
+ short_description =>
+ &mt('Detailed statistics and graphs of student performance on problems.'),
+ },
+ { internal_name => 'submissiontime_analysis',
+ name => &mt('Submission Time Plots'),
+ short_description =>
+ &mt('Display and analysis of submission times on assessments.'),
+ },
+ { internal_name => 'student_submission_reports',
+ name => &mt('Student Submission Reports'),
+ short_description =>
+ &mt('Prepare reports of student submissions.'),
+ },
+ { internal_name => 'survey_reports',
+ name => &mt('Survey Reports'),
+ short_description =>
+ &mt('Prepare reports on survey results.'),
+ },
+ { internal_name => 'correct_problems_plot',
+ name => &mt('Correct Problems Plot'),
+ short_description =>
+ &mt('Display a histogram of student performance in the course.'),
+ },
+# { internal_name => 'student_assessment',
+# name => &mt('Problem Status Chart'),
+# short_description =>
+# &mt('Brief view of each students performance in course.'),
+# },
+ # 'percentage' => 'Correct-problems Plot',
+ # 'activitylog' => 'Activity Log',
+ );
#
- $Str .= ''."\n";
- $Str .= ' '."\n";
+ # Create the menu
+ my $Str;
+ $Str .= ''.&mt('Please select a report to generate').'';
+ foreach my $reportdata (@reports) {
+ $Str .=' \n";
+ $Str .= ' '.(' 'x8).$reportdata->{'short_description'}.
+ "\n";
+ }
+ $Str .="\n";
#
return $Str;
}
@@ -915,93 +992,126 @@ sub handler {
}
}
#
- # Set document type for header only
- if($r->header_only) {
- if ($ENV{'browser.mathml'}) {
- $r->content_type('text/xml');
- } else {
- $r->content_type('text/html');
- }
- &Apache::loncommon::no_cache($r);
- $r->send_http_header;
- return OK;
- }
- #
# Send the header
- $r->content_type('text/html');
+ &Apache::loncommon::no_cache($r);
+ &Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
+ if ($r->header_only) { return OK; }
#
# Extract form elements from query string
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['sort','reportSelected',
'SelectedStudent']);
- if (! exists($ENV{'form.reportSelected'})) {
- $ENV{'form.reportSelected'} = 'student_assessment';
- }
#
# Give the LON-CAPA page header
- $r->print(&Apache::lonhtmlcommon::Title('Course Statistics and Charts'));
- $r->rflush();
- #
- if (! &Apache::lonmysql::verify_sql_connection()) {
- my $serveradmin = $r->dir_config('lonAdmEMail');
- $r->print(<Unable to connect to database!
-
-Please notify the server administrator $serveradmin.
-
-Course Statistics and Charts cannot be retrieved until the database is
-restarted. Your data is intact but cannot be displayed at this time.
-
- |
|