'."\n";
@@ -284,6 +339,15 @@ my @OutputOptions =
show => 'all',
show_links => 'yes',
},
+ { name => 'HTML, with all links',
+ value => 'html, with all links',
+ description => 'Output HTML with each symbol linked to the problem '.
+ 'which generated it. '.
+ 'This includes links for unattempted problems.',
+ mode => 'html',
+ show => 'all',
+ show_links => 'all',
+ },
{ name => 'HTML, without links',
value => 'html, without links',
description => 'Output HTML. By not including links, the size of the'.
@@ -305,11 +369,19 @@ my @OutputOptions =
{ name => 'HTML, totals',
value => 'html, totals',
description => 'Output HTML, but only the summary statistics for each'.
- ' sequence selected.',
+ ' sequence selected for each student.',
mode => 'html',
show => 'totals',
show_links => 'no',
},
+ { name => 'HTML, summary table only',
+ value => 'html summary table only',
+ description => 'Output HTML, but only the final summary table for '.
+ 'all students across all sequences.',
+ mode => 'html',
+ show => 'final table',
+ show_links => 'no',
+ },
{ name => 'Excel, scores only',
value => 'excel, scores only',
description => 'Output an Excel file (compatable with Excel 95), '.
@@ -328,27 +400,27 @@ my @OutputOptions =
show => 'totals',
show_links => 'no',
},
- { name => 'multi-sheet Excel',
- value => 'multi-sheet excel',
- description => 'Output an Excel file (compatable with Excel 95), '.
- 'with a seperate worksheet for each sequence you have selected '.
- 'the data for each problem part '.
- '(number of tries, status, points awarded) will be listed.',
- mode => 'multi-sheet excel',
- show => 'totals',
- show_links => 'no',
- },
- { name => 'multi-sheet Excel, by section',
- value => 'multi-sheet excel, by section',
- description => 'Output an Excel file (compatable with Excel 95), '.
- 'with a seperate worksheet for each sequence you have selected '.
- 'the data for each problem part '.
- '(number of tries, status, points awarded) will be listed. '.
- 'There will be one Excel workbook for each section selected.',
- mode => 'multi-sheet excel',
- show => 'by section',
- show_links => 'no',
- },
+# { name => 'multi-sheet Excel',
+# value => 'multi-sheet excel',
+# description => 'Output an Excel file (compatable with Excel 95), '.
+# 'with a seperate worksheet for each sequence you have selected '.
+# 'the data for each problem part '.
+# '(number of tries, status, points awarded) will be listed.',
+# mode => 'multi-sheet excel',
+# show => 'totals',
+# show_links => 'no',
+# },
+# { name => 'multi-sheet Excel, by section',
+# value => 'multi-sheet excel, by section',
+# description => 'Output an Excel file (compatable with Excel 95), '.
+# 'with a seperate worksheet for each sequence you have selected '.
+# 'the data for each problem part '.
+# '(number of tries, status, points awarded) will be listed. '.
+# 'There will be one Excel workbook for each section selected.',
+# mode => 'multi-sheet excel',
+# show => 'by section',
+# show_links => 'no',
+# },
{ name => 'CSV, everything',
value => 'csv, everything',
description => '',
@@ -386,10 +458,10 @@ sub OutputDescriptions {
sub CreateAndParseOutputSelector {
my $Str = '';
- my $elementname = 'outputmode';
+ my $elementname = 'chartoutputmode';
#
# Format for output options is 'mode, restrictions';
- my $selected = 'html, with links';
+ my $selected = 'html, without links';
if (exists($ENV{'form.'.$elementname})) {
if (ref($ENV{'form.'.$elementname} eq 'ARRAY')) {
$selected = $ENV{'form.'.$elementname}->[0];
@@ -446,12 +518,27 @@ Return a line of the chart for a student
my $padding;
my $count;
+ my $nodata_count; # The number of students for which there is no data
+ my %prog_state; # progress state used by loncommon PrgWin routines
+
sub html_initialize {
my ($r) = @_;
#
$padding = ' 'x3;
$count = 0;
+ $nodata_count = 0;
+ #
+ $r->print("
");
+
#
+ # Set up progress window for 'final table' display only
+ if ($show eq 'final table') {
+ my $studentcount = scalar(@Apache::lonstatistics::Students);
+ %prog_state=&Apache::lonhtmlcommon::Create_PrgWin
+ ($r,'Summary Table Status',
+ 'Summary Table Compilation Progress', $studentcount);
+ }
my $Str = "
\n";
# First, the @StudentData fields need to be listed
my @to_show = &get_student_fields_to_show();
@@ -462,7 +549,7 @@ sub html_initialize {
$Str .= $title.' 'x($width-$base).$padding;
}
# Now the selected sequences need to be listed
- foreach my $sequence (&get_sequences_to_show) {
+ foreach my $sequence (&Apache::lonstatistics::Sequences_with_Assess()){
my $title = $sequence->{'title'};
my $base = $sequence->{'base_width'};
my $width = $sequence->{'width'};
@@ -470,6 +557,11 @@ sub html_initialize {
}
$Str .= "total (of shown problems)
\n";
$Str .= "
";
+ #
+ # Check for suppression of output
+ if ($show eq 'final table') {
+ $Str = '';
+ }
$r->print($Str);
$r->rflush();
return;
@@ -499,6 +591,8 @@ sub html_outputstudent {
%StudentsData = @tmp;
}
if (scalar(@tmp) < 1) {
+ $nodata_count++;
+ return if ($show eq 'final table');
$Str .= 'No Course Data'."\n";
$r->print($Str);
$r->rflush();
@@ -508,7 +602,7 @@ sub html_outputstudent {
# By sequence build up the data
my $studentstats;
my $PerformanceStr = '';
- foreach my $seq (&get_sequences_to_show) {
+ foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) {
my ($performance,$score,$seq_max) =
&StudentPerformanceOnSequence($student,\%StudentsData,
$seq,$show_links);
@@ -543,6 +637,14 @@ sub html_outputstudent {
}
$Str .= ' '.' 'x(length($max)-length($score)).$score.'/'.$max;
$Str .= " \n";
+ #
+ # Check for suppressed output and update the progress window if so...
+ if ($show eq 'final table') {
+ $Str = '';
+ &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
+ 'last student');
+ }
+ #
$r->print($Str);
#
$r->rflush();
@@ -551,11 +653,85 @@ sub html_outputstudent {
sub html_finish {
my ($r) = @_;
- $r->print("
\n");
+ #
+ # Check for suppressed output and close the progress window if so
+ if ($show eq 'final table') {
+ &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
+ } else {
+ $r->print("\n");
+ }
+ if ($single_student_mode) {
+ $r->print(&SingleStudentTotal());
+ } else {
+ $r->print(&StudentAverageTotal());
+ }
$r->rflush();
return;
}
+sub StudentAverageTotal {
+ my $Str = "
Summary Tables
\n";
+ my $num_students = scalar(@Apache::lonstatistics::Students);
+ my $total_ave = 0;
+ my $total_max = 0;
+ $Str .= '