--- loncom/homework/chemresponse.pm 2003/10/17 22:26:38 1.18 +++ loncom/homework/chemresponse.pm 2003/10/20 16:25:53 1.20 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # chemical equation style response # -# $Id: chemresponse.pm,v 1.18 2003/10/17 22:26:38 albertel Exp $ +# $Id: chemresponse.pm,v 1.20 2003/10/20 16:25:53 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -208,7 +208,9 @@ sub start_organicstructure { my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); my $id=time.'_'.int(rand(1000)); - $result=""; + $result=" &Apache::lonnet::escape($molecule), 'cgi.'.$id.'.PNG' => 1, @@ -227,7 +229,9 @@ sub start_organicstructure { '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);