aboutsummaryrefslogtreecommitdiff
path: root/templates/courseware/block_types/default.php
blob: c0dc9004b1d4f0ceccf4aab9372691d1b0c14657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<h5 style="font-size: 14px;"><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5>
<h6 style="font-size: 12px;"><?= _('Block-Daten') ?>:</h6>
<? foreach ($payload as $key => $value): ?>
    <? $value = is_bool($value) ? ($value ? 'true' : 'false') : $value; ?>
    <? if (!empty($value)): ?>
        <h6><?= htmlReady(str_replace('_', ' ', strtocamelcase($key, true)) . ' => ' . $value) ?></h6>
    <? endif; ?>
<? endforeach; ?>
<? if($files): ?>
    <h6 style="font-size: 12px;"><?= _('Block-Dateien') ?>:</h6>
    <? foreach ($files as $file): ?>
        <? if ($file === null) { continue; } ?>
        <p>
            <a href="<?= htmlReady($file->getDownloadURL()); ?>"><?= htmlReady($file->name); ?></a>
        </p>
    <? endforeach; ?>
<? endif; ?>