Survey sections now have logical section type, which is never shown to the user, only used for silently checking gotos.
This commit is contained in:
parent
e25094a16e
commit
54063ae9f6
5 changed files with 21 additions and 2 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
- added #10145: Global Head Tags in Settings
|
- added #10145: Global Head Tags in Settings
|
||||||
- added packing to templates, snippets, and head tags.
|
- added packing to templates, snippets, and head tags.
|
||||||
- added #9289: Extending the "Request Approval For Version Tag" activity by reversing the test (Bernd Kalbfuß-Zimmermann)
|
- added #9289: Extending the "Request Approval For Version Tag" activity by reversing the test (Bernd Kalbfuß-Zimmermann)
|
||||||
|
- added: Survey sections now have logical section type, which is never shown to the user, only used for silently checking gotos.
|
||||||
|
|
||||||
7.7.4
|
7.7.4
|
||||||
- rfe: Extend DateTime for Week-Nrs (#9151)
|
- rfe: Extend DateTime for Week-Nrs (#9151)
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -439,6 +439,7 @@ sub recordResponses {
|
||||||
# We want to record responses against the "next" response section and questions, since these are
|
# We want to record responses against the "next" response section and questions, since these are
|
||||||
# the items that have just been displayed to the user.
|
# the items that have just been displayed to the user.
|
||||||
my $section = $self->nextResponseSection();
|
my $section = $self->nextResponseSection();
|
||||||
|
|
||||||
my @questions = $self->nextQuestions();
|
my @questions = $self->nextQuestions();
|
||||||
|
|
||||||
#GOTO jumps in the Survey. Order of precedence is Answer, Question, then Section.
|
#GOTO jumps in the Survey. Order of precedence is Answer, Question, then Section.
|
||||||
|
|
@ -461,7 +462,7 @@ sub recordResponses {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Handle empty Section..
|
# Handle empty Section..
|
||||||
if ( !@questions ) {
|
if ( !@questions and !$section->{logical}) {
|
||||||
# No questions to process, so increment lastResponse and return
|
# No questions to process, so increment lastResponse and return
|
||||||
$self->lastResponse( $self->nextResponse );
|
$self->lastResponse( $self->nextResponse );
|
||||||
return [ $sTerminal, $terminalUrl ];
|
return [ $sTerminal, $terminalUrl ];
|
||||||
|
|
@ -556,13 +557,18 @@ sub recordResponses {
|
||||||
|
|
||||||
# If all required responses were given, proceed onwards!
|
# If all required responses were given, proceed onwards!
|
||||||
if ($allRequiredQsAnswered) {
|
if ($allRequiredQsAnswered) {
|
||||||
|
|
||||||
# Move the lastResponse index to the last question answered
|
# Move the lastResponse index to the last question answered
|
||||||
$self->lastResponse( $self->lastResponse + @questions );
|
$self->lastResponse( $self->lastResponse + @questions );
|
||||||
|
|
||||||
# Do any requested branching..
|
# Do any requested branching..
|
||||||
$self->processGoto($goto) if ( defined $goto ); ## no critic
|
$self->processGoto($goto) if ( defined $goto ); ## no critic
|
||||||
$self->processGotoExpression($gotoExpression) if ( defined $gotoExpression ); ## no critic
|
$self->processGotoExpression($gotoExpression) if ( defined $gotoExpression ); ## no critic
|
||||||
|
|
||||||
|
# Handle next logic Section..
|
||||||
|
my $section = $self->nextResponseSection();
|
||||||
|
if($section and $section->{logical}){
|
||||||
|
return $self->recordResponses({});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Required responses were missing, so we don't let the Survey terminate
|
# Required responses were missing, so we don't let the Survey terminate
|
||||||
|
|
|
||||||
|
|
@ -882,6 +882,7 @@ sub newSection {
|
||||||
questionsPerPage => 5,
|
questionsPerPage => 5,
|
||||||
questionsOnSectionPage => 1,
|
questionsOnSectionPage => 1,
|
||||||
randomizeQuestions => 0,
|
randomizeQuestions => 0,
|
||||||
|
logical => 0,
|
||||||
everyPageTitle => 1,
|
everyPageTitle => 1,
|
||||||
everyPageText => 1,
|
everyPageText => 1,
|
||||||
terminal => 0,
|
terminal => 0,
|
||||||
|
|
@ -1222,6 +1223,9 @@ sub validateSurvey{
|
||||||
push @messages, "Section $sNum variable name $var is re-used in $count other place(s).";
|
push @messages, "Section $sNum variable name $var is re-used in $count other place(s).";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($section->{logical} and @{$self->questions([$s])} > 0){
|
||||||
|
push @messages, "Section $sNum is a logical section with questions. Those questions will never be shown.";
|
||||||
|
}
|
||||||
|
|
||||||
#step through each question validating it.
|
#step through each question validating it.
|
||||||
my $questions = $self->questions([$s]);
|
my $questions = $self->questions([$s]);
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,14 @@ our $I18N = {
|
||||||
message => q|Continue|,
|
message => q|Continue|,
|
||||||
lastUpdated => 1224686319
|
lastUpdated => 1224686319
|
||||||
},
|
},
|
||||||
|
'logical section' => {
|
||||||
|
message => q|Logical Section|,
|
||||||
|
lastUpdated => 1224686319
|
||||||
|
},
|
||||||
|
'logical section help' => {
|
||||||
|
message => q|A logical section, or its questions, are never shown. They are used to silently execute jump commands.|,
|
||||||
|
lastUpdated => 1224686319
|
||||||
|
},
|
||||||
'add section' => {
|
'add section' => {
|
||||||
message => q|Add Section|,
|
message => q|Add Section|,
|
||||||
lastUpdated => 1224686319
|
lastUpdated => 1224686319
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue