Survey bug fix - showProgress, showTimeLimit and timeLimit should not be

stored at the response level (they are global to asset instance)
This commit is contained in:
Patrick Donelan 2008-12-04 00:52:45 +00:00
parent a2a34e7a80
commit 71c56e1fcc

View file

@ -818,9 +818,9 @@ sub prepareShowSurveyTemplate {
$section->{'questions'} = $questions;
$section->{'questionsAnswered'} = $self->response->{questionsAnswered};
$section->{'totalQuestions'} = @{$self->response->surveyOrder};
$section->{'showProgress'} = $self->response->{showProgress};
$section->{'showTimeLimit'} = $self->response->{showTimeLimit};
$section->{'minutesLeft'} = int((($self->response->{startTime} + (60 * $self->response->{timeLimit})) - time())/60);
$section->{'showProgress'} = $self->get('showProgress');
$section->{'showTimeLimit'} = $self->get('showTimeLimit');
$section->{'minutesLeft'} = int((($self->response->{startTime} + (60 * $self->get('timeLimit'))) - time())/60);
my $out = $self->processTemplate( $section, $self->get("surveyQuestionsId") );
@ -954,9 +954,6 @@ sub getResponseId {
$self->response->createSurveyOrder();
$self->{responseId} = $responseId;
$self->response->{startTime} = $time;
$self->response->{timeLimit} = $self->get("timeLimit");
$self->response->{showProgress} = $self->get("showProgress");
$self->response->{showTimeLimit} = $self->get("showTimeLimit");
$self->saveResponseJSON();
} ## end if ( $haveTaken < $allowedTakes)