Mercurial > hg > webaudioevaluationtool
comparison test_list.php @ 607:328f24798462 multiple-tests-concatenation
working, hacked together.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 11 Mar 2016 16:49:47 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
583:6833d8c2b52e | 607:328f24798462 |
---|---|
1 <?php | |
2 // need to generate an array $tests containing the tests in the order they shuold be executed | |
3 $preSurvey = $defaultTestEntry; | |
4 $preSurvey['url'] = 'index.html?url=example_eval/pre_survey.xml'; | |
5 $preSurvey['string'] = 'Pre-survey'; | |
6 | |
7 $postSurvey = $defaultTestEntry; | |
8 $postSurvey['url'] = 'index.html?url=example_eval/post_survey.xml'; | |
9 $postSurvey['string'] = 'Post-survey'; | |
10 | |
11 $abTests = Array($defaultTestEntry, $defaultTestEntry, $defaultTestEntry, $defaultTestEntry); | |
12 $abTests[0]['url'] = 'index.html?url=example_eval/ABshort.xml'; | |
13 $abTests[0]['string'] = 'AB0'; | |
14 $abTests[1]['url'] = 'index.html?url=example_eval/ABshort.xml'; | |
15 $abTests[1]['string'] = 'AB1'; | |
16 $abTests[2]['url'] = 'index.html?url=example_eval/ABshort.xml'; | |
17 $abTests[2]['string'] = 'AB2'; | |
18 $abTests[3]['url'] = 'index.html?url=example_eval/ABshort.xml'; | |
19 $abTests[3]['string'] = 'AB3'; | |
20 | |
21 $likertTest = $defaultTestEntry; | |
22 $likertTest['url'] = 'index.html?url=example_eval/labelling.xml'; | |
23 $likertTest['string'] = 'Labelling'; | |
24 // the shuffling of the elements is bound to the last 8 characters of $id | |
25 $seed = hexdec(substr($id, -8)); | |
26 //shuffling only the order of the ABtests | |
27 fisherYatesShuffle($abTests, $seed); | |
28 $tests = array_merge(Array($preSurvey), $abTests, Array($likertTest), Array($postSurvey)); | |
29 |