//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'] = FALSE; //get info from experiment_x_form and form tables include('query_form_info.php'); if($form_name == "Training - Lexical") $_SESSION['provide_feedback'] = FALSE; else $_SESSION['provide_feedback'] = TRUE; $submit_to = "provide_training_feedback.php"; //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'] != ""))); if($play_stim) { 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'); } ?>