--- loncom/homework/inputtags.pm 2001/04/23 18:01:05 1.31 +++ loncom/homework/inputtags.pm 2001/06/01 15:52:50 1.34 @@ -11,21 +11,26 @@ sub BEGIN { sub initialize_inputtags { + # list of current input ids @Apache::inputtags::input=(); + # list of all input ids seen in this problem @Apache::inputtags::inputlist=(); + # list of all current response ids @Apache::inputtags::response=(); + #list of all response ids seen in this problem @Apache::inputtags::responselist=(); - @Apache::inputtags::answergroup=(); + # id of current part, 0 means that no part is current (inside only $Apache::inputtags::part=''; + # list of problem date statuses, the first element is for + #if there is a second element it is for the current @Apache::inputtags::status=(); + #hash of defined params for the current response %Apache::inputtags::params=(); } sub start_input { my ($parstack,$safeeval)=@_; - my $args =''; - if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } - my $id = &Apache::run::run("{$args;".'return $id}',$safeeval); + my $id = &Apache::lonxml::get_param('id',$parstack,$safeeval); push (@Apache::inputtags::input,$id); push (@Apache::inputtags::inputlist,$id); return $id; @@ -42,11 +47,9 @@ sub start_textarea { my $id = &start_input($parstack,$safeeval); if ($target eq 'web') { my $oldresponse = $Apache::lonhomework::history{"resource.$Apache::inputtags::part.$Apache::inputtags::response['-1'].submission"}; - my $args =''; - if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } - my $cols = &Apache::run::run("{$args;".'return $cols}',$safeeval); + my $cols = &Apache::lonxml::get_param('cols',$parstack,$safeeval); if ( $cols eq '') { $cols = 80; } - my $rows = &Apache::run::run("{$args;".'return $rows}',$safeeval); + my $rows = &Apache::lonxml::get_param('rows',$parstack,$safeeval); if ( $rows eq '') { $rows = 10; } $result= '