Diff for /loncom/interface/statistics/lonproblemanalysis.pm between versions 1.7 and 1.8

version 1.7, 2002/08/14 16:18:55 version 1.8, 2002/08/14 20:42:49
Line 231  sub OptionResponseTable { Line 231  sub OptionResponseTable {
     my @optionResponses=split(':::', $optionResponses);      my @optionResponses=split(':::', $optionResponses);
     my %partCount;      my %partCount;
     my %sequences;      my %sequences;
       my @orderedSequences=();
     foreach(@optionResponses) {      foreach(@optionResponses) {
         my ($sequence, $problemId, $part, undef)=split(':',$_);          my ($sequence, $problemId, $part, undef)=split(':',$_);
         $partCount{$problemId.':'.$part}++;          $partCount{$problemId.':'.$part}++;
         if(!defined($sequences{$sequence})) {          if(!defined($sequences{$sequence})) {
               push(@orderedSequences, $sequence);
             $sequences{$sequence} = $_;              $sequences{$sequence} = $_;
         } else {          } else {
             $sequences{$sequence} .= ':::'.$_;              $sequences{$sequence} .= ':::'.$_;
Line 243  sub OptionResponseTable { Line 245  sub OptionResponseTable {
   
     my $Str = '';      my $Str = '';
   
     foreach my $sequence (sort(keys(%sequences))) {      foreach my $sequence (@orderedSequences) {
         my @optionProblems = split(':::', $sequences{$sequence});          my @optionProblems = split(':::', $sequences{$sequence});
   
         $Str .= '<b>'.$cache->{$sequence.':title'}.'</b>'."\n";          $Str .= '<b>'.$cache->{$sequence.':title'}.'</b>'."\n";

Removed from v.1.7  
changed lines
  Added in v.1.8


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