--- loncom/interface/Attic/lonchart.pm 2002/07/02 21:34:40 1.51 +++ loncom/interface/Attic/lonchart.pm 2002/07/03 14:11:14 1.54 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonchart.pm,v 1.51 2002/07/02 21:34:40 stredwic Exp $ +# $Id: lonchart.pm,v 1.54 2002/07/03 14:11:14 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -223,13 +223,14 @@ sub FormatStudentData { sub CreateTableHeadings { my ($CacheData,$studentInformation,$headings,$spacePadding)=@_; - my $Str='
'; + my $Str=''; for(my $index=0; $index<(scalar @$headings); $index++) { if(!&ShouldShowColumn($CacheData, 'heading'.$index)) { next; } + $Str .= ' '; return $Str; } @@ -303,20 +307,20 @@ sub CreateColumnSelectors { my $found=0; my ($name, $length, $position); - my $present=''; } foreach my $sequence (split(/\:/,$CacheData->{'orderedSequences'})) { @@ -245,6 +247,7 @@ sub CreateTableHeadings { next; } + $Str .= ' '; my $data=$$headings[$index]; $Str .= $data; @@ -238,6 +239,7 @@ sub CreateTableHeadings { $Str .= (' 'x($CacheData->{$$studentInformation[$index].'Length'}- $length)); $Str .= $spacePadding; + $Str .= ''; } - $Str .= 'Total Solved/Total Problems'; - $Str .= ''; + $Str .= ' '; my $name = $CacheData->{$sequence.':title'}; $Str .= $name; my @titleLength=split(//,$CacheData->{$sequence.':title'}); @@ -252,10 +255,11 @@ sub CreateTableHeadings { (scalar @titleLength); $Str .= (' 'x$leftover); $Str .= $spacePadding; + $Str .= ''; + $Str .= ' Total Solved/Total Problems'; + + my $present='Note: Uncheck the boxes above a column to '; + $present .= 'remove that column from the display.'."\n"; + + $present .= '
'; $present .= ''; - $position+=2; - $present .= (' 'x($length-$position)); - $present .= $spacePadding; + $present .= 'name="heading'.$index.'" />'; + $present .= ' | '; $found++; } @@ -324,26 +328,18 @@ sub CreateColumnSelectors { if(!&ShouldShowColumn($CacheData, 'sequence'.$sequence)) { next; } - $name = $CacheData->{$sequence.':title'}; - $length=$CacheData->{$sequence.':columnWidth'}; - $position=int($length/2); - $present .= (' 'x($position)); + $present .= ''; $present .= ''; - $position+=2; - $present .= (' 'x($length-$position)); - $present .= $spacePadding; + $present .= 'name="sequence'.$sequence.'" />'; + $present .= ' | '; $found++; } - if($found) { - $present .= ''; - $present = $present; - } else { + if(!$found) { $present = ''; } - return $present.''."\n";; + return $present.'