NUBIC/nu_surveyor — pull request #104 by jdzak (2013-02-06 04:24:01+00:00)
Title: Dependency graph is overwritten in some scenarios

The dependency graph is being overwritten when a question (within a group) has two conditions that reference the same question.

In the scenario below, both "What is his name?" and "How old is he?" should show when "Do you own a dog?" is "Yes". Only "How old is he?" is shows though because the dependency graph is overwritten.

survey "Double Dependency" do
section "One" do
group "" do
q_dog "Do you own a dog?", :pick => :one
a_yes "Yes"
a_no "No"

q "What is his name?"
a :string
dependency :rule=>"A"
condition_A :q_dog, "==", :a_yes

q "How old is he?"
a :integer
dependency :rule=>"A and B"
condition_A :q_dog, "count>0"
condition_B :q_dog, "!=", :a_no
end
end
end