--- loncom/interface/lonwhatsnew.pm 2005/07/15 05:30:06 1.25
+++ loncom/interface/lonwhatsnew.pm 2005/07/15 06:11:16 1.27
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.25 2005/07/15 05:30:06 albertel Exp $
+# $Id: lonwhatsnew.pm,v 1.27 2005/07/15 06:11:16 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -208,6 +208,7 @@ sub display_actions_box() {
if ($result) {
$r->print($result.'
');
}
+ $r->rflush();
&get_curr_thresholds(\%threshold,$cdom,$crs);
&getitems(\%unread,\%ungraded,\%bombed,\%triggered,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs,%res_title);
@@ -507,7 +508,8 @@ sub display_config_box() {
sub getitems {
my ($unread,$ungraded,$bombed,$triggered,$newdiscussions,$tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs,$res_title) = @_;
my $navmap = Apache::lonnavmaps::navmap->new();
- my @allres=$navmap->retrieveResources();
+ # force retrieve Resource to seed the part id cache we'll need it later
+ my @allres=$navmap->retrieveResources(undef,sub {if ($_[0]->is_problem) { $_[0]->parts();} return 1;});
my %discussiontime = &Apache::lonnet::dump('discussiontimes',$cdom,$crs);
my %lastread = &Apache::lonnet::dump('nohist_'.$env{'request.course.id'}.
'_discuss',$env{'user.domain'},$env{'user.name'},'lastread');