--- loncom/homework/response.pm 2000/12/04 21:16:29 1.12 +++ loncom/homework/response.pm 2000/12/11 23:47:36 1.13 @@ -10,6 +10,24 @@ sub BEGIN { &Apache::lonxml::register('Apache::response',('responseparam','caparesponse')); } +sub start_response { + my ($parstack,$safeeval)=@_; + my $args =''; + if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } + my $id = &Apache::run::run("{$args;".'return $id}',$safeeval); + if ($id eq '') { $id = $Apache::lonxml::curdepth; } + push (@Apache::inputtags::response,$id); + push (@Apache::inputtags::responselist,$id); + @Apache::inputtags::inputlist=(); + return $id; +} + +sub end_response { + pop @Apache::inputtags::response; + @Apache::inputtags::inputlist=(); + return ''; +} + sub meta_parameter_write { my ($name,$type,$default,$display)=@_; return '