Has anyone used PHPR/ASPR for user/customer profiling, online surveys, questionnaires or tests?
Here is what I've been thinking so far. Anyone interested have a look at http://en.wikipedia.org/wiki/LimeSurvey
What I am looking at is a DB containing multiple surveys/tests, many conditional questions, and multiple response types for each question such as radio buttons, check boxes, dropdown menu, plus open ended questions (text). The closed answers given will determine what other questions are asked. The users/respondents can stop and resume their progress at a later time. The users/respondents can self-register and will always enter preliminary data. Then depending on how they respond to the first set of questions, they'll have the options of getting more focused sets of questions. If they know more about dogs than cats, then they'll get questions favouring dogs. The sets of questions are probably presented in an designed order. The user/respondent is by default presented with the next set of unanswered questions, but they can go back to a prior set and change their answers, possibly leading to a new set of subsequent questions. The responses collected so far can always be harvested, even if the full set of questions/answers has yet to be captured.
So all the questions and answers are in the DB of course, and all the survey rules too. The custom scripting just makes the survey engine go, independent of actual surveys. The question table includes the text, and the answer type (radio button, checkboxes, etc), and the multiple choice text labels (if closed question). Once the engine and database has been designed, then no regeneration of the scripts is required to build surveys/tests, just table data entry. The questionaire/test designers have a special privledge to allow them to maintain the tests and questions, enter the logic for dependencies, harvest the responses.
The answers given will give the respondent a dynamic tree to traverse. If they go back and change a prior answer, the tree may adjust accordingly. The set of responses will be collected for each respondent. They can be exported in XML or something, into an analysis programme. But lets differ that for now. I just want to focus on the collection side, or front end.
So specifically first, how to dynamically create the controls, and then how to store the responses? The questionaire will be broken up into subsets or pages, maybe 3-10 questions per set, small manageable chunks. Then once a set is saved, the answers used to determine what the next subset of questions is. As a refinement, maybe individual questions on a given page can also be conditional, but I'd start just making the sets as a whole conditional to make it easier to get going, initially keeping the coding as HTML and PHP.
So I'd guess we'd be dynamically constructing the HTML on each page recursively (maybe some javascript too). Then once the page is posted back, grab the answers and store them, work with the rules/directives to pick the next set.
From a overall design POV, does using PHPR give us any advantage? Although this is clearly a DB application, would it be just be easier to code this up from scratch? Or split it into PHPR for entering the questions and rules, and then coding up the survey engine separately? Any thoughts? The reason I ask is that there must be thousands of questionnaries/tests created each year around the world, lots of people who've been here before :)