13 - Randomisation
Anti-triche
Algorithme
// Seed unique par élève
$seed = crc32($userId . $testCodeId . $sessionId);
mt_srand($seed);
// Mélanger
shuffle($exercices);
// Sauvegarder ordre
$testSession->update([
'question_order' => $exercices->pluck('id')->toArray()
]);Avantages
Configuration
Last updated