version 1.39, 2003/03/07 17:01:45
|
version 1.40, 2003/03/07 18:46:38
|
Line 198 sub get_student_fields_to_show {
|
Line 198 sub get_student_fields_to_show {
|
return @to_show; |
return @to_show; |
} |
} |
|
|
sub get_sequences_to_show { |
|
my @Sequences; |
|
foreach my $map_symb (@Apache::lonstatistics::SelectedMaps) { |
|
foreach my $sequence (@Apache::lonstatistics::Sequences) { |
|
next if ($sequence->{'symb'} ne $map_symb && $map_symb ne 'all'); |
|
next if ($sequence->{'num_assess'} < 1); |
|
push (@Sequences,$sequence); |
|
} |
|
} |
|
return @Sequences; |
|
} |
|
|
|
|
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
|
|
Line 485 sub html_initialize {
|
Line 472 sub html_initialize {
|
$Str .= $title.' 'x($width-$base).$padding; |
$Str .= $title.' 'x($width-$base).$padding; |
} |
} |
# Now the selected sequences need to be listed |
# 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 $title = $sequence->{'title'}; |
my $base = $sequence->{'base_width'}; |
my $base = $sequence->{'base_width'}; |
my $width = $sequence->{'width'}; |
my $width = $sequence->{'width'}; |
Line 538 sub html_outputstudent {
|
Line 525 sub html_outputstudent {
|
# By sequence build up the data |
# By sequence build up the data |
my $studentstats; |
my $studentstats; |
my $PerformanceStr = ''; |
my $PerformanceStr = ''; |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my ($performance,$score,$seq_max) = |
my ($performance,$score,$seq_max) = |
&StudentPerformanceOnSequence($student,\%StudentsData, |
&StudentPerformanceOnSequence($student,\%StudentsData, |
$seq,$show_links); |
$seq,$show_links); |
Line 608 sub StudentAverageTotal {
|
Line 595 sub StudentAverageTotal {
|
my $total_max = 0; |
my $total_max = 0; |
$Str .= '<table border=2 cellspacing="1">'."\n"; |
$Str .= '<table border=2 cellspacing="1">'."\n"; |
$Str .= "<tr><th>Title</th><th>Average</th><th>Maximum</th></tr>\n"; |
$Str .= "<tr><th>Title</th><th>Average</th><th>Maximum</th></tr>\n"; |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my $ave = int(100*($Statistics->{$seq->{'symb'}}->{'score'}/ |
my $ave = int(100*($Statistics->{$seq->{'symb'}}->{'score'}/ |
($num_students-$nodata_count)))/100; |
($num_students-$nodata_count)))/100; |
$total_ave += $ave; |
$total_ave += $ave; |
Line 666 sub multi_sheet_excel_initialize {
|
Line 653 sub multi_sheet_excel_initialize {
|
my $num_data_per_part = 2; # 'status' and 'numtries' |
my $num_data_per_part = 2; # 'status' and 'numtries' |
my $fields_per_student = scalar(&get_student_fields_to_show()); |
my $fields_per_student = scalar(&get_student_fields_to_show()); |
my $bytes_per_field = 20; # Back of the envelope calculation |
my $bytes_per_field = 20; # Back of the envelope calculation |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
$num_sequences++ if ($seq->{'num_assess'} > 0); |
$num_sequences++ if ($seq->{'num_assess'} > 0); |
$fields_per_student += $num_data_per_part * $seq->{'num_assess_parts'}; |
$fields_per_student += $num_data_per_part * $seq->{'num_assess_parts'}; |
} |
} |
Line 812 sub excel_initialize {
|
Line 799 sub excel_initialize {
|
} |
} |
# |
# |
# Add the Sequence Headers |
# Add the Sequence Headers |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
$excel_sheet->write($rows_output,$cols_output,$seq->{'title'}); |
$excel_sheet->write($rows_output,$cols_output,$seq->{'title'}); |
if ($show eq 'totals') { |
if ($show eq 'totals') { |
$excel_sheet->write($rows_output+1,$cols_output,'score'); |
$excel_sheet->write($rows_output+1,$cols_output,'score'); |
Line 868 sub excel_outputstudent {
|
Line 855 sub excel_outputstudent {
|
} |
} |
# |
# |
# Write out sequence scores and totals data |
# Write out sequence scores and totals data |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my ($performance,$score,$seq_max) = |
my ($performance,$score,$seq_max) = |
&StudentPerformanceOnSequence($student,\%StudentsData, |
&StudentPerformanceOnSequence($student,\%StudentsData, |
$seq,'no'); |
$seq,'no'); |
Line 974 sub csv_initialize{
|
Line 961 sub csv_initialize{
|
$Str .= '"'.&Apache::loncommon::csv_translate($field).'",'; |
$Str .= '"'.&Apache::loncommon::csv_translate($field).'",'; |
} |
} |
} |
} |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
if ($show eq 'scores') { |
if ($show eq 'scores') { |
$Str .= '"'.&Apache::loncommon::csv_translate($seq->{'title'}). |
$Str .= '"'.&Apache::loncommon::csv_translate($seq->{'title'}). |
'",'; |
'",'; |
Line 1028 sub csv_outputstudent {
|
Line 1015 sub csv_outputstudent {
|
} |
} |
# |
# |
# Output performance data |
# Output performance data |
foreach my $seq (&get_sequences_to_show) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my ($performance,$score,$seq_max) = |
my ($performance,$score,$seq_max) = |
&StudentPerformanceOnSequence($student,\%StudentsData, |
&StudentPerformanceOnSequence($student,\%StudentsData, |
$seq,'no'); |
$seq,'no'); |