0 votes
ago in SoSci Survey (English) by s388860 (110 points)

Dear SoSci Survey Support Team,

I am developing an online questionnaire in SoSci Survey that includes ten audio recordings. Each participant should be able to play each recording only once.

I have implemented a playback restriction using PHP and JavaScript to store the playback status. However, I am experiencing the following problem:

When a participant refreshes the page, the audio recording becomes playable again, even though it has already been played once.

I would like to prevent participants from replaying an audio recording by refreshing the page, navigating back to the page, or revisiting it during the same survey session.

Could you please advise me on the recommended way to implement a reliable one-time playback restriction in SoSci Survey?

In particular, I would like to know:
1. How can the playback status be stored persistently on the server rather than only in the browser?
2. How can I ensure that refreshing or revisiting a page does not reset the playback status?
3. How can I ensure that a new participant using the same device starts with a fresh playback status?

I would appreciate any example code or documentation you could recommend.

Thank you very much for your help.

Kind regards

1 Answer

0 votes
ago by SoSci Survey (382k points)

The trick is to save the play status even if the page is not sent. You can use an "internal variable" for that and check the option to transfer it's data in the background.

Your JavaScript will have to read the status from the internal variable's input and also store it there. By and large, you use the <input>'s value instead of the JS variable.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

Categories

...