--- loncom/homework/imageresponse.pm 2003/05/06 11:54:08 1.27 +++ loncom/homework/imageresponse.pm 2003/05/06 15:48:55 1.28 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # image click response style # -# $Id: imageresponse.pm,v 1.27 2003/05/06 11:54:08 www Exp $ +# $Id: imageresponse.pm,v 1.28 2003/05/06 15:48:55 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -103,8 +103,10 @@ sub displayfoils { my $temp=1; foreach $name (@whichopt) { $result.=$Apache::response::foilgroup{"$name.text"}; + &Apache::lonxml::debug("Text is $result"); if ($target eq 'tex') {$result.="\\vskip 0 mm \n";} else {$result.="
\n";} my $image=$Apache::response::foilgroup{"$name.image"}; + &Apache::lonxml::debug("image is $image"); if ($Apache::lonhomework::history{"resource.$Apache::inputtags::part.solved"} =~ /^correct/ ) { if ($target eq 'tex') { $result.=$Apache::response::foilgroup{"$name.image"}."\\vskip 0 mm \n"; @@ -170,12 +172,11 @@ sub end_foilgroup { if ($count>$max) { $count=$max } &Apache::lonxml::debug("Count is $count from $max"); @whichopt = &whichfoils($max); - } elsif ($target eq 'web' || $target eq 'tex') { - $result=&displayfoils($target,@whichopt); - } elsif ($target eq 'grade') { - if ( defined $ENV{'form.submitted'}) { - &gradefoils(@whichopt); - } + if ($target eq 'web' || $target eq 'tex') { + $result=&displayfoils($target,@whichopt); + } elsif ($target eq 'grade') { + if ( defined $ENV{'form.submitted'}) { &gradefoils(@whichopt); } + } } elsif ($target eq 'edit') { $result=&Apache::edit::end_table(); }