Skip to content
Snippets Groups Projects
Commit 9d8e7936 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

drop formatReady for items where no formatted input is available, fixes #3222

Closes #3222

Merge request studip/studip!2185
parent 9dac4ca1
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
<? endif ?>
</div>
<? endif ?>
<?= formatReady($answer['answerdata']['text']) ?>
<?= htmlReady($answer['answerdata']['text']) ?>
</li>
<? endif ?>
<? endforeach ?>
......
......@@ -30,7 +30,7 @@ $options = $vote->questiondata['options'];
<? foreach ($vote->questiondata['statements'] as $key => $statement) : ?>
<tr>
<td>
<strong><?= formatReady($statement) ?></strong>
<strong><?= htmlReady($statement) ?></strong>
</td>
<? foreach($options as $option_index => $option) : ?>
......
......@@ -30,7 +30,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum'])
<? foreach ($vote->questiondata['statements'] as $key => $statement) : ?>
<tr>
<td>
<strong><?= formatReady($statement) ?></strong>
<strong><?= htmlReady($statement) ?></strong>
</td>
<? foreach($options as $option) : ?>
......
......@@ -38,7 +38,7 @@ $responseData = $response['answerdata'] ? $response['answerdata']->getArrayCopy(
<?= isset($responseData['answers']) && $index == $responseData['answers'] ? 'checked' : '' ?>>
<? endif ?>
<?= formatReady($answers[$index]) ?>
<?= htmlReady($answers[$index]) ?>
</label>
</li>
......
......@@ -42,7 +42,7 @@ $ordered_answer_options = [];
$ordered_users = [];
foreach ($ordered_results as $index => $value) {
if ($value > 0) {
$ordered_answer_options[] = strip_tags(formatReady($options[$index]));
$ordered_answer_options[] = $options[$index];
} else {
unset($ordered_results[$index]);
}
......@@ -89,7 +89,7 @@ rsort($ordered_results);
<? $percentage = ($countAnswers && isset($results[$key])) ? round((int) $results[$key] / $countAnswers * 100) : 0 ?>
<td style="text-align: right; background-size: <?= $percentage ?>% 100%; background-position: right center; background-image: url('<?= Assets::image_path("vote_lightgrey.png") ?>'); background-repeat: no-repeat;" width="50%">
<strong><?= formatReady($answer) ?></strong>
<strong><?= htmlReady($answer) ?></strong>
</td>
<td style="white-space: nowrap;">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment