<INPUT type=hidden name=experiment_id value="' . $experiment_id . '">';
     // show list of results
     $assign_ids = query_show_query_result($query, "assign");
     $_SESSION['assign_ids_' . $experiment_id] = $assign_ids;
     echo '</FORM>';
 } else {
     if (!isset($_SESSION['lastquery_assign_' . $experiment_id])) {
         $_SESSION['lastquery_assign_' . $experiment_id] = '';
     }
     $load_query = $_SESSION['lastquery_assign_' . $experiment_id];
     if (!$load_query) {
         $load_query = query__load_default_query('assign', $experiment_id);
     }
     $hide_modules = array('statusids');
     $status_query = participant_status__get_pquery_snippet("eligible_for_experiments");
     $saved_queries = query__load_saved_queries('assign', $settings['queryform_experimentassign_savedqueries_numberofentries'], $experiment_id);
     $exptypes = load_external_experiment_types();
     $active_clause = participant_status__get_pquery_snippet("eligible_for_experiments");
     $exptype_clause = "subscriptions LIKE '%|" . $experiment['experiment_ext_type'] . "|%'";
     echo participants__count_participants($active_clause . ' AND ' . $exptype_clause);
     echo ' ' . lang('xxx_part_in_db_for_xxx_exp') . ' ';
     if (!isset($exptypes[$experiment['experiment_ext_type']]['exptype_name'])) {
         $exptypes[$experiment['experiment_ext_type']]['exptype_name'] = 'type undefined';
     }
     echo $exptypes[$experiment['experiment_ext_type']]['exptype_name'];
     echo '<BR><BR>';
     echo experiment__count_participate_at($experiment_id) . ' ' . lang('participants_assigned_to_this_experiment');
     echo '<CENTER><TABLE width="80%"><TR><TD>';
     query__show_form($hide_modules, $experiment, $load_query, lang('search_and_show'), $saved_queries, $status_query);
     echo '</TD></TR></TABLE></CENTER>';
 }
            echo '<TR' . $rowspec . '><TD colspan="' . ($num_cols + 3) . '" class=small>&nbsp;</TD></TR>';
        }
        echo '</TABLE>';
        echo '</TD></TR>';
    }
    /////////////////////////////
    /// ASSIGNMENTS
    /////////////////////////////
    echo '<TR><TD>';
    echo '<TABLE class="or_orr_section_head"><TR><TD align="center" valign="middle">
			' . lang('recruitment_history') . '
			</TD></TR></TABLE>';
    echo '</TD></TR>
			<TR><TD>';
    echo '<table class="or_orr_section_content">';
    $queries = query__load_saved_queries('assign,deassign', -1, $experiment_id, true, "query_time ASC");
    $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
    $shade = false;
    foreach ($queries as $q) {
        if ($shade) {
            $rowspec = ' class="or_orr_list_shade_even""';
            $shade = false;
        } else {
            $rowspec = ' class="or_orr_list_shade_odd"';
            $shade = true;
        }
        echo '<TR' . $rowspec . '>';
        echo '<TD valign="top"><B>' . ortime__format($q['query_time']) . '</B><BR>';
        if ($q['permanent'] || isset($q['properties']['is_permanent']) && $q['properties']['is_permanent']) {
            echo '<B>';
            echo lang('report_queries__permanent_query') . '</B><BR>';
Пример #3
0
            $hide_modules = array('statusids');
            $status_query = participant_status__get_pquery_snippet("eligible_for_experiments");
            $formextra = '<INPUT type="hidden" name="active" value="true">';
            $saved_queries = query__load_saved_queries('participants_search_active', $settings['queryform_partsearchactive_savedqueries_numberofentries']);
        } else {
            if (!isset($_SESSION['lastquery_participants_search_all'])) {
                $_SESSION['lastquery_participants_search_all'] = '';
            }
            $load_query = $_SESSION['lastquery_participants_search_all'];
            if (!$load_query) {
                $load_query = query__load_default_query('participants_search_all');
            }
            $hide_modules = array();
            $status_query = "";
            $formextra = '';
            $saved_queries = query__load_saved_queries('participants_search_all', $settings['queryform_partsearchall_savedqueries_numberofentries']);
        }
        if ($active) {
            $active_clause = participant_status__get_pquery_snippet("eligible_for_experiments");
            $count = participants__count_participants($active_clause);
            echo $count . ' ' . lang('active_participant_profiles_in_database') . '<BR>';
        } else {
            $count = participants__count_participants();
            echo $count . ' ' . lang('participant_profiles_in_database') . '<BR>';
        }
        echo '<TABLE width="80%"><TR><TD>';
        query__show_form($hide_modules, false, $load_query, lang('search_and_show'), $saved_queries, $status_query, $formextra);
        echo '</TD></TR></TABLE>';
    }
}
if ($proceed) {