--- rat/lonpage.pm 2000/09/14 20:10:39 1.4
+++ rat/lonpage.pm 2000/09/15 20:03:48 1.5
@@ -4,7 +4,7 @@
# (TeX Content Handler
#
# 05/29/00,05/30 Gerd Kortemeyer)
-# 08/30,08/31,09/06,09/14 Gerd Kortemeyer
+# 08/30,08/31,09/06,09/14,09/15 Gerd Kortemeyer
package Apache::lonpage;
@@ -78,8 +78,12 @@ sub tracetable {
sub cell {
my ($r,$colspan,$rid)=@_;
- $r->print('
');
- $r->print($hash{'src_'.$rid});
+ $r->print(' | print('>'.$ssibody{$rid});
+ } elsif ($cellemb{$rid} eq 'img') {
+ $r->print('>');
+ }
$r->print(' | ');
}
@@ -135,10 +139,22 @@ sub handler {
$maxcols=$#colcont>$maxcols?$#colcont:$maxcols;
map {
my $src=$hash{'src_'.$_};
- $src=~/\.\w+$/;
+ $src=~/\.(\w+)$/;
$cellemb{$_}=Apache::lonnet::fileembstyle($1);
if ($cellemb{$_} eq 'ssi') {
# --------------------------------------------------------- This is an SSI cell
+ my $prefix=$_.'_';
+ my %posthash=('request.prefix' => $prefix);
+ map {
+ if ($_=~/^form.$prefix/) {
+ my $name=$_;
+ $name=~s/^form.$prefix//;
+ $posthash{$name}=$ENV{$_};
+ }
+ } keys %ENV;
+ my $output=Apache::lonnet::ssi($src,%posthash);
+
+ $ssibody{$_}=$output;
# ---------------------------------------------------------------- End SSI cell
}
@@ -157,8 +173,9 @@ sub handler {
$r->print('');
$r->print('');
- for ($i=2;$i<=$#rows;$i++) {
+ $#rows.'" border="0">');
+ for ($i=0;$i<=$#rows;$i++) {
+ if ($rows[$i]) {
$r->print("\n");
my @colcont=split(/\&/,$rows[$i]);
my $avespan=int($maxcols/($#colcont+1));
@@ -168,8 +185,10 @@ sub handler {
}
&cell($r,$lastspan,$colcont[$#colcont]);
$r->print('
');
+ }
}
$r->print("\n
");
+
$r->print('');
# -------------------------------------------------------------------- End page
}