start.php 929 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once __DIR__.'/../inc/global.inc.php';
  4. api_protect_course_script(true);
  5. api_block_anonymous_users();
  6. if (!api_is_allowed_to_edit()) {
  7. api_not_allowed(true);
  8. }
  9. $course_info = api_get_course_info();
  10. $directory = $course_info['directory'];
  11. $title = $course_info['title'];
  12. // Preparing a confirmation message.
  13. $link = api_get_path(WEB_COURSE_PATH).$directory.'/';
  14. $tpl = new Template(get_lang('ThingsToDo'));
  15. $tpl->assign('course_url', $link);
  16. $tpl->assign('course_title', Display::url($title, $link));
  17. $tpl->assign('course_id', $course_info['code']);
  18. $tpl->assign('just_created', isset($_GET['first']) && $_GET['first'] ? 1 : 0);
  19. $add_course_tpl = $tpl->get_template('create_course/add_course.tpl');
  20. $content = $tpl->fetch($add_course_tpl);
  21. $tpl->assign('content', $content);
  22. $template = $tpl->get_template('layout/layout_1_col.tpl');
  23. $tpl->display($template);