2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Merging the Limesurvey 1.91+ branch of queXS in to the trunk

This commit is contained in:
azammitdcarf
2011-09-08 01:58:41 +00:00
parent dfa55a3b9e
commit eaa9578ab8
2312 changed files with 811461 additions and 597534 deletions

View File

@@ -178,8 +178,9 @@ function return_contact_phone_list($case_id)
*
* @param int $case_id The case ID
* @param bool|int $respondent_id The respondent already selected or false if none selected
* @param bool $first Select the first respondent available if none specifically selected?
*/
function display_respondent_list($case_id,$respondent_id = false)
function display_respondent_list($case_id,$respondent_id = false,$first = false)
{
global $db;
@@ -195,13 +196,21 @@ function display_respondent_list($case_id,$respondent_id = false)
foreach($rs as $r)
{
$rid = $r['respondent_id'];
$selected = "";
if ($respondent_id == false && $first == true)
{
$first = false;
$selected = "selected='selected'";
$respondent_id = $rid;
}
else
$selected = "";
if ($rid == $respondent_id) $selected="selected='selected'";
print "<option value='?respondent_id=$rid' $selected>{$r['firstName']} {$r['lastName']}</option>";
}
}
print "<option value='?respondent_id=0' class='addresp'>" . T_("Add respondent") . "</option></select></div>";
return $respondent_id;
}

View File

@@ -173,7 +173,8 @@ function get_stats_by_shift($questionnaire_id,$shift_id)
*/
function sec_to_time($seconds)
{
$h = 0;
$m = 0;
if($seconds >= 3600){
$h = floor($seconds/3600);
$seconds = ($seconds%3600);

View File

@@ -117,9 +117,15 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
foreach ($fields as $e)
{
print "<td>{$row[$e]}</td>";
print "<td>";
if (isset($row[$e])) print $row[$e];
print "</td>";
if ($total && in_array($e,$total))
{
if (!isset($tot[$e]))
$tot[$e] = 0;
$tot[$e] += $row[$e];
}
}
print "</tr>";
}