annotate test_list.php @ 614:ecca9c11d2f2 multiple-tests-concatenation

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