diff test_list.php @ 0:d2eb0e6ccaaf

initial commit
author Giulio Moro <giuliomoro@yahoo.it>
date Wed, 20 Apr 2016 16:26:57 +0100
parents
children d4ccb6739bdf
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test_list.php	Wed Apr 20 16:26:57 2016 +0100
@@ -0,0 +1,39 @@
+<?php
+// need to generate an array $tests containing the tests in the order they should be executed
+  $lang='';
+  $baseUrl = 'index.html?url=hammond/'.$lang.'/';
+  $preSurvey = $defaultTestEntry;
+  $preSurvey['url'] = $baseUrl.'pre_survey.xml';
+  $preSurvey['string'] = 'Pre-survey';
+  
+  $trainingVideo = $defaultTestEntry;
+  $trainingVideo['url'] = 'embedded_player.php?v=kcRtyvQxbgU';
+  $trainingVideo['string'] = 'Training video';
+
+  $trainingSamples = $defaultTestEntry;
+  $trainingSamples['url'] = $baseUrl.'training.xml';
+  $trainingSamples['string'] = 'Training samples';
+
+  $postSurvey = $defaultTestEntry;
+  $postSurvey['url'] = $baseUrl.'post_survey.xml';
+  $postSurvey['string'] = 'Post-survey';
+
+  $abTests = Array($defaultTestEntry, $defaultTestEntry, $defaultTestEntry, $defaultTestEntry);
+  $abTests[0]['url'] = $baseUrl.'ABshort.xml';
+  $abTests[0]['string'] = 'AB0';
+  $abTests[1]['url'] = $baseUrl.'ABshort.xml';
+  $abTests[1]['string'] = 'AB1';
+  $abTests[2]['url'] = $baseUrl.'ABshort.xml';
+  $abTests[2]['string'] = 'AB2';
+  $abTests[3]['url'] = $baseUrl.'ABshort.xml';
+  $abTests[3]['string'] = 'AB3';
+
+  $likertTest = $defaultTestEntry;
+  $likertTest['url'] = $baseUrl.'labelling.xml';
+  $likertTest['string'] = 'Labelling';
+  // the shuffling of the elements is bound to the last 8 characters of $id
+  $seed = hexdec(substr($id, -8)); 
+  //shuffling only the order of the ABtests
+  fisherYatesShuffle($abTests, $seed);
+  $tests = array_merge(Array($preSurvey), Array($trainingVideo), Array($trainingSamples), $abTests, Array($likertTest), Array($postSurvey));
+