--- loncom/interface/lonnavmaps.pm 2005/12/05 21:37:19 1.349.2.2 +++ loncom/interface/lonnavmaps.pm 2005/12/22 21:09:15 1.349.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.349.2.2 2005/12/05 21:37:19 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.349.2.3 2005/12/22 21:09:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2265,6 +2265,25 @@ sub get_user_data { $self->{RETRIEVED_USER_DATA} = 1; } +sub get_discussion_data { + my $self = shift; + if ($self->{RETRIEVED_DISCUSSION_DATA}) { + return $self->{DISCUSSION_DATA}; + } + + my $cid=$env{'request.course.id'}; + my $cdom=$env{'course.'.$cid.'.domain'}; + my $cnum=$env{'course.'.$cid.'.num'}; + + # Retrieve discussion data for resources in course + my %discussion_data = &Apache::lonnet::dump($cid,$cdom,$cnum); + + $self->{DISCUSSION_DATA} = \%discussion_data; + $self->{RETRIEVED_DISCUSSION_DATA} = 1; + return $self->{DISCUSSION_DATA}; +} + + # Internal function: Takes a key to look up in the nav hash and implements internal # memory caching of that key. sub navhash {