NYUCCL/psiTurk — pull request #51 by jhamrick (2013-11-18 00:18:16+00:00)
Title: Concatenate old data with new data, rather than overwriting it

I need to be able to allow my participants to refresh the page, because I'm using videos and sometimes the video player breaks in a way that's irreparable unless the page is refreshed. So, I just don't mark participants as started and keep track of where they are in the experiment using URL hash strings.

However, if they refresh and then the data gets saved again, PsiTurk overwrites the old `datastring` with the new data, so any previous progress is lost. This commit concatenates the two pieces of data together, rather than overwriting the previous one, so that no data is lost (the exception would be the `questiondata` dictionary, which is updated, meaning there's a potential loss of data there).

I don't think this shouldn't affect anything beyond this one particular use case of when the page is refreshed, causing the data string to be saved more than once.

This could alternately be implemented in the `Participant` model (in `models.py`, e.g. in au `update_datastring` method). I'd be happy to adjust this patch accordingly if that's what you all would prefer!