Browse Source

Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
Scrutinizer Auto-Fixer 7 years ago
parent
commit
4b4b366d5f

+ 19 - 19
main/admin/index.php

@@ -19,7 +19,7 @@ api_protect_admin_script(true);
 $nameTools = get_lang('PlatformAdmin');
 
 $accessUrlId = 0;
-$adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/admin/";
+$adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/admin/";
 
 if (api_is_multiple_url_enabled()) {
     $accessUrlId = api_get_current_access_url_id();
@@ -28,7 +28,7 @@ if (api_is_multiple_url_enabled()) {
         $urlInfo = api_get_access_url($accessUrlId);
         $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
         $cleanUrl = str_replace('/', '-', $url);
-        $adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/$cleanUrl/admin/";
+        $adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/$cleanUrl/admin/";
     }
 }
 
@@ -84,7 +84,7 @@ if (api_is_platform_admin()) {
             <div class="form-group">
                 <input class="form-control" type="text" name="keyword" value="">
                 <button class="btn btn-default" type="submit">
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
                 </button>
             </div>
         </form>';
@@ -142,7 +142,7 @@ if (api_is_platform_admin()) {
             <div class="form-group">
                 <input class="form-control" type="text" name="keyword" value="">
                 <button class="btn btn-default" type="submit">
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
                 </button>
             </div>
         </form>';
@@ -202,7 +202,7 @@ if (api_is_platform_admin()) {
                 <input class="form-control" type="text" name="search_field" value="" >
                 <input type="hidden" value="search_setting" name="category">
                 <button class="btn btn-default" type="submit">
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
                 </button>
             </div>
         </form>';
@@ -215,24 +215,24 @@ if (api_is_platform_admin()) {
     $items[] = array('url' => 'settings.php?category=Regions', 'label' => get_lang('Regions'));
     $items[] = array('url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements'));
     $items[] = array(
-        'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin',
+        'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin',
         'label' => get_lang('GlobalAgenda')
     );
     $items[] = array('url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage'));
     $items[] = array('url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription'));
     $items[] = array('url' => 'statistics/index.php', 'label' => get_lang('Statistics'));
     $items[] = array(
-        'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php',
+        'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php',
         'label' => get_lang('Reports')
     );
     $items[] = array(
-        'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php',
+        'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php',
         'label' => get_lang('TeacherTimeReport')
     );
 
     if (api_get_configuration_value('chamilo_cms')) {
         $items[] = array(
-            'url' => api_get_path(WEB_PATH) . 'web/app_dev.php/administration/dashboard',
+            'url' => api_get_path(WEB_PATH).'web/app_dev.php/administration/dashboard',
             'label' => get_lang('CMS')
         );
     }
@@ -282,7 +282,7 @@ $search_form = ' <form method="GET" class="form-inline" action="'.$sessionPath.'
                     <div class="form-group">
                         <input class="form-control" type="text" name="keyword" value="">
                         <button class="btn btn-default" type="submit">
-                            <em class="fa fa-search"></em> ' . get_lang('Search') . '
+                            <em class="fa fa-search"></em> ' . get_lang('Search').'
                         </button>
                     </div>
                 </form>';
@@ -310,7 +310,7 @@ $items[] = array(
 
 if (api_is_platform_admin()) {
     // option only visible in development mode. Enable through code if required
-    if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
         $items[] = array('url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats'));
     }
     $items[] = array('url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions'));
@@ -336,7 +336,7 @@ if (api_is_platform_admin()) {
     $items = array();
     $items[] = array('url' => 'special_exports.php', 'label' => get_lang('SpecialExports'));
     $items[] = array('url' => 'system_status.php', 'label' => get_lang('SystemStatus'));
-    if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
         $items[] = array('url' => 'filler.php', 'label' => get_lang('DataFiller'));
     }
 
@@ -380,15 +380,15 @@ if (api_is_platform_admin()) {
         $items[] = array('url' => 'skills_wheel.php', 'label' => get_lang('SkillsWheel'));
         $items[] = array('url' => 'skills_import.php', 'label' => get_lang('SkillsImport'));
         $items[] = array('url' => 'skill_list.php', 'label' => get_lang('ManageSkills'));
-        $items[] = array('url'=>'skill.php',   'label' => get_lang('ManageSkillsLevels'));
+        $items[] = array('url'=>'skill.php', 'label' => get_lang('ManageSkillsLevels'));
         //$items[] = array('url'=>'skills_profile.php',   'label' => get_lang('SkillsProfile'));
         $items[] = array(
-            'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php',
+            'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php',
             'label' => get_lang('SkillsRanking')
         );
         $items[] = array('url' => 'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks'));
         $items[] = array(
-            'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php',
+            'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php',
             'label' => get_lang('Badges')
         );
         $blocks['skills']['items'] = $items;
@@ -431,12 +431,12 @@ if (api_is_platform_admin()) {
                     $itemUrl = '/start.php';
                 }
 
-                if (!file_exists(api_get_path(SYS_PLUGIN_PATH) . $pluginName . $itemUrl)) {
+                if (!file_exists(api_get_path(SYS_PLUGIN_PATH).$pluginName.$itemUrl)) {
                     continue;
                 }
 
                 $items[] = array(
-                    'url' => api_get_path(WEB_PLUGIN_PATH) . $plugin_name . $itemUrl,
+                    'url' => api_get_path(WEB_PLUGIN_PATH).$plugin_name.$itemUrl,
                     'label' => $plugin_info['title']
                 );
             }
@@ -515,7 +515,7 @@ if (api_is_platform_admin()) {
     }
     //end hack
 }
-$admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php';
+$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php';
 
 $tpl = new Template();
 
@@ -568,7 +568,7 @@ if (api_is_platform_admin()) {
                 die;
             }
 
-            $fullFilePath = $adminExtraContentDir . $extraData['block'];
+            $fullFilePath = $adminExtraContentDir.$extraData['block'];
             $fullFilePath .= "_extra.html";
 
             file_put_contents($fullFilePath, $extraData['extra_content']);

+ 9 - 9
main/course_home/vertical_activity.php

@@ -37,7 +37,7 @@ if (api_is_platform_admin()) {
     // Show message to confirm that a tool it to be hidden from available tools
     // visibility 0,1->2
     if (!empty($_GET['askDelete'])) {
-        $content .='<div id="toolhide">'.get_lang('DelLk').'<br />&nbsp;&nbsp;&nbsp;
+        $content .= '<div id="toolhide">'.get_lang('DelLk').'<br />&nbsp;&nbsp;&nbsp;
             <a href="'.api_get_self().'">'.get_lang('No').'</a>&nbsp;|&nbsp;
             <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a>
         </div>';
@@ -55,14 +55,14 @@ if (api_is_platform_admin()) {
 
 // Start of tools for CourseAdmins (teachers/tutors)
 if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
-    $content .=  '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;">
+    $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;">
     <div class="normal-message" id="id_normal_message" style="display:none">';
-        $content .=  '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
-        $content .=  get_lang('PleaseStandBy');
+        $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
+        $content .= get_lang('PleaseStandBy');
 
-    $content .=  '</div>
+    $content .= '</div>
         <div class="confirmation-message" id="id_confirmation_message" style="display:none"></div></div>';
-    $content .=  '<div id="activity-3col">';
+    $content .= '<div id="activity-3col">';
 
     if (api_get_setting('show_session_data') == 'true' && $session_id > 0) {
         $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span>
@@ -90,10 +90,10 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
         $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span>
             <table width="100%">';
                 $content .= CourseHome::show_session_data($session_id);
-             $content .=  '</table></div>';
+             $content .= '</table></div>';
     }
 
-    $content .=  '<div class="Authoringview">';
+    $content .= '<div class="Authoringview">';
                 $my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW);
                 $content .= CourseHome::show_tools_category($my_list);
     $content .= '</div>';
@@ -106,7 +106,7 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) {
         $order_tool_list = array();
         foreach ($my_list as $key => $new_tool) {
             $tool_name = CourseHome::translate_tool_name($new_tool);
-            $order_tool_list [$key]= $tool_name;
+            $order_tool_list [$key] = $tool_name;
         }
         natsort($order_tool_list);
         $my_temp_tool_array = array();

+ 6 - 6
main/cron/remind_course_expiration.php

@@ -5,7 +5,7 @@
  * @package chamilo.cron
  * @author Imanol Losada <imanol.losada@beeznest.com>
  */
-require_once __DIR__ . '/../inc/global.inc.php';
+require_once __DIR__.'/../inc/global.inc.php';
 
 /**
  * Initialization
@@ -64,7 +64,7 @@ $usersToBeReminded = array();
 
 foreach ($sessions as $sessionId => $userIds) {
     $userId = 0;
-    $userIds = $userIds ? " AND sessionUser.user_id NOT IN (" . implode(", ", $userIds) . ")" : null;
+    $userIds = $userIds ? " AND sessionUser.user_id NOT IN (".implode(", ", $userIds).")" : null;
     $query = "
         SELECT sessionUser.session_id, sessionUser.user_id, session.name, session.access_end_date 
         FROM $sessionUserTable AS sessionUser
@@ -156,10 +156,10 @@ if ($usersToBeReminded) {
                 $administrator['completeName'],
                 $administrator['email']
             );
-            echo "Email sent to $userCompleteName (" . $user['email'] . ")\n";
-            echo "Session: " . $session['name'] . "\n";
-            echo "Date end: " . $session['access_end_date'] . "\n";
-            echo "Days remaining: " . $daysRemaining->format("%d") . "\n\n";
+            echo "Email sent to $userCompleteName (".$user['email'].")\n";
+            echo "Session: ".$session['name']."\n";
+            echo "Date end: ".$session['access_end_date']."\n";
+            echo "Days remaining: ".$daysRemaining->format("%d")."\n\n";
         }
         echo "======================================================================\n\n";
     }

+ 7 - 7
main/dropbox/dropbox_download.php

@@ -29,8 +29,8 @@ if (isset($_GET['cat_id']) &&
     if ($_GET['sent_received'] == 'sent') {
         // here we also incorporate the person table to make sure that deleted sent documents are not included.
         $sql = "SELECT DISTINCT file.id, file.filename, file.title
-                FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." file
-                INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." person
+                FROM ". Database::get_course_table(TABLE_DROPBOX_FILE)." file
+                INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON)." person
                 ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id)
                 WHERE
                     file.uploader_id = $user_id AND
@@ -40,14 +40,14 @@ if (isset($_GET['cat_id']) &&
 
     if ($_GET['sent_received'] == 'received') {
         $sql = "SELECT DISTINCT file.id, file.filename, file.title
-                FROM ". Database::get_course_table(TABLE_DROPBOX_FILE) ." file
-                INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON) ." person
+                FROM ". Database::get_course_table(TABLE_DROPBOX_FILE)." file
+                INNER JOIN ". Database::get_course_table(TABLE_DROPBOX_PERSON)." person
                 ON (person.file_id=file.id AND file.c_id = $course_id AND person.c_id = $course_id)
                 INNER JOIN ".Database::get_course_table(TABLE_DROPBOX_POST)." post
                 ON (post.file_id = file.id AND post.c_id = $course_id AND file.c_id = $course_id)
                 WHERE
                     post.cat_id = ".intval($_GET['cat_id'])." AND
-                    post.dest_user_id = $user_id" ;
+                    post.dest_user_id = $user_id";
     }
     $files_to_download = array();
     $result = Database::query($sql);
@@ -94,9 +94,9 @@ if (!$allowed_to_download) {
 
     $work = new Dropbox_Work($_GET['id']);
 
-    $path = api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox/' . $work -> filename; //path to file as stored on server
+    $path = api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox/'.$work -> filename; //path to file as stored on server
 
-    if (!Security::check_abs_path($path, api_get_path(SYS_COURSE_PATH) . $_course['path'] . '/dropbox/')) {
+    if (!Security::check_abs_path($path, api_get_path(SYS_COURSE_PATH).$_course['path'].'/dropbox/')) {
         exit;
     }
     $file = $work->title;

+ 10 - 10
main/inc/lib/formvalidator/Element/DateTimePicker.php

@@ -39,14 +39,14 @@ class DateTimePicker extends HTML_QuickForm_text
         return '
             <div class="input-group">
                 <span class="input-group-addon cursor-pointer">
-                    <input ' . $this->_getAttrString($this->_attributes) . '>
+                    <input ' . $this->_getAttrString($this->_attributes).'>
                 </span>
-                <p class="form-control disabled" id="' . $id . '_alt_text">' . $value . '</p>
-                <input class="form-control" type="hidden" id="' . $id . '_alt" value="' . $value . '">
+                <p class="form-control disabled" id="' . $id.'_alt_text">'.$value.'</p>
+                <input class="form-control" type="hidden" id="' . $id.'_alt" value="'.$value.'">
                 <span class="input-group-btn">
                     <button class="btn btn-default" type="button">
                         <span class="fa fa-times text-danger" aria-hidden="true"></span>
-                        <span class="sr-only">' . get_lang('Reset') . '</span>
+                        <span class="sr-only">' . get_lang('Reset').'</span>
                     </button>
                 </span>
             </div>
@@ -85,18 +85,18 @@ class DateTimePicker extends HTML_QuickForm_text
                 txtDateTime
                     .hide()
                     .datetimepicker({
-                        defaultDate: '" . $this->getValue() . "',
+                        defaultDate: '".$this->getValue()."',
                         dateFormat: 'yy-mm-dd',
                         timeFormat: 'HH:mm',
                         altField: '#{$id}_alt',
-                        altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",
-                        altTimeFormat: \"" . get_lang('TimeFormatNoSecJS') . "\",
-                        altSeparator: \" " . get_lang('AtTime') . " \",
+                        altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
+                        altTimeFormat: \"" . get_lang('TimeFormatNoSecJS')."\",
+                        altSeparator: \" " . get_lang('AtTime')." \",
                         altFieldTimeOnly: false,
                         showOn: 'both',
-                        buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',
+                        buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
                         buttonImageOnly: true,
-                        buttonText: '" . get_lang('SelectDate') . "',
+                        buttonText: '" . get_lang('SelectDate')."',
                         changeMonth: true,
                         changeYear: true
                     })

+ 2 - 2
main/messages/index.php

@@ -4,9 +4,9 @@
 *	@package chamilo.messages
 */
 require_once __DIR__.'/../inc/global.inc.php';
-if (api_get_setting('allow_social_tool')=='true' &&  api_get_setting('allow_message_tool')=='true') {
+if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
 	header('Location:inbox.php?f=social');
-} elseif ( api_get_setting('allow_message_tool')=='true') {
+} elseif (api_get_setting('allow_message_tool') == 'true') {
 	header('Location:inbox.php');
 }
 exit;

+ 67 - 67
main/mySpace/myStudents.php

@@ -89,52 +89,52 @@ $em = Database::getManager();
 if (isset($_GET['details'])) {
     if ($origin === 'user_course') {
         if (empty($cidReq)) {
-            $interbreadcrumb[] = array (
-                "url" => api_get_path(WEB_COURSE_PATH) . $courseInfo['directory'],
+            $interbreadcrumb[] = array(
+                "url" => api_get_path(WEB_COURSE_PATH).$courseInfo['directory'],
                 'name' => $courseInfo['title']
             );
         }
-        $interbreadcrumb[] = array (
-            "url" => "../user/user.php?cidReq=" . $course_code,
+        $interbreadcrumb[] = array(
+            "url" => "../user/user.php?cidReq=".$course_code,
             "name" => get_lang("Users")
         );
     } else {
         if ($origin === 'tracking_course') {
-            $interbreadcrumb[] = array (
-                "url" => "../tracking/courseLog.php?cidReq=".$course_code.'&id_session=' . api_get_session_id(),
+            $interbreadcrumb[] = array(
+                "url" => "../tracking/courseLog.php?cidReq=".$course_code.'&id_session='.api_get_session_id(),
                 "name" => get_lang("Tracking")
             );
         } else {
             if ($origin === 'resume_session') {
-                $interbreadcrumb[] = array (
+                $interbreadcrumb[] = array(
                     'url' => "../session/session_list.php",
                     "name" => get_lang('SessionList')
                 );
-                $interbreadcrumb[] = array (
-                    'url' => "../session/resume_session.php?id_session=" . $sessionId,
+                $interbreadcrumb[] = array(
+                    'url' => "../session/resume_session.php?id_session=".$sessionId,
                     "name" => get_lang('SessionOverview')
                 );
             } else {
-                $interbreadcrumb[] = array (
-                    "url" => api_is_student_boss()?"#":"index.php",
+                $interbreadcrumb[] = array(
+                    "url" => api_is_student_boss() ? "#" : "index.php",
                     "name" => get_lang('MySpace')
                 );
                 if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
-                    $interbreadcrumb[] = array (
-                        "url" => "student.php?id_coach=" . Security::remove_XSS($_GET['id_coach']),
+                    $interbreadcrumb[] = array(
+                        "url" => "student.php?id_coach=".Security::remove_XSS($_GET['id_coach']),
                         "name" => get_lang("CoachStudents")
                     );
-                    $interbreadcrumb[] = array (
-                        "url" => "myStudents.php?student=" . $student_id. '&id_coach=' . Security::remove_XSS($_GET['id_coach']),
+                    $interbreadcrumb[] = array(
+                        "url" => "myStudents.php?student=".$student_id.'&id_coach='.Security::remove_XSS($_GET['id_coach']),
                         "name" => get_lang("StudentDetails")
                     );
                 } else {
-                    $interbreadcrumb[] = array (
+                    $interbreadcrumb[] = array(
                         "url" => "student.php",
                         "name" => get_lang("MyStudents")
                     );
-                    $interbreadcrumb[] = array (
-                        "url" => "myStudents.php?student=" . $student_id,
+                    $interbreadcrumb[] = array(
+                        "url" => "myStudents.php?student=".$student_id,
                         "name" => get_lang("StudentDetails")
                     );
                 }
@@ -144,7 +144,7 @@ if (isset($_GET['details'])) {
     $nameTools = get_lang("DetailsStudentInCourse");
 } else {
     if ($origin == 'resume_session') {
-        $interbreadcrumb[] = array (
+        $interbreadcrumb[] = array(
             'url' => "../session/session_list.php",
             "name" => get_lang('SessionList')
         );
@@ -155,19 +155,19 @@ if (isset($_GET['details'])) {
             );
         }
     } else {
-        $interbreadcrumb[] = array (
-            "url" => api_is_student_boss()?"#":"index.php",
+        $interbreadcrumb[] = array(
+            "url" => api_is_student_boss() ? "#" : "index.php",
             "name" => get_lang('MySpace')
         );
         if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
             if ($sessionId) {
                 $interbreadcrumb[] = array(
-                    "url" => "student.php?id_coach=" . Security::remove_XSS($_GET['id_coach']) . "&id_session=" . $sessionId,
+                    "url" => "student.php?id_coach=".Security::remove_XSS($_GET['id_coach'])."&id_session=".$sessionId,
                     "name" => get_lang("CoachStudents")
                 );
             } else {
                 $interbreadcrumb[] = array(
-                    "url" => "student.php?id_coach=" . Security::remove_XSS($_GET['id_coach']),
+                    "url" => "student.php?id_coach=".Security::remove_XSS($_GET['id_coach']),
                     "name" => get_lang("CoachStudents")
                 );
             }
@@ -355,28 +355,28 @@ if (!empty($student_id)) {
     // Actions bar
     echo '<div class="actions">';
     echo '<a href="javascript: window.history.go(-1);">'.
-            Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
+            Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
 
     echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
-            Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
+            Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
 
-    echo '<a href="' . api_get_self() . '?' . Security::remove_XSS($_SERVER['QUERY_STRING']) . '&export=csv">'.
-            Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a> ';
+    echo '<a href="'.api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_STRING']).'&export=csv">'.
+            Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a> ';
 
-    echo '<a href="' . api_get_self() . '?' . Security::remove_XSS($_SERVER['QUERY_STRING']) . '&export=xls">'.
-    Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).'</a> ';
+    echo '<a href="'.api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_STRING']).'&export=xls">'.
+    Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a> ';
 
     if (!empty ($user_info['email'])) {
         $send_mail = '<a href="mailto:'.$user_info['email'].'">'.
-            Display::return_icon('mail_send.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM).'</a>';
+            Display::return_icon('mail_send.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM).'</a>';
     } else {
-        $send_mail = Display::return_icon('mail_send_na.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM);
+        $send_mail = Display::return_icon('mail_send_na.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM);
     }
     echo $send_mail;
     if (!empty($student_id) && !empty($course_code)) {
         // Only show link to connection details if course and student were defined in the URL
-        echo '<a href="access_details.php?student=' . $student_id . '&course=' . $course_code . '&origin=' . $origin. '&cidReq='.$course_code.'&id_session='.$sessionId.'">'.
-            Display::return_icon('statistics.png', get_lang('AccessDetails'),'',ICON_SIZE_MEDIUM).'</a>';
+        echo '<a href="access_details.php?student='.$student_id.'&course='.$course_code.'&origin='.$origin.'&cidReq='.$course_code.'&id_session='.$sessionId.'">'.
+            Display::return_icon('statistics.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM).'</a>';
     }
     if (api_can_login_as($student_id)) {
         echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_list.php?action=login_as&user_id='.$student_id.'&sec_token='.$token.'">'.
@@ -386,7 +386,7 @@ if (!empty($student_id)) {
     if (api_is_platform_admin(false, true) || api_is_student_boss()) {
         echo Display::url(
             Display::return_icon('skill-badges.png', get_lang('AssignSkill'), null, ICON_SIZE_MEDIUM),
-            api_get_path(WEB_CODE_PATH) . 'badge/assign.php?' . http_build_query(['user' => $student_id])
+            api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $student_id])
         );
     }
 
@@ -447,7 +447,7 @@ if (!empty($student_id)) {
     $csv_content[] = array(
         get_lang('Information')
     );
-    $csv_content[] = array (
+    $csv_content[] = array(
         get_lang('Name'),
         get_lang('Email'),
         get_lang('Tel')
@@ -475,7 +475,7 @@ if (!empty($student_id)) {
         strip_tags($first_connection_date),
         strip_tags($last_connection_date),
         $time_spent_on_the_course,
-        $avg_student_progress . '%',
+        $avg_student_progress.'%',
         $avg_student_score
     );
 
@@ -507,12 +507,12 @@ if (!empty($student_id)) {
             </thead>
             <tbody>
             <tr>
-                <td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td>
+                <td><?php echo get_lang('Name').' : '.$user_info['complete_name']; ?></td>
             </tr>
             <tr>
                 <td>
                     <?php
-                    echo get_lang('Email') . ' : ';
+                    echo get_lang('Email').' : ';
                     if (!empty($user_info['email'])) {
                         echo '<a href="mailto:'.$user_info['email'].'">'.$user_info['email'].'</a>';
                     } else {
@@ -521,7 +521,7 @@ if (!empty($student_id)) {
                 </td>
             </tr>
             <tr>
-                <td> <?php echo get_lang('Tel') . ' : ';
+                <td> <?php echo get_lang('Tel').' : ';
                     if (!empty($user_info['phone'])) {
                         echo $user_info['phone'];
                     } else {
@@ -543,7 +543,7 @@ if (!empty($student_id)) {
                 </td>
             </tr>
             <tr>
-                <td><?php echo get_lang('OnLine') . ' : '.$online; ?> </td>
+                <td><?php echo get_lang('OnLine').' : '.$online; ?> </td>
             </tr>
             <?php
             if (!empty($course_code)) {
@@ -569,7 +569,7 @@ if (!empty($student_id)) {
             if ($timezone !== null) {
                 ?>
                 <tr>
-                    <td> <?php echo get_lang('Timezone') . ' : '.$timezone; ?> </td>
+                    <td> <?php echo get_lang('Timezone').' : '.$timezone; ?> </td>
                 </tr>
             <?php
             }
@@ -720,9 +720,9 @@ if (!empty($student_id)) {
                 }
 
                 if (!empty($access_start_date) && !empty($access_end_date)) {
-                    $date_session = get_lang('From') . ' ' . $access_start_date . ' ' . get_lang('Until') . ' ' . $access_end_date;
+                    $date_session = get_lang('From').' '.$access_start_date.' '.get_lang('Until').' '.$access_end_date;
                 }
-                $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session?' ('.$date_session.')':'');
+                $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session ? ' ('.$date_session.')' : '');
             }
 
             // Courses
@@ -792,9 +792,9 @@ if (!empty($student_id)) {
                         $scoretotal = array();
                         if (isset($cats) && isset($cats[0])) {
                             if (!empty($sId)) {
-                                $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem, $sId);
+                                $scoretotal = $cats[0]->calc_score($student_id, null, $courseCodeItem, $sId);
                             } else {
-                                $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem);
+                                $scoretotal = $cats[0]->calc_score($student_id, null, $courseCodeItem);
                             }
                         }
 
@@ -832,9 +832,9 @@ if (!empty($student_id)) {
                         );
 
                         echo '<tr>
-                        <td ><a href="' .$courseInfoItem['course_public_url'] .'?id_session=' . $sId . '">'.
+                        <td ><a href="' .$courseInfoItem['course_public_url'].'?id_session='.$sId.'">'.
                             $courseInfoItem['title'].'</a></td>
-                        <td >'.$time_spent_on_course .'</td>
+                        <td >'.$time_spent_on_course.'</td>
                         <td >'.$progress.'</td>
                         <td >'.$score.'</td>
                         <td >'.$attendances_faults_avg.'</td>
@@ -1000,7 +1000,7 @@ if (!empty($student_id)) {
                     if (!empty($start_time)) {
                         $start_time = api_convert_and_format_date($start_time, DATE_TIME_FORMAT_LONG);
                     } else {
-                        $start_time =  '-';
+                        $start_time = '-';
                     }
 
                     if (!empty($total_time)) {
@@ -1098,7 +1098,7 @@ if (!empty($student_id)) {
                     if ($any_result === true) {
                         $from = '';
                         if ($from_myspace) {
-                            $from ='&from=myspace';
+                            $from = '&from=myspace';
                         }
                         $link = Display::url(
                             Display::return_icon('2rightarrow.png', get_lang('Details')),
@@ -1137,7 +1137,7 @@ if (!empty($student_id)) {
         <thead>
         <tr>
             <th><?php echo get_lang('Exercises'); ?></th>
-            <th><?php echo get_lang('LearningPath');?></th>
+            <th><?php echo get_lang('LearningPath'); ?></th>
             <th><?php echo get_lang('AvgCourseScore').' '.Display::return_icon('info3.gif', get_lang('AverageScore'), array('align' => 'absmiddle', 'hspace' => '3px')) ?></th>
             <th><?php echo get_lang('Attempts'); ?></th>
             <th><?php echo get_lang('LatestAttempt'); ?></th>
@@ -1163,7 +1163,7 @@ if (!empty($student_id)) {
             'quiz.session_id'
         );
 
-        $sql = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz
+        $sql = "SELECT quiz.title, id FROM ".$t_quiz." AS quiz
                 WHERE
                     quiz.c_id = ".$courseInfo['real_id']." AND
                     active IN (0, 1)
@@ -1228,7 +1228,7 @@ if (!empty($student_id)) {
                 echo '<td>';
 
                 if ($count_attempts > 0) {
-                    echo $score_percentage . '%';
+                    echo $score_percentage.'%';
                 } else {
                     echo '-';
                     $score_percentage = 0;
@@ -1238,7 +1238,7 @@ if (!empty($student_id)) {
                 echo '<td>'.$count_attempts.'</td>';
                 echo '<td>';
 
-                $sql = 'SELECT exe_id FROM ' . $tbl_stats_exercices . '
+                $sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.'
                          WHERE
                             exe_exo_id = "'.$exercise_id.'" AND
                             exe_user_id ="'.$student_id.'" AND
@@ -1275,7 +1275,7 @@ if (!empty($student_id)) {
 
                 echo '</tr>';
                 $data_exercices[$i][] = $exercices['title'];
-                $data_exercices[$i][] = $score_percentage . '%';
+                $data_exercices[$i][] = $score_percentage.'%';
                 $data_exercices[$i][] = $count_attempts;
 
                 $csv_content[] = array(
@@ -1303,7 +1303,7 @@ if (!empty($student_id)) {
             $survey_list = SurveyManager::get_surveys($course_code, $sessionId);
 
             $survey_data = array();
-            foreach($survey_list as $survey) {
+            foreach ($survey_list as $survey) {
                 $user_list = SurveyManager::get_people_who_filled_survey($survey['survey_id'], false, $courseInfo['real_id']);
                 $survey_done = Display::return_icon("accept_na.png", get_lang('NoAnswer'), array(), ICON_SIZE_SMALL);
                 if (in_array($student_id, $user_list)) {
@@ -1328,7 +1328,7 @@ if (!empty($student_id)) {
                         $column = 0;
                         $table->setCellContents($row, $column, $data);
                         $class = 'class="row_odd"';
-                        if($row % 2) {
+                        if ($row % 2) {
                             $class = 'class="row_even"';
                         }
                         $table->setRowAttributes($row, $class, true);
@@ -1347,12 +1347,12 @@ if (!empty($student_id)) {
                 <table class="table table-striped table-hover">
                     <thead>
                         <tr>
-                            <th>' . get_lang('Tasks') . '</th>
-                            <th class="text-center">' . get_lang('DocumentNumber') . '</th>
-                            <th class="text-center">' . get_lang('Note') . '</th>
-                            <th class="text-center">' . get_lang('HandedOut') . '</th>
-                            <th class="text-center">' . get_lang('HandOutDateLimit') . '</th>
-                            <th class="text-center">' . get_lang('ConsideredWorkingTime') . '</th>
+                            <th>' . get_lang('Tasks').'</th>
+                            <th class="text-center">' . get_lang('DocumentNumber').'</th>
+                            <th class="text-center">' . get_lang('Note').'</th>
+                            <th class="text-center">' . get_lang('HandedOut').'</th>
+                            <th class="text-center">' . get_lang('HandOutDateLimit').'</th>
+                            <th class="text-center">' . get_lang('ConsideredWorkingTime').'</th>
                         </tr>
                     </thead>
                     <tbody>
@@ -1362,12 +1362,12 @@ if (!empty($student_id)) {
             $work = $work['work'];
             foreach ($work->user_results as $key => $results) {
                 echo '<tr>';
-                echo '<td>' . $work->title . '</td>';
+                echo '<td>'.$work->title.'</td>';
                 $documentNumber = $key + 1;
-                echo '<td class="text-center"><a href="' . api_get_path(WEB_CODE_PATH) . 'work/view.php?cidReq=' . $course_code . '&id_session=' . $sessionId .'&id=' . $results['id'] . '">(' . $documentNumber . ')</a></td>';
+                echo '<td class="text-center"><a href="'.api_get_path(WEB_CODE_PATH).'work/view.php?cidReq='.$course_code.'&id_session='.$sessionId.'&id='.$results['id'].'">('.$documentNumber.')</a></td>';
                 $qualification = !empty($results['qualification']) ? $results['qualification'] : '-';
-                echo '<td class="text-center">' . $qualification. '</td>';
-                echo '<td class="text-center">' . $results['formatted_date']. '</td>';
+                echo '<td class="text-center">'.$qualification.'</td>';
+                echo '<td class="text-center">'.$results['formatted_date'].'</td>';
                 $assignment = get_work_assignment_by_id($work->id, $courseInfo['real_id']);
 
                 echo '<td class="text-center">';
@@ -1385,7 +1385,7 @@ if (!empty($student_id)) {
                 foreach ($resultExtra as $field) {
                     $field = $field['value'];
                     if ($workingTime == $field->getField()->getVariable()) {
-                        echo '<td class="text-center">' . $field->getValue() . '</td>';
+                        echo '<td class="text-center">'.$field->getValue().'</td>';
                     }
                 }
 

+ 6 - 6
main/webservices/cm_webservice.php

@@ -55,7 +55,7 @@ class WSCMError
      */
     public static function setErrorHandler($handler)
     {
-        if($handler instanceof WSErrorHandler) {
+        if ($handler instanceof WSErrorHandler) {
             self::$_handler = $handler;
         }
     }
@@ -126,12 +126,12 @@ class WSCM
 		// if we are behind a reverse proxy, assume it will send the
 		// HTTP_X_FORWARDED_FOR header and use this IP instead
 		if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
-		  list($ip1,$ip2) = split(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
+		  list($ip1, $ip2) = split(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
 		  $ip = trim($ip1);
 		}
 		$security_key = $ip.$this->_configuration['security_key'];
 
-		if(!api_is_valid_secret_key($secret_key, $security_key)) {
+		if (!api_is_valid_secret_key($secret_key, $security_key)) {
 			return new WSCMError(1, "API key is invalid");
 		} else {
 			return null;
@@ -256,8 +256,8 @@ class WSCM
 	protected function getSessionId($session_id_field_name, $session_id_value)
 	{
 		if ($session_id_field_name == "chamilo_session_id") {
-			$session = SessionManager::fetch((int)$session_id_value);
-			if(!empty($session)) {
+			$session = SessionManager::fetch((int) $session_id_value);
+			if (!empty($session)) {
 				return intval($session_id_value);
 			} else {
 				return new WSCMError(300, "Session not found");
@@ -267,7 +267,7 @@ class WSCM
 				$session_id_value,
 				$session_id_field_name
 			);
-			if($session_id == 0) {
+			if ($session_id == 0) {
 				return new WSCMError(300, "Session not found");
 			} else {
 				return $session_id;

+ 3 - 3
plugin/azure_active_directory/src/AzureActiveDirectory.php

@@ -63,13 +63,13 @@ class AzureActiveDirectory extends Plugin
         $settings = [];
 
         foreach ($settingsInfo as $settingInfo) {
-            $variable = str_replace($this->get_name() . '_', '', $settingInfo['variable']);
+            $variable = str_replace($this->get_name().'_', '', $settingInfo['variable']);
 
             $settings[$variable] = $settingInfo['selected_value'];
         }
 
         $url = "https://login.microsoftonline.com/{$settings[self::SETTING_TENANT]}/oauth2/v2.0/";
-        $callback = api_get_path(WEB_PLUGIN_PATH) . $this->get_name() . '/src/callback.php';
+        $callback = api_get_path(WEB_PLUGIN_PATH).$this->get_name().'/src/callback.php';
 
         if ($urlType === self::URL_TYPE_SIGNOUT) {
             $action = 'logout';
@@ -97,6 +97,6 @@ class AzureActiveDirectory extends Plugin
             ];
         }
 
-        return $url . $action . '?' . http_build_query($urlParams);
+        return $url.$action.'?'.http_build_query($urlParams);
     }
 }

+ 1 - 1
plugin/bbb/config.php

@@ -3,7 +3,7 @@
 
 /* bbb parameters that will be registered in the course settings */
 
-require_once __DIR__ . '/../../main/inc/global.inc.php';
+require_once __DIR__.'/../../main/inc/global.inc.php';
 
 require_once 'lib/bbb.lib.php';
 require_once 'lib/bbb_api.php';

+ 6 - 6
plugin/buycourses/src/service_process_confirm.php

@@ -41,8 +41,8 @@ switch ($serviceSale['payment_type']) {
         // purchase-specific fields are ignored. This little condition handle this fact.
         $itemPrice = $serviceSale['price'];
 
-        $returnUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_success.php';
-        $cancelUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_error.php';
+        $returnUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_success.php';
+        $cancelUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_error.php';
 
         // The extra params for handle the hard job, this var is VERY IMPORTANT !!
         $extra = '';
@@ -74,7 +74,7 @@ switch ($serviceSale['payment_type']) {
 
             $plugin->cancelServiceSale(intval($serviceSale['id']));
 
-            header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
             exit;
         }
 
@@ -95,7 +95,7 @@ switch ($serviceSale['payment_type']) {
                 Display::addFlash(
                     Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false)
                 );
-                header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
                 exit;
             }
 
@@ -134,7 +134,7 @@ switch ($serviceSale['payment_type']) {
             );
 
             unset($_SESSION['bc_service_sale_id']);
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
             exit;
         }
 
@@ -183,7 +183,7 @@ switch ($serviceSale['payment_type']) {
                     )
                 );
 
-                header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
                 exit;
             }
         }

+ 3 - 3
plugin/customfooter/lib/customfooter_plugin.class.php

@@ -29,13 +29,13 @@ class CustomFooterPlugin extends Plugin {
 	function pix_url($pixname, $size = 16) {
         global $_configuration;
 
-        if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')){
+        if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')) {
             return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.png';
         }
-        if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.jpg')){
+        if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.jpg')) {
             return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.jpg';
         }
-        if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.gif')){
+        if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.gif')) {
             return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.gif';
         }
         return $_configuration['root_web'].'/main/img/icons/'.$size.'/'.$pixname.'.png';

+ 6 - 6
plugin/ims_lti/ImsLtiPlugin.php

@@ -111,7 +111,7 @@ class ImsLtiPlugin extends Plugin
             return false;
         }
 
-        $sql = 'DROP TABLE IF EXISTS ' . self::TABLE_TOOL;
+        $sql = 'DROP TABLE IF EXISTS '.self::TABLE_TOOL;
         Database::query($sql);
 
         return true;
@@ -124,14 +124,14 @@ class ImsLtiPlugin extends Plugin
     {
         $button = Display::toolbarButton(
             $this->get_lang('AddExternalTool'),
-            api_get_path(WEB_PLUGIN_PATH) . 'ims_lti/add.php',
+            api_get_path(WEB_PLUGIN_PATH).'ims_lti/add.php',
             'cog',
             'primary'
         );
 
         $this->course_settings = [
             [
-                'name' => $this->get_lang('ImsLtiDescription') . $button . '<hr>',
+                'name' => $this->get_lang('ImsLtiDescription').$button.'<hr>',
                 'type' => 'html'
             ]
         ];
@@ -153,8 +153,8 @@ class ImsLtiPlugin extends Plugin
             ->setId($cToolId)
             ->setCId($course->getId())
             ->setName($tool->getName())
-            ->setLink($this->get_name() . '/start.php?' . http_build_query(['id' => $tool->getId()]))
-            ->setImage($this->get_name() . '.png')
+            ->setLink($this->get_name().'/start.php?'.http_build_query(['id' => $tool->getId()]))
+            ->setImage($this->get_name().'.png')
             ->setVisibility(1)
             ->setAdmin(0)
             ->setAddress('squaregray.gif')
@@ -172,7 +172,7 @@ class ImsLtiPlugin extends Plugin
         $text = $this->get_lang('ImsLtiDescription');
         $text .= sprintf(
             $this->get_lang('ManageToolButton'),
-            api_get_path(WEB_PLUGIN_PATH) . 'ims_lti/list.php'
+            api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php'
         );
 
         return $text;

+ 1 - 1
plugin/ims_lti/create.php

@@ -33,7 +33,7 @@ if ($form->validate()) {
         Display::return_message($plugin->get_lang('ToolAdded'), 'success')
     );
 
-    header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'ims_lti/list.php');
+    header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
     exit;
 }
 

+ 3 - 3
plugin/tour/config.php

@@ -9,7 +9,7 @@
 
 define('TABLE_TOUR_LOG', 'plugin_tour_log');
 
-require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
-require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php';
+require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
+require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
+require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php';
 // Edit the config/tour.json file to add more pages or more elements to the guide

+ 2 - 2
src/Chamilo/UserBundle/Entity/Repository/UserRepository.php

@@ -259,7 +259,7 @@ class UserRepository extends EntityRepository
                         INNER JOIN ChamiloUserBundle:User AS U WITH UF.friendUserId = U
                         WHERE
                             U.status != 6 AND
-                            UF.relationType NOT IN(" . USER_RELATION_TYPE_DELETED . ", " . USER_RELATION_TYPE_RRHH . ") AND
+                            UF.relationType NOT IN(" . USER_RELATION_TYPE_DELETED.", ".USER_RELATION_TYPE_RRHH.") AND
                             UF.userId = $currentUserId AND
                             UF.friendUserId != $currentUserId AND
                             U = R.user AND
@@ -283,7 +283,7 @@ class UserRepository extends EntityRepository
                 $dql = "SELECT DISTINCT U
                         FROM ChamiloUserBundle:User U
                         INNER JOIN ChamiloCoreBundle:TrackEOnline T WITH U.id = T.loginUserId
-                        WHERE T.loginDate >= '" . $limit_date . "'";
+                        WHERE T.loginDate >= '" . $limit_date."'";
             }
         }