--- loncom/interface/loncoursedata.pm 2003/02/25 15:55:15 1.50 +++ loncom/interface/loncoursedata.pm 2003/02/25 20:36:29 1.52 @@ -1,7 +1,6 @@ # The LearningOnline Network with CAPA -# (Publication Handler # -# $Id: loncoursedata.pm,v 1.50 2003/02/25 15:55:15 matthew Exp $ +# $Id: loncoursedata.pm,v 1.52 2003/02/25 20:36:29 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -313,17 +312,15 @@ sub get_sequence_assessment_data { ## We are going to loop until we run out of sequences/pages to explore for ## resources. This means we have to start out with something to look ## at. - my $curRes = $iterator->next(); # BEGIN_MAP - $curRes = $iterator->next(); # The sequence itself - # - my $title = $curRes->title(); - my $symb = $curRes->symb(); - my $src = $curRes->src(); + my $title = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; + my $symb = 'top'; + my $src = 'not applicable'; # my @Sequences; my @Assessments; my @Nested_Sequences = (); # Stack of sequences, keeps track of depth my $top = { title => $title, + src => $src, symb => $symb, type => 'container', num_assess => 0, @@ -333,16 +330,18 @@ sub get_sequence_assessment_data { # # We need to keep track of which sequences contain homework problems # - my $previous = $top; + my $previous; + my $curRes = $iterator->next(); # BEGIN_MAP + $curRes = $iterator->next(); # The first item in the top level map. while (scalar(@Nested_Sequences)) { $previous = $curRes; $curRes = $iterator->next(); my $currentmap = $Nested_Sequences[-1]; # Last one on the stack if ($curRes == $iterator->BEGIN_MAP()) { # get the map itself, instead of BEGIN_MAP - $title = $previous->title();#$curRes->title(); - $symb = $previous->symb;#curRes->symb(); - $src = $previous->src();#$curRes->src(); + $title = $previous->title(); + $symb = $previous->symb(); + $src = $previous->src(); my $newmap = { title => $title, src => $src, symb => $symb,