Fixed hasTimeLimit to work with the new storage location of the time limit.

This commit is contained in:
Kaleb Murphy 2008-12-05 21:43:15 +00:00
parent 0768af119f
commit 4d1f311c42
2 changed files with 3 additions and 2 deletions

View file

@ -718,7 +718,7 @@ sub www_loadQuestions {
$self->session->log->debug('No responseId, surveyEnd'); $self->session->log->debug('No responseId, surveyEnd');
return $self->surveyEnd(); return $self->surveyEnd();
} }
if($self->response->hasTimedOut()){ if($self->response->hasTimedOut($self->get('timeLimit'))){
$self->session->log->debug('Response hasTimedOut, surveyEnd'); $self->session->log->debug('Response hasTimedOut, surveyEnd');
return $self->surveyEnd(); return $self->surveyEnd();
} }

View file

@ -91,7 +91,8 @@ sub freeze {
sub hasTimedOut{ sub hasTimedOut{
my $self=shift; my $self=shift;
return 1 if($self->{startTime} + ($self->{timeLimit} * 60) < time() and $self->{timeLimit} > 0); my $limit = shift;
return 1 if($self->{startTime} + ($limit * 60) < time() and $limit > 0);
return 0; return 0;
} }