GSoC/GCI Archive
Google Code-in 2010 LimeSurvey

Dynamic answer options for single choice question types

completed by: Kshitij

mentors: Carsten Schmitz, Machaven

General

There are surveys that require some degree of geographic information to be submitted.

Rather than ask novice/general public users to use a GPS and submit coordinates (which invariably end up incorrect), we would like to have them use a map-style interface like Google maps and OpenStreetMap, where they can drag and drop the pin where they were when they saw what they are reporting, and then have the question type save the latitude and longitude of their dropped pin.

Task implementation

 

  • This should be an extension (question attribute) on a normal text question type which just saves the coordinates.
  • Add a new question attribute so the admin can activate it for a text question with the options None/Google Maps/OpenStreetmap
  • Add a new question attribute to switch on/off if the start position should be found out by IP geolocation
  • Add a setings in the global settings to enter an API key for the API at http://ipinfodb.com
  • Try to find out the users rough location by IP geolocation or location browser request and place the starting position there
  • Let the user change the location and so update the coordinates in the text input
  • Statistics: Implement a graph that shows a world map with all the participant locations. Make the graph configurable so it can be configured only to show a certain continent or country.

 

Task steps

 

  • Install the LimeSurvey dev branch
  • Code! ;)
  • Check back with us if you have questions

Requirements

PHP, Javascipt