version 1.184, 2005/11/21 22:45:13
|
version 1.185, 2005/12/01 18:46:31
|
Line 131 sub addchars {
|
Line 131 sub addchars {
|
} |
} |
|
|
sub start_textfield { |
sub start_textfield { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result = ""; |
my $result = ""; |
my $id = &start_input($parstack,$safeeval); |
my $id = &start_input($parstack,$safeeval); |
my $resid=$Apache::inputtags::response[-1]; |
my $resid=$Apache::inputtags::response[-1]; |
Line 155 sub start_textfield {
|
Line 155 sub start_textfield {
|
if ($oldresponse ne '') { |
if ($oldresponse ne '') { |
|
|
#get rid of any startup text if the user has already responded |
#get rid of any startup text if the user has already responded |
&Apache::lonxml::get_all_text("/textfield",$parser); |
&Apache::lonxml::get_all_text("/textfield",$parser,$style); |
} |
} |
} else { |
} else { |
#right or wrong don't show it |
#right or wrong don't show it |
#$result='<table border="1"><tr><td><i>'.$oldresponse.'</i></td></tr></table>'; |
#$result='<table border="1"><tr><td><i>'.$oldresponse.'</i></td></tr></table>'; |
$result=''; |
$result=''; |
#get rid of any startup text |
#get rid of any startup text |
&Apache::lonxml::get_all_text("/textfield",$parser); |
&Apache::lonxml::get_all_text("/textfield",$parser,$style); |
} |
} |
} elsif ($target eq 'grade') { |
} elsif ($target eq 'grade') { |
my $seedtext=&Apache::lonxml::get_all_text("/textfield",$parser); |
my $seedtext=&Apache::lonxml::get_all_text("/textfield",$parser, |
|
$style); |
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 |
# if the seed text is still there it wasn't a real submission |
$env{'form.HWVAL_'.$resid}=''; |
$env{'form.HWVAL_'.$resid}=''; |
Line 176 sub start_textfield {
|
Line 177 sub start_textfield {
|
$result.=&Apache::edit::text_arg('Columns:','cols',$token,4); |
$result.=&Apache::edit::text_arg('Columns:','cols',$token,4); |
$result.=&Apache::edit::text_arg |
$result.=&Apache::edit::text_arg |
('Click-On Texts (comma sep):','addchars',$token,10); |
('Click-On Texts (comma sep):','addchars',$token,10); |
my $bodytext=&Apache::lonxml::get_all_text("/textfield",$parser); |
my $bodytext=&Apache::lonxml::get_all_text("/textfield",$parser, |
|
$style); |
$result.=&Apache::edit::editfield($token->[1],$bodytext,'Text you want to appear by default:',80,2); |
$result.=&Apache::edit::editfield($token->[1],$bodytext,'Text you want to appear by default:',80,2); |
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args($token,$parstack, |
my $constructtag=&Apache::edit::get_new_args($token,$parstack, |