version 1.50, 2003/05/29 21:41:10
|
version 1.51, 2003/06/02 18:28:37
|
Line 603 sub html_outputstudent {
|
Line 603 sub html_outputstudent {
|
my $studentstats; |
my $studentstats; |
my $PerformanceStr = ''; |
my $PerformanceStr = ''; |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my ($performance,$score,$seq_max) = |
my ($performance,$performance_length,$score,$seq_max) = |
&StudentPerformanceOnSequence($student,\%StudentsData, |
&StudentPerformanceOnSequence($student,\%StudentsData, |
$seq,$show_links); |
$seq,$show_links); |
my $ratio = $score.'/'.$seq_max; |
my $ratio = $score.'/'.$seq_max; |
Line 616 sub html_outputstudent {
|
Line 616 sub html_outputstudent {
|
$performance .= ' 'x($seq->{'width'}-length($performance)); |
$performance .= ' 'x($seq->{'width'}-length($performance)); |
} else { |
} else { |
# Pad with extra spaces |
# Pad with extra spaces |
$performance .= ' 'x($seq->{'width'}-$seq_max- |
$performance .= ' 'x($seq->{'width'}-$performance_length- |
length($ratio) |
length($ratio) |
).$ratio; |
).$ratio; |
} |
} |
Line 987 sub excel_outputstudent {
|
Line 987 sub excel_outputstudent {
|
# |
# |
# Write out sequence scores and totals data |
# Write out sequence scores and totals data |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my ($performance,$score,$seq_max) = |
my ($performance,$performance_length,$score,$seq_max) = |
&StudentPerformanceOnSequence($student,\%StudentsData, |
&StudentPerformanceOnSequence($student,\%StudentsData, |
$seq,'no'); |
$seq,'no'); |
if ($show eq 'totals' || $show eq 'scores') { |
if ($show eq 'totals' || $show eq 'scores') { |
Line 1147 sub csv_outputstudent {
|
Line 1147 sub csv_outputstudent {
|
# |
# |
# Output performance data |
# Output performance data |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
foreach my $seq (&Apache::lonstatistics::Sequences_with_Assess()) { |
my ($performance,$score,$seq_max) = |
my ($performance,$performance_length,$score,$seq_max) = |
&StudentPerformanceOnSequence($student,\%StudentsData, |
&StudentPerformanceOnSequence($student,\%StudentsData, |
$seq,'no'); |
$seq,'no'); |
if ($show eq 'scores') { |
if ($show eq 'scores') { |
Line 1219 sub StudentPerformanceOnSequence {
|
Line 1219 sub StudentPerformanceOnSequence {
|
$links = 'no' if (! defined($links)); |
$links = 'no' if (! defined($links)); |
my $Str = ''; |
my $Str = ''; |
my ($sum,$max) = (0,0); |
my ($sum,$max) = (0,0); |
|
my $performance_length = 0; |
foreach my $resource (@{$seq->{'contents'}}) { |
foreach my $resource (@{$seq->{'contents'}}) { |
next if ($resource->{'type'} ne 'assessment'); |
next if ($resource->{'type'} ne 'assessment'); |
my $resource_data = $studentdata->{$resource->{'symb'}}; |
my $resource_data = $studentdata->{$resource->{'symb'}}; |
my $value = ''; |
my $value = ''; |
foreach my $partnum (@{$resource->{'parts'}}) { |
foreach my $partnum (@{$resource->{'parts'}}) { |
$max++; |
$max++; |
|
$performance_length++; |
my $symbol = ' '; # default to space |
my $symbol = ' '; # default to space |
# |
# |
if (exists($resource_data->{'resource.'.$partnum.'.solved'})) { |
if (exists($resource_data->{'resource.'.$partnum.'.solved'})) { |
Line 1266 sub StudentPerformanceOnSequence {
|
Line 1268 sub StudentPerformanceOnSequence {
|
$symbol = ' '; |
$symbol = ' '; |
} |
} |
} |
} |
|
# if ($symbol ne ' ') { |
|
# $attempted_sum++; |
|
# } |
# |
# |
if ( ($links eq 'yes' && $symbol ne ' ') || |
if ( ($links eq 'yes' && $symbol ne ' ') || |
($links eq 'all')) { |
($links eq 'all')) { |
Line 1282 sub StudentPerformanceOnSequence {
|
Line 1287 sub StudentPerformanceOnSequence {
|
} |
} |
$Str .= $value; |
$Str .= $value; |
} |
} |
return ($Str,$sum,$max); |
if ($seq->{'randompick'}) { |
|
$max = $seq->{'randompick'}; |
|
} |
|
return ($Str,$performance_length,$sum,$max); |
} |
} |
|
|
####################################################### |
####################################################### |