Skip to content
Snippets Groups Projects
Commit 8f5bc299 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

prevent more php warnings

parent f27bcbd3
No related branches found
No related tags found
1 merge request!9Resolve "PHP8-Warnungen"
......@@ -23,7 +23,7 @@
</select><!--
<? else: ?>
--><input type="text" class="character_input cloze_input" name="answer[<?= $blank ?>]"
style="width: <?= $exercise->getInputWidth($blank) ?>em;" value="<?= htmlReady($response[$blank]) ?>"><!--
style="width: <?= $exercise->getInputWidth($blank) ?>em;" value="<?= htmlReady(isset($response[$blank]) ? $response[$blank] : '') ?>"><!--
<? endif ?>
<? endif ?>
<? endforeach ?>
......
......@@ -21,7 +21,7 @@
</ul>
<div id="commented-<?= $exercise->id ?>">
<? if ($!empty(edit_solution)): ?>
<? if (!empty($edit_solution)): ?>
<? if ($exercise->getLayout() === 'markup'): ?>
<? $answer = $response[0] ?>
<? elseif ($exercise->getLayout() === 'code'): ?>
......@@ -66,7 +66,7 @@
<? endif ?>
</div>
<? if ($edit_solution): ?>
<? if (!empty($edit_solution)): ?>
<?= Studip\Button::create(_vips('Lösung bearbeiten'), 'edit_solution', ['class' => 'edit_solution']) ?>
<? if ($exercise->getLayout() === 'code'): ?>
......
<? if ($exercise->getLayout() !== 'none'): ?>
<? if ($exercise->task['template'] != ''): ?>
<? if (!empty($exercise->task['template'])): ?>
<div class="vips_tabs">
<ul>
<li>
......@@ -20,7 +20,7 @@
<? /* student answer */ ?>
<div id="solution-<?= $exercise->id ?>">
<? $answer = isset($response) ? $response[0] : $exercise->task['template'] ?>
<? $answer = isset($response) ? $response[0] : (isset($exercise->task['template']) ? $exercise->task['template'] : '') ?>
<? if ($exercise->getLayout() === 'markup'): ?>
<textarea name="answer[0]" class="character_input size-l wysiwyg" data-editor="removePlugins=studip-quote,studip-upload,ImageUpload" rows="20"><?= wysiwygReady($answer) ?></textarea>
<? elseif ($exercise->getLayout() === 'code'): ?>
......@@ -35,7 +35,7 @@
<? endif ?>
</div>
<? if ($exercise->task['template'] == ''): ?>
<? if (empty($exercise->task['template'])): ?>
</label>
<? else: ?>
<? /* default answer */ ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment