Skip to content

Commit

Permalink
New feature #4927: added SurveyGroupQuestion identifier {SGQ} as a va…
Browse files Browse the repository at this point in the history
…riable for use in questions - thanks to timbee for the patch

dev: also added to question preview

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9755 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
mennodekker committed Feb 9, 2011
1 parent 3dd302a commit 3e7e906
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions admin/preview.php
Expand Up @@ -86,6 +86,7 @@ function noop_checkconditions(value, name, type)
$question['code']=$answers[0][5];
$question['class'] = question_class($qrows['type']);
$question['essentials'] = 'id="question'.$qrows['qid'].'"';
$question['sgq']=$ia[1];
if ($qrows['mandatory'] == 'Y')
{
$question['man_class'] = ' mandatory';
Expand Down
1 change: 1 addition & 0 deletions common_functions.php
Expand Up @@ -2901,6 +2901,7 @@ function templatereplace($line, $replacements=array())
if (strpos($line, "{QUESTION_VALID_MESSAGE}") !== false) $line=str_replace("{QUESTION_VALID_MESSAGE}", $question['valid_message'], $line);
if (strpos($line, "{QUESTION_FILE_VALID_MESSAGE}") !== false) $line=str_replace("{QUESTION_FILE_VALID_MESSAGE}", $question['file_valid_message'], $line);
}
if (strpos($line, "{SGQ}") !== false) $line=str_replace("{SGQ}", $question['sgq'], $line);
}
else
{
Expand Down
1 change: 1 addition & 0 deletions group.php
Expand Up @@ -1248,6 +1248,7 @@ function checkconditions(value, name, type)
$question['class'] = $q_class;
$question['man_class'] = $man_class;
$question['code']=$qa[5];
$question['sgq']=$qa[7];
//===================================================================
$answer=$qa[1];
$help=$qa[2];
Expand Down
1 change: 1 addition & 0 deletions question.php
Expand Up @@ -569,6 +569,7 @@
$question['class'] = $q_class;
$question['man_class'] = $man_class;
$question['code'] = $qa[5];
$question['sgq']=$qa[7];
//===================================================================
$answer=$qa[1];
$help=$qa[2];
Expand Down
1 change: 1 addition & 0 deletions survey.php
Expand Up @@ -965,6 +965,7 @@ function checkconditions(value, name, type)
$question['class'] = $q_class;
$question['man_class'] = $man_class;
$question['code'] = $qa[5];
$question['sgq']=$qa[7];
//===================================================================
$answer=$qa[1];
$help=$qa[2];
Expand Down

0 comments on commit 3e7e906

Please sign in to comment.