--- loncom/homework/grades.pm 2003/07/11 20:22:43 1.112 +++ loncom/homework/grades.pm 2003/07/14 14:29:07 1.113 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.112 2003/07/11 20:22:43 ng Exp $ +# $Id: grades.pm,v 1.113 2003/07/14 14:29:07 ng Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2663,21 +2663,21 @@ sub getSymbMap { my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db', $ENV{'request.course.fn'}.'_parms.db',1, 1); - my $res = $navmap->firstResource(); # temp resource to access constants + #my $res = $navmap->firstResource(); # temp resource to access constants $navmap->init(); # End navmap using boilerplate - my $iterator = $navmap->getIterator(undef, undef, undef, 1); + my $iterator = Apache::lonnavmaps::iterator->new($navmap, undef, undef, undef, 1, undef, 1); my $depth = 1; - $iterator->next(); # ignore first BEGIN_MAP my $curRes = $iterator->next(); my %symbx = (); my @titles = (); my $minder=0; - while ($depth > 0) { - if ($curRes == $iterator->BEGIN_MAP()) {$depth++;} + my $seenBeginMap = 0; + while ($depth > 0 && !$seenBeginMap) { + if ($curRes == $iterator->BEGIN_MAP()) {$depth++; $seenBeginMap = 1; } if ($curRes == $iterator->END_MAP()) { $depth--; } if (ref($curRes) && $curRes->is_map()) {