--- loncom/interface/statistics/lonsurveyreports.pm 2008/10/30 17:45:25 1.19
+++ loncom/interface/statistics/lonsurveyreports.pm 2011/01/17 00:19:41 1.25
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonsurveyreports.pm,v 1.19 2008/10/30 17:45:25 bisitz Exp $
+# $Id: lonsurveyreports.pm,v 1.25 2011/01/17 00:19:41 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -30,6 +30,7 @@ use strict;
use Apache::lonnet;
use Apache::loncommon();
use Apache::lonhtmlcommon();
+use Apache::lonquickgrades();
use Apache::loncoursedata();
use Apache::lonstatistics;
use Apache::lonlocal;
@@ -63,10 +64,13 @@ sub BuildSurveyReportsPage {
);
&Apache::loncommon::store_course_settings('survey_reports',
\%Saveable_Parameters);
- &Apache::loncommon::restore_course_settings('survey_resports',
+ &Apache::loncommon::restore_course_settings('survey_reports',
\%Saveable_Parameters);
#
&Apache::lonstatistics::PrepareClasslist();
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports'));
+ &Apache::lonquickgrades::startGradeScreen($r,'statistics');
+
#
$r->print(&CreateInterface());
#
@@ -98,7 +102,7 @@ sub BuildSurveyReportsPage {
#
$r->print('
');
$r->print(''.
- &Apache::lonlocal::locallocaltime(time).','.
+ &Apache::lonlocal::locallocaltime(time).', '.
&Apache::lonstatistics::section_and_enrollment_description().
'
');
$r->rflush();
@@ -177,7 +181,7 @@ sub SurveyProblemSelector {
my @resources = &Apache::lonstathelpers::get_resources($navmap,$seq);
foreach my $res (@resources) {
foreach my $part (@{$res->parts}) {
- if ($res->is_survey($part)) {
+ if (($res->is_survey($part)) || ($res->is_anonsurvey($part))) {
push(@SurveyProblems,{res=>$res,seq=>$seq,part=>$part});
last;
}
@@ -211,10 +215,10 @@ sub SurveyProblemSelector {
$Str .= ''.
''.' | '.
- ''.
+ ''.
''.
(' 'x2).
- ''.&mt('View survey').''.' | |
'.$/;
+ ''.&mt('View survey').''.$/;
}
$Str .= '';
return $Str;
@@ -339,7 +343,7 @@ sub make_text_report {
} else {
$r->print(''
.&mt('There is no essay or string response data to output for this survey.')
- .'');
+ .'
');
}
$r->rflush();
return;
@@ -569,15 +573,20 @@ sub make_HTML_report {
sprintf("%.2f",$count/$total*100).'%'.
&Apache::loncommon::end_data_table_row().$/;
}
- $Str .= &Apache::loncommon::start_data_table_row().
- ''.&mt('Foil Name').' | '.
- ''.&mt('Text').' | '.
- ''.&mt('Freq').' | '.
- ''.&mt('Percent').' | '.
- &Apache::loncommon::end_data_table_row().$/.
- $tmp;
+ $Str.=''
+ .''
+ .&Apache::loncommon::start_data_table()
+ .&Apache::loncommon::start_data_table_header_row()
+ .' | '.&mt('Foil Name').' | '
+ .''.&mt('Text').' | '
+ .''.&mt('Frequency').' | '
+ .''.&mt('Percent').' | '
+ .&Apache::loncommon::end_data_table_header_row().$/
+ .$tmp
+ .&Apache::loncommon::end_data_table()
+ .'
';
}
- $Str.= &Apache::loncommon::end_data_table().'
';
+ $Str.= '';
$r->print($Str);
$r->rflush();
}
@@ -621,7 +630,6 @@ sub CreateInterface {
$output_selector.= '>'.$output_format->{'text'}.''.$/;
}
$output_selector .= ''.$/;
- $Str .= &Apache::lonhtmlcommon::breadcrumbs('Student Submission Reports');
$Str .= '';
$Str .= &Apache::loncommon::start_data_table();
$Str .= &Apache::loncommon::start_data_table_header_row();
@@ -653,11 +661,12 @@ sub CreateInterface {
$prob_checkbox .= 'checked="checked" ';
}
$prob_checkbox .= 'value="true" />';
- $Str .= '
'.
- ' '.
- ' | ';
+ $Str .=
+ ''
+ .''
+ .' | ';
#
$Str .= &Apache::loncommon::end_data_table_row();
$Str .= &Apache::loncommon::end_data_table();