--- loncom/interface/loncoursedata.pm 2003/06/03 18:14:07 1.76 +++ loncom/interface/loncoursedata.pm 2003/06/17 21:45:36 1.78 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.76 2003/06/03 18:14:07 matthew Exp $ +# $Id: loncoursedata.pm,v 1.78 2003/06/17 21:45:36 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -143,12 +143,20 @@ sub get_sequence_assessment_data { # # We need to keep track of which sequences contain homework problems # + my $previous_too; my $previous; while (scalar(@Nested_Sequences)) { + $previous_too = $previous; $previous = $curRes; $curRes = $iterator->next(); my $currentmap = $Nested_Sequences[-1]; # Last one on the stack if ($curRes == $iterator->BEGIN_MAP()) { + if (! ref($previous)) { + $previous = $previous_too; + } + if (! ref($previous)) { + next; + } # get the map itself, instead of BEGIN_MAP $title = $previous->title(); $symb = $previous->symb(); @@ -1205,11 +1213,11 @@ sub get_current_state { return () if (! defined($sname) || ! defined($sdom)); # my ($status,$data) = &ensure_current_data($sname,$sdom,$courseid); - &Apache::lonnet::logthis - ('sname = '.$sname. - ' domain = '.$sdom. - ' status = '.$status. - ' data is '.(defined($data)?'defined':'undefined')); +# &Apache::lonnet::logthis +# ('sname = '.$sname. +# ' domain = '.$sdom. +# ' status = '.$status. +# ' data is '.(defined($data)?'defined':'undefined')); # while (my ($symb,$hash) = each(%$data)) { # &Apache::lonnet::logthis($symb."\n----------------------------------"); # while (my ($key,$value) = each (%$hash)) {