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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 07 Jun 2006 22:30:25 -0000


albertel		Wed Jun  7 18:30:25 2006 EDT

  Modified files:              
    /loncom/interface	lonannounce.pm 
  Log:
  - gettitle is to slow to be called for every resource, should only do it for things we are actaully going to display
  
  
Index: loncom/interface/lonannounce.pm
diff -u loncom/interface/lonannounce.pm:1.53 loncom/interface/lonannounce.pm:1.54
--- loncom/interface/lonannounce.pm:1.53	Fri May 12 11:53:10 2006
+++ loncom/interface/lonannounce.pm	Wed Jun  7 18:30:23 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Announce
 #
-# $Id: lonannounce.pm,v 1.53 2006/05/12 15:53:10 www Exp $
+# $Id: lonannounce.pm,v 1.54 2006/06/07 22:30:23 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -82,7 +82,7 @@
     }
 
     my $can_see_hidden = $env{'request.role.adv'};
-    my $navmap = Apache::lonnavmaps::navmap->new();
+    my $navmap;# = Apache::lonnavmaps::navmap->new();
     my %resourcedata=
 	&Apache::lonnet::dump('resourcedata',$coursedom,$coursenum);
     foreach my $thiskey (sort keys %resourcedata) {
@@ -116,7 +116,9 @@
 		    my $res = $navmap->getResourceByUrl($map_url);
 		    if ($res && $res->randomout()) { next; }
 		}
-		$realm=&mt('Folder/Map').': '.&Apache::lonnet::gettitle($map_url);
+		# need to do this looks up in showday or /*cell for speed resaons
+		#$realm=&mt('Folder/Map').': '.&Apache::lonnet::gettitle($map_url);
+		$realm=&mt('Folder/Map').': '.$map_url;
 	    } elsif ($middle) {
 		if (!$can_see_hidden && !$navmap) {
 		    next;
@@ -125,7 +127,8 @@
 		    my $res = $navmap->getBySymb($middle);
 		    if ($res && $res->randomout()) { next; }
 		}
-		$realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle);
+		#$realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle);
+		$realm=&mt('Resource').': '.$middle;
 	    }
 	    my $datetype='';
 	    if ($name eq 'duedate') {