Pierre-Sassoulas / django-survey

A django survey app that can export results as CSV or PDF using your native language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions groups or blocks

maximloginov opened this issue · comments

I want to implement SF-36 Health Survey, some questions in this survey are grouped in blocks, for example, see questions 3-12 in https://rand.org/health-care/surveys_tools/mos/36-item-short-form/survey-instrument.html
This group has a header and the same options for answers. Is it possible to implement this?

Basically, there are two questions:

  1. How to make a group header? e.g "The following items are about activities ... ?" in the example above.
  2. How to arrange the answers into a table?

How to make a group header? e.g "The following items are about activities ... ?" in the example above.

That would be a category to create in django admin

How to arrange the answers into a table?

This would be a new feature.

How to make a group header? e.g "The following items are about activities ... ?" in the example above.
That would be a category to create in django admin

I tried that, but it does not look as a good solution. If I put question in category name, it is formatted as H3 element in view/html, it looks very different from other questions. Category description looks better, but the field in admin interface is too short for question text, therefore I decided its purpose is different. Also, category descrition does not support html tags like <strong> or <em> to emphasize some words in question...

How to arrange the answers into a table?
This would be a new feature.

Right, and to me it looks like answers could be linked to header question, and all other "sub-questions" within the group inherit these answers.

If I try to implement this using https://github.com/Sinkler/django-radiogrid would you include the additional dependency to django-survey? The project seems to be well-maintained and compatible different python/django versions.

btw the issue #123 may be relevant to this one, @gjelsas could you confirm?

If I try to implement this using https://github.com/Sinkler/django-radiogrid would you include the additional dependency to django-survey?

Sure, but let's make it an optional extra_require guarded with conditional in the code and documented in the readme. It's more work at first but I don't want / won't be able to deal with it if the dependency is not maintained anymore (and it seems like a small lib with less than 30 stars).

btw the issue #123 may be relevant to this one, @gjelsas could you confirm?

Yes, Your suggestion would maybe be a way to implement that. Thanks!

@maximloginov , @Pierre-Sassoulas : I'm (also) looking to implement a set of healthcare questionnaires. This radiobutton grouping would be very useful.
So my questions:

  1. @Pierre-Sassoulas is this now implemented in django-survey? (Or do I need to work around this?)
  2. @maximloginov , do you have a working example that you can share/document/show the steps how you implemented it?

I don't think so as this issue is still opened.