Answer the question
In order to leave comments, you need to log in
How to shuffle questions for each student (but not order by rand)?
Is there some random way to display data, but at the same time, so that they do not change every time?
For example, there is a table of questions for testing (contains, for example, questions 1,5,9,20), I need to randomly select data from the table for user id 5 - for example 20,5,1,9 and for user id 20 - another combination . But the bottom line is that if user id 5 asks for his questions, he should have a combination (1,5,9,20), and not a newly generated random one.
Of course, you can generate a sequence once for each and add it to the table, but how can you make sure that certain random sequences are displayed by user id, and not just random data? Is it possible somehow to mix the questions using a sinusoid or some other function?
Thanks
Answer the question
In order to leave comments, you need to log in
do not initialize rand in the programming language and it will always generate the same randoms in a row.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question