Todo ==== * Check that question codes are unique. Are we going to create the node server for this? This will allow auth, more rest-like search, server side validation * Check that answers are saved correctly. Answers to multi-item questions (like scales) are stored in an object now with index as keys. This is not symmetrical with the fact that the configuration is an array. * Export answers for a survey run * Revive json schema checks for our data. Questions don't pass the schema at the moment. * Fragile: widget creation relies on the names in Factory, but these must match the types returned by the actual widgets. Fix this. * Write a spec for the codes. * Don't allow Save in Question unless all question items are done editing. * Use node as a server, adopt the layout described in http://dojotoolkit.org/documentation/tutorials/1.8/node/ This will require quite a lot of moving and creating a rest interface -> can be just a proxy to CouchDB in he beginning. Checklist ========= * Form validation (use tooltips!) * Input validation & escaping - E.g. texts and labels of ScaleWidget are directly put in innerHTML, I don't think TextBox does any escaping. * Output escaping * Widget life-cycle buildRendering -> widgets in code before set attributes postCreate -> after all inits, but before in DOM startup -> after insertion in DOM? * Review current JSON formats, do they allow for extension or extra meta-data? Open issues =========== * Do different inputs in one question get different codes? E.g. in To ease exporting into other programs and easy communication, the codes are important I think. It should be easy to pronounce, and easy to find in the tool (people might get a dataset and not know where it came from). * What if a question is included in a survey multiple times. Use block or allow a pre/post-fix on the code to differentiate it. Should not be too much work, so if an scale with 5 items has 5 codes, you should be able to set a prefix on all of them at once.