version 1.4, 2000/11/22 00:02:31
|
version 1.5, 2000/11/23 17:24:39
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# various response type definitons response definition |
# various response type definitons response definition |
|
|
|
# 11/23 Gerd Kortemeyer |
|
|
package Apache::response; |
package Apache::response; |
use strict; |
use strict; |
|
|
Line 19 sub start_caparesponse {
|
Line 21 sub start_caparesponse {
|
|
|
sub start_responseparam { |
sub start_responseparam { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
|
if ($target ne 'meta') { |
my $args=''; |
my $args=''; |
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
my $default = &Apache::run::run("{$args;".'return $default}',$safeeval); |
my $default = &Apache::run::run("{$args;".'return $default}',$safeeval); |
Line 32 sub start_responseparam {
|
Line 35 sub start_responseparam {
|
$Apache::inputtags::params{$name}=$value; |
$Apache::inputtags::params{$name}=$value; |
} |
} |
return ''; |
return ''; |
|
} else { |
|
my $tag='parameter_'.$Apache::inputtags::part['-1'].'_'. |
|
$token->[2]->{'name'}; |
|
my $display=''; |
|
if ($token->[2]->{'description'}) { |
|
$display=' display="'.$token->[2]->{'description'}.'"'; |
|
} |
|
return "\n<".$tag.$display.'>'.$token->[2]->{'type'}.'</'.$tag.'>'; |
|
} |
} |
} |
|
|
sub end_responseparam { |
sub end_responseparam { |