* @copyright Deakin University 2007,2008 * @package queXS * @subpackage admin * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ /** * Configuration file */ include_once(dirname(__FILE__).'/../config.inc.php'); /** * Database file */ include ("../db.inc.php"); /** * XHTML functions */ include ("../functions/functions.xhtml.php"); /** * AAPOR calculation functions */ include ("../functions/functions.aapor.php"); /** * Display functions */ include ("../functions/functions.display.php"); /** * Performance functions */ include ("../functions/functions.performance.php"); /** * Operator functions */ include ("../functions/functions.operator.php"); /** * Input functions */ include("../functions/functions.input.php"); $operator_id = get_operator_id(); $questionnaire_id = false; if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']); xhtml_head(T_("Questionnaire Outcomes"),true,array("../css/table.css"),array("../js/window.js")); print "
" . T_("Sample status") . "
"; $sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . T_("Drawn from sample") . "' ELSE '" . T_("Remain in sample") . "' END as drawn, count(*) as count FROM sample as s JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id) LEFT JOIN `case` as c ON (c.questionnaire_id = qs.questionnaire_id and c.sample_id = s.sample_id) GROUP BY (c.sample_id is not null)"; xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number"))); $atime = get_average_time_questionnaire(10,$questionnaire_id); $mins = intval($atime / 60); $secs = $atime % 60; print "" . T_("Average time on a completed questionnaire") . ": $mins " . T_("Min") . " $secs " . T_("Secs") . "
"; $sql = "SELECT o.calc, count( c.case_id ) FROM `case` AS c, `outcome` AS o WHERE c.questionnaire_id = '$questionnaire_id' AND c.current_outcome_id = o.outcome_id GROUP BY o.calc"; $a = $db->GetAssoc($sql); $a = aapor_clean($a); print "| " . T_("Outcome") . " | " . T_("Rate") . " |
|---|---|
| " . T_("Response Rate 1") . " | " . round(aapor_rr1($a),2) . " |
| " . T_("Refusal Rate 1") . " | " . round(aapor_ref1($a),2) . " |
| " . T_("Cooperation Rate 1") . " | " . round(aapor_coop1($a),2) . " |
| " . T_("Contact Rate 1") . " | " . round(aapor_con1($a),2) . " |
" . T_("No outcomes recorded for this questionnaire") . "
"; //display a list of shifts with completions and a link to either add a report or view reports print "" . T_("No shifts defined for this questionnaire") . "
"; else xhtml_table($r,array("description","completions","link","operform"),array(T_("Shift"),T_("Completions"),T_("Shift report"),T_("Operator performance")),"tclass"); } xhtml_foot(); ?>