version 1.2, 2010/08/27 09:42:48
|
version 1.3, 2011/04/13 10:08:06
|
Line 78 Apache:lonltextable
|
Line 78 Apache:lonltextable
|
=cut |
=cut |
|
|
package Apache::lonlatextable; |
package Apache::lonlatextable; |
|
use Data::Dumper; |
|
use Apache::lonnet; |
use strict; |
use strict; |
|
|
=pod |
=pod |
Line 146 These produce a horizontal rule that spa
|
Line 148 These produce a horizontal rule that spa
|
|
|
=back |
=back |
|
|
|
Calling this multiple times will continue to append cell data. |
|
|
=head3 Example |
=head3 Example |
|
|
$table->set_data([ ['Gnu', '92.52'], [], ['Emu', '33.33'] ]); |
$table->set_data([ ['Gnu', '92.52'], [], ['Emu', '33.33'] ]); |
Line 157 Produces
|
Line 161 Produces
|
| Emu | 33.33 | |
| Emu | 33.33 | |
+--------------+--------------+ |
+--------------+--------------+ |
|
|
|
|
=cut |
=cut |
|
|
sub set_data { |
sub set_data { |
my ($self, $data) = @_; |
my ($self, $data) = @_; |
$self->{'data'} = $data; |
&Apache::lonnet::logthis("--------------- set_data ------------"); |
|
&Apache::lonnet::logthis(Dumper($self->{'data'})); |
|
&Apache::lonnet::logthis("---------------------------------------"); |
|
&Apache::lonnet::logthis(Dumper($data)); |
|
my $current_data = $self->{'data'}; |
|
push (@$current_data, @$data); |
|
$self->{'data'} = $current_data; |
|
|
|
|
} |
} |
|
|