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

Only display email button when enabled for questionnaire

Set a case note when completed online
This commit is contained in:
Adam Zammit
2013-02-27 15:04:47 +11:00
parent 62c5937765
commit 2b7eeff881
3 changed files with 52 additions and 20 deletions

View File

@@ -102,10 +102,22 @@ function quexs_completed_by_respondent($surveyid,$clienttoken)
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$sql = "UPDATE `case`
SET current_outcome_id = 34
SET current_outcome_id = 40
WHERE token = '$clienttoken'";
$db->Execute($sql);
$sql = "SELECT case_id
FROM `case`
WHERE token = '$clienttoken'";
$case_id = $db->GetOne($sql);
//Add a case note to clarify (need to translate this string)
$sql = "INSERT INTO `case_note` (case_id,operator_id,note,datetime)
VALUES ($case_id,1,'Self completed online',NOW())";
$db->Execute($sql);
}