version 1.30, 2001/04/05 00:09:19
|
version 1.31, 2001/04/23 18:01:05
|
Line 42 sub start_textarea {
|
Line 42 sub start_textarea {
|
my $id = &start_input($parstack,$safeeval); |
my $id = &start_input($parstack,$safeeval); |
if ($target eq 'web') { |
if ($target eq 'web') { |
my $oldresponse = $Apache::lonhomework::history{"resource.$Apache::inputtags::part.$Apache::inputtags::response['-1'].submission"}; |
my $oldresponse = $Apache::lonhomework::history{"resource.$Apache::inputtags::part.$Apache::inputtags::response['-1'].submission"}; |
$result= '<textarea name="HWVAL'.$Apache::inputtags::response['-1'].'">'.$oldresponse; |
my $args =''; |
|
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
|
my $cols = &Apache::run::run("{$args;".'return $cols}',$safeeval); |
|
if ( $cols eq '') { $cols = 80; } |
|
my $rows = &Apache::run::run("{$args;".'return $rows}',$safeeval); |
|
if ( $rows eq '') { $rows = 10; } |
|
$result= '<textarea name="HWVAL'.$Apache::inputtags::response['-1'].'" '. |
|
"rows=\"$rows\" cols=\"$cols\">".$oldresponse; |
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("/textarea",$$parser[$#$parser]); |
&Apache::lonxml::get_all_text("/textarea",$$parser[$#$parser]); |