terminal sections now work correctly
This commit is contained in:
parent
36253e8a07
commit
3671e80bea
1 changed files with 9 additions and 3 deletions
|
|
@ -150,14 +150,15 @@ sub recordResponses {
|
||||||
#These were just submitted from the user, so we need to see what and how they were (un)answered.
|
#These were just submitted from the user, so we need to see what and how they were (un)answered.
|
||||||
my $questions = $self->nextQuestions();
|
my $questions = $self->nextQuestions();
|
||||||
my $qAnswered = 1;
|
my $qAnswered = 1;
|
||||||
|
my $sterminal = 0;
|
||||||
my $terminal = 0;
|
my $terminal = 0;
|
||||||
my $terminalUrl;
|
my $terminalUrl;
|
||||||
my $goto;
|
my $goto;
|
||||||
|
|
||||||
#my $section = $self->survey->section([$questions->[0]->{sid}]);
|
my $section = $self->nextSection();#which gets the current section for the just submitted questions. IE, current response pointer has not moved forward for these questions
|
||||||
my $section = $self->currentSection();
|
|
||||||
if ( $section->{terminal} ) {
|
if ( $section->{terminal} ) {
|
||||||
$terminal = 1;
|
$sterminal = 1;
|
||||||
$terminalUrl = $section->{terminalUrl};
|
$terminalUrl = $section->{terminalUrl};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,6 +212,11 @@ sub recordResponses {
|
||||||
else {
|
else {
|
||||||
$terminal = 0;
|
$terminal = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($sterminal and $self->nextSection != $self->currentSection){
|
||||||
|
$terminal = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return [ $terminal, $terminalUrl ];
|
return [ $terminal, $terminalUrl ];
|
||||||
} ## end sub recordResponses
|
} ## end sub recordResponses
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue