Diff for /loncom/interface/Attic/lonchart.pm between versions 1.52 and 1.53

version 1.52, 2002/07/02 21:48:36 version 1.53, 2002/07/02 22:06:53
Line 223  sub FormatStudentData { Line 223  sub FormatStudentData {
   
 sub CreateTableHeadings {  sub CreateTableHeadings {
     my ($CacheData,$studentInformation,$headings,$spacePadding)=@_;      my ($CacheData,$studentInformation,$headings,$spacePadding)=@_;
     my $Str='<pre>';      my $Str='<tr>';
   
     for(my $index=0; $index<(scalar @$headings); $index++) {      for(my $index=0; $index<(scalar @$headings); $index++) {
         if(!&ShouldShowColumn($CacheData, 'heading'.$index)) {          if(!&ShouldShowColumn($CacheData, 'heading'.$index)) {
             next;              next;
         }          }
   
           $Str .= '<td align="left"><pre>';
  my $data=$$headings[$index];   my $data=$$headings[$index];
  $Str .= $data;   $Str .= $data;
   
Line 238  sub CreateTableHeadings { Line 239  sub CreateTableHeadings {
  $Str .= (' 'x($CacheData->{$$studentInformation[$index].'Length'}-   $Str .= (' 'x($CacheData->{$$studentInformation[$index].'Length'}-
                       $length));                        $length));
  $Str .= $spacePadding;   $Str .= $spacePadding;
           $Str .= '</pre></td>';
     }      }
   
     foreach my $sequence (split(/\:/,$CacheData->{'orderedSequences'})) {      foreach my $sequence (split(/\:/,$CacheData->{'orderedSequences'})) {
Line 245  sub CreateTableHeadings { Line 247  sub CreateTableHeadings {
             next;              next;
         }          }
   
           $Str .= '<td align="left"><pre>';
         my $name = $CacheData->{$sequence.':title'};          my $name = $CacheData->{$sequence.':title'};
  $Str .= $name;   $Str .= $name;
  my @titleLength=split(//,$CacheData->{$sequence.':title'});   my @titleLength=split(//,$CacheData->{$sequence.':title'});
Line 252  sub CreateTableHeadings { Line 255  sub CreateTableHeadings {
                      (scalar @titleLength);                       (scalar @titleLength);
  $Str .= (' 'x$leftover);   $Str .= (' 'x$leftover);
  $Str .= $spacePadding;   $Str .= $spacePadding;
           $Str .= '</pre></td>';
     }      }
   
     $Str .= 'Total Solved/Total Problems';      $Str .= '<td>Total Solved/Total Problems</td>';
     $Str .= '</pre>';      $Str .= '</tr></tbody></table>';
   
     return $Str;      return $Str;
 }  }
Line 303  sub CreateColumnSelectors { Line 307  sub CreateColumnSelectors {
   
     my $found=0;      my $found=0;
     my ($name, $length, $position);      my ($name, $length, $position);
     my $present='<pre>';      my $present='<table border="0" cellpadding="0" cellspacing="0">';
       $present .= '</tbody><tr>';
     for(my $index=0; $index<(scalar @$headings); $index++) {      for(my $index=0; $index<(scalar @$headings); $index++) {
         if(!&ShouldShowColumn($CacheData, 'heading'.$index)) {          if(!&ShouldShowColumn($CacheData, 'heading'.$index)) {
             next;              next;
         }          }
           $present .= '<td align="center">';
         $name = $headings->[$index];          $name = $headings->[$index];
         $length=$CacheData->{$$studentInformation[$index].'Length'};  
         $position=int($length/2);  
  $present .= (' 'x($position));  
         $present .= '<input type="checkbox" checked="on" ';          $present .= '<input type="checkbox" checked="on" ';
         $present .= 'name="heading'.$index.'">';          $present .= 'name="heading'.$index.'">';
         $position+=2;          $present .= '</td>';
  $present .= (' 'x($length-$position));  
  $present .= $spacePadding;  
         $found++;          $found++;
     }      }
   
Line 324  sub CreateColumnSelectors { Line 325  sub CreateColumnSelectors {
         if(!&ShouldShowColumn($CacheData, 'sequence'.$sequence)) {          if(!&ShouldShowColumn($CacheData, 'sequence'.$sequence)) {
             next;              next;
         }          }
           $present .= '<td align="center">';
         $name = $CacheData->{$sequence.':title'};          $name = $CacheData->{$sequence.':title'};
         $length=$CacheData->{$sequence.':columnWidth'};  
         $position=int($length/2);  
  $present .= (' 'x($position));  
         $present .= '<input type="checkbox" checked="on" ';          $present .= '<input type="checkbox" checked="on" ';
         $present .= 'name="sequence'.$sequence.'">';          $present .= 'name="sequence'.$sequence.'">';
         $position+=2;          $present .= '</td>';
  $present .= (' 'x($length-$position));  
  $present .= $spacePadding;  
         $found++;          $found++;
     }      }
   
     if($found) {      if($found) {
         $present .= '</pre>';  
         $present  = $present;          $present  = $present;
     } else {      } else {
         $present = '';          $present = '<td></td>';
     }      }
   
     return $present.'</form>'."\n";;      return $present.'</tr></form>'."\n";;
 }  }
   
 sub CreateForm {  sub CreateForm {

Removed from v.1.52  
changed lines
  Added in v.1.53


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