== Introduction == We want to create a flexible Canvassing/surveying tool for SandyRelief. The proposed Survey module enhancements will also possibly improve the IFRC deployment. == Features == 1. Flexibility: Right now, the Survey module relies on importing a pre-created "Assessment" template .csv. We want the Super User/ Admin to be able to edit the question list of survey templates - add, delete and modify questions - through a web UI. a. This may create problems when the Super User tries to edit templates active and currently in use (if there is a survey series made from the template) 2. Productivity/ Usability: Providing better filtering features, progress workflows for satisfying needs, and Geocoding, similar to the current Assess module. 3. Consistency: "Assessment" may be confused with the new "Assess" module. I would like to keep the user interface consistently using the term "Survey," which more appropriately implies surveying land/disasters (building canvassing) or surveying user experiences. In addition, all data tables and methods currently use the word "Survey" rather than "Assessment", so it seems better to use "Survey." == Users/ Stakeholders == - Sandy Relief and Occupy Sandy - currently Occupy Sandy uses the Assess module to keep track of building canvassing. But Survey has more potential for flexibility. Assess needs a programmer to change the questions in the code. Survey currently allows the end user to import a .csv file of questions - Survey may end up helping the IFRC create and make use of disaster surveys. == Design == To keep the UI simple, no way for editing the survey sections will be provided. All questions created through the WebUI will default to "Section 1" (section_id in the survey_question_list table will = 1). '''Wireframe for Creating a Survey Template:''' [[Image(creating survey template.png)]][[BR]] == Data Model == These are already existing data tables that will be involved in the template creation/ editing. '''survey_question''' - Stores ALL questions, their types, and metadata (options) used by ALL templates - important when a user modifies a question in a survey - important fields: id, name, code, notes, type, metadata, modified_on, modified_by - code = position -- question has the same value as the posn field in survey_question_list table - name = actual question text - metadata = stores options associated with the question - type = question type '''survey_question_list''' - handles the actual ordering of the questions in the survey template as well as which section questions are in. - important in modification of the template's question list, not any of the question's properties - this is linked to the appropriate survey_template through the template_id property - important fields when creating NEW question: template_id, question_id, section_id, modified_on, modified_by - important fields when EDITING question: question_id, modified_on, modified_by '''survey_question_metadata''' - this table stores all the parsed metadata from the survey_question table - important fields: id [unique to each entry], question_id [not unique to each entry], descriptor, value, modified_on, modified_by - question_id = which question the metadata belongs to - survey_question_metadata belongs to only 1 question, but 1 question can have many metadata entries in the survey_question_metadata table - descriptor = order of answer choice OR denotes "Length" (which basically means # of choices the question [described by question_id] has) - value = actual answer choice/ length value - modified_on, modified_by should be changed if the question's ANSWER CHOICES are added/modified/deleted - note that if survey_question_metadata is changed, then so should survey_question's 'metadata' field - this makes for correct exporting of the template to .csv form '''survey_template''' - important fields: id, name, description, status, completion_qstn, date_qstn, time_qstn, location_detail, priority_qstn, organisation, modified_on, modified_by - name: template name - description: template description - status: number representing whether the template is Active (in use) (2 = active) - completion/ date/ time/ location qstn: questions that appear in every template - priority_qstn: currently doesn't have a use - organisation: should probably have the ability to be modified - modified_on/ modified_by: should be updated when any part of the template is modified - modified_on/ by fields should be updated when the question list is modified.