diff --git a/main/auth/courses.php b/main/auth/courses.php index c28f22cbe4..9f6fa402e1 100755 --- a/main/auth/courses.php +++ b/main/auth/courses.php @@ -81,7 +81,6 @@ if (!empty($settings)) { } } - switch ($action) { case 'unsubscribe': // We are unsubscribing from a course (=Unsubscribe from course). @@ -187,7 +186,7 @@ switch ($action) { if ($level > 0) { $separate = str_repeat('--', $level); } - $select->addOption($separate.' '.$categoryName.' ('.$countCourse.')',$categoryCodeItem); + $select->addOption($separate.' '.$categoryName.' ('.$countCourse.')', $categoryCodeItem); } $defaults['category_code'] = $categoryCode; @@ -279,8 +278,8 @@ switch ($action) { $pageLength = isset($_GET['pageLength']) ? (int) $_GET['pageLength'] : CoursesAndSessionsCatalog::PAGE_LENGTH; $pageTotal = (int) ceil($countCoursesInCategory / $pageLength); - $url = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, 'ALL', 'search_course', $fields); - $urlNoCategory = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, '', 'search_course', $fields); + $url = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, 'ALL', 'search_course', $fields); + $urlNoCategory = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, '', 'search_course', $fields); $urlNoCategory = str_replace('&category_code=ALL', '', $urlNoCategory); $form->setAttribute('action', $url); @@ -410,7 +409,6 @@ switch ($action) { $courseUrl = api_get_path(WEB_COURSE_PATH); $hideRating = api_get_configuration_value('hide_course_rating'); - if (!empty($courses)) { foreach ($courses as &$course) { $courseId = $course['real_id']; diff --git a/main/inc/lib/CoursesAndSessionsCatalog.class.php b/main/inc/lib/CoursesAndSessionsCatalog.class.php index db47f167e5..92c5571b45 100644 --- a/main/inc/lib/CoursesAndSessionsCatalog.class.php +++ b/main/inc/lib/CoursesAndSessionsCatalog.class.php @@ -411,9 +411,9 @@ class CoursesAndSessionsCatalog * The search is done on the code, title and tutor field of the course table. * * @param string $categoryCode - * @param string $keyword The string that the user submitted + * @param string $keyword The string that the user submitted * @param array $limit - * @param bool $justVisible search only on visible courses in the catalogue + * @param bool $justVisible search only on visible courses in the catalogue * @param array $conditions * * @return array an array containing a list of all the courses matching the the search term diff --git a/main/inc/lib/chat.lib.php b/main/inc/lib/chat.lib.php index 3caf99b3fb..7282a22e81 100755 --- a/main/inc/lib/chat.lib.php +++ b/main/inc/lib/chat.lib.php @@ -7,8 +7,6 @@ use ChamiloSession as Session; * Class Chat. * * @todo ChamiloSession instead of $_SESSION - * - * @package chamilo.library.chat */ class Chat extends Model { @@ -238,16 +236,16 @@ class Chat extends Model } $sql = "SELECT * FROM ".$this->table." - WHERE + WHERE ( - to_user = $toUserId AND + to_user = $toUserId AND from_user = $fromUserId ) OR ( - from_user = $toUserId AND + from_user = $toUserId AND to_user = $fromUserId - ) + ) $orderBy LIMIT $start, $end "; diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 1068a3f793..c022d5e672 100755 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -6543,7 +6543,7 @@ class CourseManager /** * Display the description button of a course in the course catalog. * - * @param array $course + * @param array $course * @param string $url * * @return string HTML string diff --git a/main/mySpace/access_details_session.php b/main/mySpace/access_details_session.php index d141f0cca7..f40698c5d1 100644 --- a/main/mySpace/access_details_session.php +++ b/main/mySpace/access_details_session.php @@ -273,7 +273,8 @@ function getReport($userId, $from, $to, $addTime = false) if (empty($courseData)) { continue; } - $courseSessionTable .= '