diff --git a/lib/models/Courseware/BlockTypes/BlockType.php b/lib/models/Courseware/BlockTypes/BlockType.php index bee1df7d450bc8a81f6c8a4f5ccbd2df9d1b6c3d..64cd5cc7bf8fbefae27fee0f5cbac7b533e681da 100644 --- a/lib/models/Courseware/BlockTypes/BlockType.php +++ b/lib/models/Courseware/BlockTypes/BlockType.php @@ -292,6 +292,18 @@ abstract class BlockType } } + protected function getFileRefById(string $fileId) + { + $file_ref = \FileRef::find($fileId); + $user = \User::findCurrent(); + + if ($file_ref && $file_ref->getFileType()->isDownloadable($user->id)) { + return $file_ref; + } else { + return null; + } + } + /** * Copies a file to a specified range. * @@ -419,7 +431,8 @@ abstract class BlockType } $template->set_attributes([ 'title' => $this->getTitle(), - 'payload' => $this->getPayload() + 'payload' => $this->getPayload(), + 'files' => $this->getFiles() ]); } catch (\Exception $e) { // it catches the exception mostly because the template file could not be found. diff --git a/lib/models/Courseware/BlockTypes/DialogCards.php b/lib/models/Courseware/BlockTypes/DialogCards.php index 7d3c8ba0735de742361adf32932ed2648166b824..e7c82f8d6c2d859dc263ad7eb34b4bbdacd01fa1 100644 --- a/lib/models/Courseware/BlockTypes/DialogCards.php +++ b/lib/models/Courseware/BlockTypes/DialogCards.php @@ -43,11 +43,13 @@ class DialogCards extends BlockType foreach ($payload['cards'] as &$card) { if ($card['front_file_id']) { $card['front_file'] = $this->getFileById($card['front_file_id']); + $card['front_file_ref'] = $this->getFileRefById($card['front_file_id']); } else { $card['front_file'] = []; } if ($card['back_file_id']) { $card['back_file'] = $this->getFileById($card['back_file_id']); + $card['back_file_ref'] = $this->getFileRefById($card['back_file_id']); } else { $card['back_file'] = []; } diff --git a/lib/models/Courseware/StructuralElement.php b/lib/models/Courseware/StructuralElement.php index 7a127dbe18efe2b3c3bf38845e4b44a68b9b61e2..f518cc1600592d76687844d9d901665d4522bf0b 100644 --- a/lib/models/Courseware/StructuralElement.php +++ b/lib/models/Courseware/StructuralElement.php @@ -830,45 +830,52 @@ SQL; $doc->setHeaderTitle(sprintf(_('Courseware von %s'), $this->user->getFullname())); } - $doc->addPage(); - if (!self::canRead($user)) { + $doc->addPage(); $doc->addContent(_('Diese Seite steht Ihnen nicht zur Verfügung!')); return $doc; } - $doc->writeHTML($this->getElementPdfExport('', $with_children, $user)); + $this->getElementPdfExport(0, $with_children, $user, $doc); + + if ($with_children) { + $doc->addTOCPage(); + $doc->SetFont('helvetica', 'B', 16); + $doc->MultiCell(0, 0, _('Inhaltsverzeichnis'), 0, 'C', 0, 1, '', '', true, 0); + $doc->Ln(); + $doc->SetFont('helvetica', '', 12); + $doc->addTOC(1, 'helvetica', '.', _('Inhaltsverzeichnis'), 'B', array(0,0,0)); + $doc->endTOCPage(); + } + return $doc; } - private function getElementPdfExport(string $parent_name, bool $with_children, $user) + private function getElementPdfExport(int $depth, bool $with_children, $user, $doc) { if (!$this->canRead($user)) { return ''; } - if ($parent_name !== '') { - $parent_name .= ' / '; - } - $html = '<h1>' . $parent_name . $this->title . '</h1>'; + $doc->addPage(); + $doc->Bookmark(htmlReady($this->title), $depth, 0, '', '', array(128,0,0)); + $html = "<h1>" . htmlReady($this->title) . "</h1>"; $html .= $this->getContainerPdfExport(); + $doc->writeHTML($html); + if ($with_children) { - $html .= $this->getChildrenPdfExport($parent_name, $with_children, $user); + $this->getChildrenPdfExport($depth, $with_children, $user, $doc); } - - return $html; } - private function getChildrenPdfExport(string $parent_name, bool $with_children, $user) + private function getChildrenPdfExport(int $depth, bool $with_children, $user, $doc) { $children = self::findBySQL('parent_id = ?', [$this->id]); - $html = ''; + $depth++; foreach ($children as $child) { - $html .= $child->getElementPdfExport($parent_name . $this->title, $with_children, $user); + $child->getElementPdfExport($depth, $with_children, $user, $doc); } - - return $html; } private function getContainerPdfExport() diff --git a/resources/vue/components/courseware/CoursewareStructuralElement.vue b/resources/vue/components/courseware/CoursewareStructuralElement.vue index 8888c41046c26565bbac51326d9fccf31ac65ab2..80db300045c451b56feb7567ae533ac9181cfd23 100644 --- a/resources/vue/components/courseware/CoursewareStructuralElement.vue +++ b/resources/vue/components/courseware/CoursewareStructuralElement.vue @@ -681,6 +681,7 @@ export default { exportChildren: false, oerExportRunning: false, oerChildren: true, + pdfExportChildren: false, containerList: [], isDragging: false, dragOptions: { diff --git a/templates/courseware/block_types/audio.php b/templates/courseware/block_types/audio.php new file mode 100644 index 0000000000000000000000000000000000000000..b779dee95fa29d71f5f91e3423c74a055d52e992 --- /dev/null +++ b/templates/courseware/block_types/audio.php @@ -0,0 +1,9 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Audio') . ': ' ?></p> + <? foreach ($files as $file): ?> + <? if ($file === null) { continue; } ?> + <p> + <a href="<?= htmlReady($file->getDownloadURL()); ?>"><?= htmlReady($file->name); ?></a> + </p> + <? endforeach; ?> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/before_after.php b/templates/courseware/block_types/before_after.php new file mode 100644 index 0000000000000000000000000000000000000000..4bdc1452068220fb5372d17c874008ea49cf5637 --- /dev/null +++ b/templates/courseware/block_types/before_after.php @@ -0,0 +1,10 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Bildvergleich') . ': ' ?></p> + <? foreach ($files as $file): ?> + <? if ($file === null) { continue; } ?> + <p> + <img src="<?= htmlReady($file->getDownloadURL()); ?>"> + <span style="font-style:italic"><?= htmlReady($file->name); ?></span> + </p> + <? endforeach; ?> +</div> diff --git a/templates/courseware/block_types/canvas.php b/templates/courseware/block_types/canvas.php new file mode 100644 index 0000000000000000000000000000000000000000..a8e0b6ffb6892d16729620e7d937ab4022d5a176 --- /dev/null +++ b/templates/courseware/block_types/canvas.php @@ -0,0 +1,13 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Leinwand') . ': ' ?></p> + <? if ($files[0]): ?> + <p> + <img src="<?= htmlReady($files[0]->getDownloadURL()); ?>"> + <span style="font-style:italic"><?= htmlReady($files[0]->name); ?></span> + </p> + <? else: ?> + <p> + <span style="font-style:italic"><?= _('ohne Hintergrundbild'); ?></span> + </p> + <? endif; ?> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/chart.php b/templates/courseware/block_types/chart.php new file mode 100644 index 0000000000000000000000000000000000000000..732aecaf1f6a9e951a074863052b953fc9752083 --- /dev/null +++ b/templates/courseware/block_types/chart.php @@ -0,0 +1,7 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Diagramm') . ': ' ?></p> + <p><?= htmlReady($payload['label']) ?></p> + <? foreach ($payload['content'] as $val): ?> + <p><?= htmlReady($val['label']) . ' => ' . htmlReady($val['value']); ?></p> + <? endforeach; ?> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/code.php b/templates/courseware/block_types/code.php index 0c369e2f31878a137d5a06c9f3e0a9e1dbefd989..456ccdf3d8fac589945e6d9042de35dbc954a584 100644 --- a/templates/courseware/block_types/code.php +++ b/templates/courseware/block_types/code.php @@ -1,2 +1 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> <pre><?= htmlReady($payload['content']) ?></pre> diff --git a/templates/courseware/block_types/confirm.php b/templates/courseware/block_types/confirm.php index 714e8e8e6f2c072075626efad1ffa99817635436..df2267c09ef4df05b5477a8f6e8de15abfdec83d 100644 --- a/templates/courseware/block_types/confirm.php +++ b/templates/courseware/block_types/confirm.php @@ -1,2 +1 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> <p><?= htmlReady($payload['text']) ?></p> diff --git a/templates/courseware/block_types/date.php b/templates/courseware/block_types/date.php index 2f748049af5cdb12b82ef3a74680b19a008a0b74..f892764d1c826a60e50b1f0bf6a75db245af5159 100644 --- a/templates/courseware/block_types/date.php +++ b/templates/courseware/block_types/date.php @@ -1,2 +1 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> <p><?= date('d.m.Y h:i', (int) $payload['timestamp'] / 1000) ?></p> diff --git a/templates/courseware/block_types/default.php b/templates/courseware/block_types/default.php index 6e09444e9984cb1bf877d0f559eb652c310a314f..c0dc9004b1d4f0ceccf4aab9372691d1b0c14657 100644 --- a/templates/courseware/block_types/default.php +++ b/templates/courseware/block_types/default.php @@ -1,8 +1,17 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> -<h6><?= _('Block-Daten') ?>:</h6> +<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; ?> \ No newline at end of file diff --git a/templates/courseware/block_types/dialog_cards.php b/templates/courseware/block_types/dialog_cards.php new file mode 100644 index 0000000000000000000000000000000000000000..6fff3efe7963b80895948edbe837c23dd4f3695c --- /dev/null +++ b/templates/courseware/block_types/dialog_cards.php @@ -0,0 +1,18 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Lernkarten') . ': ' ?></p> + <? foreach ($payload['cards'] as $card): ?> + <p style="font-weight: bold;"><?= _('Karte') . ' ' . htmlReady($card['index']) .': ' ?></p> + <p> + <? if ($card['front_file_ref']): ?> + <img src="<?= htmlReady($card['front_file_ref']->getDownloadURL()); ?>"> + <? endif; ?> + <?= htmlReady($card['front_text']); ?> + </p> + <p> + <? if ($card['front_file_ref']): ?> + <img src="<?= htmlReady($card['back_file_ref']->getDownloadURL()); ?>"> + <? endif; ?> + <?= htmlReady($card['back_text']); ?> + </p> + <? endforeach; ?> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/document.php b/templates/courseware/block_types/document.php new file mode 100644 index 0000000000000000000000000000000000000000..d4391701e9c34b6512e170e87897dff727261ae1 --- /dev/null +++ b/templates/courseware/block_types/document.php @@ -0,0 +1,9 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Dokument') . ': ' ?></p> + <p> + <?= _('Titel') . ' => ' . htmlReady($payload['title']) ?>, + <? if ($files[0]): ?> + <?= _('Datei') . '=>' ?> <a href="<?= htmlReady($files[0]->getDownloadURL()) ?>"><?= htmlReady($files[0]->name) ?></a> + <? endif; ?> + </p> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/download.php b/templates/courseware/block_types/download.php new file mode 100644 index 0000000000000000000000000000000000000000..9fdd72896b9918b934071c65e30a428b5c944b71 --- /dev/null +++ b/templates/courseware/block_types/download.php @@ -0,0 +1,12 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Download') . ': ' ?></p> + <? if ($files[0]): ?> + <p> + <a href="<?= htmlReady($files[0]->getDownloadURL()); ?>"><?= htmlReady($files[0]->name); ?></a> + </p> + <? else: ?> + <p> + <span style="font-style:italic"><?= _('keine Datei ausgewählt'); ?></span> + </p> + <? endif; ?> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/embed.php b/templates/courseware/block_types/embed.php index f22f133614ef061a1e8aa64dc8d00b2c515d6968..9bab15b63cce1db51ec37949820d44c550b4f073 100644 --- a/templates/courseware/block_types/embed.php +++ b/templates/courseware/block_types/embed.php @@ -1,6 +1,8 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> -<h6><?= _('Block-Daten') . ': ' ?></h6> -<h6><?= htmlReady(_('Titel') . ' => ' . $payload['title']) ?></h6> -<h6><?= htmlReady(_('Quelle') . ' => ' . $payload['source']) ?></h6> -<h6><?= htmlReady(_('URL') . ' => ' . $payload['url']) ?></h6> - +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Externer Inhalt') . ': ' ?></p> + <p> + <?= htmlReady(_('Titel') . ' => ' . $payload['title']) ?>, + <?= htmlReady(_('Quelle') . ' => ' . $payload['source']) ?>, + <?= _('URL') . '=>' ?> <a href="<?= htmlReady($payload['url']) ?>"><?= htmlReady($payload['url']) ?></a> + </p> +</div> diff --git a/templates/courseware/block_types/folder.php b/templates/courseware/block_types/folder.php new file mode 100644 index 0000000000000000000000000000000000000000..cd7a3a184812ed5cb7033c3afefc2c2707b0847e --- /dev/null +++ b/templates/courseware/block_types/folder.php @@ -0,0 +1,9 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Dateiordner') . ': ' ?></p> + <? foreach ($files as $file): ?> + <? if ($file === null) { continue; } ?> + <p> + <a href="<?= htmlReady($file->getDownloadURL()); ?>"><?= htmlReady($file->name); ?></a> + </p> + <? endforeach; ?> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/gallery.php b/templates/courseware/block_types/gallery.php new file mode 100644 index 0000000000000000000000000000000000000000..dff14c6bb2406e26ee446ff638fa2b8b2b06fe8d --- /dev/null +++ b/templates/courseware/block_types/gallery.php @@ -0,0 +1,7 @@ +<? foreach ($files as $file): ?> + <? if ($file === null) { continue; } ?> + <p> + <img src="<?= htmlReady($file->getDownloadURL()); ?>"> + <span style="font-style: italic; font-size: 0.75em"><?= htmlReady($file->name); ?></span> + </p> +<? endforeach; ?> \ No newline at end of file diff --git a/templates/courseware/block_types/headline.php b/templates/courseware/block_types/headline.php index fc573268d41a5de31a796cdfe93428aab3b44bfc..7df3a0840594277e3ddc452acdcd07c610f58d66 100644 --- a/templates/courseware/block_types/headline.php +++ b/templates/courseware/block_types/headline.php @@ -1,4 +1,3 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> -<h5><?= htmlReady($payload['title']) ?></h5> -<h6><?= htmlReady($payload['subtitle']) ?></h6> +<h5 style="font-size: 14px;"><?= htmlReady($payload['title']) ?></h5> +<h6 style="font-size: 12px;"><?= htmlReady($payload['subtitle']) ?></h6> diff --git a/templates/courseware/block_types/iframe.php b/templates/courseware/block_types/iframe.php new file mode 100644 index 0000000000000000000000000000000000000000..8b4ed0f616b8c7f13cae417a7b7873fe496b0840 --- /dev/null +++ b/templates/courseware/block_types/iframe.php @@ -0,0 +1,7 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Externer Inhalt') . ': ' ?></p> + <p> + <?= _('Titel') . ' => ' . htmlReady($payload['title']) ?>, + <?= _('URL') . '=>' ?> <a href="<?= htmlReady($payload['url']) ?>"><?= htmlReady($payload['url']) ?></a> + </p> +</div> diff --git a/templates/courseware/block_types/image_map.php b/templates/courseware/block_types/image_map.php new file mode 100644 index 0000000000000000000000000000000000000000..f3d351849532c5f0c1be80f15b1577444700d44a --- /dev/null +++ b/templates/courseware/block_types/image_map.php @@ -0,0 +1,20 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Verweissensitive Grafik') . ': ' ?></p> + <p style="font-style: italic; font-size: 10px;"><?= _('Hinweis: Positionen der Verweise können nicht dargestellt werden.')?></p> + <p> + <? if ($files[0]): ?> + <img src="<?= htmlReady($files[0]->getDownloadURL()); ?>"> + <span style="font-style:italic"><?= htmlReady($files[0]->name); ?></span> + <? endif; ?> + </p> + <p><?= _('Verweise'). ': ' ?></p> + <ul> + <? foreach($payload['shapes'] as $shape): ?> + <li> + <?= htmlReady($shape['title']); ?>,<?= htmlReady($shape['data']['text']); ?><? if ($shape['link_type'] === 'external'): ?>, + <a href="<?= htmlReady($shape['target_external']); ?>"><?= htmlReady($shape['target_external']); ?></a> + <? endif; ?> + </li> + <? endforeach; ?> + </ul> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/key_point.php b/templates/courseware/block_types/key_point.php index 714e8e8e6f2c072075626efad1ffa99817635436..df2267c09ef4df05b5477a8f6e8de15abfdec83d 100644 --- a/templates/courseware/block_types/key_point.php +++ b/templates/courseware/block_types/key_point.php @@ -1,2 +1 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> <p><?= htmlReady($payload['text']) ?></p> diff --git a/templates/courseware/block_types/link.php b/templates/courseware/block_types/link.php index c1da7643d143a6e2a7634521a2a2270fb108fbc4..aabca214703227348d4d9d7b15526bce30d1d16b 100644 --- a/templates/courseware/block_types/link.php +++ b/templates/courseware/block_types/link.php @@ -1,3 +1,7 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> -<p><?= htmlReady($payload['title']) ?></p> -<p><?= htmlReady($payload['url']) ?></p> +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Link') . ': ' ?></p> + <p> + <?= _('Titel') . ' => ' . htmlReady($payload['title']) ?>, + <?= _('URL') . '=>' ?> <a href="<?= htmlReady($payload['url']) ?>"><?= htmlReady($payload['url']) ?></a> + </p> +</div> \ No newline at end of file diff --git a/templates/courseware/block_types/table_of_contents.php b/templates/courseware/block_types/table_of_contents.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/templates/courseware/block_types/text.php b/templates/courseware/block_types/text.php index f92fe0748f8f724badda280c9e8bfb0632bee657..0b1afd9229f41ddb24e345e203cbef4a8bca40d9 100644 --- a/templates/courseware/block_types/text.php +++ b/templates/courseware/block_types/text.php @@ -1,2 +1,3 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> -<?= formatReady($payload['text']) ?> +<div style="font-size: 12px;"> + <?= formatReady($payload['text']) ?> +</div> diff --git a/templates/courseware/block_types/typewriter.php b/templates/courseware/block_types/typewriter.php index 714e8e8e6f2c072075626efad1ffa99817635436..fe81bf762293fff1efa0ee5cf2c562797561ae4e 100644 --- a/templates/courseware/block_types/typewriter.php +++ b/templates/courseware/block_types/typewriter.php @@ -1,2 +1 @@ -<h5><?= sprintf(_('Block-Typ: %s'), htmlReady($title)) ?></h5> -<p><?= htmlReady($payload['text']) ?></p> +<p><?= htmlReady($payload['text']) ?></p> \ No newline at end of file diff --git a/templates/courseware/block_types/video.php b/templates/courseware/block_types/video.php new file mode 100644 index 0000000000000000000000000000000000000000..5e23416795fc501a2de8bf44b164d96b6f88dba1 --- /dev/null +++ b/templates/courseware/block_types/video.php @@ -0,0 +1,9 @@ +<div style="font-size: 12px;"> + <p style="font-weight: bold;"><?= _('Video') . ': ' ?></p> + <p> + <?= htmlReady($payload['title']); ?>, + <? if ($files[0]): ?> + <a href="<?= htmlReady($files[0]->getDownloadURL()) ?>"><?= htmlReady($files[0]->name); ?></a> + <? endif; ?> + </p> +</div> \ No newline at end of file diff --git a/templates/courseware/container_types/accordion_container.php b/templates/courseware/container_types/accordion_container.php index afc25e04bd7ec04587173d6031cbabd6cc0b67ad..cbe35f70c4e538faaec58d5c8a6ab0b3ff454212 100644 --- a/templates/courseware/container_types/accordion_container.php +++ b/templates/courseware/container_types/accordion_container.php @@ -1,4 +1,3 @@ -<h3><?= sprintf(_('Container-Typ: %s'), htmlReady($title)) ?></h3> <? foreach ($payload['sections'] as $section): ?> <h4><?= htmlReady($section['name']) ?></h4> <? foreach ($section['blocks'] as $block_id): ?> @@ -8,8 +7,6 @@ <? if ($block_html_template): ?> <?= $block_html_template->render(); ?> <? endif; ?> - <? else: ?> - <p><?= _('Block konnte nicht gefunden werden') ?></p> <? endif; ?> <? endforeach ?> <? endforeach ?> diff --git a/templates/courseware/container_types/list_container.php b/templates/courseware/container_types/list_container.php index 1dc4376864de1acef82b69ba0c7e6a6f4b6500d9..efe8e952696d48704905f621bffd3bd35369862c 100644 --- a/templates/courseware/container_types/list_container.php +++ b/templates/courseware/container_types/list_container.php @@ -1,4 +1,3 @@ -<h3><?= sprintf(_('Container-Typ: %s'), htmlReady($title)) ?></h3> <? foreach ($payload['sections'][0]['blocks'] as $block_id): ?> <? $block = $container->blocks->find($block_id); ?> <? if ($block): ?> @@ -6,7 +5,5 @@ <? if ($block_html_template): ?> <?= $block_html_template->render(); ?> <? endif; ?> - <? else: ?> - <p><?= _('Block konnte nicht gefunden werden') ?></p> <? endif; ?> <? endforeach ?> diff --git a/templates/courseware/container_types/tabs_container.php b/templates/courseware/container_types/tabs_container.php index afc25e04bd7ec04587173d6031cbabd6cc0b67ad..24879f598a4a982a75a66ebc68f8e54e300d6443 100644 --- a/templates/courseware/container_types/tabs_container.php +++ b/templates/courseware/container_types/tabs_container.php @@ -1,4 +1,3 @@ -<h3><?= sprintf(_('Container-Typ: %s'), htmlReady($title)) ?></h3> <? foreach ($payload['sections'] as $section): ?> <h4><?= htmlReady($section['name']) ?></h4> <? foreach ($section['blocks'] as $block_id): ?> @@ -8,8 +7,6 @@ <? if ($block_html_template): ?> <?= $block_html_template->render(); ?> <? endif; ?> - <? else: ?> - <p><?= _('Block konnte nicht gefunden werden') ?></p> <? endif; ?> - <? endforeach ?> -<? endforeach ?> + <? endforeach; ?> +<? endforeach ?> \ No newline at end of file