give variable to css/ show random video and know order

More
1 month 4 days ago - 1 month 4 days ago #202506 by lolas7
I want to show videos in a random order and ask questions about those afterwards. I know I can make the videos random with the Randomised Group but then I don't know later on in which order they were and can't know which video the questions where answered about.

I tried to fix it with a java script that randomly chooses a video to show based on a random number an equation question gives me. I want to give a path to the random chosen video to the css to show in my text question but I don't know how.

I have tried this:

$(this.val(videoname1);
});
</script>
<div class="ckeditor-html5-video" style="text-align: center;">
<video controls="controls" src="{videoname1}" width="450"> </video>
</div>

and this:
$('#question{QID} input[type="text"]'.val(videoname1);
});
</script>
<div class="ckeditor-html5-video" style="text-align: center;">
<video controls="controls" src="{videoname1}" width="450"> </video>
</div>
Last edit: 1 month 4 days ago by lolas7.

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 4 days ago #202509 by Joffm
Hi,
so you want to show the videos first and afterwards ask questions to them?
Otherwise it would be sufficient to have groups with video and following question with the same randomization name.

Well, add a hidden question of type equation to each video group , like "order1", "order2", ...
In the question text of "order1", "order2" you only have
{Q1.gseq} with Q1 the question of the first video,
{Q2.gseq} with Q2 the question of the second video
...

At the end you see for each video the order.
Remember, groups start counting at "0", and all groups of the survey are taken into account.

File Attachment:

File Name: limesurvey...7471.lss
File Size:22 KB


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: lolas7

Please Log in to join the conversation.

More
1 month 3 days ago - 1 month 3 days ago #202514 by lolas7
Thank you, that's working
Last edit: 1 month 3 days ago by lolas7.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now