Skip to content

chb/survey_client

Repository files navigation

Indivo Survey Client

About

  • Implemented in JavaScript using:
  • JavaScriptMVC (JMVC)
    • Initial implementation written for JMVC version 1.5
    • Currently runs on JMVC version 3
  • RDF/XML parser from the Tabulator project
  • jQuery & jQuery UI
  • Consumes RDF/XML survey definitions as described here

Download

  1. git clone git://github.com/chb/survey_client.git
  2. cd survey_client
  3. git submodule init
  4. git submodule update

Sample Survey

View a sample survey by opening survey_client/survey/exampleSurvey.html in your favorite browser

Loading Survey Definitions

The client's example data connector (contained in survey_client/survey/index.html) is configured to read from your browser's local storage to retrieve survey definitions. This setup works well when testing the client in conjunction with the Indivo Survey Builder, which by default is configured to write to browser local storage.

The example data connector also contains commented out code for retrieving definitions using an Ajax request.

###Development v.s. Production Modes By default, the client will run in development mode, allowing for console logging and easier debugging. To compress the client for increased performance and a decreased download profile, do the following

  1. from survey_client/ run ./steal/js ./survey/scripts/build.js
  2. edit survey_client/survey/index.html and change the existing script tag to point to the new production bundle:
  • old src='../steal/steal.js?survey,development'>
  • new src='../steal/steal.js?survey,production'>

###Running Tests You can run the functional test suite by opening up survey_client/survey/funcunit.html