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

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 10 Jun 2008 13:49:06 -0000


www		Tue Jun 10 09:49:06 2008 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  HTML pages are never graded
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.412 loncom/interface/lonnavmaps.pm:1.413
--- loncom/interface/lonnavmaps.pm:1.412	Sat Feb  2 19:05:23 2008
+++ loncom/interface/lonnavmaps.pm	Tue Jun 10 09:49:05 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.412 2008/02/03 00:05:23 www Exp $
+# $Id: lonnavmaps.pm,v 1.413 2008/06/10 13:49:05 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -854,7 +854,7 @@
     if (!$resource->condval()) {
         $nonLinkedText .= ' <i>('.&mt('conditionally hidden').')</i> ';
     }
-    if ($resource->is_practice()) {
+    if (($resource->is_practice()) && ($resource->is_raw_problem())) {
         $nonLinkedText .=' <font color="green"><b>'.&mt('not graded').'</b></font>';
     }
  
@@ -3613,6 +3613,15 @@
     }
     return 0;
 }
+sub is_raw_problem {
+    my $self=shift;
+    my $src = $self->src();
+    if ($src =~ /\.(problem|exam|quiz|assess|survey|form|library|task)$/) {
+        return 1;
+    }
+    return 0;
+}
+
 sub contains_problem {
     my $self=shift;
     if ($self->is_page()) {