--- loncom/homework/caparesponse/caparesponse.pm 2008/09/08 16:08:37 1.230 +++ loncom/homework/caparesponse/caparesponse.pm 2008/09/12 09:56:10 1.232 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # caparesponse definition # -# $Id: caparesponse.pm,v 1.230 2008/09/08 16:08:37 riegler Exp $ +# $Id: caparesponse.pm,v 1.232 2008/09/12 09:56:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -447,7 +447,7 @@ sub check_submission { use Time::HiRes; my $t0 = [Time::HiRes::gettimeofday()]; my ($result,@msgs) = - &Apache::run::run("&caparesponse_check_list()",$safeeval); + &Apache::run::run("&caparesponse_check_list($tag)",$safeeval); &Apache::lonxml::debug("checking $name $result with $response took ".&Time::HiRes::tv_interval($t0)); &Apache::lonxml::debug('msgs are '.join(':',@msgs)); my ($awards)=split(/:/,$result); @@ -606,8 +606,10 @@ sub end_numericalresponse { } } if (($target eq 'web') && ($tag eq 'formularesponse') - && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER')&& (&Apache::lonxml::get_param('turnoneditor',$parstack,$safeeval) ne 'no')) { + && ($Apache::lonhomework::type ne 'exam') && ($Apache::inputtags::status['-1'] eq 'CAN_ANSWER') + && (&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoneditor') ne 'no')){ $result.=&Apache::response::edit_mathresponse_button($id,"HWVAL_$id"); +#hier } &Apache::response::setup_prior_tries_hash(\&format_prior_response_numerical); @@ -1165,7 +1167,7 @@ sub end_stringresponse { foreach my $name (keys(%answer)) { &Apache::lonxml::debug(" doing $name with ".join(':',@{ $answer{$name}{'answers'} })); ${$safeeval->varglob('LONCAPA::CAPAresponse_answer')}=dclone($answer{$name}); - my ($result, @msgs)=&Apache::run::run("&caparesponse_check_list()",$safeeval); + my ($result, @msgs)=&Apache::run::run("&caparesponse_check_list($$tagstack[-1])",$safeeval); &Apache::lonxml::debug('msgs are'.join(':',@msgs)); my ($awards)=split(/:/,$result); my (@awards) = split(/,/,$awards);