Amsterdam-Music-Lab / MUSCLE

An application to easily set up and run online listening experiments for music research.
https://www.amsterdammusiclab.nl/
MIT License
4 stars 1 forks source link

🐛 "Play again" not working in Hooked / Matching Pairs if experiment / block slugs are different #1389

Open BeritJanssen opened 2 days ago

BeritJanssen commented 2 days ago

Description

When setting up an experiment from scratch that has a block based on hooked.py or matching_pairs.py in it, one might choose a different slug for the experiment.slug as compared to the block.slug. When hitting the "Play again" button at the end of such a block, the url to redirect to the experiment will fail, as the url of the redirect is set up as follows:

f"/{session.block.slug}{participant_id_url_param}".

The easy fix is of course to make sure that the slugs match. But to avoid this bug, we should either:

I don't currently know which of the two approaches is preferable.

Reproduction URL

https://tst.amsterdammusiclab.nl/block/tune

Reproduction steps

1. Go to Tune Twins on the test server
2. Play until end of experiment
3. Hit "Play again" button

Logs

No response

Browsers

No response

OS

No response

Additional context

No response