Diff for /loncom/homework/chemresponse.pm between versions 1.80 and 1.82

version 1.80, 2008/09/05 20:23:57 version 1.82, 2008/09/21 20:28:27
Line 491  sub start_reactionresponse { Line 491  sub start_reactionresponse {
     } elsif ($target eq 'web') {      } elsif ($target eq 'web') {
  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"};  
  if ($reaction eq '') {  $reaction=&Apache::lonxml::get_param('initial',$parstack,$safeeval); }  
  if (  &Apache::response::show_answer() ) {   if (  &Apache::response::show_answer() ) {
     my $ans=&Apache::lonxml::get_param('answer',$parstack,$safeeval);      my $ans=&Apache::lonxml::get_param('answer',$parstack,$safeeval);
     if (!$Apache::lonxml::default_homework_loaded) {      if (!$Apache::lonxml::default_homework_loaded) {
Line 505  sub start_reactionresponse { Line 503  sub start_reactionresponse {
  $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,
  $safeeval);   $safeeval);
  $result .='<nobr>'.   $result .='<span class="LC_nobreak">'.
     &Apache::edit::text_arg('Answer:','answer',$token,40);      &Apache::edit::text_arg('Answer:','answer',$token,40);
    $result .=&edit_reaction_button($id,&Apache::edit::html_element_name('answer'),$answer).'</span>';
  my $initial=&Apache::lonxml::get_param('initial',$parstack,$safeeval);   my $initial=&Apache::lonxml::get_param('initial',$parstack,$safeeval);
  $result.='<nobr>'.   $result.='<span class="LC_nobreak">'.
     &Apache::edit::text_arg('Initial Reaction:','initial',$token,40);      &Apache::edit::text_arg('Initial Reaction:','initial',$token,40);
    $result .=&edit_reaction_button($id,&Apache::edit::html_element_name('initial'),$initial).'</span>';
  $result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row();   $result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row();
     }  elsif ($target eq 'modified') {      }  elsif ($target eq 'modified') {
  my $constructtag=&Apache::edit::get_new_args($token,$parstack,   my $constructtag=&Apache::edit::get_new_args($token,$parstack,
Line 584  sub end_reactionresponse { Line 583  sub end_reactionresponse {
             &Apache::lonhomework::set_bubble_lines();              &Apache::lonhomework::set_bubble_lines();
         }          }
     }      }
      my $status=$Apache::inputtags::status['-1'];      my $status=$Apache::inputtags::status['-1'];
         if  (($target eq 'web') && ($Apache::lonhomework::type ne 'exam') && ($status eq 'CAN_ANSWER')) {      if  (($target eq 'web') && ($Apache::lonhomework::type ne 'exam') && ($status eq 'CAN_ANSWER')) {
              my $partid = $Apache::inputtags::part;          my $reaction=$Apache::lonhomework::history{"resource.$partid.$id.submission"};
              my $id = $Apache::inputtags::response['-1'];          if ($reaction eq '') {  $reaction=&Apache::lonxml::get_param('initial',$parstack,$safeeval); }
              my $reaction=$Apache::lonhomework::history{"resource.$partid.$id.submission"};          $result.=&edit_reaction_button($id,"HWVAL_$id",$reaction);
              $result.=&edit_reaction_button($id,"HWVAL_$id",$reaction);      }
   
         }    
     &Apache::response::end_response();      &Apache::response::end_response();
     return $result;      return $result;
 }  }

Removed from v.1.80  
changed lines
  Added in v.1.82


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