--- loncom/interface/Attic/lonchart.pm 2002/07/08 16:50:03 1.58 +++ loncom/interface/Attic/lonchart.pm 2002/07/17 12:36:17 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: lonchart.pm,v 1.58 2002/07/08 16:50:03 stredwic Exp $ +# $Id: lonchart.pm,v 1.60 2002/07/17 12:36:17 stredwic Exp $ # # Copyright Michigan State University Board of Trustees # @@ -84,10 +84,9 @@ display options back to default values. =head1 CODE LAYOUT DESCRIPTION -The code is broken down into five components: formatting data for printing, -downloading data from servers, processing data, helper functions, -and the central processing functions. The module is broken into chunks -for each component. +The code is broken down into three components: formatting data for printing, +helper functions, and the central processing functions. The module is broken +into chunks for each component. =head1 PACKAGES USED @@ -105,6 +104,7 @@ use strict; use Apache::Constants qw(:common :http); use Apache::lonnet(); use Apache::loncommon(); +use Apache::loncoursedata(); use HTML::TokeParser; use GDBM_File; @@ -150,12 +150,13 @@ $Str: Formatted string. sub FormatStudentInformation { my ($cache,$name,$studentInformation,$spacePadding)=@_; my $Str=''; + my $data; for(my $index=0; $index<(scalar @$studentInformation); $index++) { - if(!&ShouldShowColumn($cache, 'heading'.$index)) { + if(!&ShouldShowColumn($cache, 'ChartHeading'.$index)) { next; } - my $data=$cache->{$name.':'.$studentInformation->[$index]}; + $data=$cache->{$name.':'.$studentInformation->[$index]}; $Str .= $data; my @dataLength=split(//,$data); @@ -211,6 +212,14 @@ sub FormatStudentData { unless(tie(%CacheData,'GDBM_File',$ChartDB,&GDBM_READER,0640)) { return ''; } + +# my $section = &Apache::loncoursedata::CheckStatus($name, \%CacheData, +# $CacheData{'form.Status'}); +# if($section eq 'not found') { +# untie(%CacheData); +# return; +# } + # Handle Student information ------------------------------------------ # Handle user data $Str=&FormatStudentInformation(\%CacheData, $name, $studentInformation, @@ -236,7 +245,7 @@ sub FormatStudentData { my $problemsSolved = 0; my $numberOfParts = 0; foreach my $sequence (split(/\:/,$CacheData{'orderedSequences'})) { - if(!&ShouldShowColumn(\%CacheData, 'sequence'.$sequence)) { + if(!&ShouldShowColumn(\%CacheData, 'ChartSequence'.$sequence)) { next; } @@ -390,7 +399,7 @@ sub CreateTableHeadings { my $Str='