--- loncom/homework/optionresponse.pm 2004/03/08 23:23:04 1.103 +++ loncom/homework/optionresponse.pm 2004/03/25 16:55:16 1.105 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.103 2004/03/08 23:23:04 albertel Exp $ +# $Id: optionresponse.pm,v 1.105 2004/03/25 16:55:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -530,7 +530,10 @@ sub start_foil { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result=''; if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze' ) { - &Apache::lonxml::startredirection; + &Apache::lonxml::startredirection; + if ($target eq 'analyze') { + &Apache::response::check_if_computed($token,$parstack,$safeeval,'value'); + } } elsif ($target eq 'edit') { $result=&Apache::edit::tag_start($target,$token,"Foil"); my $level='-2'; @@ -568,13 +571,13 @@ sub end_foil { my $value = &Apache::lonxml::get_param('value',$parstack,$safeeval); if ($value ne 'unused') { my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval); - $Apache::response::foilnames{$name}++; &Apache::lonxml::debug("Got a name of :$name:"); if (!$name) { $name=$Apache::lonxml::curdepth; } &Apache::lonxml::debug("Using a name of :$name:"); if (defined($Apache::response::foilnames{$name})) { &Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",$name)); } + $Apache::response::foilnames{$name}++; my $location =&Apache::lonxml::get_param('location',$parstack,$safeeval); if ( $Apache::optionresponse::conceptgroup && !&Apache::response::showallfoils() ) {