--- loncom/interface/lonnavmaps.pm 2002/10/29 20:17:39 1.91 +++ loncom/interface/lonnavmaps.pm 2002/10/29 20:20:45 1.92 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.91 2002/10/29 20:17:39 bowersj2 Exp $ +# $Id: lonnavmaps.pm,v 1.92 2002/10/29 20:20:45 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -820,7 +820,7 @@ sub new_handle { &Apache::loncommon::no_cache($r); $r->send_http_header; - # Initialize the nav map + # Create the nav map the nav map my $navmap = Apache::lonnavmaps::navmap->new( $ENV{"request.course.fn"}.".db", $ENV{"request.course.fn"}."_parms.db", 1, 1); @@ -850,6 +850,9 @@ sub new_handle { '
New message (click to open)

'); } + # Now that we've displayed some stuff to the user, init the navmap + $navmap->init(); + # Check that it's defined if (!($navmap->courseMapDefined())) { $r->print('Coursemap undefined.' . @@ -1640,6 +1643,14 @@ sub new { $self->{PARM_HASH} = \%parmhash; $self->{HASH_TIED} = 1; + bless($self); + + return $self; +} + +sub init { + my $self = $self; + # If the course opt hash and the user opt hash should be generated, # generate them if ($self->{GENERATE_COURSE_USER_OPT}) { @@ -1744,10 +1755,6 @@ sub new { } $self->{PARM_CACHE} = {}; - - bless($self); - - return $self; } # Checks to see if coursemap is defined, matching test in old lonnavmaps