Skip to content

Commit

Permalink
Codition is now shown (inserted) correctly when getting the value fro…
Browse files Browse the repository at this point in the history
…m db; text change "relevance equation"->"Condition"
  • Loading branch information
Trischi80 committed Feb 16, 2021
1 parent c5c1953 commit 8535114
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
8 changes: 6 additions & 2 deletions application/views/questionAdministration/summary.php
Original file line number Diff line number Diff line change
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 8535114

Please sign in to comment.