Diff for /loncom/homework/chemresponse.pm between versions 1.59 and 1.63

version 1.59, 2005/06/27 14:27:25 version 1.63, 2006/03/09 00:48:47
Line 105  function submitSmiles() { Line 105  function submitSmiles() {
 function openHelpWindow() {  function openHelpWindow() {
     window.open("/adm/jme/jme_help.html","","scrollbars=yes,resizable=yes,width=500,height=600");      window.open("/adm/jme/jme_help.html","","scrollbars=yes,resizable=yes,width=500,height=600");
 }  }
   function substituent(r) {document.applets.JME.setSubstituent(r);}
 </script>  </script>
 </head>  </head>
 <body bgcolor="#ffffff">  <body bgcolor="#ffffff">
 <center>  <center>
 <applet code="JME.class" name="JME" archive="/adm/jme/JME.jar" width="440" height="390">  <form>
     <table width="440"><tr>
       <td></td>
       <td align="right">
         <select onchange="javascript:substituent(options[selectedIndex].text)">
           <option>Select substituent</option>
           <option>-C(=O)OH</option>
           <option>-C(=O)OMe</option>
           <option>-OC(=O)Me</option>
           <option>-CMe3</option>
           <option>-CF3</option>
           <option>-CCl3</option>
           <option>-NO2</option>
           <option>-SO2-NH2</option>
           <option>-NH-SO2-Me</option>
           <option>-NMe2</option>
           <option>-C#N</option>
           <option>-C#C-Me</option>
           <option>-C#CH</option>
         </select>
       </td></tr>
     </table>
   <applet code="JME.class" name="JME" archive="/adm/jme/JME.jar" width="440" height="390" mayscript>
 You have to enable Java and JavaScript on your machine.  You have to enable Java and JavaScript on your machine.
 $molecule  $molecule
 <param name="options" value="$options" />  <param name="options" value="$options" />
 </applet><br />  </applet><br />
 <font face="arial,helvetica,sans-serif" size="-1"><a href="http://www.molinspiration.com/jme/index.html">JME Editor</a> courtesy of Peter Ertl, Novartis</font>  <font face="arial,helvetica,sans-serif" size="-1"><a href="http://www.molinspiration.com/jme/index.html">JME Editor</a> courtesy of Peter Ertl, Novartis</font>
 <form>  <br />
 $insert_answer  $insert_answer
 <br />  <br />
 <input type="button" value="  Close  " onclick = "javascript:window.close()" />  <input type="button" value="  Close  " onclick = "javascript:window.close()" />
Line 133  CHEMPAGE Line 156  CHEMPAGE
     my $display=&mt('Draw Molecule');      my $display=&mt('Draw Molecule');
     if (defined($shown_text)) { $display=&mt($shown_text); }      if (defined($shown_text)) { $display=&mt($shown_text); }
     my $result=<<CHEMINPUT;      my $result=<<CHEMINPUT;
 <input type="button" value="$display" onclick="javascript:editor=window.open($nothing,'jmeedit','width=500,height=500,menubar=yes,scrollbars=no,resizable=yes');editor.$docopen;editor.document.write('$body');editor.document.close();editor.focus()" />  <input type="button" value="$display" onclick="javascript:editor=window.open($nothing,'jmeedit','width=500,height=500,menubar=no,scrollbars=no,resizable=yes');editor.$docopen;editor.document.write('$body');editor.document.close();editor.focus()" />
 CHEMINPUT  CHEMINPUT
     return $result;      return $result;
 }  }
Line 228  sub start_organicresponse { Line 251  sub start_organicresponse {
      'options','width');       'options','width');
  if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }   if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }
     }      }
   
     return $result;      return $result;
 }  }
   
Line 271  sub end_organicresponse { Line 295  sub end_organicresponse {
  }   }
  $result.=&Apache::response::answer_footer('organicresponse');   $result.=&Apache::response::answer_footer('organicresponse');
     }      }
     &Apache::response::end_response;  
       if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || 
    $target eq 'tex' || $target eq 'analyze') {
    &Apache::lonxml::increment_counter(&Apache::response::repetition());
       }
       &Apache::response::end_response();
     return $result;      return $result;
 }  }
   
Line 294  sub start_organicstructure { Line 323  sub start_organicstructure {
  my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1);   my $texwidth=&Apache::lonxml::get_param('texwidth',$parstack,$safeeval,undef,1);
  my $webwidth=&Apache::lonxml::get_param('width', $parstack, $safeeval);   my $webwidth=&Apache::lonxml::get_param('width', $parstack, $safeeval);
  my $webheight=&Apache::lonxml::get_param('height', $parstack, $safeeval);   my $webheight=&Apache::lonxml::get_param('height', $parstack, $safeeval);
  if ($webheight) { $webheight = $webwidth; }   if (!$webheight) { $webheight = $webwidth; }
  if (!$texwidth) { $texwidth='90'; }   if (!$texwidth) { $texwidth='90'; }
  $result = "%DYNAMICIMAGE:$webwidth:$webheight:$texwidth\n";   $result = "%DYNAMICIMAGE:$webwidth:$webheight:$texwidth\n";
  my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval);   my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval);
Line 459  sub end_reactionresponse { Line 488  sub end_reactionresponse {
  }   }
  $result.=&Apache::response::answer_footer('reactionresponse');   $result.=&Apache::response::answer_footer('reactionresponse');
     }      }
     &Apache::response::end_response;  
       if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || 
    $target eq 'tex' || $target eq 'analyze') {
    &Apache::lonxml::increment_counter(&Apache::response::repetition());
       }
       &Apache::response::end_response();
     return $result;      return $result;
 }  }
   

Removed from v.1.59  
changed lines
  Added in v.1.63


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>