Diff for /loncom/interface/Attic/lonspreadsheet.pm between versions 1.64 and 1.65

version 1.64, 2001/09/14 00:16:02 version 1.65, 2001/09/17 22:01:23
Line 6 Line 6
 # 01/01/01,02/01,03/01,19/01,20/01,22/01,  # 01/01/01,02/01,03/01,19/01,20/01,22/01,
 # 03/05,03/08,03/10,03/12,03/13,03/15,03/17,  # 03/05,03/08,03/10,03/12,03/13,03/15,03/17,
 # 03/19,03/20,03/21,03/27,04/05,04/09,  # 03/19,03/20,03/21,03/27,04/05,04/09,
 # 07/09,07/14,07/21,09/01,09/10,9/11,9/12,9/13 Gerd Kortemeyer  # 07/09,07/14,07/21,09/01,09/10,9/11,9/12,9/13,9/14,9/17 Gerd Kortemeyer
   
 package Apache::lonspreadsheet;  package Apache::lonspreadsheet;
                           
Line 763  sub outsheet { Line 763  sub outsheet {
     $tabledata.=&rown($safeeval,'-').&rown($safeeval,0);      $tabledata.=&rown($safeeval,'-').&rown($safeeval,0);
     $r->print($tabledata);      $r->print($tabledata);
   
 #        $sortby=$safeeval->reval('$f{"A'.$n.'"}');      my @sortby=();
 #    print join(',',@linklst).'<br>';      my @sortidx=();
 #    @linklst=sort { $sortprt[$a] cmp $sortprt[$b]; } @linklst;   
 #    print join(',',@linklst).'<br>';  
   
     my $n=0;  
     for ($row=1;$row<=$maxrow;$row++) {      for ($row=1;$row<=$maxrow;$row++) {
      my $thisrow=&rown($safeeval,$row);         $sortby[$row-1]=$safeeval->reval('$f{"A'.$row.'"}');
      if ($thisrow) {         $sortidx[$row-1]=$row-1;
       if ($n/25==int($n/25)) {      }
       @sortidx=sort { $sortby[$a] cmp $sortby[$b]; } @sortidx;
   
         my $what='Student';          my $what='Student';
         if (&gettype($safeeval) eq 'assesscalc') {          if (&gettype($safeeval) eq 'assesscalc') {
     $what='Item';      $what='Item';
  } elsif (&gettype($safeeval) eq 'studentcalc') {   } elsif (&gettype($safeeval) eq 'studentcalc') {
             $what='Assessment';              $what='Assessment';
         }          }
  $r->print("</table>\n<br><table border=2>".  
         '<tr><td>&nbsp;<td>'.$what.'</td>');      my $n=0;
       for ($row=0;$row<$maxrow;$row++) {
        my $thisrow=&rown($safeeval,$sortidx[$row]+1);
        if ($thisrow) {
          if ($n/25==int($n/25)) {
    $r->print("</table>\n<br>\n");
           $r->rflush();
           $r->print('<table border=2><tr><td>&nbsp;<td>'.$what.'</td>');
         map {          map {
            $r->print('<td>'.$_.'</td>');             $r->print('<td>'.$_.'</td>');
         } ('A','B','C','D','E','F','G','H','I','J','K','L','M',          } ('A','B','C','D','E','F','G','H','I','J','K','L','M',

Removed from v.1.64  
changed lines
  Added in v.1.65


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