--- loncom/interface/spreadsheet/studentcalc.pm 2003/09/18 20:12:40 1.22 +++ loncom/interface/spreadsheet/studentcalc.pm 2003/10/14 18:36:54 1.23 @@ -1,5 +1,5 @@ # -# $Id: studentcalc.pm,v 1.22 2003/09/18 20:12:40 matthew Exp $ +# $Id: studentcalc.pm,v 1.23 2003/10/14 18:36:54 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -58,6 +58,7 @@ use Apache::Spreadsheet(); use Apache::assesscalc(); use HTML::Entities(); use Time::HiRes; +use Apache::lonlocal; @Apache::studentcalc::ISA = ('Apache::Spreadsheet'); @@ -118,7 +119,7 @@ sub get_title { push (@title,$name); push (@title,$self->{'coursedesc'}); - push (@title,scalar(localtime(time))); + push (@title,&Apache::lonlocal::locallocaltime(time)); return @title; } @@ -140,7 +141,7 @@ sub get_html_title { sub parent_link { my $self = shift; - return '

Course level sheet

'."\n"; + return '

'.&mt('Course level sheet').'

'."\n"; } sub convenience_links { @@ -177,15 +178,22 @@ sub outsheet_html { #################################### my $num_uneditable = 26; my $num_left = 52-$num_uneditable; + my %lt=&Apache::lonlocal::texthash( + 'st' => 'Student', + 'im' => 'Import', + 'ca' => 'Calculations', + 'as' => 'Assessment', + 'ro' => 'Row', + ); my $tableheader =<<"END";

- + + $lt{'im'} + $lt{'ca'} END my $label_num = 0; @@ -201,8 +209,8 @@ END $tableheader .="\n"; if ($self->blackout()) { $r->print('

'. - 'Some computations are not available at this time.
'. - 'There are problems whose status you are allowed to view.'. + &mt('Some computations are not available at this time.').'
'. + &mt('There are problems whose status you are not allowed to view.'). '

'."\n"); } else { $r->print($tableheader); @@ -215,7 +223,7 @@ END } # # Print out summary/export row - $r->print(''. + $r->print(''. $self->html_export_row($exportcolor)."\n"); } $r->print("
Student$lt{'st'} - Import - Calculations
Summary0
'.&mt('Summary').'0
\n"); @@ -225,13 +233,13 @@ END $tableheader =<<"END";

- + END } else { $tableheader =<<"END";

Row Assessment
$lt{'ro'} $lt{'as'}
- + END } foreach (split(//,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')){ @@ -278,7 +286,7 @@ END } if ($self->blackout() && $self->{'blackout_rows'}->{$rownum}>0) { $row_output .= - ''."\n"; + ''."\n"; } else { $row_output .= $self->html_row($num_uneditable,$rownum, $exportcolor,$importcolor). @@ -355,7 +363,7 @@ sub csv_rows { # # Write a header row $self->csv_output_row($filehandle,undef, - ('Sequence or Folder','Assessment title')); + (&mt('Sequence or Folder'),&mt('Assessment title'))); # # Write each assessments row if (scalar(@Sequences)< 1) { @@ -382,7 +390,7 @@ sub excel_rows { # Write a header row $cols_output = 0; foreach my $value ('Container','Assessment title') { - $worksheet->write($rows_output,$cols_output++,$value); + $worksheet->write($rows_output,$cols_output++,&mt($value)); } $rows_output++; #
 Assessment
 $lt{'as'}Unavailable at this time
'.&mt('Unavailable at this time').'