version 1.3, 2001/02/19 20:36:26
|
version 1.4, 2001/02/22 00:49:03
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# option list style responses |
# option list style responses |
|
# 2/21 Guy |
package Apache::optionresponse; |
package Apache::optionresponse; |
use strict; |
use strict; |
|
|
Line 145 sub end_conceptgroup {
|
Line 145 sub end_conceptgroup {
|
|
|
sub start_foil { |
sub start_foil { |
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
if ($target eq 'web') { |
if ($target eq 'web') { &Apache::lonxml::startredirection; } |
$Apache::lonxml::redirection--; |
|
} |
|
return ''; |
return ''; |
} |
} |
|
|
sub end_foil { |
sub end_foil { |
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
|
my $text =''; |
|
if ($target eq 'web') { $text=&Apache::lonxml::endredirection; } |
if ($target eq 'web' || $target eq 'grade') { |
if ($target eq 'web' || $target eq 'grade') { |
my $args =''; |
my $args =''; |
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
Line 161 sub end_foil {
|
Line 161 sub end_foil {
|
my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); |
my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); |
push @{ $Apache::response::foilgroup{'names'} }, $name; |
push @{ $Apache::response::foilgroup{'names'} }, $name; |
$Apache::response::foilgroup{"$name.value"} = $value; |
$Apache::response::foilgroup{"$name.value"} = $value; |
$Apache::response::foilgroup{"$name.text"} = $Apache::lonxml::outputstack; |
$Apache::response::foilgroup{"$name.text"} = $text; |
} |
|
} |
|
if ($target eq 'web' ) { |
|
$Apache::lonxml::redirection++; |
|
if ($Apache::lonxml::redirection == 1) { |
|
$Apache::lonxml::outputstack=''; |
|
} |
} |
} |
} |
return ''; |
return ''; |