Made Survey use question default score if answer score undefined,

updated hoverHelp
This commit is contained in:
Patrick Donelan 2009-04-09 05:38:49 +00:00
parent f1f40bc129
commit aa7a20b4f2
3 changed files with 10 additions and 7 deletions

View file

@ -781,8 +781,11 @@ sub responseScoresByVariableName {
# Grab the corresponding answer
my $answer = $self->survey->answer([@address]);
# Use question score if answer score undefined
my $score = (exists $answer->{value} && length $answer->{value} > 0) ? $answer->{value} : $question->{value};
# Add variable => score to our hash
$lookup{$question->{variable}} = $answer->{value};
$lookup{$question->{variable}} = $score;
}
# Add section score totals