recordResponse tests (just a few)

Fix a bug where if a section is terminal, and has no questions, it did not return the terminal flag as true.
A little recordResponse POD.
This commit is contained in:
Colin Kuskie 2008-12-13 03:56:26 +00:00
parent aafd5e5a2e
commit aa04599aec
2 changed files with 36 additions and 3 deletions

View file

@ -297,7 +297,15 @@ sub currentSection {
#-------------------------------------------------------------------
=head2 recordResponses
=head2 recordResponses ($session, $responses)
=head3 $session
A WebGUI session object
=head3 $responses
A hash ref. More news at 6 o'clock.
=cut
@ -337,7 +345,7 @@ sub recordResponses {
#There were no questions in the section just displayed, so increment the lastResponse by one
if ( ref $questions ne 'ARRAY' ) {
$self->lastResponse( $self->lastResponse + 1 );
return [ $terminal, $terminalUrl ];
return [ $sterminal, $terminalUrl ];
}
for my $question (@$questions) {