version 1.63, 2001/09/13 15:55:40
|
version 1.67, 2001/10/16 19:27:19
|
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 760 sub outsheet {
|
Line 760 sub outsheet {
|
$tabledata.='</tr>'; |
$tabledata.='</tr>'; |
my $row; |
my $row; |
my $maxrow=&getmaxrow($safeeval); |
my $maxrow=&getmaxrow($safeeval); |
$tabledata.=&rown($safeeval,'-'); |
$tabledata.=&rown($safeeval,'-').&rown($safeeval,0); |
$r->print($tabledata); |
$r->print($tabledata); |
my @rowprt=(); |
|
for ($row=0;$row<=$maxrow;$row++) { |
my @sortby=(); |
$rowprt[$row]=&rown($safeeval,$row); |
my @sortidx=(); |
|
for ($row=1;$row<=$maxrow;$row++) { |
|
$sortby[$row-1]=$safeeval->reval('$f{"A'.$row.'"}'); |
|
$sortidx[$row-1]=$row-1; |
} |
} |
my $n=0; |
@sortidx=sort { $sortby[$a] cmp $sortby[$b]; } @sortidx; |
for ($row=0;$row<=$maxrow;$row++) { |
|
if ($rowprt[$row]) { |
|
if ((($n-1)/25)==int(($n-1)/25)) { |
|
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> <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> <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', |
Line 786 sub outsheet {
|
Line 794 sub outsheet {
|
'n','o','p','q','r','s','t','u','v','w','x','y','z'); |
'n','o','p','q','r','s','t','u','v','w','x','y','z'); |
$r->print('</tr>'); |
$r->print('</tr>'); |
} |
} |
$n++; |
$n++; |
$r->print($rowprt[$row]); |
$r->print($thisrow); |
} |
} |
} |
} |
$r->print('</table>'); |
$r->print('</table>'); |
undef @rowprt; |
|
} |
} |
|
|
# |
# |