From b505e48d0af49f0bcafaa5ea514a69076777ac66 Mon Sep 17 00:00:00 2001 From: azammitdcarf Date: Tue, 17 Mar 2009 23:26:54 +0000 Subject: [PATCH] Updated language information --- admin/addshift.php | 2 +- admin/callhistory.php | 4 ++++ admin/callrestrict.php | 2 +- admin/clientquestionnaire.php | 2 +- admin/clients.php | 2 +- admin/databasestrings.php | 8 +++++++- admin/dataoutput.php | 8 ++++---- admin/displayappointments.php | 3 +++ admin/import.php | 2 +- admin/operatorquestionnaire.php | 2 +- admin/operatorskill.php | 4 ++-- admin/outcomes.php | 6 ++++++ admin/questionnaireprefill.php | 2 +- admin/shifttemplate.php | 5 ++--- admin/supervisor.php | 19 ++++++++++++++----- admin/timezonetemplate.php | 2 +- appointmentlist.php | 1 + callhistory.php | 3 +++ calllist.php | 3 +++ client/index.php | 3 +++ nocaseavailable.php | 29 ++++++++++++++++++++++++++++- 21 files changed, 88 insertions(+), 24 deletions(-) diff --git a/admin/addshift.php b/admin/addshift.php index ea921742..d77a4d73 100644 --- a/admin/addshift.php +++ b/admin/addshift.php @@ -244,7 +244,7 @@ if ($questionnaire_id != false) -

+

"/>

diff --git a/admin/callhistory.php b/admin/callhistory.php index 91162b6b..d7abe1d1 100644 --- a/admin/callhistory.php +++ b/admin/callhistory.php @@ -69,8 +69,12 @@ if ($operator_id) if (empty($rs)) print "

" . T_("No calls ever made") . "

"; else + { + translate_array($rs,array("des")); xhtml_table($rs,array("start","end","case_id","opname","des","firstName"),array(T_("Date/Time call start"),T_("Time end"),T_("Case ID"),T_("Operator"),T_("Outcome"),T_("Respondent"))); + } } + else print "

" . T_("No operator") . "

"; diff --git a/admin/callrestrict.php b/admin/callrestrict.php index ffc51048..187bcd94 100644 --- a/admin/callrestrict.php +++ b/admin/callrestrict.php @@ -119,7 +119,7 @@ $daysofweek = $db->Execute($sql); $count = 0; foreach($shifts as $shift) { - print "" . $daysofweek->GetMenu("day[$count]",$shift['dt']) . ""; + print "" . $daysofweek->GetMenu("day[$count]",T_($shift['dt'])) . ""; $daysofweek->MoveFirst(); $count++; } diff --git a/admin/clientquestionnaire.php b/admin/clientquestionnaire.php index 58384ad5..2713e964 100644 --- a/admin/clientquestionnaire.php +++ b/admin/clientquestionnaire.php @@ -264,7 +264,7 @@ foreach($clients as $v) } -print "

"; +print "

"; xhtml_foot(); diff --git a/admin/clients.php b/admin/clients.php index 42d669b7..83b8bdf9 100644 --- a/admin/clients.php +++ b/admin/clients.php @@ -90,7 +90,7 @@ if ($a)

-

+

" />

diff --git a/admin/dataoutput.php b/admin/dataoutput.php index 661aeb48..829ee40e 100644 --- a/admin/dataoutput.php +++ b/admin/dataoutput.php @@ -117,14 +117,14 @@ if (isset($_GET['sample_var'])) xhtml_head(T_("Data output"),true,false,array("../js/window.js")); -print "

Please select a questionnaire

"; +print "

" . T_("Please select a questionnaire") . "

"; $questionnaire_id = false; if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']); display_questionnaire_chooser($questionnaire_id); if ($questionnaire_id) { - print "

Download all data for this questionnaire

"; + print "

". T_("Download all data for this questionnaire") . "

"; $sample_import_id = false; if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']); @@ -132,14 +132,14 @@ if ($questionnaire_id) if ($sample_import_id) { - print "

Download data for this sample

"; + print "

" . T_("Download data for this sample") . "

"; //get sample vars $sql = "SELECT sv.var as value, sv.var as description FROM `sample_var` as sv WHERE sv.sample_id = (SELECT sample_id FROM sample WHERE import_id = '$sample_import_id' LIMIT 1)"; //download a key file linking the caseid to the sample - print "

Download key file: select sample var

"; + print "

" . T_("Download key file: select sample var") . "

"; display_chooser($db->GetAll($sql),"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id"); diff --git a/admin/displayappointments.php b/admin/displayappointments.php index 8a8fefb7..3b10cc46 100644 --- a/admin/displayappointments.php +++ b/admin/displayappointments.php @@ -110,7 +110,10 @@ else $rs = $db->GetAll($sql); if (!empty($rs)) + { + translate_array($rs,array("outcome")); xhtml_table($rs,array("description","case_id","start","end","makerName","firstName","lastName","outcome","callerName","link"),array(T_("Questionnaire"),T_("Case ID"),T_("Start"),T_("End"),T_("Operator Name"),T_("Respondent Name"),T_("Surname"),T_("Current outcome"),T_("Operator who called"),T_("Delete"))); + } else print "

" . T_("No appointments in the future") . "

"; diff --git a/admin/import.php b/admin/import.php index a2e86b16..728af951 100644 --- a/admin/import.php +++ b/admin/import.php @@ -118,7 +118,7 @@ else

-

+

"/>

"; +print "

"; xhtml_foot(); diff --git a/admin/operatorskill.php b/admin/operatorskill.php index 1da0f6d7..a43a90c0 100644 --- a/admin/operatorskill.php +++ b/admin/operatorskill.php @@ -240,7 +240,7 @@ print "
"; print ""; foreach($outcome_types as $q) { - print ""; + print ""; } print ""; @@ -263,7 +263,7 @@ foreach($operators as $v) } -print "
{$q['description']}" . T_($q['description']) . "

"; +print "

"; xhtml_foot(); diff --git a/admin/outcomes.php b/admin/outcomes.php index c02d5490..7951ffdf 100644 --- a/admin/outcomes.php +++ b/admin/outcomes.php @@ -131,7 +131,10 @@ if ($questionnaire_id != false) $rs = $db->GetAll($sql); if (!empty($rs)) + { + translate_array($rs,array("des")); xhtml_table($rs,array("des","count"),array(T_("Outcome"),T_("Count")),"tclass",array("des" => "Complete")); + } else print "

" . T_("No outcomes recorded for this questionnaire") . "

"; @@ -182,7 +185,10 @@ if ($questionnaire_id != false) $rs = $db->GetAll($sql); if (!empty($rs)) + { + translate_array($rs,array("des")); xhtml_table($rs,array("des","count"),array(T_("Outcome"),T_("Count")),"tclass",array("des" => "Complete")); + } else print "

" . T_("No outcomes recorded for this sample") . "

"; } diff --git a/admin/questionnaireprefill.php b/admin/questionnaireprefill.php index e2c13684..1eaa0f9b 100644 --- a/admin/questionnaireprefill.php +++ b/admin/questionnaireprefill.php @@ -161,7 +161,7 @@ if ($questionnaire_id != false)
-

+ "/>

Execute($sql); - - + ?>
@@ -119,7 +118,7 @@ $daysofweek = $db->Execute($sql); $count = 0; foreach($shifts as $shift) { - print ""; + print ""; $daysofweek->MoveFirst(); $count++; } diff --git a/admin/supervisor.php b/admin/supervisor.php index e48f5ef9..4af4b8e9 100644 --- a/admin/supervisor.php +++ b/admin/supervisor.php @@ -120,7 +120,9 @@ if (isset($_GET['call_id'])) FROM outcome as o, `call` as c WHERE c.call_id = '$call_id'"; - display_chooser($db->GetAll($sql), "set_outcome_id", "set_outcome_id",true,false,false); + $rs2 = $db->GetAll($sql); + translate_array($rs2,array("description")); + display_chooser($rs2, "set_outcome_id", "set_outcome_id",true,false,false); ?>

"/>

@@ -165,7 +167,7 @@ if ($case_id != false) print "

" . T_("Project") . ": {$rs['qd']}

"; print "

" . T_("Sample") . ": {$rs['sd']}

"; - print "

". T_("Current outcome:") ." {$rs['description']}

"; + print "

". T_("Current outcome:") ." " . T_($rs['description']) . "

"; $current_outcome_id = $rs['outcome_id']; @@ -184,7 +186,10 @@ if ($case_id != false) $rs = $db->GetAll($sql); if (!empty($rs)) + { + translate_array($rs,array("outcome")); xhtml_table($rs,array("description","start","end","makerName","firstName","lastName","outcome","callerName","link"),array(T_("Questionnaire"),T_("Start"),T_("End"),T_("Operator Name"),T_("Respondent Name"),T_("Surname"),T_("Current outcome"),T_("Operator who called"),T_("Delete"))); + } else print "

" . T_("No appointments for this case") . "

"; @@ -203,8 +208,10 @@ if ($case_id != false) if (empty($rs)) print "

" . T_("No calls made") . "

"; else + { + translate_array($rs,array("des")); xhtml_table($rs,array("start","des","phone","link","firstName"),array(T_("Date/Time"),T_("Outcome"),T_("Phone number"),T_("Change outcome"),T_("Operator"))); - + } //view notes $sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, op.firstName, op.lastName, c.note as note @@ -251,8 +258,10 @@ if ($case_id != false) GetAll($sql), "outcome_id", "outcome_id",true,false,false); + + $rs2 = $db->GetAll($sql); + translate_array($rs2,array("description")); + display_chooser($rs2, "outcome_id", "outcome_id",true,false,false); ?>

"/>

diff --git a/admin/timezonetemplate.php b/admin/timezonetemplate.php index 91d5d0aa..a235818a 100644 --- a/admin/timezonetemplate.php +++ b/admin/timezonetemplate.php @@ -101,7 +101,7 @@ $sql = "SELECT Time_zone_name ?>

-

+ "/>

" . T_("No calls ever made") . "

"; else + { + translate_array($rs,array("des")); xhtml_table($rs,array("start","case_id","des","firstName"),array(T_("Date/Time"),T_("Case ID"),T_("Outcome"),T_("Respondent"))); + } } else print "

" . T_("No operator") . "

"; diff --git a/calllist.php b/calllist.php index 9815cba3..68571e54 100644 --- a/calllist.php +++ b/calllist.php @@ -75,7 +75,10 @@ if ($case_id) if (empty($rs)) print "

" . T_("No calls made") . "

"; else + { + translate_array($rs,array("des")); xhtml_table($rs,array("start","des","cphone","firstName"),array(T_("Date/Time"),T_("Outcome"),T_("Number called"),T_("Operator"))); + } } else print "

" . T_("No case") . "

"; diff --git a/client/index.php b/client/index.php index 79d2e363..c202b0e9 100644 --- a/client/index.php +++ b/client/index.php @@ -105,7 +105,10 @@ if ($client_id) $rs = $db->GetAll($sql); if (!empty($rs)) + { + translate_array($rs,array("des")); xhtml_table($rs,array("des","count"),array(T_("Outcome"),T_("Count")),"tclass",array("des" => "Complete")); + } else print "

" . T_("No outcomes recorded for this questionnaire") . "

"; diff --git a/nocaseavailable.php b/nocaseavailable.php index 01759dc1..e47cdf7e 100644 --- a/nocaseavailable.php +++ b/nocaseavailable.php @@ -51,6 +51,11 @@ include ("functions/functions.xhtml.php"); */ include ("functions/functions.operator.php"); +/** + * Limesurvey functions + */ +include ("functions/functions.limesurvey.php"); + xhtml_head(T_("No case available"),true,array("css/table.css")); $operator_id = get_operator_id(); @@ -146,7 +151,7 @@ else //no link to limesurvey $sql = "SELECT q.lime_sid, q.description FROM questionnaire as q, operator_questionnaire as oq - WHERE oq.operator_id = '1' + WHERE oq.operator_id = '$operator_id' AND q.questionnaire_id = oq.questionnaire_id"; $rs = $db->GetAll($sql); @@ -170,6 +175,28 @@ 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"; + +$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']; + } + } +} + + //no tokens table associated with questionnaire in limesurvey

" . $daysofweek->GetMenu("day[$count]",$shift['dt']) . "
" . $daysofweek->GetMenu("day[$count]",T_($shift['dt'])) . "