--- loncom/homework/optionresponse.pm 2001/01/19 21:44:51 1.1
+++ loncom/homework/optionresponse.pm 2001/02/19 20:36:26 1.3
@@ -11,7 +11,7 @@ sub BEGIN {
sub start_optionresponse {
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
#when in a radiobutton response use these
- &Apache::lonxml::register('Apache::optionresponse',('foilgroup','foil'));
+ &Apache::lonxml::register('Apache::optionresponse',('foilgroup','foil','conceptgroup'));
my $id = &Apache::response::start_response($parstack,$safeeval);
return '';
}
@@ -64,7 +64,7 @@ sub end_foilgroup {
my $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1'].":$temp"};
$allresponse.="$response:";
if ( $response =~ /[^\s]/) {
- &Apache::lonxml::debug("submitted a $response
\n");
+ &Apache::lonxml::debug("submitted a $response
\n");
my $value=$Apache::response::foilgroup{$name.'.value'};
if ($value eq $response) {$right++;} else {$wrong++;}
}
@@ -137,8 +137,17 @@ sub displayfoils {
return $result."
";
}
+sub start_conceptgroup {
+}
+
+sub end_conceptgroup {
+}
+
sub start_foil {
- $Apache::lonxml::redirection--;
+ my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
+ if ($target eq 'web') {
+ $Apache::lonxml::redirection--;
+ }
return '';
}
@@ -155,10 +164,11 @@ sub end_foil {
$Apache::response::foilgroup{"$name.text"} = $Apache::lonxml::outputstack;
}
}
-
- $Apache::lonxml::redirection++;
- if ($Apache::lonxml::redirection == 1) {
- $Apache::lonxml::outputstack='';
+ if ($target eq 'web' ) {
+ $Apache::lonxml::redirection++;
+ if ($Apache::lonxml::redirection == 1) {
+ $Apache::lonxml::outputstack='';
+ }
}
return '';
}