--- loncom/homework/optionresponse.pm 2004/12/04 00:41:26 1.122 +++ loncom/homework/optionresponse.pm 2005/01/10 19:21:57 1.123 @@ -1,7 +1,7 @@ # LearningOnline Network with CAPA # option list style responses # -# $Id: optionresponse.pm,v 1.122 2004/12/04 00:41:26 albertel Exp $ +# $Id: optionresponse.pm,v 1.123 2005/01/10 19:21:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -629,7 +629,10 @@ sub end_foil { if ($value ne 'unused') { my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval); &Apache::lonxml::debug("Got a name of :$name:"); - if (!$name) { $name=$Apache::lonxml::curdepth; } + if (!$name) { + &Apache::lonxml::error("Foils without names exist. This can cause problems to malfunction."); + $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));