--- loncom/homework/chemresponse.pm 2008/09/05 20:23:57 1.80 +++ loncom/homework/chemresponse.pm 2008/09/21 20:09:06 1.81 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # chemical equation style response # -# $Id: chemresponse.pm,v 1.80 2008/09/05 20:23:57 riegler Exp $ +# $Id: chemresponse.pm,v 1.81 2008/09/21 20:09:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -491,8 +491,6 @@ sub start_reactionresponse { } elsif ($target eq 'web') { my $partid = $Apache::inputtags::part; 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() ) { my $ans=&Apache::lonxml::get_param('answer',$parstack,$safeeval); if (!$Apache::lonxml::default_homework_loaded) { @@ -510,7 +508,6 @@ sub start_reactionresponse { my $initial=&Apache::lonxml::get_param('initial',$parstack,$safeeval); $result.=''. &Apache::edit::text_arg('Initial Reaction:','initial',$token,40); - $result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); } elsif ($target eq 'modified') { my $constructtag=&Apache::edit::get_new_args($token,$parstack, @@ -584,14 +581,12 @@ sub end_reactionresponse { &Apache::lonhomework::set_bubble_lines(); } } - my $status=$Apache::inputtags::status['-1']; - if (($target eq 'web') && ($Apache::lonhomework::type ne 'exam') && ($status eq 'CAN_ANSWER')) { - my $partid = $Apache::inputtags::part; - my $id = $Apache::inputtags::response['-1']; - my $reaction=$Apache::lonhomework::history{"resource.$partid.$id.submission"}; - $result.=&edit_reaction_button($id,"HWVAL_$id",$reaction); - - } + my $status=$Apache::inputtags::status['-1']; + if (($target eq 'web') && ($Apache::lonhomework::type ne 'exam') && ($status eq 'CAN_ANSWER')) { + my $reaction=$Apache::lonhomework::history{"resource.$partid.$id.submission"}; + if ($reaction eq '') { $reaction=&Apache::lonxml::get_param('initial',$parstack,$safeeval); } + $result.=&edit_reaction_button($id,"HWVAL_$id",$reaction); + } &Apache::response::end_response(); return $result; }