version 1.37, 2004/08/10 18:05:12
|
version 1.42, 2004/10/21 06:37:36
|
Line 121 $molecule
|
Line 121 $molecule
|
CHEMPAGE |
CHEMPAGE |
$body=&HTML::Entities::encode($body,'<>&"'); |
$body=&HTML::Entities::encode($body,'<>&"'); |
$body=~s/\n/ /g; |
$body=~s/\n/ /g; |
|
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $result=<<CHEMINPUT; |
my $result=<<CHEMINPUT; |
<input type="button" value="Draw Molecule" onClick="javascript:editor=window.open('','','width=500,height=500,scrollbars=no,resizable=yes');editor.document.open('text/html','replace');editor.document.writeln('$body')" /> |
<input type="button" value="Draw Molecule" onClick="javascript:editor=window.open('','','width=500,height=500,scrollbars=no,resizable=yes');editor.$docopen;editor.document.writeln('$body')" /> |
CHEMINPUT |
CHEMINPUT |
return $result; |
return $result; |
} |
} |
Line 210 sub end_organicresponse {
|
Line 211 sub end_organicresponse {
|
$ad='INCORRECT'; |
$ad='INCORRECT'; |
} |
} |
} |
} |
|
if ($ad && $Apache::lonhomework::type eq 'survey') { |
|
$ad='SUBMITTED'; |
|
} |
&Apache::response::handle_previous(\%previous,$ad); |
&Apache::response::handle_previous(\%previous,$ad); |
$Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad; |
$Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad; |
$Apache::lonhomework::results{"resource.$partid.$id.molecule"}=$ENV{"form.MOLECULE_$id"}; |
$Apache::lonhomework::results{"resource.$partid.$id.molecule"}=$ENV{"form.MOLECULE_$id"}; |
Line 245 sub start_organicstructure {
|
Line 249 sub start_organicstructure {
|
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.WIDTH' => $width ); |
'cgi.'.$id.'.WIDTH' => $width ); |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,1); |
my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1); |
if (!$texwidth) { $texwidth='90'; } |
if (!$texwidth) { $texwidth='90'; } |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); |
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); |
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); |
Line 308 sub edit_reaction_button {
|
Line 312 sub edit_reaction_button {
|
my $id_es=&Apache::lonnet::escape($id); |
my $id_es=&Apache::lonnet::escape($id); |
my $field_es=&Apache::lonnet::escape($field); |
my $field_es=&Apache::lonnet::escape($field); |
my $reaction_es=&Apache::lonnet::escape($reaction); |
my $reaction_es=&Apache::lonnet::escape($reaction); |
|
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $result=<<EDITREACTION; |
my $result=<<EDITREACTION; |
<script type="text/javascript"> |
<script type="text/javascript"> |
function create_reaction_window_${id}_${field} () { |
function create_reaction_window_${id}_${field} () { |
editor=window.open('','','width=500,height=270,scrollbars=no,resizable=yes'); |
editor=window.open('','','width=500,height=270,scrollbars=no,resizable=yes'); |
editor.document.open('text/html','replace'); |
editor.$docopen; |
editor.document.writeln('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>LON-CAPA Reaction Editor</title></head><frameset rows="30%,*" border="0"> <frame src="/res/adm/pages/reactionresponse/reaction_viewer.html?inhibitmenu=yes" name="viewer" scrolling="no" /> <frame src="/res/adm/pages/reactionresponse/reaction_editor.html?inhibitmenu=yes&reaction=$reaction_es&id=$id_es&field=$field_es" name="editor" scrolling="no" /> </frameset> </html>'); |
editor.document.writeln('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>LON-CAPA Reaction Editor</title></head><frameset rows="30%,*" border="0"> <frame src="/res/adm/pages/reactionresponse/reaction_viewer.html?inhibitmenu=yes" name="viewer" scrolling="no" /> <frame src="/res/adm/pages/reactionresponse/reaction_editor.html?inhibitmenu=yes&reaction=$reaction_es&id=$id_es&field=$field_es" name="editor" scrolling="no" /> </frameset> </html>'); |
} |
} |
</script> |
</script> |
Line 385 sub end_reactionresponse {
|
Line 390 sub end_reactionresponse {
|
$ad='INCORRECT'; |
$ad='INCORRECT'; |
} |
} |
} |
} |
|
if ($ad && $Apache::lonhomework::type eq 'survey') { |
|
$ad='SUBMITTED'; |
|
} |
&Apache::response::handle_previous(\%previous,$ad); |
&Apache::response::handle_previous(\%previous,$ad); |
$Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad; |
$Apache::lonhomework::results{"resource.$partid.$id.awarddetail"}=$ad; |
} |
} |