--- loncom/homework/chemresponse.pm 2003/10/21 20:49:06 1.21
+++ loncom/homework/chemresponse.pm 2003/11/24 21:55:12 1.24
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# chemical equation style response
#
-# $Id: chemresponse.pm,v 1.21 2003/10/21 20:49:06 albertel Exp $
+# $Id: chemresponse.pm,v 1.24 2003/11/24 21:55:12 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -208,7 +208,7 @@ sub start_organicstructure {
my $width=&Apache::lonxml::get_param('width',$parstack,$safeeval);
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval);
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval);
- my $id=time.'_'.int(rand(1000));
+ my $id=&Apache::loncommon::get_cgi_id();
$result="';
@@ -235,9 +235,8 @@ sub start_organicstructure {
if ($options =~ /border/) { $result.= '} '; }
} elsif ($target eq 'edit') {
$result .=&Apache::edit::tag_start($target,$token);
- $result .=&Apache::edit::text_arg('Width:','width',$token,5);
- $result .=&Apache::edit::text_arg('Height:','height',$token,5);
- $result .=&Apache::edit::text_arg('TeXwidth:','texwidth',$token,5);
+ $result .=&Apache::edit::text_arg('Width (pixels):','width',$token,5);
+ $result .=&Apache::edit::text_arg('TeXwidth (mm):','texwidth',$token,5);
$result .='';
$result .=&Apache::edit::text_arg('Molecule:','molecule',$token,40);
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,
@@ -256,12 +255,12 @@ sub start_organicstructure {
[ ['reaction','Is a reaction'],
['border','Draw a border'] ],
$token);
- $result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row();
+ $result .=&Apache::edit::end_row();
} elsif ($target eq 'modified') {
my $constructtag=&Apache::edit::get_new_args($token,$parstack,
$safeeval,'molecule',
- 'width','height',
- 'texwidth','options');
+ 'width','texwidth',
+ 'options');
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }
}
return $result;