NUBIC / surveyor

A Rails gem that lets you code surveys, questionnaires, quizzes, etc... and add them to your app.
http://nubic.github.com/surveyor
MIT License
750 stars 273 forks source link

Dependencies on answers without reference identifiers #461

Open flockom opened 11 years ago

flockom commented 11 years ago

Currently we have:

q_montypython4 "What... is your quest? (e.g. To seek the Holy Grail)"
    a_1 :string
    dependency :rule => "A"
    condition_A :q_montypython3, "==", {:string_value => "It is 'Arthur', King of the Britons, :answer_reference => "1""}

But if you do:

    condition_A :q_montypython3, "==", {:string_value => "It is 'Arthur', King of the Britons"}

This will not work, but the parser will not complain about it.

The parser should complain and possibly it should be supported when a question has only one answer

flockom commented 11 years ago

see https://github.com/NUBIC/surveyor/blob/a9b68f668da936fbe16fc89448e53c463b867dc0/lib/surveyor/parser.rb#L152