get_toc(); $content = ''; $is_allowed_to_edit = api_is_allowed_to_edit(null, true, false, false); if ($is_allowed_to_edit) { $content .= '
'; global $interbreadcrumb; $interbreadcrumb[] = [ 'url' => 'lp_controller.php?action=list&isStudentView=false&'.api_get_cidreq(), 'name' => get_lang('Learning paths'), ]; $interbreadcrumb[] = [ 'url' => api_get_self()."?action=add_item&type=step&lp_id=".$lp->lp_id."&isStudentView=false&".api_get_cidreq(), 'name' => $lp->getNameNoTags(), ]; $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Preview')]; $content .= return_breadcrumb($interbreadcrumb, null, null); $content .= '
'; } $html = ''; $step = 1; foreach ($list as $toc) { $stepId = "$step-".api_replace_dangerous_char($toc['title']); $x = 1000 * $step; $html .= '
'; $html .= '
'; $src = $lp->get_link('http', $toc['id']); if ('dir' !== $toc['type']) { //just showing the src in a iframe ... $html .= '

'.$toc['title'].'

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

'.$toc['title'].'

'; $html .= "
"; } $html .= "
"; $html .= "
"; $step++; } //Setting the template $tool_name = get_lang('Current view mode: Impress'); $tpl = new Template($tool_name, false, false, true); $tpl->assign('html', $html); $templateName = $tpl->get_template('learnpath/impress.tpl'); $content = $tpl->fetch($templateName); $tpl->assign('content', $content); $tpl->display_one_col_template();