Giter Site home page Giter Site logo

q10r's Introduction

q10r

q10r is a simple questionnaire web app. It produces questionnaires from JSON files and stores submissions in JSON files under different directory. q10r also provides a page for viewing questionnaire results.

Demo

http://demo:[email protected]/q10r/ <-- list of questionnaires
http://vlevit.org/q10r/texteditor <-- questionnaire "texteditor"
http://demo:[email protected]/q10r/texteditor/results <-- results for questionnaire "texteditor"

Installation

q10r is a Flask blueprint. To install dependencies run

pip install -r requirements.txt

Then create a new application (or embed to the existing one). See example_app.py as for example. Create config similar to example_config.py. It must contain QUESTIONNAIRE_DIR which must point to a directory with questionnaire files and QUESTIONNAIRE_SUBMISSIONS_DIR where submissions will be written. Don't forget to udpate QUESTIONNAIRE_BASIC_AUTH tuple. It is used for authentication to the questionnaire list and results pages.

Usage

Site root provides a list of existing questionnaires with links to forms and results.

Look at questionnaires/texteditor.json for a questionnaire example. Each questionnaire is an object with the following keys:

extends
title
comment
template
submit
questions

With extends you can specify a different json file as a base, it should be prefixed with _ so it will not be considered a stand-alone questionnaire. With template you can specify alternative template. If not specified questionnaire.html is used. questions is a list of objects which represent (surprisingly) questions. Each such object must be one of the following types: string (text), text (textarea), radio and checkbox. radio, checkbox questions must have options. To mark option as "other" field (a field with a text input) prefix it with "+" sign.

You can override q10r templates by creating templates with the same names in your application's template directory or you can specify template option for desired questionnaires.

q10r's People

Contributors

dependabot[bot] avatar vlevit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

q10r's Issues

Modifying the results output page

Is it possible to change the code for the results page so that you get a column per question asked and rows with all answers to that, followed by a percentage (=number of people that answered with that multiple choice question divided by number of people that filled in the questionnaire X 100 ).

So for example: say 10 people filled in the texteditor questionnaire and 7 of those answered emacs, you may get something like this:

What text editor do you use ?
Emacs 70%
Vi 10%
Ed 10%
Other 10%

I am also thinking of not needing users to type in their name, but do require them to have a unique IP per person entering. This way, while the questionnaire can then be anonymous, a same person can't cheat the program by answering the questionnaire several times.

Can you also allow users to type in their country of residence ?

Is it btw possible to automatically detect their country from the IP and block the response if it doesn't match the typed in country, and also allow questionnaires to be answered if the person filling it in is part of a certain country ?
This would then allow questionnaires to be made country-specific and allow counting only those people that are from that country (also important for calculating %).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.