diff --git a/templates/courseware/container_types/accordion_container.php b/templates/courseware/container_types/accordion_container.php index cbe35f70c4e538faaec58d5c8a6ab0b3ff454212..2c352e8c611fb371624dfe030308e88f59849839 100644 --- a/templates/courseware/container_types/accordion_container.php +++ b/templates/courseware/container_types/accordion_container.php @@ -2,7 +2,7 @@ <h4><?= htmlReady($section['name']) ?></h4> <? foreach ($section['blocks'] as $block_id): ?> <? $block = $container->blocks->find($block_id); ?> - <? if ($block): ?> + <? if ($block && $block->visible): ?> <? $block_html_template = $block->type->getPdfHtmlTemplate(); ?> <? if ($block_html_template): ?> <?= $block_html_template->render(); ?> diff --git a/templates/courseware/container_types/list_container.php b/templates/courseware/container_types/list_container.php index efe8e952696d48704905f621bffd3bd35369862c..a54b058b31af73d5c463cd36148529d54e8017cf 100644 --- a/templates/courseware/container_types/list_container.php +++ b/templates/courseware/container_types/list_container.php @@ -1,6 +1,6 @@ <? foreach ($payload['sections'][0]['blocks'] as $block_id): ?> <? $block = $container->blocks->find($block_id); ?> - <? if ($block): ?> + <? if ($block && $block->visible): ?> <? $block_html_template = $block->type->getPdfHtmlTemplate(); ?> <? if ($block_html_template): ?> <?= $block_html_template->render(); ?> diff --git a/templates/courseware/container_types/tabs_container.php b/templates/courseware/container_types/tabs_container.php index 24879f598a4a982a75a66ebc68f8e54e300d6443..6772026f51f17fe92363ecef2a6a731e1065743b 100644 --- a/templates/courseware/container_types/tabs_container.php +++ b/templates/courseware/container_types/tabs_container.php @@ -2,7 +2,7 @@ <h4><?= htmlReady($section['name']) ?></h4> <? foreach ($section['blocks'] as $block_id): ?> <? $block = $container->blocks->find($block_id); ?> - <? if ($block): ?> + <? if ($block && $block->visible): ?> <? $block_html_template = $block->type->getPdfHtmlTemplate(); ?> <? if ($block_html_template): ?> <?= $block_html_template->render(); ?>