Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 12, 2021
2 parents fd45b98 + 1e1a589 commit fe5080e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
Expand Up @@ -119,7 +119,7 @@ public function actionEdit($questionId, $tabOverviewEditor = 'overview')
{
$questionId = (int) $questionId;

/** @var Question|null */
/** @var $question Question|null */
$question = Question::model()->findByPk($questionId);
if (empty($question)) {
throw new CHttpException(404, gT("Invalid question id"));
Expand Down
Expand Up @@ -13,6 +13,13 @@ public function run()
if ($this->generalOption->inputType === 'buttongroup') {
//echo '<pre>';print_r($this->generalOption->formElement->options);die;
}

//workaround if inputType is text, then take out "" in the middle of the string and replace every " inside the string
//with '
if($this->generalOption->inputType === 'text'){
$this->generalOption->formElement->value = str_replace('"', "'",$this->generalOption->formElement->value);
}

$content = $this->render($this->generalOption->inputType, null, true);
$this->render('layout', ['content' => $content]);
}
Expand Down
9 changes: 7 additions & 2 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -3947,13 +3947,18 @@ public function setVariableAndTokenMappingsForExpressionManager($surveyid, $forc

$token = Token::model($surveyid)->findByToken($_SESSION[$this->sessid]['token']);
if ($token) {
$tokenEncryptionOptions = $survey->getTokenEncryptionOptions();
foreach ($token as $key => $val) {
$this->knownVars["TOKEN:" . strtoupper($key)] = array(
// Decrypt encrypted token attributes
if (isset($tokenEncryptionOptions['columns'][$key]) && $tokenEncryptionOptions['columns'][$key] === 'Y'){
$val = $token->decrypt($val);
}
$this->knownVars["TOKEN:" . strtoupper($key)] = [
'code' => $anonymized ? '' : $val,
'jsName_on' => '',
'jsName' => '',
'readWrite' => 'N',
);
];
}
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion application/models/Question.php
Expand Up @@ -620,7 +620,7 @@ public static function getQuestionClass($sType)
{
switch ($sType) {
case Question::QT_1_ARRAY_MULTISCALE:
return 'array-flexible-duel-scale';
return 'array-flexible-dual-scale';
case Question::QT_5_POINT_CHOICE:
return 'choice-5-pt-radio';
case Question::QT_A_ARRAY_5_CHOICE_QUESTIONS:
Expand Down
8 changes: 6 additions & 2 deletions application/views/questionAdministration/summary.php
Expand Up @@ -173,10 +173,14 @@
</tr>
<?php endif; ?>

<!-- Relevance equation -->
<!-- Condition for this question -->
<?php if (trim($question->relevance) != ''): ?>
<tr>
<td><?php eT("Relevance equation:"); ?></td>
<td>
<strong>
<?php eT("Condition:"); ?>
</strong>
</td>
<td>
<?php
LimeExpressionManager::ProcessString("{" . $question->relevance . "}", $question->qid); // tests Relevance equation so can pretty-print it
Expand Down

0 comments on commit fe5080e

Please sign in to comment.