Diff for /loncom/homework/chemresponse.pm between versions 1.31 and 1.33

version 1.31, 2004/03/12 18:41:43 version 1.33, 2004/06/07 21:17:42
Line 92  $molecule Line 92  $molecule
 </body>  </body>
 </html>  </html>
 CHEMPAGE  CHEMPAGE
     $body=&HTML::Entities::encode($body);      $body=&HTML::Entities::encode($body,'<>&"');
     $body=~s/\n/ /g;      $body=~s/\n/ /g;
     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.document.open('text/html','replace');editor.document.writeln('$body')" />
Line 304  sub start_reactionresponse { Line 304  sub start_reactionresponse {
  my $partid = $Apache::inputtags::part;   my $partid = $Apache::inputtags::part;
  my $id = $Apache::inputtags::response['-1'];   my $id = $Apache::inputtags::response['-1'];
  my $reaction=$Apache::lonhomework::history{"resource.$partid.$id.submission"};   my $reaction=$Apache::lonhomework::history{"resource.$partid.$id.submission"};
  $result.=&edit_reaction_button($id,"HWVAL_$id",$reaction);   my $status=$Apache::inputtags::status['-1'];
    if ($status eq 'CAN_ANSWER') {
       $result.=&edit_reaction_button($id,"HWVAL_$id",$reaction);
    }
    if (  &Apache::response::show_answer() ) {
       my $ans=&Apache::lonxml::get_param('answer',$parstack,$safeeval);
       $ans=~s/(\\|\')/\\$1/g;
       $Apache::inputtags::answertxt{$id}=&Apache::run::run("return &chemparse('$ans');",$safeeval);
    }
     } elsif ($target eq "edit") {      } elsif ($target eq "edit") {
  $result .=&Apache::edit::tag_start($target,$token);   $result .=&Apache::edit::tag_start($target,$token);
  my $answer=&Apache::lonxml::get_param('answer',$parstack,   my $answer=&Apache::lonxml::get_param('answer',$parstack,

Removed from v.1.31  
changed lines
  Added in v.1.33


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