Survey slider answer updates, now update all the answers for max,min,step settings since only the first answers values are used anyways.

This commit is contained in:
Kaleb Murphy 2009-04-23 19:33:10 +00:00
parent f10da67dae
commit a0d41dc5ae
2 changed files with 18 additions and 2 deletions

View file

@ -37,7 +37,7 @@
- Added Survey back button
- fixed #10158: Matrix 2.0 - Screenshots rendering poorly
- administer.js now has a much improved handling of the slider algorithm, plus some refactored code. Users will not notice anything.
- Survey slider answer updates, now update all the answers for max,min,step settings since only the first answers values are used anyways.
7.7.3
- fixed #10094: double explanation in thread help
- rfe #9612: Carousel Wobject (was Widget Wobject) (SDH Consulting Group)

View file

@ -667,16 +667,32 @@ sub update {
}
}
$self->_handleSpecialAnswerUpdates($address,$properties);
# Update $object with all of the data in $properties
while (my ($key, $value) = each %{$properties}) {
if (defined $value) {
$object->{$key} = $value;
}
}
return;
}
sub _handleSpecialAnswerUpdates{
my $self = shift;
my $address = shift;
my $properties = shift;
my $question = $self->question($address);
if($question->{questionType} =~ /^Slider|Multi Slider - Allocate|Dual Slider - Range$/){
for my $answer(@{$self->answers($address)}){
$answer->{max} = $properties->{max};
$answer->{min} = $properties->{min};
$answer->{step} = $properties->{step};
}
}
}
=head2 insertObject ( $object, $address )
Rearrange existing objects in the current data structure.