--- loncom/homework/inputtags.pm 2000/12/11 23:47:36 1.14 +++ loncom/homework/inputtags.pm 2001/06/01 15:52:50 1.34 @@ -1,5 +1,6 @@ # The LearningOnline Network with CAPA # input definitons +# 2/19 Guy package Apache::inputtags; use strict; @@ -10,20 +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; @@ -39,7 +46,17 @@ sub start_textarea { my $result = ""; my $id = &start_input($parstack,$safeeval); if ($target eq 'web') { - $result= '