Code Monkey home page Code Monkey logo

aw-datacollection's People

Contributors

nunoveloso avatar olafveerman avatar ricardoduplos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aw-datacollection's Issues

Improve save method on models

Models are responsible for saving entities to the database. Every time a new field is added to an entity, the save method in the model needs to be updated.

Ideally there would be a way to generalize this, maybe using public fields as fields that go in the database,.

LocalStorage security issues

Having data stored in the browser poses security issues.
A user that gets access to the computer can change the data stored in the local storage.

Call status

As a cc operator starting a survey him/her should be presented with:

  • A number to call;
  • The text the operator has to read. (introduction)
  • Option to cancel collection.
  • Option to start actual collection.

When cancelling a collection the cc operator should be prompted with:

  • The reason why stopping (pre-defined set of options)
  • Explanatory message (when needed)

When starting collection the user should be presented with:

  • The enketo form.

Draft submissions - enketo

Scenario:
A callcenter operator is filling a big form and the call drops when he's almost finished.

Should he be able to save it as a draft and continue later on, or just discard the data.

Integrate enketo for testrun

When a survey has a xml file a button to perform a test run should be shown.
The user should be presented with a form equal to the final one, but upon click on the submission button, only the validation should run.

Pyxform

Two changes are needed in pyxform.

  • validate=True => validate=False [xls2xform.py - line 22]
  • from pyxform import constants => import constants [survey.py - line 13]

We should consider forking pyxform and update it when needed.

Debug why sendmail isn't working

Vagrant box didn't have the required OS packages and configs for this. Not sure if it solves the code igniter part of it, but we can now send emails via OS.

Steps to be replicated vagrant config:

$ sudo apt-get install coreutils mailutils sendmail 
$ sudo sendmailconfig

Test with:

$ echo "This will go into the body of the mail." | mail -s "Hello world" [email protected]

Password security

Right now the password is being hashed with sha1().
There are rainbow tables for these functions and we can not assume users will use safe passwords.

Implement passwords hashing with salt and a cost factor.

Lengths

Right now, fields have no minimum length set.

User password, for example, should have a minimum length.

Users - Change profile data

  • Users should be able to change their own profile data. (Except username and email)
  • Admin can change data for all users (Except username and email)

Enketo-core as submodule

To be able to quickly test, modify and share a working version, the enketo library was added to the project just by copying files.

This library should be used as a git submodule.

Users

Create the users entity and some fixture data

Introductory text.

The text presented to the cc operator when collecting data should be set per survey, when creating/editing the survey.

Roles

Extend Users Roles.

  • roles admin
  • extend fixtures

Full offline support.

A callcenter operator will be able to continue to collect data even if the connection drops (Given that he has enough number to call stored.)

However if he navigates away from the page he won't be able to come back. The page will not be available offline.

Do we really need that?
The callcenter operator will only be assigned a limited amount of numbers so, even if we have offline support, he will only be able to submit data until the numbers run out.

LocalStorage data and user change

A user (A), without connection, submits data and goes away.
The data is stored in the browser's localstorage.

The next day, another user (B) logs in the same computer and does data collection. The data from the previous user (A) should not be lost.

Right now an error will be thrown because the user (B) submitting the data collected by the user (A) is not assigned to that call task.

Option 1
Do not submit the data and store it in the browser until the other user (A) comes back.

Option 2
Store in the browser the id of the user (A) that collected the data. When the data is submitted, check if who collected is assigned to that call task. Several changes needed (Ex: author of call task status)

Every option has significant security flaws. Since the data is stored in the browser whoever gets access to the browser can change the data.

Notify user

There should be an option to notify an user when his account is created.

Add logging

Add some logging throughout the code, for critical operation:

  • success / info / status / notice
  • warning
    -failure / error

This should be able to be controlled enabled at the following levels:

  • all: saves all logs
  • no-notices: only warnings and errors
  • errors-only
  • none

Email config

Related with #31

Move email settings (admin email and name) to a config file

Enketo for single collection

Implement single data collection.
This data collection will be started from the call activity page and will be used for one respondent at a time.

Enketo offline.

Follow up from #8

Full offline support is not needed. Instead ask for confirmation when the user is leaving the page and the connection is down.

Status restriction

Several tasks depend on survey statuses.

  • Discuss/document status implications (with @olafveerman)
  • Implement status restrictions, (need thorough testing).

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.