[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 10 Dec 2004 17:50:30 -0000


albertel		Fri Dec 10 12:50:30 2004 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  - reusing the maxtries -1 means it isn't really a problem logic 
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.274 loncom/homework/structuretags.pm:1.275
--- loncom/homework/structuretags.pm:1.274	Fri Dec  3 16:54:46 2004
+++ loncom/homework/structuretags.pm	Fri Dec 10 12:50:30 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.274 2004/12/03 21:54:46 albertel Exp $
+# $Id: structuretags.pm,v 1.275 2004/12/10 17:50:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1127,6 +1127,10 @@
 			    if ($1 ne '0') {$allow_print_points=1;}
 			}
 		    }
+		    my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");
+		    if (defined($maxtries) && $maxtries < 0) {
+			$allow_print_points=0;
+		    }
 		    if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
 		} elsif ($target eq 'web') {
 		    $result.='<a name="'.&Apache::lonnet::escape($Apache::inputtags::part).'" />';