--- loncom/homework/chemresponse.pm 2003/10/16 18:30:46 1.15 +++ loncom/homework/chemresponse.pm 2003/10/16 20:16:42 1.16 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # chemical equation style response # -# $Id: chemresponse.pm,v 1.15 2003/10/16 18:30:46 albertel Exp $ +# $Id: chemresponse.pm,v 1.16 2003/10/16 20:16:42 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -210,12 +210,12 @@ sub start_organicstructure { my $height=&Apache::lonxml::get_param('height',$parstack,$safeeval); my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); - $result=< - - - -CHEMOUTPUT + my $id=time.'_'.int(rand(1000)); + $result=""; + &Apache::lonnet::appenv( + 'cgi.'.$id.'.JME' => &Apache::lonnet::escape($molecule), + 'cgi.'.$id.'.WIDTH' => $width ); + } elsif ($target eq 'edit') { $result .=&Apache::edit::tag_start($target,$token); $result .=&Apache::edit::text_arg('Width:','width',$token,5);