‘fieldset’ AND c.nid = %d ORDER BY c.weight”, $nid);
while ($row = db_fetch_object($result)) {
$header[] = $row->form_key;
$cid[$row->cid] = $row->form_key;
}
return $cid;
}

function assign_record ($nid, $cid, $row, &$record) {
$record[‘FormID’] = $nid;
$record[‘SubmissionID’] = $row->sid;
$record[‘User’] = $row->user;
$record[‘Date’] = date(‘d-m-Y’, $row->submitted);
$field = $cid[$row->cid];
if (preg_match(‘/”filepath”;s:(d+):”([^”]+)/’, $row->data, $matches))
$value = “http://www.aipass.org/” . $matches[2];
else
$value = $row->data;
if (array_key_exists($field, $record))
$record[$field] = $record[$field] . ‘ ‘ . $value;
else
$record[$field] = $value;
}

function get_webform_submissions ($nid, &$header, &$record) {
$cid = get_webform_fields($nid, $header);

$record = array();
$result = db_query(“SELECT s.*, sd.sid, sd.cid, sd.no, sd.data FROM {webform_submitted_data} as sd LEFT JOIN {webform_submissions} as s on (sd.sid = s.sid) WHERE s.nid = %d”, $nid);
while ($row = db_fetch_object($result)) {
assign_record($nid, $cid, $row, $record[$row->sid]);
}
return count($record);
}

function get_webform_submission ($nid, $sid) {
$result = db_query(“SELECT s.*, sd.sid, sd.cid, sd.no, sd.data FROM {webform_submitted_data} as sd LEFT JOIN {webform_submissions} as s on (sd.sid = s.sid) WHERE s.nid = %d AND sd.sid = %d”, $nid, $sid);
$row = db_fetch_object($result);
if ($row) {
$cid = get_webform_fields($nid, $header);
assign_record($nid, $cid, $row, $record);
while ($row = db_fetch_object($result)) {
assign_record($nid, $cid, $row, $record);
}
return $record;
} else
return NULL;
}

function sendhtmlemail ($from, $to, $subject, $contents) {
$headers = array(
‘MIME-Version’ => ‘1.0’,
‘Content-Type’ => ‘text/html; charset=UTF-8; format=flowed’,
‘Content-Transfer-Encoding’ => ‘8Bit’,
‘X-Mailer’ => ‘Drupal’,
‘Sender’ => $from,
‘Errors-To’ => $from,
‘Return-Path’ => $from
);
drupal_mail(‘submission’, $to, $subject, $contents, $from, $headers);
}

function sendattachemail ($from, $to, $subject, $contents, $attachment_name, $attachment_type, $attachment_contents) {
$random_hash = md5(date(‘r’, time()));
$headers = array(
‘MIME-Version’ => ‘1.0’,
‘Content-Type’ => ‘multipart/mixed; boundary=”‘ . $random_hash . ‘”‘,
‘Content-Transfer-Encoding’ => ‘8Bit’,
‘X-Mailer’ => ‘Drupal’,
‘Sender’ => $from,
‘Errors-To’ => $from,
‘Return-Path’ => $from
);
$body = “–” . $random_hash . “nContent-Type: text/html; charset=windows-1252nn”;
$body = $body . $contents;
$body = $body . “n–” . $random_hash . “n”;
$body = $body . “Content-Description: File Transfern”;
$body = $body . “Content-Type: ” . $attachment_type . “n”;
$body = $body . ‘Content-Disposition: attachment; filename=”‘ . $attachment_name . ‘”‘ . “n”;
$body = $body . “Content-Transfer-Encoding: binarynn”;
$body = $body . $attachment_contents;
$body = $body . “–” . $random_hash . “–n”;
drupal_mail(‘submission’, $to, $subject, $body, $from, $headers);
print(“Sent report ” . $subject);
}

$nid = $_GET[‘form’];
if ($nid == NULL) {
print(get_webform_submissions(4098, $header, $formdata) . ” abstract presentati da soci
“);
print(get_webform_submissions(4101, $header, $formdata) . ” abstract presentati da aspiranti soci
“);
print(get_webform_submissions(4099, $header, $formdata) . ” simposi
“);
print(get_webform_submissions(4100, $header, $formdata) . ” iscritti al congresso
“);
print(get_webform_submissions(4108, $header, $formdata) . ” domande premi migliori presentazioni
“);

} elseif ($nid == ‘user’) {
$filename = ‘user_report.html’;
$subject = “User list”;
$body = “User list”;
$table = ‘

‘;
$result = db_query(‘SELECT users.uid AS uid, users.mail AS users_mail, users.name AS users_name FROM users users’);
while ($user = db_fetch_object($result)) {
profile_load_profile($user);
$table = $table . ‘

‘;
}
$table = $table . “

Cognome Nome Citta Posizione Email Iscrizione
‘ . $user->{profile_cognome} . ‘ ‘ . $user->{profile_nome} . ‘ ‘ . $user->{profile_citta} . ‘ ‘ . $user->{profile_statusaccademico} . ‘ ‘ . $user->{users_mail} . ‘ ‘ . $user->{profile_sperimentale} . ‘

n”;
sendattachemail(“aipsperimentale@gmail.com”, “aipsperimentale@gmail.com”, $subject, $body, $filename, “text/html”, $table);
} else {
$count = get_webform_submissions($nid, $header, $formdata);
if ($count > 0) {
$filename = ‘form_report_’ . $nid . ‘.html’;
$subject = “Report for form ” . $nid;
$body = “Report for form ” . $nid;
$table = ‘

‘;
foreach ($header as $field) {
$table = $table . ‘

‘;
}
$table = $table . ‘

‘;
foreach ($formdata as $submission) {
$table = $table . ‘

‘;
foreach ($header as $field) {
$table = $table . ‘

‘;
}
$table = $table . ‘

‘;
}
$table = $table . “

‘ . $field . ‘
‘ . nl2br(htmlentities($submission[$field], ENT_QUOTES, ‘UTF-8’)) . ‘

n”;
echo($table);
sendattachemail(“aipsperimentale@gmail.com”, “aipsperimentale@gmail.com”, $subject, $body, $filename, “text/html”, $table);
}
else
print(“Error”);
}
?>

Categoria Descrizione & esempi
1 Test di massima performance Prove di intelligenza, batterie attitudinali, test neuropsicologici, prove di apprendimento normate.
2 Test di tipica performance Strumenti che rilevano comportamenti abituali o modalità espressive normate
3 Autovalutazione (Self-report) Questionari, inventari, scale di atteggiamento compilati dal soggetto.
4 Eterovalutazione (Informant-report) Checklist, griglie, questionari compilati da genitori, insegnanti, clinici, pari.
5 Protocolli di intervista Interviste strutturate o semi-strutturate con scoring standardizzato (es. K-SADS, ADI-R).
6 Protocolli di osservazione Sistemi osservativi/behavioral coding con metriche psicometriche (es. ABAS-3 Observation, video-coding con accordo inter-rater).
7 Paradigmi sperimentali standardizzati Compiti di laboratorio o computerizzati (Stroop, Iowa Gambling Task, ecc.).
Licenza Uso libero Uso commerciale Modifiche permesse Attribuzione richiesta Note
Dominio pubblico Si Si Si No Nessun diritto riservato
CC BY Si Si Si Si Massima libertà con attribuzione
CC BY-NC Sì Con licenza o pagamento Sì Sì Libero e gratuito solo se non a fini commerciali
CC BY-ND Sì Sì No Sì Nessuna modifica consentita
CC BY-NC-ND Si Con licenza o pagamento No Si Libero senza modifiche e gratuito solo se non a fini commerciali
CC BY-SA Si Si Si Si Le opere derivate devono mantenere la stessa licenza
Tutti i diritti riservati No No No Di norma sì Uso possibile, e gratuito, se autorizzato
Copyright dell’editore No Con licenza o pagamento No Di norma sì Uso possibile, e a pagamento, se autorizzato
Licenza proprietaria (specificare) Solo se autorizzato Solo se autorizzato Solo se autorizzato Di norma sì Condizioni d’uso definite dal titolare