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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jul 2004 15:35:39 -0000


albertel		Mon Jul 19 11:35:39 2004 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - the Mark as read link/form screwes up the printing helper. and looks silly there anyway
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.266 loncom/interface/lonnavmaps.pm:1.267
--- loncom/interface/lonnavmaps.pm:1.266	Fri Jul  9 19:05:51 2004
+++ loncom/interface/lonnavmaps.pm	Mon Jul 19 11:35:38 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.266 2004/07/09 23:05:51 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.267 2004/07/19 15:35:38 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1373,35 +1373,37 @@
     }
 
     # Check for any unread discussions in all resources.
-    my $totdisc = 0;
-    my $haveDisc = '';
-    my @allres=$navmap->retrieveResources();
-    foreach my $resource (@allres) {
-        if ($resource->hasDiscussion()) {
-            my $ressymb;
-            if ($resource->symb() =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) {
-                $ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard';
-            } else {
-                $ressymb = $resource->symb();
-            }
-            $haveDisc .= $ressymb.':';
-            $totdisc ++;
-        }
-    }
-    if ($totdisc > 0) {
-        $haveDisc =~ s/:$//;
-        my %lt = &Apache::lonlocal::texthash(
-           'mapr' => 'Mark all posts read',
-           );
-        $result .= (<<END);
-&nbsp;&nbsp;&nbsp;<a href="javascript:document.clearbubbles.submit()">$lt{'mapr'}</a>&nbsp;<a href="javascript:void(open('/adm/help/NavMaps_MarkPosts_Read.hlp', 'Help_for_NavMaps_MarkPosts', 'menubar=0,toolbar=1,scrollbars=1,width=350,height=400,resizable=yes'))" title="Online Help"><image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Help: NavMaps_MarkPostsLink)" /></a>
-<form name="clearbubbles" method="post" action="/adm/feedback">
-<input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />
-<input type="hidden" name="navmaps" value="$haveDisc" />
-</form>
+    if (!$args->{'resource_no_folder_link'}) {
+	my $totdisc = 0;
+	my $haveDisc = '';
+	my @allres=$navmap->retrieveResources();
+	foreach my $resource (@allres) {
+	    if ($resource->hasDiscussion()) {
+		my $ressymb;
+		if ($resource->symb() =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) {
+		    $ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard';
+		} else {
+		    $ressymb = $resource->symb();
+		}
+		$haveDisc .= $ressymb.':';
+		$totdisc ++;
+	    }
+	}
+	if ($totdisc > 0) {
+	    $haveDisc =~ s/:$//;
+	    my %lt = &Apache::lonlocal::texthash(
+						 'mapr' => 'Mark all posts read',
+						 );
+	    $result .= (<<END);
+	        &nbsp;&nbsp;&nbsp;<a href="javascript:document.clearbubbles.submit()">$lt{'mapr'}</a>&nbsp;<a href="javascript:void(open('/adm/help/NavMaps_MarkPosts_Read.hlp', 'Help_for_NavMaps_MarkPosts', 'menubar=0,toolbar=1,scrollbars=1,width=350,height=400,resizable=yes'))" title="Online Help"><image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Help: NavMaps_MarkPostsLink)" /></a>
+		<form name="clearbubbles" method="post" action="/adm/feedback">
+		<input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />
+		<input type="hidden" name="navmaps" value="$haveDisc" />
+		</form>
 END
-    } else {
-        $result .= '<br />';
+        } else {
+	    $result .= '<br />';
+	}
     }
     $result .= "<br />\n";
     if ($r) {