[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 08 Apr 2003 02:37:58 -0000
albertel Mon Apr 7 22:37:58 2003 EDT
Modified files:
/loncom/homework inputtags.pm
Log:
- tryin to bring some consistancy to the input field names
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.88 loncom/homework/inputtags.pm:1.89
--- loncom/homework/inputtags.pm:1.88 Mon Apr 7 18:18:11 2003
+++ loncom/homework/inputtags.pm Mon Apr 7 22:37:58 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.88 2003/04/07 22:18:11 albertel Exp $
+# $Id: inputtags.pm,v 1.89 2003/04/08 02:37:58 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -89,7 +89,7 @@
if ( $cols eq '') { $cols = 80; }
my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval);
if ( $rows eq '') { $rows = 10; }
- $result= '<textarea name="HWVAL'.$resid.'" '.
+ $result= '<textarea name="HWVAL_'.$resid.'" '.
"rows=\"$rows\" cols=\"$cols\">".$oldresponse;
if ($oldresponse ne '') {
#get rid of any startup text if the user has already responded
@@ -104,9 +104,9 @@
}
} elsif ($target eq 'grade') {
my $seedtext=&Apache::lonxml::get_all_text("/textfield",$parser);
- if ($seedtext eq $ENV{'form.HWVAL'.$resid}) {
+ if ($seedtext eq $ENV{'form.HWVAL_'.$resid}) {
# if the seed text is still there it wasn't a real submission
- $ENV{'form.HWVAL'.$resid}='';
+ $ENV{'form.HWVAL_'.$resid}='';
}
} elsif ($target eq 'edit') {
$result.=&Apache::edit::tag_start($target,$token);
@@ -164,7 +164,7 @@
my $id=$Apache::inputtags::response[-1];
my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"});
if ($Apache::lonhomework::type ne 'exam') {
- $result= '<input type="text" name="HWVAL'.$id.'" value="'.
+ $result= '<input type="text" name="HWVAL_'.$id.'" value="'.
$oldresponse.'" size="'.$size.'" maxlength="'.$maxlength.'" />';
}
} else {