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

bisitz bisitz@source.lon-capa.org
Thu, 02 Dec 2010 15:40:02 -0000


bisitz		Thu Dec  2 15:40:02 2010 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Bugfix:
  Navigate Contents screen - Only display status description for resources ("raw_problem"), but not for folders anymore.
  $resource->kind() always returns "res", even for folders!?!
  
  Example: Create folder; include a problem; set problem type to practice on folder level; create sub folder within this folder -> status used to be displayed by mistake behind the sub folder
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.451 loncom/interface/lonnavmaps.pm:1.452
--- loncom/interface/lonnavmaps.pm:1.451	Wed Nov 17 22:46:27 2010
+++ loncom/interface/lonnavmaps.pm	Thu Dec  2 15:40:02 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.451 2010/11/17 22:46:27 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.452 2010/12/02 15:40:02 bisitz Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1090,9 +1090,10 @@
         }
     }
     
-    if ($resource->kind() eq "res" &&
+    if (($resource->kind() eq "res" &&
         ($resource->is_problem() || $resource->is_practice()) &&
-        !$firstDisplayed) {
+        !$firstDisplayed) &&
+        $resource->is_raw_problem()) {
         if ($color) {$result .= "<font color=\"$color\"><b>"; }
         $result .= getDescription($resource, $part);
         if ($color) {$result .= "</b></font>"; }