diff --git a/main/dropbox/index.php b/main/dropbox/index.php
index 68aef7f876..a17d3e5284 100755
--- a/main/dropbox/index.php
+++ b/main/dropbox/index.php
@@ -5,7 +5,7 @@
require_once 'dropbox_init.inc.php';
// get the last time the user accessed the tool
-if ($_SESSION[$_course['id']]['last_access'][TOOL_DROPBOX] == '') {
+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 {
@@ -181,9 +181,11 @@ if (isset($_GET['error']) AND !empty($_GET['error'])) {
Display :: display_normal_message(get_lang($_GET['error']));
}
+$dropbox_data_sent = array();
+$movelist = array();
+$dropbox_data_recieved = array();
if ($action != 'add') {
-
// Getting all the categories in the dropbox for the given user
$dropbox_categories = get_dropbox_categories();
// Greating the arrays with the categories for the received files and for the sent files
diff --git a/main/exercice/exercise.lib.php b/main/exercice/exercise.lib.php
index 9a0b73250f..6d36767778 100755
--- a/main/exercice/exercise.lib.php
+++ b/main/exercice/exercise.lib.php
@@ -1379,7 +1379,9 @@ function get_exam_results_data(
$teacher_id_list[] = $teacher['user_id'];
}
- //Simple exercises
+ $list_info = array();
+
+ // Simple exercises
if (empty($hotpotatoe_where)) {
$column = !empty($column) ? Database::escape_string($column) : null;
$from = intval($from);
@@ -1407,7 +1409,7 @@ function get_exam_results_data(
$lp_list_obj = new learnpathList(api_get_user_id());
$lp_list = $lp_list_obj->get_flat_list();
- $list_info = array();
+
if (is_array($results)) {
$users_array_id = array();
diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php
index 4972befc9b..cce5651dd7 100755
--- a/main/forum/forumfunction.inc.php
+++ b/main/forum/forumfunction.inc.php
@@ -182,6 +182,7 @@ function handle_forum_and_forumcategories($lp_id = null)
$return_message = delete_forum_forumcategory_thread($get_content, $get_id);
Display::display_confirmation_message($return_message, false);
}
+
// Change visibility of a forum or a forum category.
if ($action_forum_cat == 'invisible' || $action_forum_cat == 'visible') {
$return_message = change_visibility($get_content, $get_id, $action_forum_cat);
@@ -1023,9 +1024,9 @@ function display_up_down_icon($content, $id, $list)
/**
* This function changes the visibility in the database (item_property)
*
- * @param $content what is it that we want to make (in)visible: forum category, forum, thread, post
- * @param $id the id of the content we want to make invisible
- * @param $target_visibility what is the current status of the visibility (0 = invisible, 1 = visible)
+ * @param string $content what is it that we want to make (in)visible: forum category, forum, thread, post
+ * @param int $id the id of the content we want to make invisible
+ * @param string $target_visibility what is the current status of the visibility (0 = invisible, 1 = visible)
*
* @todo change the get parameter so that it matches the tool constants.
* @todo check if api_item_property_update returns true or false => returnmessage depends on it.
diff --git a/main/gradebook/gradebook_display_certificate.php b/main/gradebook/gradebook_display_certificate.php
index 2364de90c4..2365fbf085 100755
--- a/main/gradebook/gradebook_display_certificate.php
+++ b/main/gradebook/gradebook_display_certificate.php
@@ -97,7 +97,7 @@ $this_section = SECTION_COURSES;
Display::display_header('');
-if ($_GET['action'] == 'delete') {
+if (isset($_GET['action']) && $_GET['action'] == 'delete') {
$check = Security::check_token('get');
if ($check) {
$certificate = new Certificate($_GET['certificate_id']);
diff --git a/main/gradebook/gradebook_edit_all.php b/main/gradebook/gradebook_edit_all.php
index 29e3d8899b..593dc197cf 100755
--- a/main/gradebook/gradebook_edit_all.php
+++ b/main/gradebook/gradebook_edit_all.php
@@ -57,7 +57,6 @@ $course_id = get_course_id_by_link_id($my_selectcat);
$table_link = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
$table_evaluation = Database::get_main_table(TABLE_MAIN_GRADEBOOK_EVALUATION);
-
$tbl_forum_thread = Database :: get_course_table(TABLE_FORUM_THREAD);
$tbl_work = Database :: get_course_table(TABLE_STUDENT_PUBLICATION);
$tbl_attendance = Database :: get_course_table(TABLE_ATTENDANCE);
@@ -77,7 +76,7 @@ if ($submitted==1) {
require_once 'lib/be/evaluation.class.php';
$eval_log = new Evaluation();
}
- if(isset($_POST['link'])){
+ if (isset($_POST['link'])) {
require_once 'lib/be/abstractlink.class.php';
//$eval_link_log = new AbstractLink();
}
@@ -170,7 +169,7 @@ if ($my_api_cidreq=='') {
}
?>