\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 +810,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'}=
@@ -833,6 +832,8 @@ sub handler {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['sort','reportSelected',
'SelectedStudent']);
+ my $GoToPage = $env{'form.reportSelected'};
+
#
# Give the LON-CAPA page header
my $style = <
ENDSTYLE
-
+
+ my $head_extra = $style;
+ if (($env{'form.reportSelected'} eq 'student_submission_reports') &&
+ ($env{'form.renderprob'})) {
+ my @Symbs = &Apache::lonstathelpers::get_selected_symbs('problemchoice');
+ if (scalar(@Symbs) == 1) {
+ $head_extra .= &Apache::loncommon::css_links($Symbs[0]);
+ }
+ } elsif ($env{'form.reportSelected'} eq 'submissiontime_analysis') {
+ my ($navmap,$current_problem) =
+ &Apache::lonsubmissiontimeanalysis::get_current_problem();
+ if (ref($current_problem) eq 'HASH') {
+ my $symb = $current_problem->{'symb'};
+ if ($symb) {
+ $head_extra .= &Apache::loncommon::css_links($symb);
+ }
+ }
+ } elsif (($env{'form.reportSelected'} eq 'problem_analysis') &&
+ ($env{'form.show_prob'})) {
+ my $problem_types = &Apache::lonproblemanalysis::analyzable_types();
+ my ($navmap,$current_problem) =
+ &Apache::lonproblemanalysis::get_current_problem($problem_types);
+ if (ref($current_problem) eq 'HASH') {
+ my $symb = $current_problem->{'symb'};
+ my $res = $current_problem->{'resource'};
+ if ($symb) {
+ $head_extra .= &Apache::loncommon::css_links($symb);
+ }
+ }
+ }
$r->print(&Apache::loncommon::start_page('Course Statistics and Charts',
- $style));
+ $head_extra));
$r->rflush();
#
# Either print out a menu for them or send them to a report
@@ -855,17 +885,17 @@ ENDSTYLE
text =>'Statistics',
faq=>139,
bug=>'Statistics and Charts'});
- if (! exists($env{'form.reportSelected'}) ||
- $env{'form.reportSelected'} eq '') {
- $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page').
- &CreateMainMenu());
+ if ($GoToPage eq '') {
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Statistics Main Page'));
+ &Apache::lonquickgrades::startGradeScreen($r,'statistics');
+ $r->print(&CreateMainMenu());
} else {
#
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.'')
@@ -881,18 +911,18 @@ ENDSTYLE
#
# Clean out the caches
if (exists($env{'form.ClearCache'})) {
- &Apache::loncoursedata::delete_caches($env{'requres.course.id'});
+ &Apache::loncoursedata::delete_caches($env{'request.course.id'});
}
#
# Begin form output
$r->print('