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

Add specification for storing self completion details

Allow for self completion without using interviewer argument to Limesurvey (need to update to take details from database)
This commit is contained in:
Adam Zammit
2013-01-30 15:45:24 +11:00
parent 61a7ac0803
commit 01cd69c0fc
5 changed files with 95 additions and 26 deletions

View File

@@ -56,6 +56,7 @@ if (isset($_GET['loadall']) && $_GET['loadall'] == "reload" && isset($_GET['toke
//Must destroy the session
session_unset();
}
//end queXS Addition
//LimeExpressionManager::SetSurveyId($surveyid); // must be called early - it clears internal cache if a new survey is being used
@@ -120,6 +121,21 @@ if ( $embedded && $embedded_inc != '' )
require_once( $embedded_inc );
}
//queXS Addition
//see who is doing this survey - an interviewer or the respondent directly
$interviewer=returnglobal('interviewer');
if (!empty($interviewer) || (isset($_SESSION['interviewer']) && $_SESSION['interviewer'] == true))
{
$interviewer = true;
$_SESSION['interviewer'] = true;
}
else
{
$interviewer = false;
}
//CHECK FOR REQUIRED INFORMATION (sid)
if (!$surveyid || !$surveyexists)
{
@@ -512,16 +528,20 @@ else
//SET THE TEMPLATE DIRECTORY
if (!$thissurvey['templatedir'])
if ($interviewer)
{
$thistpl=sGetTemplatePath($defaulttemplate);
//SET THE TEMPLATE DIRECTORY
if (!$thissurvey['templatedir'])
{
$thistpl=sGetTemplatePath($defaulttemplate);
}
else
{
$thistpl=sGetTemplatePath($thissurvey['templatedir']);
}
}
else
{
$thistpl=sGetTemplatePath($thissurvey['templatedir']);
}
$thistpl=sGetTemplatePath('sherpa');