--- loncom/interface/lonstatistics.pm 2010/02/13 00:30:53 1.144.2.2
+++ loncom/interface/lonstatistics.pm 2013/05/11 21:48:06 1.156.2.3
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstatistics.pm,v 1.144.2.2 2010/02/13 00:30:53 raeburn Exp $
+# $Id: lonstatistics.pm,v 1.156.2.3 2013/05/11 21:48:06 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -64,6 +64,7 @@ use Apache::lonpercentage;
use Apache::lonstudentsubmissions();
use Apache::lonsurveyreports();
use Apache::longradinganalysis();
+use Apache::lonquickgrades();
use LONCAPA;
#
@@ -405,25 +406,25 @@ sub StudentDataSelect {
$Str .= 'size="'.$numvisible.'" >'."\n";
#
# Deal with 'all'
- $Str .= ' \n";
}
$Str .= "\n";
return $Str;
@@ -506,9 +507,9 @@ sub map_select {
$form .= 'size="'.$numvisible.'" >'."\n";
#
# Put in option for 'all'
- $form .= '
';
+ $Str .= '';
$Str .= '';
$r->print($Str);
@@ -690,13 +691,13 @@ sub DisplayClasslist {
}
$Str .= ''.&mt('Select One Student').'
'
- .''.&mt("Click on a student's name or username to view their chart").'
'
+ .''.&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).
' | ';
}
@@ -711,15 +712,19 @@ sub DisplayClasslist {
if ($field eq 'fullname' || $field eq 'username') {
$Str .= '';
- $Str .= $student->{$field}.' ';
+ $Str .= $student->{$field};
$Str .= '';
} elsif ($field eq 'status') {
$Str .= &mt($student->{$field});
} else {
- $Str .= $student->{$field};
+ if ($student->{$field} eq 'none') {
+ $Str .= &mt('none')
+ } else {
+ $Str .= $student->{$field};
+ }
}
$Str .= '';
}
@@ -738,63 +743,52 @@ sub DisplayClasslist {
sub CreateMainMenu {
#
# 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 => 'grading_analysis',
-# name => &mt('Detailed Grading Analysis'),
-# short_description =>
-# &mt('Display statistics about who graded who.'),
-# },
-# { 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',
- );
- #
- # 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;
+ my @reports = (
+ {categorytitle => 'Statistics and Analyses',
+ items => [
+ {url => '/adm/statistics?reportSelected=problem_statistics',
+ permission => 'F',
+ icon => 'document-open.png',
+ linktext => ('Overall Problem Statistics'),
+ linktitle => ('Student performance statistics on all problems.')},
+
+ {url => '/adm/statistics?reportSelected=problem_analysis',
+ permission => 'F',
+ icon => 'prob_ana.png',
+ linktext => ('Detailed Problem Analysis'),
+ linktitle => ('Detailed statistics and graphs of student performance on problems.')},
+ ]},
+ {categorytitle => 'Plots',
+ items => [
+ {url => '/adm/statistics?reportSelected=submissiontime_analysis',
+ permission => 'F',
+ icon => 'subtimpl.png',
+ linktext => ('Submission Time Plots'),
+ linktitle => ('Display and analysis of submission times on assessments.')},
+
+ {url => '/adm/statistics?reportSelected=correct_problems_plot',
+ permission => 'F',
+ icon => 'coprplot.png',
+ linktext => ('Correct Problems Plot'),
+ linktitle => ('Display a histogram of student performance in the course.')},
+ ]},
+ {categorytitle => 'Reports',
+ items => [
+ {url => '/adm/statistics?reportSelected=student_submission_reports',
+ permission => 'F',
+ icon => 'edit-copy.png',
+ linktext => ('Student Submission Reports'),
+ linktitle => ('Prepare reports of student submissions.')},
+
+ {url => '/adm/statistics?reportSelected=survey_reports',
+ permission => 'F',
+ icon => 'survey_rep.png',
+ linktext => ('Survey Reports'),
+ linktitle => ('Prepare reports on survey results.')},
+ ]});
+
+return &Apache::lonhtmlcommon::generate_menu(@reports);
+
}
@@ -803,14 +797,6 @@ sub handler {
my $r=shift;
my $c = $r->connection();
#
- # Check for overloading
- my $loaderror=&Apache::lonnet::overloaderror($r);
- if ($loaderror) { return $loaderror; }
- $loaderror=
- &Apache::lonnet::overloaderror($r,
- $env{'course.'.$env{'request.course.id'}.'.home'});
- if ($loaderror) { return $loaderror; }
- #
# Check for access
if (! &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
$env{'user.error.msg'}=
@@ -863,9 +849,9 @@ ENDSTYLE
#
if (! &Apache::lonmysql::verify_sql_connection()) {
my $serveradmin = $r->dir_config('lonAdmEMail');
- $r->print(''.
+ $r->print('
'.
&mt('Unable to connect to database!').
- '');
+ '
');
$r->print(''
.&mt('Please notify the server administrator [_1]',
,''.$serveradmin.'')
@@ -884,15 +870,17 @@ ENDSTYLE
&Apache::loncoursedata::delete_caches($env{'requres.course.id'});
}
#
+ my $GoToPage = $env{'form.reportSelected'};
+ #
# Begin form output
$r->print('