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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Sep 2005 20:16:53 -0000


albertel		Fri Sep 23 16:16:53 2005 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
    /loncom/homework	structuretags.pm 
  Log:
  - allow a corse global diabling of the automatic exam print points
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.250 loncom/interface/lonparmset.pm:1.251
--- loncom/interface/lonparmset.pm:1.250	Wed Sep 14 13:56:25 2005
+++ loncom/interface/lonparmset.pm	Fri Sep 23 16:16:50 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.250 2005/09/14 17:56:25 banghart Exp $
+# $Id: lonparmset.pm,v 1.251 2005/09/23 20:16:50 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1921,6 +1921,9 @@
 	     'disablesigfigs'
 	         => '<b>'.&mt('Disable checking of Significant Figures').'</b><br />'.
                     ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',
+	     'disableexampointprint'
+	         => '<b>'.&mt('Disable automatically printing point values onto exams.').'</b><br />'.
+                    ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',
 	     'tthoptions'
 	         => '<b>'.&mt('Default set of options to pass to tth/m when converting tex').'</b>'
              ); 
@@ -1947,7 +1950,8 @@
                              'default_enrollment_start_date',
                              'default_enrollment_end_date',
 			     'tthoptions',
-			     'disablesigfigs'
+			     'disablesigfigs',
+			     'disableexampointprint'
                              );
 	foreach my $parameter (sort(keys(%values))) {
             unless (($parameter =~ m/^internal\./)||($parameter =~ m/^metadata\./)) {
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.301 loncom/homework/structuretags.pm:1.302
--- loncom/homework/structuretags.pm:1.301	Fri Sep 23 14:39:55 2005
+++ loncom/homework/structuretags.pm	Fri Sep 23 16:16:50 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.301 2005/09/23 18:39:55 albertel Exp $
+# $Id: structuretags.pm,v 1.302 2005/09/23 20:16:50 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -645,6 +645,10 @@
 	    }
 	    my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");
 	    if (defined($maxtries) && $maxtries < 0) { $allow_print_points=0; }
+	    if (lc($env{'course.'.$env{'request.course.id'}.
+			    '.disableexampointprint'}) eq 'yes') {
+		$allow_print_points=0;
+	    }
 	    my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); 
 	    $duedate = POSIX::strftime("%c",localtime($duedate));
 	    my $temp_file;
@@ -1207,6 +1211,10 @@
 		    if (defined($maxtries) && $maxtries < 0) {
 			$allow_print_points=0;
 		    }
+		    if (lc($env{'course.'.$env{'request.course.id'}.
+				    '.disableexampointprint'}) eq 'yes') {
+			$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).'" />';