I want to write a workbook (book module is perfect) with 1-3 questions on each page, that people can go back and see or edit their answers, and I can create views of interesting answers ... think of a self-help workbook.

Here's a bad way I could do it:

  • create a cck type and a block/panel for each and every question, find a way to embed each form in a block, and move them by hand to the correct book-page on the blocks/panels interfaces. If I have 50 questions going on 30 pages, that will move around as the book gets written, this would work but be a nightmare... if I add a new question on page 10 and want to bump pages 10-20 each to the next page, I have to do each page one at a time... probably making changes like this over and over.

The ideal version would, I think:

  1. Let me slide questions around from page to page with a gui, much like you can reorganize a book. And not have 30 or 50 page-specific blocks.
  2. Have one large cck form instead of creating 30 (~one for each page of the workbook), and be able to pick the questions per page.
  3. Expose other peoples answers for 5-star and complex viewing.
  4. Questions are ajaxy with primary questions as checkboxes that reveal secondary questions. (this is probably a separate problem from the overall site design.)

I'd prefer to write the book, and not instead spend my time writing a Drupal module, so off-the-shelf answers preferred but ideas writing a module also ok (would other people use it?)

Some early ideas:

  • Use the book module and place the questions "below" the page they're on -- so I can move them around with book's GUI, then do something fancy [???] to have child-forms display on parent pages. Still means 30-50 cck types. --> I think I'm going to simplify and use questions with comments, one answer per page, for now.
  • Create a module that exposes a form in each book-page entry, to choose it's questions, rather than using 30-50 blocks.
  • Maybe there is a way to play with views to embed form questions on each page without an admin nightmare?

(Drupal 6 also ok)

Thanks for any advice!!!

Comments

zoyobe’s picture

subscribing.

(Interested to see how this goes.)

zirvap’s picture

What about:

  • a nodetype for question (create one node for each question)
  • another nodetype for answer, with nodereference field (part of CCK module in D6, http://drupal.org/project/references for D7) pointing to the question-node it belongs to
  • for page: either use taxonomy (one taxonomy term for each page), or have a third nodetype for page, and a noderef on the question-node pointing to the page-node it belongs to

Then use views to show the pages with questions and answers.

stephen verdant’s picture

Thanks zirvap ...

I thought about nodereferences and like them in general, but they only get half my problem (might solve it for other people's very similar problems, though)
1) asking a question on each page
2) not knowing what I'm doing as the author... I'm not trying to take a finished workbook and move it to Drupal, so questions may jump pages quite a bit. I really want to use the book modules easy ability to slide stuff around while I'm writing.

My current brainstorm is this:
* Use book
* Write a module that grabs the children pages of book pages marked "section" and print them as a section. One [some?] of those children can be a question, which gets a comment form, and floats up near the top of the page. There will also be a link to view all your answers, or everyone's answers to the current question.

I'm wondering if I should use some type of node-comment instead of regular comments (seems like it might be hard to switch after I have content) in order to allow more complex answers like polls.

I've started sketching this module (in D7), co-authors welcome...

Anthony Pero’s picture

I don't see why you wouldn't use nodereference for people's answers. Any content type can be made into a book page. Not just Book content type. And you can still slide the questions around. It will slide the "answers" with it, done the way suggested

Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/