--- loncom/homework/response.pm 2001/05/04 21:19:37 1.26 +++ loncom/homework/response.pm 2001/05/31 22:37:11 1.27 @@ -12,9 +12,7 @@ sub BEGIN { sub start_response { 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); if ($id eq '') { $id = $Apache::lonxml::curdepth; } push (@Apache::inputtags::response,$id); push (@Apache::inputtags::responselist,$id); @@ -144,10 +142,8 @@ sub start_essayresponse { sub start_responseparam { my ($target,$token,$parstack,$parser,$safeeval)=@_; if ($target eq 'grade' || $target eq 'web') { - my $args=''; - if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } - my $default = &Apache::run::run("{$args;".'return $default}',$safeeval); - my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); + my $default= &Apache::lonxml::get_param('default',$parstack,$safeeval); + my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); &Apache::lonxml::debug("looking for resource.$Apache::inputtags::part.$name"); my $value = &Apache::lonnet::EXT("resource.$Apache::inputtags::part.$name"); &Apache::lonxml::debug("$name has value :$value: and default :$default:");