view new/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 1ed0c5908575
children
line wrap: on
line source
<?php
// make sure $seed exists before including this script. $seed is used to shuffle the order of the tests.
// make sure $defaultTestEntry is defined
// need to generate an array $tests containing the tests in the order they should be executed
  $lang='';
  $baseUrl = 'test.html?url=hammond/tests'.$lang.'/';
  $preSurvey = $defaultTestEntry;
  $preSurvey['url'] = $baseUrl.'pre_survey.xml';
  $preSurvey['string'] = 'Preliminary survey';
  
  $postSurvey = $defaultTestEntry;
  $postSurvey['url'] = $baseUrl.'post_survey.xml';
  $postSurvey['string'] = 'Post survey(optional)';

  $trainingVideo = $defaultTestEntry;
  $trainingVideo['url'] = 'embedded_player.php?v=kcRtyvQxbgU';
  $trainingVideo['string'] = 'Training';
  $trainingVideo['alwaysAccessible'] = true;

  $trainingSamples = $defaultTestEntry;
  $trainingSamples['url'] = $baseUrl.'training.xml';
  $trainingSamples['string'] = 'Training samples';
  $trainingSamples['alwaysAccessible'] = true;
  
  $abxTest = $defaultTestEntry;
  $abxTest['url'] = $baseUrl.'ABX.xml';
  $abxTest['string'] = 'A/B/X (72 pages, about 18 minutes)';

  $abTests = Array($defaultTestEntry, $defaultTestEntry, $defaultTestEntry);
  $abTests[0]['url'] = $baseUrl.'AB-p-s.xml';
  $abTests[0]['string'] = 'A/B pressed/struck (24 pages, about 3 minutes)';
  $abTests[1]['url'] = $baseUrl.'AB-ps-pf.xml';
  $abTests[1]['string'] = 'A/B fast/slow pressed (24 pages, about 3 minutes)';
  $abTests[2]['url'] = $baseUrl.'AB-ss-sf.xml';
  $abTests[2]['string'] = 'A/B fast/slow struck (24 pages, about 3 minutes)';

  $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),*/ Array($abxTest), $abTests, Array($postSurvey));