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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 06 Feb 2004 22:38:24 -0000


albertel		Fri Feb  6 17:38:24 2004 EDT

  Modified files:              (Branch: version_1_1_X)
    /loncom/homework	structuretags.pm 
  Log:
  - backport 1.232
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.227.2.1 loncom/homework/structuretags.pm:1.227.2.2
--- loncom/homework/structuretags.pm:1.227.2.1	Fri Jan 30 11:22:52 2004
+++ loncom/homework/structuretags.pm	Fri Feb  6 17:38:24 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.227.2.1 2004/01/30 16:22:52 albertel Exp $
+# $Id: structuretags.pm,v 1.227.2.2 2004/02/06 22:38:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -517,7 +517,7 @@
     if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
 	$target eq 'tex') {
 	if ( $target eq 'grade' && $Apache::inputtags::part eq '0' &&
-	     $status eq 'CAN_ANSWER' ) {
+	     ($status eq 'CAN_ANSWER' || $Apache::lonhomework::scantronmode)) {
 	    # if part is zero, no <part>s existed, so we need to the grading
 	    &Apache::inputtags::grade;
 	} elsif ( ($target eq 'web' || $target eq 'tex') &&
@@ -1009,7 +1009,9 @@
     my $result='';
     if ( $target eq 'meta' ) {
 	$result='';
-    } elsif ( $target eq 'grade' && $status eq 'CAN_ANSWER' && !$hidden) {
+    } elsif ($target eq 'grade' && 
+	     ($status eq 'CAN_ANSWER' || $Apache::lonhomework::scantronmode) &&
+	     !$hidden) {
 	$result=&Apache::inputtags::grade;
     } elsif (($target eq 'web' || $target eq 'tex') && !$hidden ) {
 	my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part,