start.php 960 B

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