[LON-CAPA-cvs] cvs: loncom /homework essayresponse.pm externalresponse.pm radiobuttonresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 08 Apr 2003 02:40:56 -0000


albertel		Mon Apr  7 22:40:56 2003 EDT

  Modified files:              
    /loncom/homework	externalresponse.pm essayresponse.pm 
                    	radiobuttonresponse.pm 
  Log:
  - brining consitancy to the homework input fields
  
  
Index: loncom/homework/externalresponse.pm
diff -u loncom/homework/externalresponse.pm:1.2 loncom/homework/externalresponse.pm:1.3
--- loncom/homework/externalresponse.pm:1.2	Mon Sep 23 03:07:02 2002
+++ loncom/homework/externalresponse.pm	Mon Apr  7 22:40:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # external style responses
 #
-# $Id: externalresponse.pm,v 1.2 2002/09/23 07:07:02 albertel Exp $
+# $Id: externalresponse.pm,v 1.3 2003/04/08 02:40:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -52,7 +52,7 @@
   if ($target eq 'grade') {
     if ( defined $ENV{'form.submitted'}) {
       my $id = $Apache::inputtags::response['-1'];
-      my $response = $ENV{'form.HWVAL'.$id};
+      my $response = $ENV{'form.HWVAL_'.$id};
       if ( $response =~ /[^\s]/) {
 	my $url = &Apache::lonxml::get_param('url',$parstack,$safeeval);
 	my $answer = &Apache::lonxml::get_param('answer',$parstack,$safeeval);
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.25 loncom/homework/essayresponse.pm:1.26
--- loncom/homework/essayresponse.pm:1.25	Thu Feb 27 16:20:48 2003
+++ loncom/homework/essayresponse.pm	Mon Apr  7 22:40:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.25 2003/02/27 21:20:48 sakharuk Exp $
+# $Id: essayresponse.pm,v 1.26 2003/04/08 02:40:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -98,7 +98,7 @@
 		if ($collaborators ne $previous_list);
 	}
 	if ( defined $ENV{'form.submitted'}) {
-	    my $response      = $ENV{'form.HWVAL'.$id};
+	    my $response      = $ENV{'form.HWVAL_'.$id};
             my $filename= $ENV{'form.HWFILE'.$part.'_'.$id.'.filename'};
 	    if (( $response =~ /[^\s]/) || ($filename =~ /[^\s]/)) {
  		my $award;
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.67 loncom/homework/radiobuttonresponse.pm:1.68
--- loncom/homework/radiobuttonresponse.pm:1.67	Mon Apr  7 18:28:08 2003
+++ loncom/homework/radiobuttonresponse.pm	Mon Apr  7 22:40:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.67 2003/04/07 22:28:08 albertel Exp $
+# $Id: radiobuttonresponse.pm,v 1.68 2003/04/08 02:40:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -93,7 +93,7 @@
 
 sub storesurvey {
   if ( !defined($ENV{'form.submitted'})) { return ''; }
-  my $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']};
+  my $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1']};
   &Apache::lonxml::debug("Here I am!:$response:");
   if ( $response !~ /[0-9]+/) { return ''; }
   my $id = $Apache::inputtags::response['-1'];
@@ -120,7 +120,7 @@
       $response = $ENV{'scantron.'.$Apache::lonxml::counter.'.answer'};
       $response = $let_to_num{$response};
   } else {
-      $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']};
+      $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1']};
   }
   if ( $response !~ /[0-9]+/) { return; }
   my $part=$Apache::inputtags::part;
@@ -216,7 +216,7 @@
   } else {
     foreach my $name (@names) {
       if ($Apache::response::foilgroup{$name.'.value'} ne 'unused') {
-	$result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";
+	$result.="<br /><input type=\"radio\" name=\"HWVAL_$Apache::inputtags::response['-1']\" value=\"$temp\" ";
 	if (defined($lastresponse{$name})) { $result .= 'checked="on"'; }
 	$result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";
 	$temp++;
@@ -389,7 +389,7 @@
     my %lastresponse=&Apache::lonnet::str2hash($lastresponse);
     foreach my $name (@whichfoils) {
       if ($target ne 'tex') {
-	  $result.="<br /><input type=\"radio\" name=\"HWVAL$Apache::inputtags::response['-1']\" value=\"$temp\" ";
+	  $result.="<br /><input type=\"radio\" name=\"HWVAL_$Apache::inputtags::response['-1']\" value=\"$temp\" ";
 	  if (defined($lastresponse{$name})) { $result .= 'checked="on"'; }
 	  $result .= '>'.$Apache::response::foilgroup{$name.'.text'}."</input>\n";
       } else {