Survey module

Events happening in the community are now at Drupal community events on www.drupal.org.
chris_p's picture

Hi Quiz Developers,

I've been looking into the possibility of using Drupal to host surveys for Market and Social Research projects, similar to apps such as Limesurvey, SurveyWriter and ConfirmIT. Quiz seems to be the module that is closest to what I need however it does lack some necessary functions. These are (in no particular order):

  • Grid questions (eg. "Please indicated one the scale below how much you agree or disagree with the following statements")
  • Skips (the ability to route users to different questions based upon their responses to previous questions)
  • Loops (repeating a question or group of questions)
  • Filtering the list of possible answers based upon the responses to previous questions
  • Randomizing or rotating the order the answers are displayed
  • Associating a specific number ('code') with each possible answer
  • Customizable validation of answers
  • "text piping" - copying the answers to a question into the text of a subsequent question
  • "Other/specify" text response as a possible answer for Multi-choice questions

Note that a number of these presuppose a non-random question ordering.

This would be a significant departure from the main purpose of your module so I assume I would have to create my own fork of Quiz an add them in myself - I'm an experienced programmer but new to PHP and Drupal. What are you thoughts, if any, on this?

Comments

Sorry, I made a mistake, I

Feral's picture

Sorry, I made a mistake, I posted to the wrong place.

Webform

HylkeVDS's picture

I've just looked into this today, as I need evaluation forms for my education, as WebForm seems to be an option: http://drupal.org/project/webform

Webform

chris_p's picture

Hi Hylke,

Thanks yes I have had a look at webform and in fact have set up a simple survey on my test server using it. Again as with quiz it has limitations and also requires a bit too much fiddling around to be useful in the market/social research industry.

I think quiz would be a good basis for a survey module. At the moment I looking through the code trying to understand how it all works.

Survey Module

noels's picture

Hi Chris

I think what you are looking for is a survey which supports Likert responses. I have just written such a module, but it's related quite strongly to the work I am doing for a client.

I think that there could be some scope to write something similar, which would be useful in a more general way. Currently the module I've written allows the user to set up "surveys" and attach statements to the survey. A vocabulary is associated with the survey, and each statement is tagged with a term from the vocabulary. The vocabulary serves to divide the statements into "sections".

Once the user has set up the survey, and published it, other users are able to enter a Likert choice as to how strongly they agree or disagree with the statement. Each survey section is handled as a multi-step form, and at the end of the survey, the results are stored in the database.

The responses are stored in a "response session" (to allow a user to complete the survey at different times), which is attached to the survey. The responses are then used to generate a query based on taxonomy terms associated with the survey and statement, and this is used to surface content intended to be relevant to the individual.

I'm not sure of how much of this applies to your use-case, but I would be interested to know if this is something that other people may find useful. What are your particular requirements for the results of the survey? Reporting?

Noel

Survey Module

chris_p's picture

Hi Noel,

Your work definitely sounds like something that may be useful too me, particularly in relation to the first dot point on my original post. I envisage the "Grid Question" to be able to be used to present a Likert Scale amongst other things. The user who creates the survey would define scale and statement lists of arbitrary length, and indicate if multiple responses are allowed for each statement - the scale would be listed either along the top (default) or side of the grid with the statements along the other axis.

What I am trying to create is purely a data collection tool. The end product will be a data file that can be downloaded from the Drupal site and imported into a stats package such as SPSS or SAS. I guess online reporting and analysis could be something to be added in the future however this is more than enough for me to work on for now.

This is not a commercial project as such, more personal interest for me to expand my skill set and perhaps create something that is less frustrating to use than the online survey software I've encountered in the past.

CP.

Survey Module

HylkeVDS's picture

That sounds really useful. I could use something like that as well.

Other question types like open answer can always be added later...

Quiz 4

vegardjo's picture

Hia all, just so you know: Quiz 4 will include a new "scale" question type, which is what you refer to as grid or likert questions above. You can add your own presets or use one of the predefined. Quiz also includes open answers, and will give you statistics on everything, so I believe it will solve most survey use cases.

Grouping questions?

HylkeVDS's picture

Can quiz 4 group a set of questions on a single page? For a survey that's a must, as people will quickly become annoyed if they have to answer every question on it's own page, and that would thus influence the results of the survey...

Not yet

vegardjo's picture

Not yet I'm afraid. There's been an issue for having all questions on one page for a long time: http://drupal.org/node/286626 but this is not resolved yet. The focus now is to get a 4.0 release published, and you can see the progress on that in the comments here: http://groups.drupal.org/node/24066

I imagine this issue will be revisited some time after that.

Scope creep

HylkeVDS's picture

I also think we/you should be careful not to add too much "features" to Quiz and cause it to lose focus. While there are many similarities between a quiz and a questionnaire, their purpose and scope is probably different enough to warrant separate modules and we should not try to shoehorn questionnaire functionality into quiz.

That said, there is probably quite some code that can be shared between the two projects.

True

vegardjo's picture

Very true, but atleast this very specific issue (show all / group / single questions) is not unique for surveys, and we will eventually need it in quiz as well! However, I have only made relatively simple surveys before, where tools like Quiz have been sufficient, and not big ones that are outlined in this thread :)

Re: Scope Creep

noels's picture

I agree that scope creep is probably not a good idea for any project. I agree with your assertion that the questionnaire functionality is different than the intention of Quiz, and probably warrants another module. I also think that while you could feasibly add the discussed functionality into quiz, it would result in a less maintainable Quiz module with added complexity and all the disadvantages that brings with it.

If there is support for it, I would like to see a module which functions primarily at a Survey/Questionnaire to collect data from users. From my point of view, I would like use the data gathered to surface content based on a taxonomic query that is built from the user's responses to Questions/Statements which are themselves tagged with taxonomic terms. I envision this functionality being realised in a separate dependent module.

There is probably a large amount of functionality that could be reused from the Quiz module. Unless someone can point me at some information they have already compiled, I will have a look over the architecture of Quiz, to determine how the Quiz code could be leveraged to realise a separate Survey module.

Check Out The Multistep Module

packetbrain's picture

I am using multistep module to do many of the things you require... (for me) its a little better than webform because it stores its data in the DB - which can then be retrieved and displayed with results computations, etc using Views and Views Calc.

The randomization, routing/skip, and loops you would have to tinker with the module to do... but probably easy to do that with the "step" function built into it.

Best of luck...

Ken

Sign up for a userID to see quiz module in action at:

http://www.packetbrain.com - Cisco training

Survey Module

chris_p's picture

Thank you for all the feedback! Noel and Hylke - we are all thinking along the same lines I suspect, but possibly want to do different things with the data once it has been collected. Perhaps we could get together to work on a project to create a survey module?

I've just had a look at this:
http://drupal.org/node/446858
Which seems to indicate that the Quiz devs are moving away from doing this sort of thing themselves. Understandable, as I think evaluating academic performance is different enough from getting a personality profile or measuring respondents brand awareness or whatever. In a perfect world I think we would have a base module that provides the common functionality of a quiz and a survey, but then implement the specifics of each in separate modules.

I'll have a look at the multistep module tomorrow I think it might be quite good. However one things I like about quiz is the scoring of essay/short answer questions which I think could be turned into a online "coding" aspect of a survey module (providing numeric codes for what I would call "verbatim" or "open ended" questions).

I evaluated the multistep

noels's picture

I evaluated the multistep module, however rejected it as it would require all of the statements to be pre-defined in a content type. The multistep module lets you break the creation of a node into multiple steps based on the field group (one set of fields in a group per step). If you used this module, you would need to create a new content type for each survey.

I agree that you could adapt the concepts used in the Quiz module to a new survey module where the specific behaviours could be abstracted to a separate module. It may even be possible to reuse some of components of Quiz (e.g. the question types) in a new module. In effect the new module would allow a different "controller" for the contained questions/statements. One could also implement different navigational strategies in a pluggable way (by for example implementing a sequential navigation strategy and a random or rule based navigation strategy). This is a textbook example of implementing a strategy pattern.

I think the first step in creating a project around this would be to define the requirements, and work out if our (perhaps differing) goals could be best met by implementing a new project or if it would be better to extend existing functionality of Quiz.

Requirements

chris_p's picture

Well Noel your a brave man to want to read any doco I've written! But joking aside I think I can throw something together in terms of business requirements.

Interesting to think I was drawn to Drupal because I liked the idea of using what others have created to enhance what I wanted to do. For instance giving the user creating the survey the ability to upload a video (stimulus) into the survey using one of the video upload modules by including the appropriate node within the survey. However when I found quiz it seemed so close to what I otherwise wanted, even though it didn't do that (As far as I know), that I thought I would just play around with the quiz code - which would be a good learning experience as well given that this is all very new to me.

With respect to navigation strategies I don't really see it as an either/or situation. It would be good to be able to randomize a section of the survey - and even have sections which themselves are randomized (ie. as a quiz is a collection of questions, so to have a node within the survey which is also a collection of questions which can be randomly presented or sequentially with flow control).

Hmm hope this makes sense.

Anyway I shall endeavor to produce some concrete doco in the next week or so.

Requirements

chris_p's picture

OK Here it is, a bit rough and some of the detail is lacking but you should be able to get an idea of what I want to achieve.

It looks very thorough.

noels's picture

IEEE 830 1998... Nice work Chris. Looks like a very comprehensive document, detailing some really useful functionality. I will need to go through it in some more detail, and will be in touch.

Noel

Subscribing to this... What

deleuje's picture

Subscribing to this...

What are you guys up to by the way?
Is there another gathering point for this discussion?

I am going all around drupal.org trying to find traces...

time...a valuable commodity

chris_p's picture

Hi deleuje,

I haven't had a lot of time lately to work on this lately, mainly due to work commitments (as in I now have some paid employment). It will be a completely separate module from quiz and I will open a new project for it as soon as I've got what little code I've written so far into a state that is suitable for other people to see.

I'm not sure what has happened to Noel - I can only assume he suffered some sort of lovecraftian descent into insanity as a result of reading my software specification :)

Chris.

I'm still around...

noels's picture

I've been very busy. The Organisation I was working for scuppered the project I was working on that needed this module to focus on other projects in the business. The spec looked very well written, but as the company no longer need the module, I would only be able to help in my spare time (of which I currently have none). I only wish I had more time to help on this project, but wish you all the best of luck implementing it.

Noel

Thank you Noel, I was a bit

chris_p's picture

Thank you Noel, I was a bit unsure about the specification as it is the first one I've done that wasn't just for my own use.

All the best,
Chris.

functioning survey module in sandbox

chris_p's picture

Hello Quiz Group,

Firstly sorry it has taken so long to get to this stage but I have finally got a functioning version of my survey module in the git sandbox! I've called it deepsurvey as there is a defunct module already called survey. Here it is:
http://drupal.org/sandbox/chris_p/1136296

It is still a bit rough, for example the formatting of the questions needs some work, and there is still a lot of functionality yet to be implement from my original grandiose ideas. However you can create and publish a survey, and download a csv file of the resulting data.

Chris

randomised loops

YoS's picture

It sounds nice for me to hear quizzes or survey forms that allow presenting trials or each question in randomised loops.
As for a survey module, I should like to welcome a function that does not require correct answers.
If it is possible, I should like to have a module that allows an audio recording function for survey takers to record.

Some survey types require much controlled survey participants. In this case, I think there should be a couple techniques or strategies.

Quiz

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week