[LON-CAPA-dev] parts/lonnavmaps

Jeremy Bowers lon-capa-dev@mail.lon-capa.org
Thu, 06 Mar 2003 11:11:51 -0500


H. K. Ng wrote:
> When retrieving the parts using parts->$curRes->parts(), it appears that 
> if it goes to the same httpd, it remembers that list that was there, 
> i.e., instead of getting, say, 2 parts, it list 4 parts - a duplicate.

That's not supposed to happen. It is supposed to remember the parts so 
it doesn't have to re-compute them.

Try changing

     return if ($self->{PARTS});

to

     return if (defined($self->{PARTS}));

on line 2705 of lonnavmaps.pm and see if that fixes it.


> Questions:
> 1. How do I reset the call so that it give the correct number of parts? 
> I tried $navmap->init();

This isn't supposed to be necessary, so there isn't a way. If you want, 
deleting the {PARTS} member of the resource object will reset the parts, 
but that's only to let you continue developing while I/we fix the 
problem; you should not normally do that and you need to take that out 
before the end.

> 2. I recalled that there is a way to have only one (child process) httpd 
> running. Can anyone tell me how that is done?

-X on the Apache call, but that is not related to this. The nav maps 
routines do not make sub-calls within Apache, it is all done within one 
child, as confirmed by the fact that nav maps still work when -X is used.