* @copyright Deakin University 2007,2008 * @package queXS * @subpackage user * @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 * * @todo Use calls to the database to determine the real reason why no case is available, not just give a list * */ /** * Configuration file */ include ("config.inc.php"); /** * Database file */ include ("db.inc.php"); /** * Authentication */ require ("auth-interviewer.php"); /** * XHTML functions */ include ("functions/functions.xhtml.php"); /** * Operator functions */ include ("functions/functions.operator.php"); /** * Limesurvey functions */ include ("functions/functions.limesurvey.php"); $js = false; if (AUTO_LOGOUT_MINUTES !== false) $js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js"); xhtml_head(T_("No case available"),true,array("css/table.css"),$js); $operator_id = get_operator_id(); ?>
GetAll($sql); ?> GetAll($sql); ?> = sh.start ) AND (CONVERT_TZ( NOW( ) , 'System', 'UTC' ) <= sh.end )) WHERE oq.operator_id = '$operator_id' AND !(q.restrict_work_shifts = 1 AND sh.shift_id IS NULL)"; $rs = $db->GetAll($sql); ?> = cr.start and TIME(CONVERT_TZ(NOW(), 'System' , s.Time_zone_name)) <= cr.end) WHERE operator_id = '$operator_id' AND si.enabled = 1 AND !(si.call_restrict = 1 AND cr.day_of_week IS NULL) AND ou.outcome_type_id IN( SELECT outcome_type_id FROM operator_skill WHERE operator_id = '$operator_id') AND ou.outcome_id NOT IN (10,25,28,42,43,44,45,40) "; $rs = $db->GetRow($sql); ?> " . T_("There are ") . $rs['count_samples'] . T_(" unassigned case(s) available within the specified call restrictions") . ""; } //no link to limesurvey echo "" . T_("Limesurvey links:") . "
"; $sql = "SELECT q.lime_sid, q.description FROM questionnaire as q, operator_questionnaire as oq WHERE oq.operator_id = '$operator_id' AND q.questionnaire_id = oq.questionnaire_id AND q.enabled = 1"; $rs = $db->GetAll($sql); if (!empty($rs)) { foreach($rs as $r) { $sql = "SELECT count(*) FROM " . LIME_PREFIX ."tokens_{$r['lime_sid']}"; $rs2 = $db->GetRow($sql); if (empty($rs2)) print "" . T_("ERROR: No tokens table defined for LimeSurvey questionnaire") . " {$r['lime_sid']} " . T_("from questionnaire:") . " {$r['description']}
"; else print "{$r['description']}: " . T_("Tokens table exists for Limesurvey questionnaire:") . " {$r['lime_sid']}
"; } } else print "" . T_("ERROR: Cannot find questionnaires with LimeSurvey ID's") . "
"; //quota's full $sql = "SELECT questionnaire_sample_quota_id,q.questionnaire_id,sample_import_id,lime_sgqa,value,comparison,completions,quota_reached,q.lime_sid FROM questionnaire_sample_quota as qsq, questionnaire as q, operator_questionnaire as oq WHERE oq.operator_id = '$operator_id' AND qsq.questionnaire_id = oq.questionnaire_id AND q.questionnaire_id = oq.questionnaire_id AND q.enabled = 1"; $rs = $db->GetAll($sql); if (isset($rs) && !empty($rs)) { foreach($rs as $r) { if ($r['quota_reached'] == 1) { print "" . T_("ERROR: Quota reached for this question") . " - " . $r['lime_sgqa']; } } } //quota row's full $sql = "SELECT qsq.questionnaire_sample_quota_row_id,qsq.quota_reached,qsq.description FROM questionnaire_sample_quota_row as qsq, operator_questionnaire as oq WHERE oq.operator_id = '$operator_id' AND qsq.questionnaire_id = oq.questionnaire_id"; $rs = $db->GetAll($sql); if (isset($rs) && !empty($rs)) { foreach($rs as $r) { if ($r['quota_reached'] == 1) { print "
" . T_("POSSIBLE ERROR: Row quota reached for this quota") . " - " . $r['description']; } } } //no tokens table associated with questionnaire in limesurvey //no sample associated with questionnaire xhtml_foot(); ?>