Diff for /loncom/xml/londefdef.pm between versions 1.429 and 1.430

version 1.429, 2011/04/05 10:33:15 version 1.430, 2011/04/13 10:08:06
Line 1 Line 1
   
 # The LearningOnline Network with CAPA  # The LearningOnline Network with CAPA
 # Tags Default Definition Module   # Tags Default Definition Module 
 #  #
Line 2076  sub start_table { Line 2077  sub start_table {
  $table->cell_border(2);   $table->cell_border(2);
     } elsif ($cell_border eq 'cols') {      } elsif ($cell_border eq 'cols') {
  $table->cell_border(3);   $table->cell_border(3);
       } elsif($cell_border eq 'groups') {
    $table->cell_border(4);
     } else {      } else {
  $table->cell_border(0);   $table->cell_border(0);
     }      }
Line 3384  sub end_col { Line 3387  sub end_col {
     return $currentstring;      return $currentstring;
 }  }
   
 #-- <colgroup> tag (end tag optional)  #-- <colgroup tag (end tag optional)
 sub start_colgroup {  sub start_colgroup {
     my ($target,$token) = @_;      my ($target,$token,$tagstack, $parstack, $parser, $safeeval, $style) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     }       } 
       if ($target eq 'tex') {
    # TODO: Ensure this tag is in a table:
   
    # Fetch the attributes and build the hash for the
    # call to define_colgroup.
   
    my $span    = &Apache::lonxml::get_param('span',   $parstack, $safeeval);
    my $halign  = &Apache::lonxml::get_param('halign', $parstack, $safeeval);
   
    my %colgroup_params;
    if ($span ne '') {
       $colgroup_params{'span'} = $span;
    }
    if ($halign ne '') {
       $colgroup_params{'halign'} = $halign;
    }
   
    my $table = $Apache::londefdef::table[-1];
    $table->define_colgroup(\%colgroup_params);
   
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 3884  sub start_tbody { Line 3908  sub start_tbody {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     }       } 
       if ($target eq 'tex') {
    # TODO: Ensure this tag is within a table:
   
    my $table = $Apache::londefdef::table[-1];
    $table->start_body();
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 3893  sub end_tbody { Line 3923  sub end_tbody {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[2];       $currentstring = $token->[2];    
     }       } 
       if($target eq 'tex') {
    # TODO: Ensure this tag is within a table:
   
    my $table = $Apache::londefdef::table[-1];
    $table->end_body();
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 3903  sub start_tfoot { Line 3939  sub start_tfoot {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     }       } 
       if ($target eq 'tex') {
           # TODO: ensure this is within a table tag.
    my $table = $Apache::londefdef::table[-1];
    $table->start_foot();
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 3912  sub end_tfoot { Line 3953  sub end_tfoot {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[2];       $currentstring = $token->[2];    
     }       } 
       if ($target eq 'tex') {
    #  TODO: Ensure this is in side a table 
    my $table = $Apache::londefdef::table[-1];
    $table->end_foot();
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 3922  sub start_thead { Line 3968  sub start_thead {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[4];        $currentstring = $token->[4];     
     }       } 
       if ($target eq 'tex') {
    # Assume we're in a table... TODO: Verify that and ignore tag if not.
    my $table = $Apache::londefdef::table[-1];
    $table->start_head();
       }
     return $currentstring;      return $currentstring;
 }  }
   
Line 3931  sub end_thead { Line 3982  sub end_thead {
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[2];       $currentstring = $token->[2];    
     }       } 
       if ($target eq 'tex') {
         # TODO: Verify we are in a table and ignore tag if not.
   
    my $table = $Apache::londefdef::table[-1];
    $table->end_head();
       }
     return $currentstring;      return $currentstring;
 }  }
   

Removed from v.1.429  
changed lines
  Added in v.1.430


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