[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 15 Jul 2005 05:43:46 -0000


albertel		Fri Jul 15 01:43:46 2005 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
  Log:
  - force retrieve resource to see d the parts cahce
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.25 loncom/interface/lonwhatsnew.pm:1.26
--- loncom/interface/lonwhatsnew.pm:1.25	Fri Jul 15 01:30:06 2005
+++ loncom/interface/lonwhatsnew.pm	Fri Jul 15 01:43:42 2005
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.25 2005/07/15 05:30:06 albertel Exp $
+# $Id: lonwhatsnew.pm,v 1.26 2005/07/15 05:43:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -507,7 +507,8 @@
 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');