--- loncom/xml/londefdef.pm 2003/09/30 19:51:44 1.176 +++ loncom/xml/londefdef.pm 2003/10/01 20:45:05 1.177 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.176 2003/09/30 19:51:44 sakharuk Exp $ +# $Id: londefdef.pm,v 1.177 2003/10/01 20:45:05 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -2202,11 +2202,16 @@ sub start_applet { $currentstring='[APPLET: '.$alttag.']'; } } elsif ($target eq 'tex') { - my $code=&Apache::lonxml::get_param('code',$parstack,$safeeval, - undef,1); - if ($code=~/TrueFalse\.class/) { - $currentstring.='\begin{center} \fbox{There is JAVA applet here.}\end{center}'; + my $alttag= &Apache::lonxml::get_param('alt',$parstack, + $safeeval,undef,1); + unless ($alttag) { + my $code=&Apache::lonxml::get_param('code',$parstack,$safeeval, + undef,1); + $alttag=&Apache::lonmeta::alttag($Apache::lonxml::pwd[-1], + $code); } + $currentstring.='\begin{center} \fbox{Java Applet: '.$alttag. + '.}\end{center}'; } return $currentstring; }