123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <?php
-
- $this_section=SECTION_COURSES;
- api_protect_course_script();
-
- include('learnpath_functions.inc.php');
- include('resourcelinker.inc.php');
- $language_file = 'learnpath';
-
- $currentstyle = api_get_setting('stylesheets');
- $htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="dtree.css" />';
-
- $is_allowed_to_edit = api_is_allowed_to_edit();
- $tbl_lp = Database::get_course_table('lp');
- $tbl_lp_item = Database::get_course_table('lp_item');
- $tbl_lp_view = Database::get_course_table('lp_view');
- $isStudentView = (int) $_REQUEST['isStudentView'];
- $learnpath_id = (int) $_REQUEST['lp_id'];
- $submit = $_POST['submit_button'];
- if ($action=="add" and $type=="learnpathitem")
- {
- $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
- }
- if ( (! $is_allowed_to_edit) or ($isStudentView) )
- {
- error_log('New LP - User not authorized in lp_add.php');
- header('location:lp_controller.php?action=view&lp_id='.$learnpath_id);
- }
- $sql_query = "SELECT * FROM $tbl_lp WHERE id = $learnpath_id";
- $result=api_sql_query($sql_query);
- $therow=Database::fetch_array($result);
-
- $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path"));
- $interbreadcrumb[]= array ("url"=>"#", "name"=> get_lang("_add_learnpath"));
- Display::display_header(null,'Path');
- echo '<div class="actions">';
- echo Display::return_icon('scorm.gif').' <a href="lp_controller.php?cidReq='.$_course['sysCode'].'">'.get_lang('ReturnToLearningPaths').'</a>';
- echo '</div>';
- Display::display_normal_message(get_lang('AddLpIntro'),false);
- echo '<p>'.get_lang('AddLpToStart').' :</p>';
- echo '<form method="post">';
- echo '<label for="idTitle">'.get_lang('Title').' : </label><input id="idTitle" name="learnpath_name" type="text" /> ';
- echo '<input type="submit" value="'.get_lang('Ok').'" />';
- echo '<input name="post_time" type="hidden" value="' . time() . '" />';
- echo '</form>';
- Display::display_footer();
- ?>
|