Ejemplo n.º 1
0
#### Send participant to next phase of experiment (demographics or instructions)
if ($_CONFIG->run_demographics == true) {
    $link = 'BasicInfo.php';
} elseif ($_CONFIG->run_instructions) {
    $link = 'instructions.php';
} else {
    $link = 'experiment.php';
}
if ($_CONFIG->stop_at_login == true) {
    // if things are going wrong this info will help you figure out when the program broke
    Readable($_SESSION['Condition'], 'Condition information');
    Readable($stimuli, 'Stimuli file in use (' . $_FILES->stim_files . '/' . $_SESSION['Condition']['Stimuli'] . ')');
    Readable($procedure, 'Procedure file in use (' . $_FILES->proc_files . '/' . $_SESSION['Condition']['Procedure'] . ')');
    Readable($trialTypeColumns, 'Levels of trial types being used');
    Readable($trialTypes, 'All info about trial types used in experiment');
    Readable($_SESSION['Trials'], '$_SESSION["Trials"] array');
    // for checking that shuffling is working as planned
    echo '<h1> Stimuli before/after</h1>';
    echo '<div class="before">';
    display2darray($cleanStimuli);
    echo '</div>';
    echo '<div class="after">';
    display2darray($stimuli);
    echo '</div>';
    echo '<div class="sectionBreak">';
    echo '<h1>Procedure before/after</h1>';
    echo '</div>';
    echo '<div class="before">';
    display2darray($cleanProcedure);
    echo '</div>';
    echo '<div class="after">';
Ejemplo n.º 2
0
}
#### check if this user has previously logged in
/*
 * This will be completed once I finish updating some other functionality
 *
 * Planned functionality once completed:
 *      if a user tries to login and has not been rejected for IP or previous involvment
 *   then this function will load up user session, figure out where they last were,
 *   reload all stimuli, and continue experiment.
 *
 *   users who are restarted in this way should be denoted as special cases in status.txt
 */
if (count($noGo) == 0 and isset($toCheck) and !isset($_SESSION)) {
    echo '<h2>User <b>' . $toCheck . '</b> is eligible to participate</h2>';
}
// show all users to people who want to login
if (!isset($_SESSION)) {
    Readable($files, 'Files in directory');
    Readable($uniques, 'Previous iteration workers');
    Readable($skipped, 'Files skipped becasue there is no "WorkerID" column');
}
if (!isset($_SESSION)) {
    echo '<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"> </script>';
    echo '<script src="javascript/collector_1.0.0.js" type="text/javascript"> </script>';
}
#### style to make the page look right
echo '<style>
            .eCheck { background:#A4DBFC; }
            p { font-size: 1.3em; }
          </style>';
####################