version 1.29, 2004/02/13 15:12:57
|
version 1.30, 2004/03/08 17:31:37
|
Line 35 BEGIN {
|
Line 35 BEGIN {
|
&Apache::lonxml::register('Apache::chemresponse',('organicresponse','organicstructure','reactionresponse')); |
&Apache::lonxml::register('Apache::chemresponse',('organicresponse','organicstructure','reactionresponse')); |
} |
} |
|
|
sub seperate_jme_window { |
sub separate_jme_window { |
my ($smile_input,$jme_input,$molecule,$options)=@_; |
my ($smile_input,$jme_input,$molecule,$options)=@_; |
my $smilesection; |
my $smilesection; |
if (defined($smile_input)) { |
if (defined($smile_input)) { |
Line 117 sub start_organicresponse {
|
Line 117 sub start_organicresponse {
|
} |
} |
my $options=&Apache::lonxml::get_param('options',$parstack, |
my $options=&Apache::lonxml::get_param('options',$parstack, |
$safeeval); |
$safeeval); |
$result=&seperate_jme_window("HWVAL_$id","MOLECULE_$id",$molecule,$options); |
$result=&separate_jme_window("HWVAL_$id","MOLECULE_$id",$molecule,$options); |
$result.= '<input type="hidden" name="MOLECULE_'.$id.'" value="" />'; |
$result.= '<input type="hidden" name="MOLECULE_'.$id.'" value="" />'; |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result .=&Apache::edit::tag_start($target,$token); |
$result .=&Apache::edit::tag_start($target,$token); |
Line 129 sub start_organicresponse {
|
Line 129 sub start_organicresponse {
|
$token,40); |
$token,40); |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack, |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack, |
$safeeval); |
$safeeval); |
$result .=&seperate_jme_window(undef, |
$result .=&separate_jme_window(undef, |
&Apache::edit::html_element_name('molecule'), |
&Apache::edit::html_element_name('molecule'), |
$molecule,$options); |
$molecule,$options); |
$result .='</nobr><br /><nobr>'; |
$result .='</nobr><br /><nobr>'; |
Line 138 sub start_organicresponse {
|
Line 138 sub start_organicresponse {
|
$result .=&Apache::edit::hidden_arg('jmeanswer',$token); |
$result .=&Apache::edit::hidden_arg('jmeanswer',$token); |
my $jmeanswer=&Apache::lonxml::get_param('jmeanswer',$parstack, |
my $jmeanswer=&Apache::lonxml::get_param('jmeanswer',$parstack, |
$safeeval); |
$safeeval); |
$result .=&seperate_jme_window( |
$result .=&separate_jme_window( |
&Apache::edit::html_element_name('answer'), |
&Apache::edit::html_element_name('answer'), |
&Apache::edit::html_element_name('jmeanswer'), |
&Apache::edit::html_element_name('jmeanswer'), |
$jmeanswer,$options); |
$jmeanswer,$options); |
Line 248 sub start_organicstructure {
|
Line 248 sub start_organicstructure {
|
$options.= ',multipart,number'; |
$options.= ',multipart,number'; |
} |
} |
|
|
$result .=&seperate_jme_window(undef, |
$result .=&separate_jme_window(undef, |
&Apache::edit::html_element_name('molecule'), |
&Apache::edit::html_element_name('molecule'), |
$molecule,$options); |
$molecule,$options); |
$result.="</nobr><br />"; |
$result.="</nobr><br />"; |