--- loncom/interface/statistics/lonstudentassessment.pm 2004/02/12 21:15:47 1.90
+++ loncom/interface/statistics/lonstudentassessment.pm 2004/03/01 16:39:19 1.95
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.90 2004/02/12 21:15:47 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.95 2004/03/01 16:39:19 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -306,6 +306,7 @@ the chart page.
#######################################################
sub CreateInterface {
my $Str = '';
+ $Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Chart');
# $Str .= &CreateLegend();
$Str .= '
'."\n";
$Str .= '';
@@ -642,6 +643,7 @@ sub html_initialize {
# Use 3 digits for the total
$sequence->{'width_sum'}+=3;
}
+ #
if ($chosen_output->{'every_problem'}) {
# one problem per digit
$sequence->{'width_problem'} = $sequence->{'num_assess_parts'};
@@ -650,10 +652,8 @@ sub html_initialize {
}
$sequence->{'width_total'} = $sequence->{'width_problem'} +
$sequence->{'width_sum'};
- if ($sequence->{'width_total'} < length($sequence->{'title'})) {
- $sequence->{'width_total'} = length($sequence->{'title'});
- $sequence->{'width_problem'} =
- $sequence->{'width_total'} - $sequence->{'width_sum'};
+ if ($sequence->{'width_total'} < length(&HTML::Entities::decode($sequence->{'title'}))) {
+ $sequence->{'width_total'} = length(&HTML::Entities::decode($sequence->{'title'}));
}
#
# Output the sequence titles
@@ -727,8 +727,9 @@ sub html_outputstudent {
#
if (! $chosen_output->{'every_problem'}) {
$performance = '';
+ $performance_length=0;
}
- $performance .= ' 'x($seq->{'width_problem'}-$performance_length).
+ $performance .= ' 'x($seq->{'width_total'}-$performance_length-$seq->{'width_sum'}).
$ratio;
#
$Str .= $performance.$padding;
@@ -970,23 +971,13 @@ END
# File::Temp is used to determine the temporary directory.
$excel_workbook->set_tempdir($Apache::lonnet::tmpdir);
#
+ my $format = &Apache::loncommon::define_excel_formats($excel_workbook);
+ #
# Add a worksheet
my $sheetname = $ENV{'course.'.$ENV{'request.course.id'}.'.description'};
$sheetname = &Apache::loncommon::clean_excel_name($sheetname);
$excel_sheet = $excel_workbook->addworksheet($sheetname);
#
- # Define some potentially useful formats
- my $format;
- $format->{'header'} = $excel_workbook->add_format(bold => 1,
- bottom => 1,
- align => 'center');
- $format->{'bold'} = $excel_workbook->add_format(bold=>1);
- $format->{'h1'} = $excel_workbook->add_format(bold=>1, size=>18);
- $format->{'h2'} = $excel_workbook->add_format(bold=>1, size=>16);
- $format->{'h3'} = $excel_workbook->add_format(bold=>1, size=>14);
- $format->{'date'} = $excel_workbook->add_format(num_format=>
- 'mmm d yyyy hh:mm AM/PM');
- #
# Put the course description in the header
$excel_sheet->write($header_row,$cols_output++,
$ENV{'course.'.$ENV{'request.course.id'}.'.description'},
@@ -1595,7 +1586,7 @@ sub csv_finish {
#
# Tell the user where to get their csv file
$r->print('
'.
- 'Your csv file.'."\n");
+ ''.&mt('Your csv file.').''."\n");
$r->rflush();
return;