version 1.101, 2004/05/18 17:43:36
|
version 1.104, 2004/08/25 21:04:37
|
Line 607 Return a line of the chart for a student
|
Line 607 Return a line of the chart for a student
|
|
|
my $nodata_count; # The number of students for which there is no data |
my $nodata_count; # The number of students for which there is no data |
my %prog_state; # progress state used by loncommon PrgWin routines |
my %prog_state; # progress state used by loncommon PrgWin routines |
|
my $total_sum_width; |
|
|
sub html_initialize { |
sub html_initialize { |
my ($r) = @_; |
my ($r) = @_; |
Line 633 sub html_initialize {
|
Line 634 sub html_initialize {
|
} |
} |
# |
# |
# Compute the column widths and output the sequence titles |
# Compute the column widths and output the sequence titles |
|
my $total_count; |
foreach my $sequence (&Apache::lonstatistics::Sequences_with_Assess()){ |
foreach my $sequence (&Apache::lonstatistics::Sequences_with_Assess()){ |
# |
# |
# Comptue column widths |
# Comptue column widths |
Line 642 sub html_initialize {
|
Line 644 sub html_initialize {
|
# Use 1 digit for a space |
# Use 1 digit for a space |
$sequence->{'width_sum'} += 1; |
$sequence->{'width_sum'} += 1; |
} |
} |
|
$total_count += $sequence->{'num_assess_parts'}; |
# Use 3 digits for the sum |
# Use 3 digits for the sum |
$sequence->{'width_sum'} += 3; |
$sequence->{'width_sum'} += 3; |
} |
} |
Line 672 sub html_initialize {
|
Line 675 sub html_initialize {
|
length($sequence->{'title'}) |
length($sequence->{'title'}) |
).$padding; |
).$padding; |
} |
} |
$Str .= "total</pre>\n"; |
$total_sum_width = length($total_count)+1; |
|
$Str .= " total</pre>\n"; |
$Str .= "<pre>"; |
$Str .= "<pre>"; |
$r->print($Str); |
$r->print($Str); |
$r->rflush(); |
$r->rflush(); |
Line 690 sub html_outputstudent {
|
Line 694 sub html_outputstudent {
|
my @to_show = &get_student_fields_to_show(); |
my @to_show = &get_student_fields_to_show(); |
foreach my $field (@to_show) { |
foreach my $field (@to_show) { |
my $title=$student->{$field}; |
my $title=$student->{$field}; |
|
# Deal with 'comments' - how I love special cases |
|
if ($field eq 'comments') { |
|
$title = '<a href="/adm/'.$student->{'domain'}.'/'.$student->{'username'}.'/'.'aboutme#coursecomment">'.&mt('Comments').'</a>'; |
|
} |
my $base = length($title); |
my $base = length($title); |
my $width=$Apache::lonstatistics::StudentData{$field}->{'width'}; |
my $width=$Apache::lonstatistics::StudentData{$field}->{'width'}; |
$Str .= $title.' 'x($width-$base).$padding; |
$Str .= $title.' 'x($width-$base).$padding; |
Line 767 sub html_outputstudent {
|
Line 775 sub html_outputstudent {
|
$max += $seq_stats->{'max'}; |
$max += $seq_stats->{'max'}; |
} |
} |
if (! defined($score)) { |
if (! defined($score)) { |
$score = ' 'x3; |
$score = ' ' x $total_sum_width; |
} |
} |
$Str .= ' '.' 'x(length($max)-length($score)).$score.'/'.$max; |
$Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max; |
$Str .= " \n"; |
$Str .= " \n"; |
# |
# |
$r->print($Str); |
$r->print($Str); |
Line 1321 sub excel_outputstudent {
|
Line 1329 sub excel_outputstudent {
|
# Write out student data |
# Write out student data |
my @to_show = &get_student_fields_to_show(); |
my @to_show = &get_student_fields_to_show(); |
foreach my $field (@to_show) { |
foreach my $field (@to_show) { |
$excel_sheet->write($rows_output,$cols_output++,$student->{$field}); |
my $value = $student->{$field}; |
|
if ($field eq 'comments') { |
|
$value = &Apache::lonmsg::retrieve_instructor_comments |
|
($student->{'username'},$student->{'domain'}); |
|
} |
|
$excel_sheet->write($rows_output,$cols_output++,$value); |
} |
} |
# |
# |
# Get student assessment data |
# Get student assessment data |
Line 1582 sub csv_outputstudent {
|
Line 1595 sub csv_outputstudent {
|
# Output student fields |
# Output student fields |
my @to_show = &get_student_fields_to_show(); |
my @to_show = &get_student_fields_to_show(); |
foreach my $field (@to_show) { |
foreach my $field (@to_show) { |
$Str .= '"'.&Apache::loncommon::csv_translate($student->{$field}).'",'; |
my $value = $student->{$field}; |
|
if ($field eq 'comments') { |
|
$value = &Apache::lonmsg::retrieve_instructor_comments |
|
($student->{'username'},$student->{'domain'}); |
|
} |
|
$Str .= '"'.&Apache::loncommon::csv_translate($value).'",'; |
} |
} |
# |
# |
# Get student assessment data |
# Get student assessment data |
Line 1768 sub StudentTriesOnSequence {
|
Line 1786 sub StudentTriesOnSequence {
|
} |
} |
} |
} |
# |
# |
if (! defined($tries)) { |
if (! defined($tries) || $symbol eq '.') { |
$tries = $symbol; |
$tries = $symbol; |
} |
} |
push (@TriesData,$tries); |
push (@TriesData,$tries); |