Diff for /loncom/interface/loncoursedata.pm between versions 1.48 and 1.49

version 1.48, 2003/02/14 21:45:19 version 1.49, 2003/02/20 14:28:25
Line 283  The returned structure is a hash referen Line 283  The returned structure is a hash referen
   response_ids => [12,14,16]       # only for assessment    response_ids => [12,14,16]       # only for assessment
 }  }
   
   Also returned are array references to the symbs and assessments contained
   in the sequence.
   
 $hash->{'contents'} is a reference to an array of hashes of the same structure.  $hash->{'contents'} is a reference to an array of hashes of the same structure.
   
 =cut  =cut
Line 312  sub get_sequence_assessment_data { Line 315  sub get_sequence_assessment_data {
     my $symb  = $curRes->symb();      my $symb  = $curRes->symb();
     my $src   = $curRes->src();      my $src   = $curRes->src();
     #      #
       my @Sequences; 
       my @Assessments;
     my @Nested_Sequences = ();   # Stack of sequences, keeps track of depth      my @Nested_Sequences = ();   # Stack of sequences, keeps track of depth
     my $top = { title    => $title,      my $top = { title    => $title,
                 symb     => $symb,                  symb     => $symb,
                 type     => 'container',                  type     => 'container',
                 num_assess => 0,                  num_assess => 0,
                 contents   => [], };                  contents   => [], };
       push (@Sequences,$top);
     push (@Nested_Sequences, $top);      push (@Nested_Sequences, $top);
     #      #
     # We need to keep track of which sequences contain homework problems      # We need to keep track of which sequences contain homework problems
Line 339  sub get_sequence_assessment_data { Line 345  sub get_sequence_assessment_data {
                            contents   => [],                             contents   => [],
                        };                         };
             push (@{$currentmap->{'contents'}},$newmap); # this is permanent              push (@{$currentmap->{'contents'}},$newmap); # this is permanent
               push (@Sequences,$newmap);
             push (@Nested_Sequences, $newmap); # this is a stack              push (@Nested_Sequences, $newmap); # this is a stack
             next;              next;
         }          }
Line 358  sub get_sequence_assessment_data { Line 365  sub get_sequence_assessment_data {
                            symb  => $symb,                             symb  => $symb,
                            type  => 'assessment',                             type  => 'assessment',
                        };                         };
           push(@Assessments,$assessment);
         push(@{$currentmap->{'contents'}},$assessment);          push(@{$currentmap->{'contents'}},$assessment);
         $currentmap->{'num_assess'}++;          $currentmap->{'num_assess'}++;
     }      }
     return $top;      return ($top,\@Sequences,\@Assessments);
 }  }
   
 =pod  =pod

Removed from v.1.48  
changed lines
  Added in v.1.49


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