--- loncom/interface/loncoursedata.pm 2003/06/02 17:09:09 1.74 +++ loncom/interface/loncoursedata.pm 2003/06/02 17:18:33 1.75 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.74 2003/06/02 17:09:09 matthew Exp $ +# $Id: loncoursedata.pm,v 1.75 2003/06/02 17:18:33 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -109,6 +109,10 @@ sub get_sequence_assessment_data { if (!defined($navmap)) { return 'Can not open Coursemap'; } + # We explicity grab the top level map because I am not sure we + # are pulling it from the iterator. + my $top_level_map = $navmap->getById('0.0'); + # my $iterator = $navmap->getIterator(undef, undef, undef, 1); my $curRes = $iterator->next(); # Top level sequence ## @@ -117,9 +121,10 @@ 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 $title = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; - my $symb = 'top'; - my $src = 'not applicable'; + my $title = $top_level_map->title(); + my $symb = $top_level_map->symb(); + my $src = $top_level_map->src(); + my $randompick = $top_level_map->randompick(); # my @Sequences; my @Assessments; @@ -130,7 +135,9 @@ sub get_sequence_assessment_data { type => 'container', num_assess => 0, num_assess_parts => 0, - contents => [], }; + contents => [], + randompick => $randompick, + }; push (@Sequences,$top); push (@Nested_Sequences, $top); # @@ -146,11 +153,13 @@ sub get_sequence_assessment_data { $title = $previous->title(); $symb = $previous->symb(); $src = $previous->src(); + $randompick = $previous->randompick(); my $newmap = { title => $title, src => $src, symb => $symb, type => 'container', num_assess => 0, + randompick => $randompick, contents => [], }; push (@{$currentmap->{'contents'}},$newmap); # this is permanent