Completed
Pull Request — 1.11.x (#1458)
by José
138:44 queued 104:05
created
main/course_home/course_home.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             if (Database::num_rows($result) ==  0) {
214 214
                 $condition = '';
215 215
             } else {
216
-            	//great, there is an specific auto launch for this session we leave the $condition
216
+                //great, there is an specific auto launch for this session we leave the $condition
217 217
             }
218 218
         }
219 219
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             $lp_data = Database::fetch_array($result,'ASSOC');
226 226
             if (!empty($lp_data['id'])) {
227 227
                 if (api_is_platform_admin() || api_is_allowed_to_edit()) {
228
-                	$show_autolaunch_lp_warning = true;
228
+                    $show_autolaunch_lp_warning = true;
229 229
                 } else {
230 230
                     $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
231 231
                     if (!isset($_SESSION[$session_key])) {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         //if (!isset($_SESSION[$forumKey])) {
255 255
             //redirecting to the LP
256 256
             $url = api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&id_session='.$session_id;
257
-          //  $_SESSION[$forumKey] = true;
257
+            //  $_SESSION[$forumKey] = true;
258 258
             header("Location: $url");
259 259
             exit;
260 260
         //}
@@ -280,13 +280,13 @@  discard block
 block discarded – undo
280 280
 if (api_get_setting('course.homepage_view') == 'activity' ||
281 281
     api_get_setting('course.homepage_view') == 'activity_big'
282 282
 ) {
283
-	require 'activity.php';
283
+    require 'activity.php';
284 284
 } elseif (api_get_setting('course.homepage_view') == '2column') {
285
-	require '2column.php';
285
+    require '2column.php';
286 286
 } elseif (api_get_setting('course.homepage_view') == '3column') {
287
-	require '3column.php';
287
+    require '3column.php';
288 288
 } elseif (api_get_setting('course.homepage_view') == 'vertical_activity') {
289
-	require 'vertical_activity.php';
289
+    require 'vertical_activity.php';
290 290
 }
291 291
 
292 292
 $content = '<div id="course_tools">'.$content.'</div>';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 //unset($_SESSION['oLP']);
42 42
 //unset($_SESSION['lpobject']);
43 43
 
44
-$htmlHeadXtra[] ='<script>
44
+$htmlHeadXtra[] = '<script>
45 45
 /* option show/hide thematic-block */
46 46
 $(document).ready(function(){
47 47
     $("#thematic-show").click(function(){
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
210 210
             if (!isset($_SESSION[$session_key])) {
211 211
                 //redirecting to the LP
212
-                $url = api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?' . api_get_cidreq() . '&id_session=' . $session_id;
212
+                $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&id_session='.$session_id;
213 213
                 $_SESSION[$session_key] = true;
214 214
                 header("Location: $url");
215 215
                 exit;
@@ -220,13 +220,13 @@  discard block
 block discarded – undo
220 220
         $course_id = api_get_course_int_id();
221 221
         $condition = '';
222 222
         if (!empty($session_id)) {
223
-            $condition =  api_get_session_condition($session_id);
223
+            $condition = api_get_session_condition($session_id);
224 224
             $sql = "SELECT id FROM $lp_table
225 225
                     WHERE c_id = $course_id AND autolaunch = 1 $condition
226 226
                     LIMIT 1";
227 227
             $result = Database::query($sql);
228 228
             //If we found nothing in the session we just called the session_id =  0 autolaunch
229
-            if (Database::num_rows($result) ==  0) {
229
+            if (Database::num_rows($result) == 0) {
230 230
                 $condition = '';
231 231
             } else {
232 232
             	//great, there is an specific auto launch for this session we leave the $condition
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
                 WHERE c_id = $course_id AND autolaunch = 1 $condition
238 238
                 LIMIT 1";
239 239
         $result = Database::query($sql);
240
-        if (Database::num_rows($result) >  0) {
241
-            $lp_data = Database::fetch_array($result,'ASSOC');
240
+        if (Database::num_rows($result) > 0) {
241
+            $lp_data = Database::fetch_array($result, 'ASSOC');
242 242
             if (!empty($lp_data['id'])) {
243 243
                 if (api_is_platform_admin() || api_is_allowed_to_edit()) {
244 244
                 	$show_autolaunch_lp_warning = true;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                     $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
247 247
                     if (!isset($_SESSION[$session_key])) {
248 248
                         //redirecting to the LP
249
-                        $url = api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?' . api_get_cidreq() . '&action=view&lp_id=' . $lp_data['id'];
249
+                        $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp_data['id'];
250 250
 
251 251
                         $_SESSION[$session_key] = true;
252 252
                         header("Location: $url");
Please login to merge, or discard this patch.
src/Chamilo/FaqBundle/Entity/Question.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@
 block discarded – undo
219 219
      */
220 220
     public function getEntityIdentifier()
221 221
     {
222
-        return 'GenjFaqBundle:Question:' . $this->getId();
222
+        return 'GenjFaqBundle:Question:'.$this->getId();
223 223
     }
224 224
 
225 225
     /**
Please login to merge, or discard this patch.
src/Chamilo/FaqBundle/Entity/Category.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      *
94 94
      * @param string $rank
95 95
      *
96
-     * @return Question
96
+     * @return Category
97 97
      */
98 98
     public function setRank($rank)
99 99
     {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     /**
202 202
      * Get questions
203 203
      *
204
-     * @return \Doctrine\Common\Collections\Collection
204
+     * @return Question[]
205 205
      */
206 206
     public function getQuestions()
207 207
     {
Please login to merge, or discard this patch.
main/course_info/tools.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
         $interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq(), 'name' => get_lang('CustomizeIcons'));
47 47
         $toolName = $tool['name'];
48 48
 
49
-        $currentUrl = api_get_self().'?action=edit_icon&id=' . $id.'&'.api_get_cidreq();
49
+        $currentUrl = api_get_self().'?action=edit_icon&id='.$id.'&'.api_get_cidreq();
50 50
 
51 51
         $form = new FormValidator('icon_edit', 'post', $currentUrl);
52 52
         $form->addElement('header', get_lang('EditIcon'));
53 53
         $form->addHtml('<div class="col-md-7">');
54 54
         $form->addElement('text', 'name', get_lang('Name'));
55 55
         $form->addElement('text', 'link', get_lang('Links'));
56
-        $allowed_picture_types = array ('jpg', 'jpeg', 'png');
56
+        $allowed_picture_types = array('jpg', 'jpeg', 'png');
57 57
         $form->addElement('file', 'icon', get_lang('CustomIcon'));
58 58
         $form->addRule('icon', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types);
59 59
         $form->addElement(
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $iconsTools .= Display::page_header(get_lang('CustomizeIcons'), null, 'h4');
119 119
         $iconsTools .= '<div class="row">';
120 120
         foreach ($toolList as $tool) {
121
-            $toolIconName = 'Tool' . api_underscore_to_camel_case($tool['name']);
121
+            $toolIconName = 'Tool'.api_underscore_to_camel_case($tool['name']);
122 122
             $toolIconName = isset($$toolIconName) ? get_lang($toolIconName) : $tool['name'];
123 123
 
124 124
             $iconsTools .= '<div class="col-md-2">';
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
 
141 141
             $delete = (!empty($tool['custom_icon'])) ? "<a class=\"btn btn-default\" onclick=\"javascript:
142 142
                 if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
143
-                "')) return false;\" href=\"". api_get_self() . '?action=delete_icon&id=' . $tool['iid'] . '&'.api_get_cidreq()."\">
143
+                "')) return false;\" href=\"".api_get_self().'?action=delete_icon&id='.$tool['iid'].'&'.api_get_cidreq()."\">
144 144
             <em class=\"fa fa-trash-o\"></em></a>" : "";
145
-            $edit = '<a class="btn btn-default" href="' . api_get_self() . '?action=edit_icon&id=' . $tool['iid'] . '&'.api_get_cidreq().'"><em class="fa fa-pencil"></em></a>';
145
+            $edit = '<a class="btn btn-default" href="'.api_get_self().'?action=edit_icon&id='.$tool['iid'].'&'.api_get_cidreq().'"><em class="fa fa-pencil"></em></a>';
146 146
 
147
-            $iconsTools .= '<div class="icon-tools">'. $icon . '</div>';
148
-            $iconsTools .= '<div class="name-tools">' . $toolIconName . '</div>';
149
-            $iconsTools .= '<div class="toolbar">' . $edit . $delete . '</div>';
147
+            $iconsTools .= '<div class="icon-tools">'.$icon.'</div>';
148
+            $iconsTools .= '<div class="name-tools">'.$toolIconName.'</div>';
149
+            $iconsTools .= '<div class="toolbar">'.$edit.$delete.'</div>';
150 150
             $iconsTools .= '</div>';
151 151
             $iconsTools .= '</div>';
152 152
         }
Please login to merge, or discard this patch.
main/auth/external_login/facebook.init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
  * See facebook section of the auth.conf.php file
23 23
  */
24 24
 
25
-require dirname(__FILE__) . '/../../../app/config/auth.conf.php';
25
+require dirname(__FILE__).'/../../../app/config/auth.conf.php';
26 26
 
Please login to merge, or discard this patch.
main/gradebook/certificate_report.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 api_block_anonymous_users();
18 18
 
19 19
 $interbreadcrumb[] = array(
20
-    "url" => api_is_student_boss()?"#":api_get_path(WEB_CODE_PATH) . "mySpace/index.php?".api_get_cidreq(),
20
+    "url" => api_is_student_boss() ? "#" : api_get_path(WEB_CODE_PATH)."mySpace/index.php?".api_get_cidreq(),
21 21
     "name" => get_lang("MySpace")
22 22
 );
23 23
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     }
112 112
 
113 113
     if (!is_null($gradebook)) {
114
-        $exportAllLink = api_get_path(WEB_CODE_PATH) . "gradebook/gradebook_display_certificate.php?";
114
+        $exportAllLink = api_get_path(WEB_CODE_PATH)."gradebook/gradebook_display_certificate.php?";
115 115
         $exportAllLink .= http_build_query(array(
116 116
             "action" => "export_all_certificates",
117 117
             "cidReq" => $selectedCourseInfo['code'],
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 $searchBySessionCourseDateForm = new FormValidator(
251 251
     'certificate_report_form',
252 252
     'post',
253
-    api_get_path(WEB_CODE_PATH) . 'gradebook/certificate_report.php'
253
+    api_get_path(WEB_CODE_PATH).'gradebook/certificate_report.php'
254 254
 );
255 255
 $searchBySessionCourseDateForm->addSelect('session', get_lang('Sessions'), $sessions, ['id' => 'session']);
256 256
 $searchBySessionCourseDateForm->addSelect('course', get_lang('Courses'), $courses, ['id' => 'course']);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     $searchByStudentForm = new FormValidator(
284 284
         'certificate_report_form',
285 285
         'post',
286
-        api_get_path(WEB_CODE_PATH) . 'gradebook/certificate_report.php'
286
+        api_get_path(WEB_CODE_PATH).'gradebook/certificate_report.php'
287 287
     );
288 288
     $searchByStudentForm->addSelect('student', get_lang('Students'), $students, ['id' => 'student']);
289 289
     $searchByStudentForm->addButtonSearch();
Please login to merge, or discard this patch.
main/mySpace/company_reports.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     api_not_allowed(true);
17 17
 }
18 18
 
19
-$interbreadcrumb[] = array ('url' => api_is_student_boss()?'#':'index.php', 'name' => get_lang('MySpace'));
19
+$interbreadcrumb[] = array('url' => api_is_student_boss() ? '#' : 'index.php', 'name' => get_lang('MySpace'));
20 20
 $tool_name = get_lang('Report');
21 21
 
22 22
 $this_section = SECTION_TRACKING;
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
 //Column config
44 44
 $column_model = array(
45
-    array('name'=>'course',         'index'=>'title',       'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'),
46
-    array('name'=>'user',           'index'=>'user',        'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'),
47
-    array('name'=>'email',          'index'=>'email',       'width'=>'100', 'align'=>'left','sortable'=>'false', 'wrap_cell' => 'true'),
48
-    array('name'=>'time',           'index'=>'time',        'width'=>'50',  'align'=>'left','sortable'=>'false'),
49
-    array('name'=>'certificate',    'index'=>'certificate', 'width'=>'50',  'align'=>'left','sortable'=>'false'),
50
-    array('name'=>'progress_100',   'index'=>'progress_100',       'width'=>'50',  'align'=>'left','sortable'=>'false'),
51
-    array('name'=>'progress',       'index'=>'progress',    'width'=>'50',  'align'=>'left','sortable'=>'false')
45
+    array('name'=>'course', 'index'=>'title', 'width'=>'180', 'align'=>'left', 'wrap_cell' => 'true'),
46
+    array('name'=>'user', 'index'=>'user', 'width'=>'100', 'align'=>'left', 'sortable'=>'false', 'wrap_cell' => 'true'),
47
+    array('name'=>'email', 'index'=>'email', 'width'=>'100', 'align'=>'left', 'sortable'=>'false', 'wrap_cell' => 'true'),
48
+    array('name'=>'time', 'index'=>'time', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
49
+    array('name'=>'certificate', 'index'=>'certificate', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
50
+    array('name'=>'progress_100', 'index'=>'progress_100', 'width'=>'50', 'align'=>'left', 'sortable'=>'false'),
51
+    array('name'=>'progress', 'index'=>'progress', 'width'=>'50', 'align'=>'left', 'sortable'=>'false')
52 52
 );
53 53
 
54 54
 if (!empty($extra_fields)) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 }
68 68
 
69 69
 if (api_is_student_boss()) {
70
-    $column_model[] = array('name'=>'group', 'index'=>'group', 'width'=>'50', 'align'=>'left','sortable'=>'false');
70
+    $column_model[] = array('name'=>'group', 'index'=>'group', 'width'=>'50', 'align'=>'left', 'sortable'=>'false');
71 71
     $columns[] = get_lang('Group');
72 72
 }
73 73
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 $htmlHeadXtra[] = '<script>
80 80
 $(function() {
81
-    '.Display::grid_js('user_course_report',  $url, $columns, $column_model, $extra_params, array(), null, true).'
81
+    '.Display::grid_js('user_course_report', $url, $columns, $column_model, $extra_params, array(), null, true).'
82 82
     jQuery("#user_course_report").jqGrid("navGrid","#user_course_report_pager",{
83 83
         view:false,
84 84
         edit:false,
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 if (api_is_student_boss()) {
103 103
     $actions .= Display::url(
104 104
         Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
105
-        api_get_path(WEB_CODE_PATH) . "auth/my_progress.php"
105
+        api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
106 106
     );
107 107
     $actions .= Display::url(
108 108
         Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM),
109
-        api_get_path(WEB_CODE_PATH) . "mySpace/student.php"
109
+        api_get_path(WEB_CODE_PATH)."mySpace/student.php"
110 110
     );
111 111
     $actions .= Display::url(
112 112
         Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             [],
120 120
             ICON_SIZE_MEDIUM
121 121
         ),
122
-        api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
122
+        api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
123 123
     );
124 124
 }
125 125
 
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
 }
131 131
 $content .= Display::url(
132 132
     get_lang("CompanyReportResumed"),
133
-    api_get_path(WEB_CODE_PATH) . "mySpace/company_reports_resumed.php",
133
+    api_get_path(WEB_CODE_PATH)."mySpace/company_reports_resumed.php",
134 134
     array(
135 135
         'class' => 'btn btn-success'
136 136
     )
137 137
 );
138 138
 $content .= '</div>';
139
-$content .= '<h1 class="page-header">' . get_lang('CompanyReport') . '</h1>';
139
+$content .= '<h1 class="page-header">'.get_lang('CompanyReport').'</h1>';
140 140
 $content .= Display::grid_html('user_course_report');
141 141
 
142 142
 $tpl = new Template($tool_name);
Please login to merge, or discard this patch.
main/mySpace/company_reports_resumed.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     api_not_allowed(true);
16 16
 }
17 17
 
18
-$interbreadcrumb[] = array('url' => api_is_student_boss()?'#':'index.php', 'name' => get_lang('MySpace'));
18
+$interbreadcrumb[] = array('url' => api_is_student_boss() ? '#' : 'index.php', 'name' => get_lang('MySpace'));
19 19
 
20 20
 $tool_name = get_lang('Report');
21 21
 $this_section = SECTION_TRACKING;
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
 if (api_is_student_boss()) {
90 90
     $actions .= Display::url(
91 91
         Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
92
-        api_get_path(WEB_CODE_PATH) . "auth/my_progress.php"
92
+        api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
93 93
     );
94 94
     $actions .= Display::url(
95 95
         Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM),
96
-        api_get_path(WEB_CODE_PATH) . "mySpace/student.php"
96
+        api_get_path(WEB_CODE_PATH)."mySpace/student.php"
97 97
     );
98 98
     $actions .= Display::url(
99 99
         Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
100
-        api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php"
100
+        api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
101 101
     );
102 102
     $actions .= Display::url(
103 103
         Display::return_icon(
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             [],
107 107
             ICON_SIZE_MEDIUM
108 108
         ),
109
-        api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
109
+        api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
110 110
     );
111 111
 }
112 112
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 if (!api_is_student_boss()) {
120 120
     $content .= Display::url(
121 121
         get_lang("CompanyReport"),
122
-        api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php",
122
+        api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php",
123 123
         array(
124 124
             'class' => 'btn btn-success'
125 125
         )
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 }
128 128
 
129 129
 $content .= '</div>';
130
-$content .= '<h1 class="page-header">' . get_lang('CompanyReportResumed') . '</h1>';
130
+$content .= '<h1 class="page-header">'.get_lang('CompanyReportResumed').'</h1>';
131 131
 $content .= Display::grid_html('user_course_report');
132 132
 
133 133
 $tpl = new Template($tool_name);
Please login to merge, or discard this patch.
src/Chamilo/ContactBundle/Controller/ContactController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      * @Route("/contact")
20 20
      *
21 21
      * @param Request $request
22
-     * @return mixed
22
+     * @return Response
23 23
      */
24 24
     public function indexAction(Request $request)
25 25
     {
Please login to merge, or discard this patch.