1. ' . lang('save_mail_text_only') . '
				</TD></TR>
                <TR class="empty"><TD align="left">
                	<INPUT class="button" type=submit name="preview" class="small" value="' . lang('mail_preview') . '">
                </TD><TD align="right">
					<INPUT class="button" type=submit name="save" value="' . lang('save') . '">
                </TD></TR>
                </TABLE>
			</TD></TR>
			<TR>
				<TD colspan=2>
					<TABLE class="or_option_buttons_box" style="background: ' . $color['options_box_background'] . ';">
					<TR>
					<TD>' . lang('assigned_subjects') . ': ' . experiment__count_participate_at($experiment_id) . '</TD>
					<TD>' . lang('invited_subjects') . ': ' . experiment__count_participate_at($experiment_id, "", "invited = :invited", array(':invited' => 1)) . '</TD>
					<TD>' . lang('registered_subjects') . ': ' . experiment__count_participate_at($experiment_id, "", "session_id != :session_id", array(':session_id' => 0)) . '</TD>
					</TR>
					<TR class="empty">
					<TD colspan=3>' . lang('inv_mails_in_mail_queue') . ': ';
    $qmails = experimentmail__mails_in_queue("invitation", $experiment_id);
    echo $qmails;
    if (check_allow('mailqueue_show_experiment')) {
        echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . button_link('experiment_mailqueue_show.php?experiment_id=' . $experiment['experiment_id'], lang('monitor_experiment_mail_queue'), 'envelope-square');
    }
    echo '</TD></TR></TABLE>
				</TD>
			</TR>';
    if ($qmails > 0) {
        echo '	<TR>
					<TD colspan=2>
						<TABLE class="or_option_buttons_box" style="background: ' . $color['options_box_background'] . ';">
示例#2
0
         </TD>
     </TR>';
 if ($session_id) {
     echo '
         <TR>
             <TD COLSPAN=2 align="right">
                 <INPUT class="button" name="copy" type="submit" value="' . lang('copy_as_new_session') . '">
             </TD>
         </TR>';
 }
 echo '
       </table>
 </FORM>
 <BR>';
 if ($session_id) {
     $reg = experiment__count_participate_at($edit['experiment_id'], $session_id);
     if ($reg == 0 && check_allow('session_empty_delete') || check_allow('session_nonempty_delete')) {
         echo '
             <table>
                 <TR>
                     <TD>
                         ' . button_link('session_delete.php?session_id=' . $edit['session_id'], lang('delete'), 'trash-o') . '
                     </TD>
                 </TR>
             </table>';
     }
 }
 if ($session_id) {
     $experiment_id = $edit['experiment_id'];
 } else {
     $experiment_id = $_REQUEST['experiment_id'];
示例#3
0
function sessions__session_full($session_id, $thissession = array())
{
    if (!isset($thissession['session_id'])) {
        $thissession = orsee_db_load_array("sessions", $session_id, "session_id");
    }
    $reg = experiment__count_participate_at($thissession['experiment_id'], $thissession['session_id']);
    if ($reg < $thissession['part_needed'] + $thissession['part_reserve']) {
        $session_full = false;
    } else {
        $session_full = true;
    }
    return $session_full;
}
                        participant__update_last_enrolment_time($allmids);
                    }
                    // clean up participation statuses for 'no session's
                    $query = "UPDATE " . table('participate_at') . "\n\t\t\t\t\t\t\tSET pstatus_id = '0' \n\t\t\t\t\t\t\tWHERE session_id='0'";
                    $done = or_query($query);
                    message(lang('changes_saved'));
                    $m_message = '<UL>';
                    foreach ($new_session as $msession => $mparts) {
                        $m_message .= '<LI>' . count($mparts) . ' ';
                        if ($msession == 0) {
                            $m_message .= lang('xxx_subjects_removed_from_registration');
                        } else {
                            $tsession = orsee_db_load_array("sessions", $msession, "session_id");
                            $m_message .= lang('xxx_subjects_moved_to_session_xxx') . ' 
								<A HREF="' . thisdoc() . '?experiment_id=' . $experiment_id . '&session_id=' . $msession . '">' . session__build_name($tsession) . '</A>';
                            $tpartnr = experiment__count_participate_at($experiment_id, $msession);
                            if ($tsession['part_needed'] + $tsession['part_reserve'] < $tpartnr) {
                                $mmessage .= lang('subjects_number_exceeded');
                            }
                        }
                    }
                    $m_message .= '</UL>';
                    message($m_message);
                    $target = "experiment:" . $experiment['experiment_name'];
                    if ($session_id) {
                        $target .= "\nsession_id:" . $session_id;
                    }
                    log__admin("experiment_edit_participant_list", $target);
                    redirect('admin/' . thisdoc() . $thiscgis);
                }
            }
        }
        $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>';
    }
}
if ($proceed) {
    echo '  <A HREF="experiment_show.php?experiment_id=' . $experiment_id . '">
            ' . lang('mainpage_of_this_experiment') . '</A><BR><BR>

        </CENTER>';
}
include "footer.php";
示例#6
0
             ' . $counts['assigned'] . '
         </TD>
     </TR>
     <TR>
         <TD colspan=2>';
 if ($allow_sp) {
     echo '<A HREF="experiment_participants_show.php?experiment_id=' . $experiment['experiment_id'] . '&focus=invited">';
 }
 echo lang('invited_subjects');
 if ($allow_sp) {
     echo '</A>';
 }
 echo ':
         </TD>
         <TD>
             ' . experiment__count_participate_at($experiment_id, "", "invited=1") . '
         </TD>
     </TR>
     <TR>
         <TD colspan=2>';
 if ($allow_sp) {
     echo '<A HREF="experiment_participants_show.php?experiment_id=' . $experiment['experiment_id'] . '&focus=enroled">';
 }
 echo lang('registered_subjects');
 if ($allow_sp) {
     echo '</A>';
 }
 echo ':
         </TD>
         <TD>
             ' . $counts['enroled'] . '
示例#7
0
function experimentmail__send_registration_notice($line)
{
    global $settings;
    $reg = experiment__count_participate_at($line['experiment_id'], $line['session_id']);
    $experimenters = db_string_to_id_array($line['experimenter_mail']);
    foreach ($experimenters as $experimenter) {
        $admin = orsee_db_load_array("admin", $experimenter, "admin_id");
        if (isset($admin['admin_id'])) {
            $tlang = $admin['language'] ? $admin['language'] : $settings['admin_standard_language'];
            $lang = load_language($tlang);
            $admin['session_name'] = session__build_name($line, $tlang);
            $admin['experiment_name'] = $line['experiment_name'];
            $admin['registered'] = $reg;
            $admin['status'] = session__get_status($line, $tlang, $reg);
            $admin['needed'] = $line['part_needed'];
            $admin['reserve'] = $line['part_reserve'];
            $subject = load_language_symbol('subject_for_registration_notice', $tlang);
            $subject .= ' ' . $admin['experiment_name'] . ', ' . $admin['session_name'];
            $recipient = $admin['email'];
            $mailtext = load_mail("admin_registration_notice", $tlang) . "\n" . experimentmail__get_admin_footer($tlang, $admin) . "\n";
            $message = process_mail_template($mailtext, $admin);
            $now = time();
            $list_name = lang('participant_list_filename') . ' ' . date("Y-m-d", $now);
            $list_filename = str_replace(" ", "_", $list_name) . ".pdf";
            $list_file = pdfoutput__make_part_list($line['experiment_id'], $line['session_id'], 'registered', 'lname,fname', true, $tlang);
            $done = experimentmail__mail_attach($recipient, $settings['support_mail'], $subject, $message, $list_filename, $list_file);
        }
    }
    // update session table : reg_notice_sent
    $pars = array(':session_id' => $line['session_id']);
    $query = "UPDATE " . table('sessions') . " SET reg_notice_sent='y' WHERE session_id= :session_id ";
    $done2 = or_query($query, $pars);
    return $done;
}