Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:LimeSurvey/LimeSurvey.git int…
Browse files Browse the repository at this point in the history
…o develop

# Conflicts:
#	application/controllers/admin/questions.php
#	application/core/Survey_Common_Action.php
#	application/helpers/expressions/em_manager_helper.php
#	application/helpers/questionHelper.php
  • Loading branch information
Shnoulle committed Oct 23, 2018
2 parents 762602c + 2461a56 commit b270345
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 57 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/database.php
Expand Up @@ -356,7 +356,7 @@ private function actionUpdateAnswerOptions($iSurveyID)
}

/**
* action to do when update sub-questions
* action to do when update subquestions
* @param integer $iSurveyID
* @return void
* @throws CHttpException
Expand Down
7 changes: 4 additions & 3 deletions application/core/LsDefaultDataSets.php
Expand Up @@ -111,6 +111,7 @@ public static function getTemplateDefaultTexts($mode, $language='en')
public static function getSurveyMenuData()
{
$headerArray = [
'id',
'parent_id',
'survey_id',
'user_id',
Expand All @@ -130,9 +131,9 @@ public static function getSurveyMenuData()
$sOldLanguage = App()->language;
App()->setLanguage('en');
$returnArray = [];
$returnArray[] = array_combine($headerArray, [null,null,null,1,0,'settings',gT('Survey settings'),'side',gT('Survey settings'),1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0,1]);
$returnArray[] = array_combine($headerArray, [null,null,null,2,0,'mainmenu',gT('Survey menu'),'side',gT('Main survey menu'),1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0,1]);
$returnArray[] = array_combine($headerArray, [null,null,null,3,0,'quickmenu',gT('Quick menu'),'collapsed',gT('Quick menu'),1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0,0]);
$returnArray[] = array_combine($headerArray, [1,null,null,null,1,0,'settings',gT('Survey settings'),'side',gT('Survey settings'),1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0,1]);
$returnArray[] = array_combine($headerArray, [2,null,null,null,2,0,'mainmenu',gT('Survey menu'),'side',gT('Main survey menu'),1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0,1]);
$returnArray[] = array_combine($headerArray, [3,null,null,null,3,0,'quickmenu',gT('Quick menu'),'collapsed',gT('Quick menu'),1, date('Y-m-d H:i:s'),0,date('Y-m-d H:i:s'),0,0]);
App()->setLanguage($sOldLanguage);

return $returnArray;
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/admin/export/HtmlWriter.php
Expand Up @@ -109,7 +109,7 @@ protected function openTag($tag, $options = array())
}

/**
* Renders a question and recurses into sub-questions.
* Renders a question and recurses into subquestions.
* @param Question $question
* @param string $value
*/
Expand Down
95 changes: 51 additions & 44 deletions application/helpers/expressions/em_manager_helper.php

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions application/helpers/frontend_helper.php
Expand Up @@ -2034,6 +2034,11 @@ function killSurveySession($iSurveyID)
unset($_SESSION['survey_'.$iSurveyID]);
// Force EM to refresh
LimeExpressionManager::SetDirtyFlag();

// unsetting LEMsingleton from session so new survey execution would start with new LEM instance
// SetDirtyFlag() method doesn't reset LEM properly
// this solution fixes bug: https://bugs.limesurvey.org/view.php?id=10162
unset($_SESSION["LEMsingleton"]);
}

/**
Expand Down
10 changes: 5 additions & 5 deletions application/helpers/questionHelper.php
Expand Up @@ -124,7 +124,7 @@ public static function getAttributesDefinitions()
'options'=>array(0=>gT('Hidden', 'unescaped'),
1=>gT('Disabled', 'unescaped')),
'default'=>0,
"help"=>gT("Specify how array-filtered sub-questions should be displayed"),
"help"=>gT("Specify how array-filtered subquestions should be displayed"),
"caption"=>gT('Array filter style')
);

Expand Down Expand Up @@ -324,8 +324,8 @@ public static function getAttributesDefinitions()
'sortorder'=>220,
'inputtype'=>'textarea',
'expression'=>2,
"help"=>gT('Enter a boolean equation to validate each sub-question.'),
"caption"=>gT('Sub-question validation equation')
"help"=>gT('Enter a boolean equation to validate each subquestion.'),
"caption"=>gT('Subquestion validation equation')
);

self::$attributes["em_validation_sq_tip"] = array(
Expand All @@ -335,8 +335,8 @@ public static function getAttributesDefinitions()
'inputtype'=>'textarea',
'expression'=>1,
'i18n'=>true,
"help"=>gT('This is a tip shown to the participant describing the sub-question validation equation.'),
"caption"=>gT('Sub-question validation tip')
"help"=>gT('This is a tip shown to the participant describing the subquestion validation equation.'),
"caption"=>gT('Subquestion validation tip')
);

self::$attributes["exclude_all_others"] = array(
Expand Down
Expand Up @@ -40,13 +40,16 @@
<?php
echo $aAttribute['caption'];
if ($aAttribute['i18n']==true) { ?> (<?php echo $aAttribute['language'] ?>)<?php }
?>:
?>
<?php if (!empty($aAttribute['help'])): ?>
<a class="text-primary show-help" data-toggle="collapse" href="#help<?php echo $aAttribute['name'];?>" aria-expanded="false" aria-controls="help<?php echo $aAttribute['name'];?>" aria-hidden=true>
<span class="fa fa-info-circle" ></span>
</a>
<?php endif; ?>
</label>
<?php if (!empty($aAttribute['help'])): ?>
<p class="help-block collapse" id="help<?php echo $aAttribute['name'];?>"><?php echo $aAttribute['help'];?></p>

<?php endif; ?>
<!-- Input -->
<div class="">
<?php
Expand Down
Expand Up @@ -80,7 +80,7 @@
</thead>

<tbody>
<!-- Loop all sub-questions -->
<!-- Loop all subquestions -->
{% for ansrow in aSubQuestions %}
<!-- Check for repeat headings -->
{% if ansrow.repeatheadings %}
Expand Down

0 comments on commit b270345

Please sign in to comment.