The Question module allows (anonymous) users to submit questions to a queue. Administrators can view the queue of submitted questions and optionally respond to them, creating a question/answer node on the site.
A common use for such a module would be to provide an "Ask the Experts" feature where users can ask administrators about various topics. For an example of a site using Question, check out Mac Geekery. Look for the nodes with the blue bar down the side to see what an answered question looks like.
Development of this module was driven by the requirements of a site that had to deal with a large number of questions (> 100,000 per year) submitted from anonymous users. Only a fraction of these questions would be answered, and questions were not to be visible or searchable on the site until after they had been answered.
Based on this requirement, when questions are submitted using Question module, they are *not* initially created as nodes, but saved to a separate table in the database - question_queue. They are therefore kept separate from other content on the site, which reduces the risk of allowing anonymous users to submit malicious data into your main node table or allowing your core tables to grow large and unwieldy.
Setting up the module
- Grant the 'ask questions' permission to one or more roles. Users in these roles will be able to access a new menu item, 'Ask Question', in their navigation menu.
- Grant the 'manage questions' permission to those site users who are going to administer the question queue. Users in these roles will be able to access the question queue via admin/content/question.
- Question managers can either delete questions in the queue or promote them into question nodes, which include both the original submitted question and the answer.
- On the settings page (admin/settings/question), you can choose whether to restrict asking questions to registered users only, set the page to which users should be redirected after submitting a question, and define any instruction text that should appear for users on the question submission form.
The main strength of this approach is also its biggest weakness: since questions are saved as records in a table rather than nodes or other entities, they are not affected by e.g. access modules and they cannot have additional fields added via e.g. CCK or taxonomy module (or just using Drupal core in Drupal 7).
Version 2.x of Question, currently in development for Drupal 6.x and Drupal 7.x, will come with the ability to capture additional fields such as the age, sex, and IP address of the user asking the question.
There are many ways that one can approach developing question/answer functionality in Drupal:
- If you simply want to display content in a question/answer format, such as a list of frequently asked questions, you can do so using the CCK module (or just using Drupal core in Drupal 7) by creating a new node type and attaching separate fields for the question and answer components, and then present a list of those question/answers using Views.
- Alternatively, you might want to check out the Frequently Asked Questions module, which defines a node type and several pre-set lists of question/answer pairs for you. However, note that this module does not create a workflow for answering questions - only a method to present question and answer pairs.