version 1.65, 2006/04/13 18:57:51
|
version 1.66, 2006/05/30 12:45:36
|
Line 31 use strict;
|
Line 31 use strict;
|
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
|
|
|
|
BEGIN { |
BEGIN { |
&Apache::lonxml::register('Apache::chemresponse',('organicresponse','organicstructure','reactionresponse','chem')); |
&Apache::lonxml::register('Apache::chemresponse',('organicresponse','organicstructure','reactionresponse','chem')); |
Line 174 sub jme_img {
|
Line 177 sub jme_img {
|
if ($options =~ /border/) { $result.= ' border="1"'; } |
if ($options =~ /border/) { $result.= ' border="1"'; } |
$result.=' />'; |
$result.=' />'; |
&Apache::lonnet::appenv('cgi.'.$id.'.JME' => |
&Apache::lonnet::appenv('cgi.'.$id.'.JME' => |
&Apache::lonnet::escape($jme), |
&escape($jme), |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.WIDTH' => $width); |
'cgi.'.$id.'.WIDTH' => $width); |
return $result; |
return $result; |
Line 333 sub start_organicstructure {
|
Line 336 sub start_organicstructure {
|
if ($options =~ /border/) { $result.= ' border="1"'; } |
if ($options =~ /border/) { $result.= ' border="1"'; } |
$result.=' />'; |
$result.=' />'; |
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
'cgi.'.$id.'.JME' => &Apache::lonnet::escape($molecule), |
'cgi.'.$id.'.JME' => &escape($molecule), |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.WIDTH' => $width ); |
'cgi.'.$id.'.WIDTH' => $width ); |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
Line 349 sub start_organicstructure {
|
Line 352 sub start_organicstructure {
|
'_'.time.'_'.$$.int(rand(1000)).'_organicstructure'; |
'_'.time.'_'.$$.int(rand(1000)).'_organicstructure'; |
my $id=$filename; |
my $id=$filename; |
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
'cgi.'.$id.'.JME' => &Apache::lonnet::escape($molecule), |
'cgi.'.$id.'.JME' => &escape($molecule), |
'cgi.'.$id.'.PS' => 1, |
'cgi.'.$id.'.PS' => 1, |
'cgi.'.$id.'.WIDTH' => $texwidth ); |
'cgi.'.$id.'.WIDTH' => $texwidth ); |
$id=&Apache::lonnet::escape($id); |
$id=&escape($id); |
&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id"); |
&Apache::lonxml::register_ssi("/cgi-bin/convertjme.pl?$id"); |
if ($options =~ /border/) { $result.= '\fbox{'; } |
if ($options =~ /border/) { $result.= '\fbox{'; } |
$result .= '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$texwidth.' mm]{'.$filename.'.eps}'; |
$result .= '\graphicspath{{/home/httpd/perl/tmp/}}\includegraphics[width='.$texwidth.' mm]{'.$filename.'.eps}'; |
Line 401 sub end_organicstructure {
|
Line 404 sub end_organicstructure {
|
|
|
sub edit_reaction_button { |
sub edit_reaction_button { |
my ($id,$field,$reaction)=@_; |
my ($id,$field,$reaction)=@_; |
my $id_es=&Apache::lonnet::escape($id); |
my $id_es=&escape($id); |
my $field_es=&Apache::lonnet::escape($field); |
my $field_es=&escape($field); |
my $reaction_es=&Apache::lonnet::escape($reaction); |
my $reaction_es=&escape($reaction); |
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('LON-CAPA Reaction Editor',undef, |
&Apache::loncommon::start_page('LON-CAPA Reaction Editor',undef, |