|
|
|
@ -14,7 +14,7 @@ $tbl_lp_item = Database :: get_course_table(TABLE_LP_ITEM); |
|
|
|
|
$sessionId = api_get_session_id(); |
|
|
|
|
|
|
|
|
|
switch ($action) { |
|
|
|
|
case 'get_documents'; |
|
|
|
|
case 'get_documents': |
|
|
|
|
$courseInfo = api_get_course_info(); |
|
|
|
|
$folderId = isset($_GET['folder_id']) ? $_GET['folder_id'] : null; |
|
|
|
|
if (empty($folderId)) { |
|
|
|
@ -46,9 +46,13 @@ switch ($action) { |
|
|
|
|
if ($_REQUEST['type'] == TOOL_QUIZ) { |
|
|
|
|
$title = Exercise::format_title_variable($title); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$parentId = isset($_REQUEST['parent_id']) ? $_REQUEST['parent_id'] : ''; |
|
|
|
|
$previousId = isset($_REQUEST['previous_id']) ? $_REQUEST['previous_id'] : ''; |
|
|
|
|
|
|
|
|
|
echo $_SESSION['oLP']->add_item( |
|
|
|
|
$_REQUEST['parent_id'], |
|
|
|
|
$_REQUEST['previous_id'], |
|
|
|
|
$parentId, |
|
|
|
|
$previousId, |
|
|
|
|
$_REQUEST['type'], |
|
|
|
|
$_REQUEST['id'], |
|
|
|
|
$title, |
|
|
|
|