[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 01 Oct 2003 20:45:05 -0000


albertel		Wed Oct  1 16:45:05 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - why not uset the ALT tag when printing a page with an Applet?
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.176 loncom/xml/londefdef.pm:1.177
--- loncom/xml/londefdef.pm:1.176	Tue Sep 30 15:51:44 2003
+++ loncom/xml/londefdef.pm	Wed Oct  1 16:45:05 2003
@@ -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 @@
 	    $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;
 }