//Author: Stefan Tomic //Janata Lab //Center for Mind and Brain //Developed for the Ensemble Project require_once('../include/subject_includes.php'); //unset random piece choices saved during last //visit to form_MBEA_lexical_cond (if applicable). unset($_SESSION['MBEA_lexical_piece_names']); $_SESSION['submit_stimulus_id'] = TRUE; //get info from experiment_x_form and form tables include('query_form_info.php'); $submit_to = 'submit_response.php'; //if this is the lexical form, and an error occurred on the second response (conditional form) of the trial //go to that form, sending the first response and error message as GET variables $enum_fieldname = sprintf("trialid_%d_type_%d_enum_0",$_SESSION['trial_id'],$row_get_trial['data_format_id']); //display subject name, basic instructions and header of form include('htmlhead_name_mesg_formhead.php'); //only play stim if soundCompleted was not sent by flash player, or we are not revisiting the form because of an error in the response posting $play_stim = (!(isset($_POST['soundCompleted']) && $_POST['soundCompleted']) && !(isset($_GET['error']) && ($_GET['error'] != ""))); //flash sends soundCompleted == true as a POST variable when finished playing //if the stim hasn't played yet, get stim urls and trial id, otherwise display the form fields if($play_stim) { //update and query information for this trial include('update_trial_order.php'); include('query_trial_info.php'); //returns $row_get_trial associated array from query $audio_url1 = $stimuli_location . $row_get_trial['audio_url1']; if ($row_get_trial['audio_url2'] != "") $audio_url2 = $stimuli_location . $row_get_trial['audio_url2']; else $audio_url2 = ""; play_audio_button_w_beep($stimulus_cue_beep_location, $audio_url1,$audio_url2,$form_handler,$form_mode,$form_id); //write the footer of the form printf("
".$row_form_info['footer']."
"); } else { include('display_trial_choices.php'); } ?>