start.php 1.0 KB

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