From 76cd8c79e5bc58e7271f5e771c31738eaaa1613c Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Fri, 10 Jul 2015 14:05:18 +0200 Subject: [PATCH] Minor - format code. --- main/course_info/tools.php | 1 - main/dropbox/index.php | 14 ++++++++++---- main/newscorm/learnpath.class.php | 1 - main/newscorm/learnpathList.class.php | 1 + 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/main/course_info/tools.php b/main/course_info/tools.php index ad8fbdba89..e9af662fad 100644 --- a/main/course_info/tools.php +++ b/main/course_info/tools.php @@ -36,7 +36,6 @@ switch ($action) { } $interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq(), 'name' => get_lang('CustomizeIcons')); - $toolName = $tool['name']; $currentUrl = api_get_self().'?action=edit_icon&id=' . $id.'&'.api_get_cidreq(); diff --git a/main/dropbox/index.php b/main/dropbox/index.php index 8fc2a22782..959f387a5a 100755 --- a/main/dropbox/index.php +++ b/main/dropbox/index.php @@ -4,12 +4,15 @@ // The file that contains all the initialisation stuff (and includes all the configuration stuff) require_once 'dropbox_init.inc.php'; +$last_access = ''; // get the last time the user accessed the tool if (isset($_SESSION[$_course['id']]) && $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] == '') { $last_access = get_last_tool_access(TOOL_DROPBOX); $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] = $last_access; } else { - $last_access = $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX]; + if (isset($_SESSION[$_course['id']])) { + $last_access = $_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX]; + } } $postAction = isset($_POST['action']) ? $_POST['action'] : null; @@ -42,16 +45,19 @@ if (isset($_GET['dropbox_direction'])) { } $sort_params = Security::remove_XSS(implode('&', $sort_params)); - $action = isset($_GET['action']) ? $_GET['action'] : null; -/* ACTIONS: add a dropbox file, add a dropbox category. */ // Display the form for adding a new dropbox item. if ($action == 'add') { if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) { api_not_allowed(); } - display_add_form($dropbox_unid, $viewReceivedCategory, $viewSentCategory, $view); + display_add_form( + $dropbox_unid, + $viewReceivedCategory, + $viewSentCategory, + $view + ); } if (isset($_POST['submitWork'])) { diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 7dee1a530d..5cacf4379f 100755 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -6214,7 +6214,6 @@ class learnpath // Get all the docs. $documents = $this->get_documents(true); - // Get all the exercises. $exercises = $this->get_exercises(); diff --git a/main/newscorm/learnpathList.class.php b/main/newscorm/learnpathList.class.php index f4f76ed9ca..6bcd877dc4 100755 --- a/main/newscorm/learnpathList.class.php +++ b/main/newscorm/learnpathList.class.php @@ -106,6 +106,7 @@ class LearnpathList // is done using domesticate() $myname = domesticate($row['name']); $mylink = 'newscorm/lp_controller.php?action=view&lp_id='.$row['id'].'&id_session='.$session_id; + $sql2 = "SELECT * FROM $tbl_tool WHERE c_id = $course_id AND (