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 @@ ...@@ -23,7 +23,7 @@
</select><!-- </select><!--
<? else: ?> <? else: ?>
--><input type="text" class="character_input cloze_input" name="answer[<?= $blank ?>]" --><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 ?>
<? endif ?> <? endif ?>
<? endforeach ?> <? endforeach ?>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</ul> </ul>
<div id="commented-<?= $exercise->id ?>"> <div id="commented-<?= $exercise->id ?>">
<? if ($!empty(edit_solution)): ?> <? if (!empty($edit_solution)): ?>
<? if ($exercise->getLayout() === 'markup'): ?> <? if ($exercise->getLayout() === 'markup'): ?>
<? $answer = $response[0] ?> <? $answer = $response[0] ?>
<? elseif ($exercise->getLayout() === 'code'): ?> <? elseif ($exercise->getLayout() === 'code'): ?>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<? endif ?> <? endif ?>
</div> </div>
<? if ($edit_solution): ?> <? if (!empty($edit_solution)): ?>
<?= Studip\Button::create(_vips('Lösung bearbeiten'), 'edit_solution', ['class' => 'edit_solution']) ?> <?= Studip\Button::create(_vips('Lösung bearbeiten'), 'edit_solution', ['class' => 'edit_solution']) ?>
<? if ($exercise->getLayout() === 'code'): ?> <? if ($exercise->getLayout() === 'code'): ?>
......
<? if ($exercise->getLayout() !== 'none'): ?> <? if ($exercise->getLayout() !== 'none'): ?>
<? if ($exercise->task['template'] != ''): ?> <? if (!empty($exercise->task['template'])): ?>
<div class="vips_tabs"> <div class="vips_tabs">
<ul> <ul>
<li> <li>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<? /* student answer */ ?> <? /* student answer */ ?>
<div id="solution-<?= $exercise->id ?>"> <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'): ?> <? 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> <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'): ?> <? elseif ($exercise->getLayout() === 'code'): ?>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<? endif ?> <? endif ?>
</div> </div>
<? if ($exercise->task['template'] == ''): ?> <? if (empty($exercise->task['template'])): ?>
</label> </label>
<? else: ?> <? else: ?>
<? /* default answer */ ?> <? /* default answer */ ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment