To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / test_list.php
History | View | Annotate | Download (1.49 KB)
| 1 |
<?php
|
|---|---|
| 2 |
// need to generate an array $tests containing the tests in the order they should be executed
|
| 3 |
$lang=''; |
| 4 |
$baseUrl = 'index.html?url=hammond/tests'.$lang.'/'; |
| 5 |
$preSurvey = $defaultTestEntry; |
| 6 |
$preSurvey['url'] = $baseUrl.'pre_survey.xml'; |
| 7 |
$preSurvey['string'] = 'Survey'; |
| 8 |
|
| 9 |
$trainingVideo = $defaultTestEntry; |
| 10 |
$trainingVideo['url'] = 'embedded_player.php?v=kcRtyvQxbgU'; |
| 11 |
$trainingVideo['string'] = 'Training video'; |
| 12 |
|
| 13 |
$trainingSamples = $defaultTestEntry; |
| 14 |
$trainingSamples['url'] = $baseUrl.'training.xml'; |
| 15 |
$trainingSamples['string'] = 'Training samples'; |
| 16 |
|
| 17 |
$postSurvey = $defaultTestEntry; |
| 18 |
$postSurvey['url'] = $baseUrl.'post_survey.xml'; |
| 19 |
$postSurvey['string'] = 'Post-survey'; |
| 20 |
|
| 21 |
$abTests = Array($defaultTestEntry, $defaultTestEntry, $defaultTestEntry); |
| 22 |
$abTests[0]['url'] = $baseUrl.'AB-p-s.xml'; |
| 23 |
$abTests[0]['string'] = 'A/B pressed/struck'; |
| 24 |
$abTests[1]['url'] = $baseUrl.'AB-ps-pf.xml'; |
| 25 |
$abTests[1]['string'] = 'A/B fast/slow pressed'; |
| 26 |
$abTests[2]['url'] = $baseUrl.'AB-ss-sf.xml'; |
| 27 |
$abTests[2]['string'] = 'A/B fast/slow struck'; |
| 28 |
|
| 29 |
$likertTest = $defaultTestEntry; |
| 30 |
$likertTest['url'] = $baseUrl.'labelling.xml'; |
| 31 |
$likertTest['string'] = 'Labelling'; |
| 32 |
// the shuffling of the elements is bound to the last 8 characters of $id
|
| 33 |
$seed = hexdec(substr($id, -8)); |
| 34 |
//shuffling only the order of the ABtests
|
| 35 |
fisherYatesShuffle($abTests, $seed); |
| 36 |
$tests = array_merge(Array($preSurvey), Array($trainingVideo), Array($trainingSamples), $abTests, Array($likertTest)); |
| 37 |
|