get_toc(); $is_allowed_to_edit = api_is_allowed_to_edit(null, true, false, false); if ($is_allowed_to_edit) { echo '
'; global $interbreadcrumb; $interbreadcrumb[] = array( 'url' => 'lp_controller.php?action=list&isStudentView=false', 'name' => get_lang('LearningPaths'), ); $interbreadcrumb[] = array( 'url' => api_get_self( )."?action=add_item&type=step&lp_id=".$learnPath->lp_id."&isStudentView=false", 'name' => $learnPath->get_name(), ); $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Preview')); echo return_breadcrumb($interbreadcrumb, null, null); echo '
'; } $html = ''; $step = 1; foreach ($list as $toc) { $x = 1000*$step; $html .= '
'; $html .= '
'; $src = $learnPath->get_link('http', $toc['id']); if ($toc['type'] !== 'dokeos_chapter') { //just showing the src in a iframe ... $html .= '

'.$toc['title'].'

'; $html .= ''; }else{ $html .= "
"; $html .= '

'.$toc['title'].'

'; $html .= "
"; } $html .= "
"; $html .= "
"; $step ++; } //Setting the template $tpl = Container::getTwig(); $tpl->addGlobal('html', $html); echo $tpl->render('@template_style/learnpath/impress.html.twig'); // Hide headers Container::$legacyTemplate = 'layout_one_col_no_content.html.twig';