QSurvey - 0.22
It's a ZClasses thingy to make multi-page surveys or quizzes. Almost, but not entirely unlike Martijn Faassen's python-class-based ZFormulator.
It will automatically create a "RESULTS" folder and save the results of submission into the ZODB.
It is currently broken after the 2.1.7/Hotfix. I will try to come up with a solution soon.
There is a wiki page about QSurvey in the zope-edu Wiki. Zope.org members may now give me persistent! feedback about QSurvey.
The product is designed to make on-line surveys easy to write. Instead of having first to develop the backend for the storage, then adapt the questions to the storage available, this product allows you to concentrate on the survey and its questions. Zope takes care of the storage.
The new page-centric model with optional branching determines at run-time which page to display next.
If you need more than simply questions, you may include DTML Document material interspersed with your questions. This means that Images and other content are allowed inside a QPage.
QSurvey is an almost complete rewrite of the previous thing. It features:
- A page-oriented model, with the QSurvey holding QPages, and QPages holding DTML Documents and Questions.
- Multi-page interaction is possible with branching dependent on the values of a multiple-choice question.
- All Multiple-Choice are a single type. Select listbox, radio, checkbox, formatting from a single "options" tab.
- Ordering of things within a page from a management tab in the QPage object.
- Now uses css instead of tables. Looks very nice in IE4+, Mozilla. Acceptable on NS4. Degrades nicely for Lynx.
- Pays attention to AUTHENTICATED_USER for results ID creation
- Still does no validation.
- Some hooks do nothing yet
- Still no nice views of the RESULTS
- Still too much global Add-list pollution (4 items: QSurvey, QPage, TextQuestion, MultipleChoiceQuestion)
- Each page writes to the ZODB when submitted. This may increase your need to pack the ZODB.
Installation: Delete the old Survey Product if you still have it! Import QSurvey.zexp into your Control_Panel/Products folder.
Usage:Create a QSurvey. Within the Qsurvey, create a QPage. Within the QPage, add questions. Within each question, enter the text for the question and the choices if it is a multiple-choice question. Set options on each question from the "Options" management tab.
"View" or index_html from the QSurvey level actually writes to the ZODB when submitted; "View" from QPage or "Question" level will dump REQUEST when submitted.
Quick Notes: css is in Control_Panel / Products / QSurvey / QSurveyClass. Move it out of there into a QSurvey object if you want to change formatting for one QSurvey, or edit in-place to change for all.
QPages, MultipleChoiceQuestions, and TextQuestions will not work outside a QSurvey. I will move them off the global add list as soon as I figure out how.
This is posted, not as a finished product, but as a framework to start with (plus, it's off-location storage!). Assistance and commentary in the form of code is graciously accepted. It is getting cooler and more useful now. Please help me make this product do everything it should.
Does anyone have any ideas for icons for these ZClasses?