mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Added IS_INTERVIEWER token so can check if the questionnaire is administered by an interviewer by the following Lime Expression Manager code: {if(IS_INTERVIEWER,'This is an interviewer','THIS IS NOT AN INTERVIEWER')}
This commit is contained in:
@@ -50,11 +50,6 @@ function templatereplace($line, $replacements=array(), $anonymized=false, $quest
|
|||||||
$_templateurl = sGetTemplateURL($_templatename) . '/';
|
$_templateurl = sGetTemplateURL($_templatename) . '/';
|
||||||
$templatedir = sgetTemplatePath($_templatename);
|
$templatedir = sgetTemplatePath($_templatename);
|
||||||
|
|
||||||
if (stripos($line, "</head>"))
|
|
||||||
{
|
|
||||||
//queXS Addition
|
|
||||||
$textfocus = "";
|
|
||||||
|
|
||||||
$interviewer=returnglobal('interviewer');
|
$interviewer=returnglobal('interviewer');
|
||||||
if (!empty($interviewer) || (isset($_SESSION['interviewer']) && $_SESSION['interviewer'] == true))
|
if (!empty($interviewer) || (isset($_SESSION['interviewer']) && $_SESSION['interviewer'] == true))
|
||||||
{
|
{
|
||||||
@@ -66,6 +61,11 @@ function templatereplace($line, $replacements=array(), $anonymized=false, $quest
|
|||||||
$interviewer = false;
|
$interviewer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stripos($line, "</head>"))
|
||||||
|
{
|
||||||
|
//queXS Addition
|
||||||
|
$textfocus = "";
|
||||||
|
|
||||||
if ($interviewer)
|
if ($interviewer)
|
||||||
{
|
{
|
||||||
$textfocus =
|
$textfocus =
|
||||||
@@ -770,6 +770,7 @@ EOD;
|
|||||||
|
|
||||||
//queXS Addition
|
//queXS Addition
|
||||||
include_once("quexs.php");
|
include_once("quexs.php");
|
||||||
|
$coreReplacements['IS_INTERVIEWER'] = $interviewer;
|
||||||
$coreReplacements = array_merge($coreReplacements,quexs_core_replace());
|
$coreReplacements = array_merge($coreReplacements,quexs_core_replace());
|
||||||
|
|
||||||
if (!is_null($replacements) && is_array($replacements))
|
if (!is_null($replacements) && is_array($replacements))
|
||||||
|
|||||||
Reference in New Issue
Block a user