Package: django-cms-saq
This is a Django app that provides some generic building blocks for
creating self-assessment questionnaires using Django CMS (2.4.x).Quick Start(assuming you already have a working Django CMS project)Install django-cms-saq and django-taggit using pippip install django-cms-saq django-taggitAddcms_saqandtaggitto yourINSTALLED_APPSINSTALLED_APPS = ( … ‘taggit’, ‘cms_saq’, … )Addcms_saq.urlsto your urls.pyurlpatterns = patterns(‘’, … url(r’^saq/’,
include(‘cms_saq.urls’), … )The django-cms-saq plugins should now be available to add to your CMS
pages.Available PluginsQuestionsThe core of django-cms-saq is the question plugins. Each question is
uniquely identified by itsslug. Answers to questions are be stored
with references to theirslugand the users that submitted them.There is no formal grouping of questions in the models, so there’s no
concept of aquestionnaire. Questions are merely plugins placed on
pages. Where you need to aggregate answers to questions (eg. for
average/total scores for a series of questions grouped on a page, or in
a section), you can usetags.Question TypesSingle Choice QuestionDisplays a list of radio buttons, from which a user can select a single answer.Multi Choice QuestionDisplays a list of checkboxes, from which a user can selectone or moreanswers.Scores for multi-choice questions will be the sum of the scores for all the chosen answers.Free Text QuestionDisplays a text input box.Free text questions are not scored.
They are simply for collecting information about the user (eg. name / address / company details).Drop-down QuestionDisplays a select box.Grouped Drop-down QuestionDisplays a select box with optgroups.Back / Next ButtonsThis plugin contains the javascript code that submits answers to thecms_saq.views.submitview. This pluginmustbe included on each
page of questions.Sectioned ScoringThis is a simple analysis plugin. It displays aggregate total scores for
questions grouped by tags. Scores are displayed as percentages of the
maximum score available for each group.Progress BarThis simply adds a progress bar to any page that is part of the
questionnaire. It displays the number of answered questions out of the
total available in the entire tree. You can also filter out optional
questions to show progress on required questions only (though this won’t
count answers to optional questions, so might be misleading).Bulk AnswerUseful for ‘skip this section’ type functionality, this allows the
insertion of a button into the page that marks all single-choice
questions with a given answer. It only works on questions where the
given answer value is one of the options and disregards any other user
input.Adding your own analysis – how to access user submissionsEach user submission is stored in acms_saq.models.Submissionobject, which references the user, the question and the answer(s), as
well as containing a score calculated at submission. For some guidance
on creating a plugin to display your own analysis (and how to query
submissions by question tags), take a look at the source code forcms_saq.cms_plugins.SectionedScoringPlugin.Integration with django-lazysignupIf you addSAQ_LAZYSIGNUP=Trueto your settings.py, thecms_saq.views.submitview will use theallow_lazy_userdecorator
from django-lazysignup.Seehttps://github.com/danfairs/django-lazysignupfor more info on lazysignup.