--- loncom/homework/matchresponse.pm 2004/12/04 00:41:26 1.48 +++ loncom/homework/matchresponse.pm 2005/01/10 19:21:57 1.49 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Full matching style response # -# $Id: matchresponse.pm,v 1.48 2004/12/04 00:41:26 albertel Exp $ +# $Id: matchresponse.pm,v 1.49 2005/01/10 19:21:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -646,7 +646,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));