fix: survey in response driven mode sometimes won't terminate correctly

This commit is contained in:
Graham Knop 2007-05-22 21:47:13 +00:00
parent c4ac66ce09
commit 14e951863c
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@
http://www.plainblack.com/bugs/tracker/webgui-hangs-on-package-export
- fix: spectre fails on Admin.pm because of env_proxy
http://www.plainblack.com/bugs/tracker/spectre-fails-on-admin.pm-because-of-env_proxy
- fix: survey in response driven mode sometimes won't terminate correctly
7.3.17

View file

@ -485,7 +485,7 @@ sub getResponseDrivenQuestionIds {
($questionId) = $self->session->db->quickArray("select gotoQuestion from Survey_question where
Survey_questionId=".$self->session->db->quote($previousResponse->{Survey_questionId}));
}
unless ($questionId) { # terminate survey
if (!$questionId || $questionId eq '-1') { # terminate survey
$self->completeResponse($responseId);
return ();
}
@ -689,8 +689,8 @@ sub view {
if ($var->{'questions.soFar.count'} > 0) {
$var->{'questions.correct.percent'} = round(($var->{'questions.correct.count'}/$var->{'questions.soFar.count'})*100)
}
$var->{'response.isComplete'} = $self->responseIsComplete($var->{'response.Id'});
$var->{question_loop} = $self->getQuestionsLoop($var->{'response.Id'});
$var->{'response.isComplete'} = $self->responseIsComplete($var->{'response.Id'});
}
}
$var->{'form.header'} = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl})