--- loncom/interface/loncoursedata.pm 2003/02/14 21:45:19 1.48 +++ loncom/interface/loncoursedata.pm 2003/02/20 14:28:25 1.49 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # (Publication Handler # -# $Id: loncoursedata.pm,v 1.48 2003/02/14 21:45:19 matthew Exp $ +# $Id: loncoursedata.pm,v 1.49 2003/02/20 14:28:25 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -283,6 +283,9 @@ The returned structure is a hash referen 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. =cut @@ -312,12 +315,15 @@ sub get_sequence_assessment_data { my $symb = $curRes->symb(); my $src = $curRes->src(); # + my @Sequences; + my @Assessments; my @Nested_Sequences = (); # Stack of sequences, keeps track of depth my $top = { title => $title, symb => $symb, type => 'container', num_assess => 0, contents => [], }; + push (@Sequences,$top); push (@Nested_Sequences, $top); # # We need to keep track of which sequences contain homework problems @@ -339,6 +345,7 @@ sub get_sequence_assessment_data { contents => [], }; push (@{$currentmap->{'contents'}},$newmap); # this is permanent + push (@Sequences,$newmap); push (@Nested_Sequences, $newmap); # this is a stack next; } @@ -358,10 +365,11 @@ sub get_sequence_assessment_data { symb => $symb, type => 'assessment', }; + push(@Assessments,$assessment); push(@{$currentmap->{'contents'}},$assessment); $currentmap->{'num_assess'}++; } - return $top; + return ($top,\@Sequences,\@Assessments); } =pod