view test_list.php @ 22:1f375b7d75fd tip

updated warning for breaks during test
author Giulio Moro <giuliomoro@yahoo.it>
date Fri, 13 May 2016 19:01:08 +0100
parents 4261f898bd4c
children
line wrap: on
line source
<?php
// need to generate an array $tests containing the tests in the order they should be executed
  $lang='';
  $baseUrl = 'index.html?url=hammond/tests'.$lang.'/';
  $preSurvey = $defaultTestEntry;
  $preSurvey['url'] = $baseUrl.'pre_survey.xml';
  $preSurvey['string'] = '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);
  $abTests[0]['url'] = $baseUrl.'AB-p-s.xml';
  $abTests[0]['string'] = 'A/B pressed/struck';
  $abTests[1]['url'] = $baseUrl.'AB-ps-pf.xml';
  $abTests[1]['string'] = 'A/B fast/slow pressed';
  $abTests[2]['url'] = $baseUrl.'AB-ss-sf.xml';
  $abTests[2]['string'] = 'A/B fast/slow struck';

  $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));