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

sakharuk lon-capa-cvs@mail.lon-capa.org
Fri, 08 Nov 2002 20:34:10 -0000


sakharuk		Fri Nov  8 15:34:10 2002 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  Added if statement to avoid print input text box in the case of exam.
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.72 loncom/homework/inputtags.pm:1.73
--- loncom/homework/inputtags.pm:1.72	Wed Nov  6 17:40:29 2002
+++ loncom/homework/inputtags.pm	Fri Nov  8 15:34:10 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.72 2002/11/06 22:40:29 albertel Exp $
+# $Id: inputtags.pm,v 1.73 2002/11/08 20:34:10 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -153,8 +153,10 @@
       my $partid=$Apache::inputtags::part;
       my $id=$Apache::inputtags::response[-1];
       my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"});
-      $result= '<input type="text" name="HWVAL'.$id.'" value="'.
-	$oldresponse.'" size="'.$size.'" maxlength="'.$maxlength.'" />';
+      if ($Apache::lonhomework::type ne 'exam') {
+        $result= '<input type="text" name="HWVAL'.$id.'" value="'.
+	    $oldresponse.'" size="'.$size.'" maxlength="'.$maxlength.'" />';
+      }
     } else {
       #right or wrong don't show what was last typed in.
       #$result='<i>'.$oldresponse.'</i>';