GSoC/GCI Archive
Google Code-in 2010 LimeSurvey

New feature to create dummy tokens

completed by: Kshitij

mentors: Carsten Schmitz, Machaven

General
A survey should be anonymous, but you should have the advantages of a token based survey (like.. save or finish later on an other Computer).

For that you need to create tokens, export them and send a token to each participant
(it‘s like the TAN of online banking) by normal mail! (not email!).

In this scenario the participant would have a good feeling, that it‘s really anonymous.

So we need an option in the token area to create a certain number of dummy tokens.


Task details

  • Create a new link in the tokens are overview (there are already some tool links at the bottom) which opens a form where you can set:
    • Number of token entries to create
    • Token length (as default use the length set in survey settings)
    • Base email address (like 'email_{TOKEN_COUNTER}@test.test)
    • Base first name (like 'Firstname{TOKEN_COUNTER})
    • Base last name (like 'Lastname{TOKEN_COUNTER})
    • Explanation: {TOKEN_COUNTER} is a replacement tag that is visible as such to the admin so he can place it where he needs it.
  • On submitting the form the token entries are created along with the token keys and he received a success message.
  • Make sure that at token entry generation at least the email address (if it is used) is unique or empty and the token key is unique. Check out how the existin token key generation (grey gear) works and if possible put that in a function so you can reuse it.

Steps
  • Install the development version of LimeSurvey
  • Code, code, code.
  • Ask if you need help.