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

Reset page position when respondent is to self complete in a different mode

This commit is contained in:
Adam Zammit
2013-04-29 15:35:37 +10:00
parent 2b0cdce5f8
commit 9a1d2b9eb1

View File

@@ -242,6 +242,22 @@ if (isset($_POST['firstname']))
$db->Execute($sql);
//set to start frm the first page if the format for the respondent is not question by question
$sql = "SELECT q.lime_mode
FROM questionnaire as q, `case` as c
WHERE c.case_id = $case_id
AND q.questionnaire_id = c.questionnaire_id";
$lmode = $db->GetOne($sql);
if ($lmode != "question")
{
$sql = "UPDATE " . LIME_PREFIX ."survey_{$lime_sid}
SET lastpage = 0
WHERE token = '$token'";
$db->Execute($sql);
}
if (isset($_POST['submith']))
{