Fix php warnings

1.10.x
jmontoya 9 years ago
parent e22f5c838f
commit 9a7133d7ca
  1. 10
      main/inc/ajax/lp.ajax.php
  2. 2
      main/newscorm/learnpath.class.php

@ -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,

@ -597,7 +597,7 @@ class learnpath
"max_score" => $max_score,
"parent_item_id" => $parent,
"previous_item_id" => $previous,
"next_item_id" => $next,
"next_item_id" => itnval($next),
"display_order" => $display_order +1,
"prerequisite" => $prerequisites,
"max_time_allowed" => $max_time_allowed,

Loading…
Cancel
Save