[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 20 Oct 2003 16:25:54 -0000


albertel		Mon Oct 20 12:25:54 2003 EDT

  Modified files:              
    /loncom/homework	chemresponse.pm 
  Log:
  - add border to printed version
  
  
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.19 loncom/homework/chemresponse.pm:1.20
--- loncom/homework/chemresponse.pm:1.19	Sat Oct 18 03:24:35 2003
+++ loncom/homework/chemresponse.pm	Mon Oct 20 12:25:53 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.19 2003/10/18 07:24:35 albertel Exp $
+# $Id: chemresponse.pm,v 1.20 2003/10/20 16:25:53 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -229,7 +229,9 @@
 		     'cgi.'.$id.'.WIDTH' => $texwidth );
 	$id=&Apache::lonnet::escape($id);
 	&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id");
-	$result = '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$texwidth.' mm]{'.$filename.'.eps}';
+	if ($options =~ /border/) { $result.= '\fbox{'; }
+	$result .= '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$texwidth.' mm]{'.$filename.'.eps}';
+	if ($options =~ /border/) { $result.= '} '; }
     } elsif ($target eq 'edit') {
 	$result .=&Apache::edit::tag_start($target,$token);
 	$result .=&Apache::edit::text_arg('Width:','width',$token,5);