diff --git a/main/newscorm/lp_admin_view.php b/main/newscorm/lp_admin_view.php deleted file mode 100644 index a57e848e0f..0000000000 --- a/main/newscorm/lp_admin_view.php +++ /dev/null @@ -1,438 +0,0 @@ - - cleaning and update for new SCORM tool -* @package dokeos.learnpath -============================================================================== -*/ - -/* -============================================================================== - INIT SECTION -============================================================================== -*/ -$this_section=SECTION_COURSES; - -api_protect_course_script(); - -/* ------------------------------------------------------------ - Libraries ------------------------------------------------------------ -*/ -//the main_api.lib.php, database.lib.php and display.lib.php -//libraries are included by default - -include('learnpath_functions.inc.php'); -//include('../resourcelinker/resourcelinker.inc.php'); -include('resourcelinker.inc.php'); -//rewrite the language file, sadly overwritten by resourcelinker.inc.php -// name of the language file that needs to be included -$language_file = "learnpath"; - -/* ------------------------------------------------------------ - Header and action code ------------------------------------------------------------ -*/ -$htmlHeadXtra[] = ""; - -/* ------------------------------------------------------------ - Constants and variables ------------------------------------------------------------ -*/ -$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']; -/* -$chapter_id = $_GET['chapter_id']; -$title = $_POST['title']; -$description = $_POST['description']; -$Submititem = $_POST['Submititem']; -$action = $_REQUEST['action']; -$id = (int) $_REQUEST['id']; -$type = $_REQUEST['type']; -$direction = $_REQUEST['direction']; -$moduleid = $_REQUEST['moduleid']; -$prereq = $_REQUEST['prereq']; -$type = $_REQUEST['type']; -*/ -/* -============================================================================== - MAIN CODE -============================================================================== -*/ -// using the resource linker as a tool for adding resources to the learning path -if ($action=="add" and $type=="learnpathitem") -{ - $htmlHeadXtra[] = ""; -} -if ( (! $is_allowed_to_edit) or ($isStudentView) ) -{ - error_log('New LP - User not authorized in lp_admin_view.php'); - header('location:lp_controller.php?action=view&lp_id='.$learnpath_id); -} -//from here on, we are admin because of the previous condition, so don't check anymore - -$sql_query = "SELECT * FROM $tbl_lp WHERE id = $learnpath_id"; -$result=api_sql_query($sql_query); -$therow=Database::fetch_array($result); - -$admin_output = ''; -/* ------------------------------------------------------------ - Course admin section - - all the functions not available for students - always available in this case (page only shown to admin) ------------------------------------------------------------ -*/ -/*================================================== - SHOWING THE ADMIN TOOLS - ==================================================*/ - -//Preparing the form to add a new module -$add_module_form = ' -
'; - -if (($_REQUEST['action']=="add_item" and $type=="dokeos_module" and !$submit)) -{ - //this is when the user has selected the "add module" link previously, so we don't display it this time -} -else -{ - //in case the user hasn't selected the "add module" link previously, first quick-check the database to remove the - //useless step of asking the user to click on "add module" if the only possible action is to add a module - $sql = "SELECT * FROM $tbl_lp_item WHERE lp_id = $learnpath_id AND item_type = 'dokeos_module'"; - $result=api_sql_query($sql,__FILE__,__LINE__); - if (Database::num_rows($result) <= 0) - { - $admin_output .= "| - | -