Diff for /loncom/interface/spreadsheet/studentcalc.pm between versions 1.22 and 1.23

version 1.22, 2003/09/18 20:12:40 version 1.23, 2003/10/14 18:36:54
Line 58  use Apache::Spreadsheet(); Line 58  use Apache::Spreadsheet();
 use Apache::assesscalc();  use Apache::assesscalc();
 use HTML::Entities();  use HTML::Entities();
 use Time::HiRes;  use Time::HiRes;
   use Apache::lonlocal;
   
 @Apache::studentcalc::ISA = ('Apache::Spreadsheet');  @Apache::studentcalc::ISA = ('Apache::Spreadsheet');
   
Line 118  sub get_title { Line 119  sub get_title {
   
     push (@title,$name);      push (@title,$name);
     push (@title,$self->{'coursedesc'});      push (@title,$self->{'coursedesc'});
     push (@title,scalar(localtime(time)));      push (@title,&Apache::lonlocal::locallocaltime(time));
     return @title;      return @title;
 }  }
   
Line 140  sub get_html_title { Line 141  sub get_html_title {
   
 sub parent_link {  sub parent_link {
     my $self = shift;      my $self = shift;
     return '<p><a href="/adm/classcalc">Course level sheet</a></p>'."\n";      return '<p><a href="/adm/classcalc">'.&mt('Course level sheet').'</a></p>'."\n";
 }  }
   
 sub convenience_links {  sub convenience_links {
Line 177  sub outsheet_html { Line 178  sub outsheet_html {
     ####################################      ####################################
     my $num_uneditable = 26;      my $num_uneditable = 26;
     my $num_left = 52-$num_uneditable;      my $num_left = 52-$num_uneditable;
       my %lt=&Apache::lonlocal::texthash(
          'st' => 'Student',
          'im' => 'Import',
          'ca' => 'Calculations',
          'as' => 'Assessment',
          'ro' => 'Row',
          );
     my $tableheader =<<"END";      my $tableheader =<<"END";
 <p>  <p>
 <table border="2">  <table border="2">
 <tr>  <tr>
   <th colspan="2" rowspan="2"><font size="+2">Student</font></th>    <th colspan="2" rowspan="2"><font size="+2">$lt{'st'}</font></th>
   <td bgcolor="$importcolor" colspan="$num_uneditable">    <td bgcolor="$importcolor" colspan="$num_uneditable">
       <b><font size="+1">Import</font></b></td>        <b><font size="+1">$lt{'im'}</font></b></td>
   <td colspan="$num_left">    <td colspan="$num_left">
       <b><font size="+1">Calculations</font></b></td>        <b><font size="+1">$lt{'ca'}</font></b></td>
 </tr><tr>  </tr><tr>
 END  END
     my $label_num = 0;      my $label_num = 0;
Line 201  END Line 209  END
     $tableheader .="</tr>\n";      $tableheader .="</tr>\n";
     if ($self->blackout()) {      if ($self->blackout()) {
         $r->print('<font color="red" size="+2"><p>'.          $r->print('<font color="red" size="+2"><p>'.
                   'Some computations are not available at this time.<br />'.                    &mt('Some computations are not available at this time.').'<br />'.
                   'There are problems whose status you are allowed to view.'.                    &mt('There are problems whose status you are not allowed to view.').
                   '</font></p>'."\n");                    '</font></p>'."\n");
     } else {      } else {
         $r->print($tableheader);          $r->print($tableheader);
Line 215  END Line 223  END
         }          }
         #          #
         # Print out summary/export row          # Print out summary/export row
         $r->print('<tr><td>Summary</td><td>0</td>'.          $r->print('<tr><td>'.&mt('Summary').'</td><td>0</td>'.
                   $self->html_export_row($exportcolor)."</tr>\n");                    $self->html_export_row($exportcolor)."</tr>\n");
     }      }
     $r->print("</table>\n");      $r->print("</table>\n");
Line 225  END Line 233  END
         $tableheader =<<"END";          $tableheader =<<"END";
 </p><p>  </p><p>
 <table border="2">  <table border="2">
 <tr><th>Row</th><th>&nbsp;</th><th>Assessment</th>  <tr><th>$lt{'ro'}</th><th>&nbsp;</th><th>$lt{'as'}</th>
 END  END
     } else {      } else {
         $tableheader =<<"END";          $tableheader =<<"END";
 </p><p>  </p><p>
 <table border="2">  <table border="2">
 <tr><th>&nbsp;</th><th>Assessment</th>  <tr><th>&nbsp;</th><th>$lt{'as'}</th>
 END  END
     }      }
     foreach (split(//,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')){      foreach (split(//,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')){
Line 278  END Line 286  END
             }              }
             if ($self->blackout() && $self->{'blackout_rows'}->{$rownum}>0) {              if ($self->blackout() && $self->{'blackout_rows'}->{$rownum}>0) {
                 $row_output .=                   $row_output .= 
                     '<td colspan="52">Unavailable at this time</td></tr>'."\n";                      '<td colspan="52">'.&mt('Unavailable at this time').'</td></tr>'."\n";
             } else {              } else {
                 $row_output .= $self->html_row($num_uneditable,$rownum,                  $row_output .= $self->html_row($num_uneditable,$rownum,
                                                $exportcolor,$importcolor).                                                 $exportcolor,$importcolor).
Line 355  sub csv_rows { Line 363  sub csv_rows {
     #      #
     # Write a header row      # Write a header row
     $self->csv_output_row($filehandle,undef,      $self->csv_output_row($filehandle,undef,
                           ('Sequence or Folder','Assessment title'));                            (&mt('Sequence or Folder'),&mt('Assessment title')));
     #      #
     # Write each assessments row      # Write each assessments row
     if (scalar(@Sequences)< 1) {      if (scalar(@Sequences)< 1) {
Line 382  sub excel_rows { Line 390  sub excel_rows {
     # Write a header row      # Write a header row
     $cols_output = 0;      $cols_output = 0;
     foreach my $value ('Container','Assessment title') {      foreach my $value ('Container','Assessment title') {
         $worksheet->write($rows_output,$cols_output++,$value);          $worksheet->write($rows_output,$cols_output++,&mt($value));
     }      }
     $rows_output++;          $rows_output++;    
     #      #

Removed from v.1.22  
changed lines
  Added in v.1.23


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>