The Q&A feature is inspired by Quora, Stackexchange and other Q&A applications out there.

  • As a user, I can create a question or write an answer
  • As a user, I can vote an answer up or down
  • As a user, I can comment on answers
  • Comments appear hidden initially. You have to click to see the comments.
  • The list of questions and 'add question' will probably look very similar to listing page for the Ideation feature, but with the addition of displaying the # of answers: #1392756: Create ideation feature (designs attached). I can provide a comp if needed.

Feedback on this design would be appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Category: task » feature
ay13’s picture

attached patch is for the theme only.

requires:

Commons Answers (currently in sandbox):
http://drupal.org/sandbox/ezrag/1398922

vote up down widget (currently in a patch):
http://drupal.org/node/1016804#comment-5463316

ay13’s picture

attached patch is for the theme only (new origins theme).

requires:

Commons Answers (currently in sandbox):
http://drupal.org/sandbox/ezrag/1398922

vote up down widget (currently in a patch):
http://drupal.org/node/1016804#comment-5463316

ezra-g’s picture

Version: » 6.x-2.x-dev
Status: Needs review » Needs work

This is coming along nicely in the Commons_answers sandbox. I'll move that development as well as the theme development by ay13 into a feature branch of the Commons project to facilitate easier testing.

It would be great to see the following revisions:

- In the "Questions in this group" view - Change post date to a time specific format.
- List 0 answers in group listing instead of hiding the field when empty
- Question content type: Alter the content type export to make the title/body fields Question/Additional information
- Comments on answers should be enabled by default (override content type export)
- Add pathauto config - suggested pattern: question/[title-raw]

- Permissions for authenticated users are missing:
-- VUD perms
-- view field answer count

- Answer count should use format_plural (node-question.tpl.php)
- group_tab_questions isn't defined for some reason. Likely solution: add it to the feature through the UI and re-export.
- In the event that answer nodes are displayed individually (such as when the user clicks the answer title from the activity stream), display "This is a response to [link to question page]". This is probably a matter of displaying the field_answer_question output, and possibly overriding the exact text.

- Display (disabled) vote widget when logged out

Theme:
- Display only the question in search results: https://skitch.com/ezra-g/g4en2/search-results-for-our-community-commons...
- Awkward # of comments, themeing: https://skitch.com/ezra-g/g4efb/where-can-i-go-for-lunch-commons-2.4-dev
- Add a timestamp that is a permalink to each answer within the Question page
- "Add answer" button should have new primary style
- Display "login or register to vote" call to action for anonymous users viewing a question/answer

juan_g’s picture

Title: Create Add a question and answers (Q&A) feature to Commons » Create/Add a question and answers (Q&A) feature to Commons

For possible ideas to consider in the design of this really interesting new Commons Answers feature, there are other Drupal Q&A projects that have been discussed in Another possibility: Answers module (discussion from the Support Infrastructure group):

ezra-g’s picture

Title: Create/Add a question and answers (Q&A) feature to Commons » Create Add a question and answers (Q&A) feature to Commons

There's now a full feature branch of Commons containing Commons_answers, dependencies, and the theme changes at the Commons Answers sandbox. ay13 and laurentc both have commit access to this branch. To facilitate easier collaboration, let's proceed by committing directly this branch.

Also, here's a suggested format for the timestamp/permalink: https://skitch.com/lisarex/g4ew8/qanda-w-timestamp

ezra-g’s picture

Thanks so much for the architecture suggestion, @juan_g! We are already building Commons_Answers on-top of the Answers module as you suggest :).

Great to see you in the queue and feel free to join us in IRC at #drupal-commons :D!

juan_g’s picture

We are already building Commons_Answers on-top of the Answers module

That's great. Answers and most of its supporting modules have D6 and D7 versions, so this is good for a next Commons for Drupal 7 (hopefully soon). ;)

ezra-g’s picture

We've implemented most of the fixes from #4.

Here are some more tweaks ;):

Theme:
- Text other than the answer (permalink and author) should be less highlighted because the answer is more important
- Remove itals from "comment, 1 comment"

General:
- After submitting the answer, redirect the user to the anchor to the submitted answer (and remove the confirmation prompt)
- Change questions to Q&A in the nav
- Main answers view needs 0, timestamp
- add a question => ask a question
- activity stream messages should either list, "Added the answer [answer] to the question [question]" or "Jane smith answered the question [question]" (and anchor to the answer within the question page)
- Text change next to # answers, *Login or Register to Vote/Answer *

lightsurge’s picture

One thought I had about this feature...

It would be handy if relevant questions were flagged up in the streams of related experts, and not just because those experts belong to the groups in which the question is posted. I think in general a 'question/answer' scenario is more likely first-most to be a site-wide appeal, rather than being group-centric?

If for example Commons were being used in an academic environment, and a slightly lost student asked the question "Where can I find the reading list for year 2 Media Studies?", and they either tag that question with terms 'Year 2'/'Media Studies' or have it tagged automatically with something like Calais... then that post would be logged in the stream of administrators/tutors/fellow students etc who have tagged themselves with those terms.

lightsurge’s picture

My question there isn't a very good example, but I'm sure that there would be a lot of questions a user wouldn't know where to 'place', and Commons could do some of the work in identifying whom the question might be relevant to - rather than expecting the user to direct the question appropriately or the experts to be constantly rummaging through an epic unanswered list of lost questions.

ezra-g’s picture

Title: Create Add a question and answers (Q&A) feature to Commons » question and answers (Q&A) feature & Origins theme tweaks
Status: Needs work » Fixed

@lightsurge - These are awesome suggestions! Please file as a separate issue so that it doesn't get lost once the initial feature gets committed :).

A lot of work has happened at #1369676: Proposed theme changes to Origins that's related to Q+A. Originally we'd separated these issues into 2 branches but ultimately they converged in the sandbox mentioned earlier in this thread. As a result, we've combined the Origins changes and the Q+A feature into a single commit.

The sandbox code has been peer-reviewed extensively by myself and laurentc, and we feel good about committing this to dev for further functional testing in the nightly snapshot releases.

Great work, laurentc and ay13!
This is committed. http://drupalcode.org/project/commons.git/commit/64513ef

ezra-g’s picture

juan_g’s picture

Congrats! Q&A functionality is a really good addition to Commons for user support.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

fix link to other issue