Completed
Push — 1.10.x ( 3658ba...81c9ff )
by
unknown
91:59 queued 46:43
created
main/gradebook/gradebook_view_result.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $resultedit[0],
63 63
         'edit_result_form',
64 64
         null,
65
-        api_get_self() . '?editres=' . $resultedit[0]->get_id() . '&selecteval=' . $select_eval.'&'.api_get_cidreq()
65
+        api_get_self().'?editres='.$resultedit[0]->get_id().'&selecteval='.$select_eval.'&'.api_get_cidreq()
66 66
     );
67 67
 
68 68
     if ($edit_res_form->validate()) {
@@ -79,21 +79,21 @@  discard block
 block discarded – undo
79 79
         }
80 80
         $result->save();
81 81
         unset($result);
82
-        header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&editresmessage=&'.api_get_cidreq());
82
+        header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&editresmessage=&'.api_get_cidreq());
83 83
         exit;
84 84
     }
85 85
 }
86 86
 $file_type = null;
87 87
 if (isset($_GET['import'])) {
88 88
     $interbreadcrumb[] = array(
89
-        'url' => api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval=' . $select_eval.'&'.api_get_cidreq(),
89
+        'url' => api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval='.$select_eval.'&'.api_get_cidreq(),
90 90
         'name' => get_lang('ViewResult')
91 91
     );
92 92
     $import_result_form = new DataForm(
93 93
         DataForm :: TYPE_IMPORT,
94 94
         'import_result_form',
95 95
         null,
96
-        api_get_self() . '?import=&selecteval=' . $select_eval,
96
+        api_get_self().'?import=&selecteval='.$select_eval,
97 97
         '_blank',
98 98
         ''
99 99
     );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     if (($importedresult['user_id'] == $allresult->get_user_id())) {
123 123
                         if ($importedresult['score'] != $allresult->get_score()) {
124 124
                             if (!isset($values['overwrite'])) {
125
-                                header('Location: '.api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval=' . $select_eval . '&import_score_error=' . $importedresult['user_id']);
125
+                                header('Location: '.api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?selecteval='.$select_eval.'&import_score_error='.$importedresult['user_id']);
126 126
                                 exit;
127 127
                                 break;
128 128
                             } else {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     }
141 141
                 }
142 142
                 if ($importedresult['user_id'] == null) {
143
-                    header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&incorrectdata=');
143
+                    header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&incorrectdata=');
144 144
                     exit;
145 145
                 }
146 146
                 $userinfo = api_get_user_info($importedresult['user_id']);
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
                     $userinfo['official_code'] != $importedresult['official_code']
150 150
                 ) {
151 151
                     if (!isset($values['ignoreerrors'])) {
152
-                        header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&import_user_error=' . $importedresult['user_id']);
152
+                        header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&import_user_error='.$importedresult['user_id']);
153 153
                         exit;
154 154
                     }
155 155
                 }
156 156
                 if ($added != '1') {
157 157
                     if ($importedresult['score'] > $eval[0]->get_max()) {
158
-                        header('Location: gradebook_view_result.php?selecteval=' . $select_eval . '&overwritemax=');
158
+                        header('Location: gradebook_view_result.php?selecteval='.$select_eval.'&overwritemax=');
159 159
                         exit;
160 160
                     }
161 161
                     $result = new Result();
@@ -174,18 +174,18 @@  discard block
 block discarded – undo
174 174
                 }
175 175
             }
176 176
         } else {
177
-            header('Location: ' . api_get_self() . '?import=&selecteval=' . $select_eval . '&importnofile=');
177
+            header('Location: '.api_get_self().'?import=&selecteval='.$select_eval.'&importnofile=');
178 178
             exit;
179 179
         }
180 180
         if ($overwritescore != 0) {
181
-            header('Location: ' . api_get_self() . '?selecteval=' . $select_eval. '&importoverwritescore=' . $overwritescore);
181
+            header('Location: '.api_get_self().'?selecteval='.$select_eval.'&importoverwritescore='.$overwritescore);
182 182
             exit;
183 183
         }
184 184
         if ($nr_results_added == 0) {
185
-            header('Location: ' . api_get_self() . '?selecteval=' . $select_eval. '&nothingadded=');
185
+            header('Location: '.api_get_self().'?selecteval='.$select_eval.'&nothingadded=');
186 186
             exit;
187 187
         }
188
-        header('Location: ' . api_get_self() . '?selecteval=' . $select_eval . '&importok=');
188
+        header('Location: '.api_get_self().'?selecteval='.$select_eval.'&importok=');
189 189
         exit;
190 190
     }
191 191
 }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         DataForm :: TYPE_EXPORT,
201 201
         'export_result_form',
202 202
         null,
203
-        api_get_self() . '?export=&selecteval=' . $select_eval,
203
+        api_get_self().'?export=&selecteval='.$select_eval,
204 204
         '_blank',
205 205
         $locked_status
206 206
     );
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     if ($export_result_form->validate()) {
212 212
         $export = $export_result_form->exportValues();
213 213
         $file_type = $export['file_type'];
214
-        $filename = 'export_results_' . gmdate('Y-m-d_H-i-s');
214
+        $filename = 'export_results_'.gmdate('Y-m-d_H-i-s');
215 215
         $results = Result :: load(null, null, $select_eval);
216 216
         $data = array(); //when file type is csv, add a header to the output file
217 217
         if ($file_type == 'csv') {
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
             $datagen = new ResultsDataGenerator($eval[0], $allresults);
232 232
 
233 233
             // set headers pdf
234
-            !empty($_user['official_code']) ? $officialcode = $_user['official_code'] . ' - ' : '';
234
+            !empty($_user['official_code']) ? $officialcode = $_user['official_code'].' - ' : '';
235 235
 
236
-            $h1 = array(get_lang('Teacher'), $officialcode . $_user['firstName'] . ', ' . $_user['lastName']);
236
+            $h1 = array(get_lang('Teacher'), $officialcode.$_user['firstName'].', '.$_user['lastName']);
237 237
             $h2 = array(get_lang('Score'), $eval[0]->get_max());
238 238
             $h3 = array(get_lang('Course'), $_course['name']);
239 239
             $h4 = array(get_lang('Weight'), $eval[0]->get_weight());
@@ -243,9 +243,9 @@  discard block
 block discarded – undo
243 243
             $header_pdf = array($h1, $h2, $h3, $h4, $h5, $h6);
244 244
 
245 245
             // set footer pdf
246
-            $f1 = '<hr />' . get_lang('Drh');
247
-            $f2 = '<hr />' . get_lang('Teacher');
248
-            $f3 = '<hr />' . get_lang('Date');
246
+            $f1 = '<hr />'.get_lang('Drh');
247
+            $f2 = '<hr />'.get_lang('Teacher');
248
+            $f3 = '<hr />'.get_lang('Date');
249 249
             $footer_pdf = array($f1, $f2, $f3);
250 250
 
251 251
             // set title pdf
@@ -254,9 +254,9 @@  discard block
 block discarded – undo
254 254
             // set headers data table
255 255
             $head_ape_name = '';
256 256
             if (api_is_western_name_order()) {
257
-                $head_ape_name = get_lang('FirstName') . ', ' . get_lang('LastName');
257
+                $head_ape_name = get_lang('FirstName').', '.get_lang('LastName');
258 258
             } else {
259
-                $head_ape_name = get_lang('LastName') . ', ' . get_lang('FirstName');
259
+                $head_ape_name = get_lang('LastName').', '.get_lang('FirstName');
260 260
             }
261 261
 
262 262
             $head_table = array(
@@ -291,15 +291,15 @@  discard block
 block discarded – undo
291 291
                 $result[] = $user_info['username'];
292 292
 
293 293
                 if (api_is_western_name_order()) {
294
-                    $result[] = $user_info['firstname'] . ', ' . $user_info['lastname'];
294
+                    $result[] = $user_info['firstname'].', '.$user_info['lastname'];
295 295
                 } else {
296
-                    $result[] = $user_info['lastname'] . ', ' . $user_info['firstname'];
296
+                    $result[] = $user_info['lastname'].', '.$user_info['firstname'];
297 297
                 }
298 298
                 if ($number_decimals == null) {
299 299
                     if (empty($data['scoreletter']) && !is_numeric($data['score'])) {
300 300
                         $result[] = get_lang('DidNotTakeTheExam');
301 301
                     } else {
302
-                        $result[] = api_strtoupper(get_lang('Literal' . $data['scoreletter']));
302
+                        $result[] = api_strtoupper(get_lang('Literal'.$data['scoreletter']));
303 303
                     }
304 304
                 } else {
305 305
                     if (empty($data['score']) && !is_numeric($data['score'])) {
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 if (isset($_GET['resultdelete'])) {
351 351
     $result = Result :: load($_GET['resultdelete']);
352 352
     $result[0]->delete();
353
-    header('Location: gradebook_view_result.php?deleteresult=&selecteval=' . $select_eval);
353
+    header('Location: gradebook_view_result.php?deleteresult=&selecteval='.$select_eval);
354 354
     exit;
355 355
 }
356 356
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
                     $result[0]->delete();
368 368
                     $number_of_deleted_results++;
369 369
                 }
370
-                header('Location: gradebook_view_result.php?massdelete=&selecteval=' . $select_eval);
370
+                header('Location: gradebook_view_result.php?massdelete=&selecteval='.$select_eval);
371 371
                 exit;
372 372
                 break;
373 373
         }
@@ -408,14 +408,14 @@  discard block
 block discarded – undo
408 408
 
409 409
 $htmlHeadXtra[] = '<script>
410 410
 function confirmationuser() {
411
-    if (confirm("' . get_lang('DeleteUser') . '?"))
411
+    if (confirm("' . get_lang('DeleteUser').'?"))
412 412
     	{return true;}
413 413
     else
414 414
     	{return false;}
415 415
 }
416 416
 
417 417
 function confirmationall () {
418
-    if (confirm("' . get_lang('DeleteAll') . '?"))
418
+    if (confirm("' . get_lang('DeleteAll').'?"))
419 419
     	{return true;}
420 420
     else
421 421
     	{return false;}
@@ -423,13 +423,13 @@  discard block
 block discarded – undo
423 423
 </script>';
424 424
 if (isset($_GET['deleteall'])) {
425 425
     $eval[0]->delete_results();
426
-    header('Location: '.api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?allresdeleted=&selecteval=' . $select_eval.'&'.api_get_cidreq());
426
+    header('Location: '.api_get_path(WEB_CODE_PATH).'gradebook/gradebook_view_result.php?allresdeleted=&selecteval='.$select_eval.'&'.api_get_cidreq());
427 427
     exit;
428 428
 }
429 429
 if (!isset($_GET['export']) && (!isset($_GET['import']))) {
430 430
     if (!isset($_GET['selectcat'])) {
431 431
         $interbreadcrumb[] = array(
432
-            'url' => $_SESSION['gradebook_dest'] . '?selectcat=' . $currentcat[0]->get_id().'&'.api_get_cidreq(),
432
+            'url' => $_SESSION['gradebook_dest'].'?selectcat='.$currentcat[0]->get_id().'&'.api_get_cidreq(),
433 433
             'name' => get_lang('Details')
434 434
         );
435 435
     }
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
     Display :: display_warning_message(get_lang('OverWriteMax'), false);
485 485
 }
486 486
 if (isset($_GET['importoverwritescore'])) {
487
-    Display :: display_confirmation_message(get_lang('ImportOverWriteScore') . ' ' . $_GET['importoverwritescore']);
487
+    Display :: display_confirmation_message(get_lang('ImportOverWriteScore').' '.$_GET['importoverwritescore']);
488 488
 }
489 489
 if (isset($_GET['import_user_error'])) {
490 490
     $userinfo = api_get_user_info($_GET['import_user_error']);
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 }
498 498
 if (isset($_GET['import_score_error'])) {
499 499
     $userinfo = api_get_user_info($_GET['import_score_error']);
500
-    Display :: display_warning_message(get_lang('ScoreDoesNotMatch') . ' ' . api_get_person_name($userinfo['firstname'], $userinfo['lastname']));
500
+    Display :: display_warning_message(get_lang('ScoreDoesNotMatch').' '.api_get_person_name($userinfo['firstname'], $userinfo['lastname']));
501 501
 }
502 502
 if ($file_type == null) {
503 503
     //show the result header
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_get_path(WEB_CODE_PATH) . "mySpace/index.php?".api_get_cidreq(),
20
+    "url" => 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/gradebook/gradebook.php 1 patch
Spacing   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 // $cidReset : This is the main difference with gradebook.php, here we say,
8 8
 // basically, that we are inside a course, and many things depend from that
9
-$cidReset= true;
9
+$cidReset = true;
10 10
 $_in_course = false;
11 11
 //make sure the destination for scripts is index.php instead of gradebook.php
12 12
 require_once '../inc/global.inc.php';
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  </script>';
31 31
 api_block_anonymous_users();
32 32
 
33
-$htmlHeadXtra[]= '<script type="text/javascript">
33
+$htmlHeadXtra[] = '<script type="text/javascript">
34 34
 function confirmation ()
35 35
 {
36 36
 	if (confirm("'.get_lang('DeleteAll').'?")) {
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 //this is called when there is no data for the course admin
48 48
 if (isset ($_GET['createallcategories'])) {
49 49
     GradebookUtils::block_students();
50
-    $coursecat= Category :: get_not_created_course_categories(api_get_user_id());
50
+    $coursecat = Category :: get_not_created_course_categories(api_get_user_id());
51 51
     if (!count($coursecat) == 0) {
52 52
         foreach ($coursecat as $row) {
53
-            $cat= new Category();
53
+            $cat = new Category();
54 54
             $cat->set_name($row[1]);
55 55
             $cat->set_course_code($row[0]);
56 56
             $cat->set_description(null);
@@ -66,33 +66,33 @@  discard block
 block discarded – undo
66 66
     exit;
67 67
 }
68 68
 //move a category
69
-$selectcat=isset($_GET['selectcat']) ?  Security::remove_XSS($_GET['selectcat']) : '';
69
+$selectcat = isset($_GET['selectcat']) ? Security::remove_XSS($_GET['selectcat']) : '';
70 70
 
71 71
 if (isset ($_GET['movecat'])) {
72 72
     $move_cat = Security::remove_XSS($_GET['movecat']);
73 73
     GradebookUtils::block_students();
74
-    $cats= Category :: load($move_cat);
74
+    $cats = Category :: load($move_cat);
75 75
     if (!isset ($_GET['targetcat'])) {
76
-        $move_form= new CatForm(CatForm :: TYPE_MOVE,
76
+        $move_form = new CatForm(CatForm :: TYPE_MOVE,
77 77
             $cats[0],
78 78
             'move_cat_form',
79 79
             null,
80
-            api_get_self() . '?movecat=' . $move_cat
81
-            . '&selectcat=' . Security::remove_XSS($_GET['selectcat']));
80
+            api_get_self().'?movecat='.$move_cat
81
+            . '&selectcat='.Security::remove_XSS($_GET['selectcat']));
82 82
         if ($move_form->validate()) {
83
-            header('Location: ' . api_get_self() . '?selectcat=' . Security::remove_XSS($_GET['selectcat'])
84
-                . '&movecat=' . $move_cat
85
-                . '&targetcat=' . $move_form->exportValue('move_cat'));
83
+            header('Location: '.api_get_self().'?selectcat='.Security::remove_XSS($_GET['selectcat'])
84
+                . '&movecat='.$move_cat
85
+                . '&targetcat='.$move_form->exportValue('move_cat'));
86 86
             exit;
87 87
         }
88 88
     } else {
89
-        $get_target_cat=Security::remove_XSS($_GET['targetcat']);
90
-        $targetcat= Category :: load($get_target_cat);
89
+        $get_target_cat = Security::remove_XSS($_GET['targetcat']);
90
+        $targetcat = Category :: load($get_target_cat);
91 91
         $course_to_crsind = ($cats[0]->get_course_code() != null && $targetcat[0]->get_course_code() == null);
92 92
 
93 93
         if (!($course_to_crsind && !isset($_GET['confirm']))) {
94 94
             $cats[0]->move_to_cat($targetcat[0]);
95
-            header('Location: ' . api_get_self() . '?categorymoved=&selectcat=' . Security::remove_XSS($_GET['selectcat']));
95
+            header('Location: '.api_get_self().'?categorymoved=&selectcat='.Security::remove_XSS($_GET['selectcat']));
96 96
             exit;
97 97
         }
98 98
         unset($targetcat);
@@ -103,32 +103,32 @@  discard block
 block discarded – undo
103 103
 //move an evaluation
104 104
 if (isset ($_GET['moveeval'])) {
105 105
     GradebookUtils::block_students();
106
-    $get_move_eval=Security::remove_XSS($_GET['moveeval']);
107
-    $evals= Evaluation :: load($get_move_eval);
106
+    $get_move_eval = Security::remove_XSS($_GET['moveeval']);
107
+    $evals = Evaluation :: load($get_move_eval);
108 108
     if (!isset ($_GET['targetcat'])) {
109 109
 
110
-        $move_form= new EvalForm(EvalForm :: TYPE_MOVE,
110
+        $move_form = new EvalForm(EvalForm :: TYPE_MOVE,
111 111
             $evals[0],
112 112
             null,
113 113
             'move_eval_form',
114 114
             null,
115
-            api_get_self() . '?moveeval=' . $get_move_eval
116
-            . '&selectcat=' . Security::remove_XSS($_GET['selectcat']));
115
+            api_get_self().'?moveeval='.$get_move_eval
116
+            . '&selectcat='.Security::remove_XSS($_GET['selectcat']));
117 117
 
118 118
         if ($move_form->validate()) {
119
-            header('Location: ' .api_get_self() . '?selectcat=' . Security::remove_XSS($_GET['selectcat'])
120
-                . '&moveeval=' . $get_move_eval
121
-                . '&targetcat=' . $move_form->exportValue('move_cat'));
119
+            header('Location: '.api_get_self().'?selectcat='.Security::remove_XSS($_GET['selectcat'])
120
+                . '&moveeval='.$get_move_eval
121
+                . '&targetcat='.$move_form->exportValue('move_cat'));
122 122
             exit;
123 123
         }
124 124
     } else {
125
-        $get_target_cat=Security::remove_XSS($_GET['targetcat']);
126
-        $targetcat= Category :: load($get_target_cat);
125
+        $get_target_cat = Security::remove_XSS($_GET['targetcat']);
126
+        $targetcat = Category :: load($get_target_cat);
127 127
         $course_to_crsind = ($evals[0]->get_course_code() != null && $targetcat[0]->get_course_code() == null);
128 128
 
129 129
         if (!($course_to_crsind && !isset($_GET['confirm']))) {
130 130
             $evals[0]->move_to_cat($targetcat[0]);
131
-            header('Location: ' . api_get_self() . '?evaluationmoved=&selectcat=' . Security::remove_XSS($_GET['selectcat']));
131
+            header('Location: '.api_get_self().'?evaluationmoved=&selectcat='.Security::remove_XSS($_GET['selectcat']));
132 132
             exit;
133 133
         }
134 134
         unset ($targetcat);
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 //move a link
140 140
 if (isset ($_GET['movelink'])) {
141 141
     GradebookUtils::block_students();
142
-    $get_move_link=Security::remove_XSS($_GET['movelink']);
143
-    $link= LinkFactory :: load($get_move_link);
142
+    $get_move_link = Security::remove_XSS($_GET['movelink']);
143
+    $link = LinkFactory :: load($get_move_link);
144 144
     $move_form = new LinkForm(
145 145
         LinkForm :: TYPE_MOVE,
146 146
         null,
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
         api_get_self().'?movelink='.$get_move_link.'&selectcat='.Security::remove_XSS($_GET['selectcat'])
151 151
     );
152 152
     if ($move_form->validate()) {
153
-        $targetcat= Category :: load($move_form->exportValue('move_cat'));
153
+        $targetcat = Category :: load($move_form->exportValue('move_cat'));
154 154
         $link[0]->move_to_cat($targetcat[0]);
155 155
         unset ($link);
156
-        header('Location: ' . api_get_self(). '?linkmoved=&selectcat=' . Security::remove_XSS($_GET['selectcat']));
156
+        header('Location: '.api_get_self().'?linkmoved=&selectcat='.Security::remove_XSS($_GET['selectcat']));
157 157
         exit;
158 158
     }
159 159
 }
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
 if (isset ($_GET['visiblecat'])) {
163 163
     GradebookUtils::block_students();
164 164
     if (isset ($_GET['set_visible'])) {
165
-        $visibility_command= 1;
165
+        $visibility_command = 1;
166 166
     } else {
167
-        $visibility_command= 0;
167
+        $visibility_command = 0;
168 168
     }
169
-    $cats= Category :: load($_GET['visiblecat']);
169
+    $cats = Category :: load($_GET['visiblecat']);
170 170
     $cats[0]->set_visible($visibility_command);
171 171
     $cats[0]->save();
172 172
     $cats[0]->apply_visibility_to_children();
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 }
182 182
 if (isset ($_GET['deletecat'])) {
183 183
     GradebookUtils::block_students();
184
-    $cats= Category :: load($_GET['deletecat']);
184
+    $cats = Category :: load($_GET['deletecat']);
185 185
     //delete all categories,subcategories and results
186 186
     if ($cats[0] != null) {
187 187
         if ($cats[0]->get_id() != 0) {
@@ -196,12 +196,12 @@  discard block
 block discarded – undo
196 196
 if (isset ($_GET['visibleeval'])) {
197 197
     GradebookUtils::block_students();
198 198
     if (isset ($_GET['set_visible'])) {
199
-        $visibility_command= 1;
199
+        $visibility_command = 1;
200 200
     } else {
201
-        $visibility_command= 0;
201
+        $visibility_command = 0;
202 202
     }
203 203
 
204
-    $eval= Evaluation :: load($_GET['visibleeval']);
204
+    $eval = Evaluation :: load($_GET['visibleeval']);
205 205
     $eval[0]->set_visible($visibility_command);
206 206
     $eval[0]->save();
207 207
     unset ($eval);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 }
216 216
 if (isset ($_GET['deleteeval'])) {
217 217
     GradebookUtils::block_students();
218
-    $eval= Evaluation :: load($_GET['deleteeval']);
218
+    $eval = Evaluation :: load($_GET['deleteeval']);
219 219
     if ($eval[0] != null) {
220 220
         $eval[0]->delete_with_results();
221 221
     }
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 if (isset ($_GET['visiblelink'])) {
227 227
     GradebookUtils::block_students();
228 228
     if (isset ($_GET['set_visible'])) {
229
-        $visibility_command= 1;
230
-    }else {
231
-        $visibility_command= 0;
229
+        $visibility_command = 1;
230
+    } else {
231
+        $visibility_command = 0;
232 232
     }
233
-    $link= LinkFactory :: load($_GET['visiblelink']);
233
+    $link = LinkFactory :: load($_GET['visiblelink']);
234 234
     $link[0]->set_visible($visibility_command);
235 235
     $link[0]->save();
236 236
     unset ($link);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     GradebookUtils::block_students();
247 247
     //fixing #5229
248 248
     if (!empty($_GET['deletelink'])) {
249
-        $link= LinkFactory :: load($_GET['deletelink']);
249
+        $link = LinkFactory :: load($_GET['deletelink']);
250 250
         if ($link[0] != null) {
251 251
             $link[0]->delete();
252 252
         }
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
     }
264 264
     $button = '<form name="confirm"
265 265
 					 method="post"
266
-					 action="'.api_get_self() .'?confirm='
267
-        .(isset($_GET['movecat']) ? '&movecat=' . Security::remove_XSS($_GET['movecat'])
268
-            : '&moveeval=' . Security::remove_XSS($_GET['moveeval']) )
269
-        .'&selectcat=' . Security::remove_XSS($_GET['selectcat'])
270
-        .'&targetcat=' . Security::remove_XSS($_GET['targetcat']).'">
266
+					 action="'.api_get_self().'?confirm='
267
+        .(isset($_GET['movecat']) ? '&movecat='.Security::remove_XSS($_GET['movecat'])
268
+            : '&moveeval='.Security::remove_XSS($_GET['moveeval']))
269
+        .'&selectcat='.Security::remove_XSS($_GET['selectcat'])
270
+        .'&targetcat='.Security::remove_XSS($_GET['targetcat']).'">
271 271
 			   <input type="submit" value="'.'  '.get_lang('Ok').'  '.'">
272 272
 			   </form>';
273 273
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 //actions on the sortabletable
278 278
 if (isset ($_POST['action'])) {
279 279
     GradebookUtils::block_students();
280
-    $number_of_selected_items= count($_POST['id']);
280
+    $number_of_selected_items = count($_POST['id']);
281 281
     if ($number_of_selected_items == '0') {
282 282
         $warning_message = get_lang('NoItemsSelected');
283 283
         $filter_warning_msg = false;
@@ -285,19 +285,19 @@  discard block
 block discarded – undo
285 285
     else {
286 286
         switch ($_POST['action']) {
287 287
             case 'deleted' :
288
-                $number_of_deleted_categories= 0;
289
-                $number_of_deleted_evaluations= 0;
290
-                $number_of_deleted_links= 0;
288
+                $number_of_deleted_categories = 0;
289
+                $number_of_deleted_evaluations = 0;
290
+                $number_of_deleted_links = 0;
291 291
                 foreach ($_POST['id'] as $indexstr) {
292 292
                     if (api_substr($indexstr, 0, 4) == 'CATE') {
293
-                        $cats= Category :: load(api_substr($indexstr, 4));
293
+                        $cats = Category :: load(api_substr($indexstr, 4));
294 294
                         if ($cats[0] != null) {
295 295
                             $cats[0]->delete_all();
296 296
                         }
297 297
                         $number_of_deleted_categories++;
298 298
                     }
299 299
                     if (api_substr($indexstr, 0, 4) == 'EVAL') {
300
-                        $eval= Evaluation :: load(api_substr($indexstr, 4));
300
+                        $eval = Evaluation :: load(api_substr($indexstr, 4));
301 301
                         if ($eval[0] != null) {
302 302
                             $eval[0]->delete_with_results();
303 303
                         }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                     if (api_substr($indexstr, 0, 4) == 'LINK') {
307 307
                         $id = api_substr($indexstr, 4);
308 308
                         if (!empty($id)) {
309
-                            $link= LinkFactory :: load();
309
+                            $link = LinkFactory :: load();
310 310
                             if ($link[0] != null) {
311 311
                                 $link[0]->delete();
312 312
                             }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                         }
315 315
                     }
316 316
                 }
317
-                $confirmation_message = get_lang('DeletedCategories') . ' : <b>' . $number_of_deleted_categories . '</b><br />' . get_lang('DeletedEvaluations') . ' : <b>' . $number_of_deleted_evaluations . '</b><br />' . get_lang('DeletedLinks') . ' : <b>' . $number_of_deleted_links . '</b><br /><br />' . get_lang('TotalItems') . ' : <b>' . $number_of_selected_items . '</b>';
317
+                $confirmation_message = get_lang('DeletedCategories').' : <b>'.$number_of_deleted_categories.'</b><br />'.get_lang('DeletedEvaluations').' : <b>'.$number_of_deleted_evaluations.'</b><br />'.get_lang('DeletedLinks').' : <b>'.$number_of_deleted_links.'</b><br /><br />'.get_lang('TotalItems').' : <b>'.$number_of_selected_items.'</b>';
318 318
                 $filter_confirm_msg = false;
319 319
                 break;
320 320
             case 'setvisible' :
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 }
367 367
 
368 368
 if (isset ($_POST['submit']) && isset ($_POST['keyword'])) {
369
-    header('Location: ' . api_get_self() . '?selectcat=' . Security::remove_XSS($_GET['selectcat'])
369
+    header('Location: '.api_get_self().'?selectcat='.Security::remove_XSS($_GET['selectcat'])
370 370
         . '&search='.Security::remove_XSS($_POST['keyword']));
371 371
     exit;
372 372
 }
@@ -374,8 +374,8 @@  discard block
 block discarded – undo
374 374
 // DISPLAY HEADERS AND MESSAGES                           -
375 375
 if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) {
376 376
     if (isset ($_GET['studentoverview'])) {
377
-        $interbreadcrumb[]= array (
378
-            'url' => $_SESSION['gradebook_dest'].'?selectcat=' . Security::remove_XSS($_GET['selectcat'].'&'.api_get_cidreq()),
377
+        $interbreadcrumb[] = array(
378
+            'url' => $_SESSION['gradebook_dest'].'?selectcat='.Security::remove_XSS($_GET['selectcat'].'&'.api_get_cidreq()),
379 379
             'name' => get_lang('ToolGradebook')
380 380
         );
381 381
         Display :: display_header(get_lang('FlatView'));
@@ -386,13 +386,13 @@  discard block
 block discarded – undo
386 386
             $gradebook_dest = Security::remove_XSS($_SESSION['gradebook_dest']);
387 387
         }
388 388
 
389
-        $interbreadcrumb[]= array ('url' => $gradebook_dest,'name' => get_lang('Gradebook'));
389
+        $interbreadcrumb[] = array('url' => $gradebook_dest, 'name' => get_lang('Gradebook'));
390 390
 
391
-        if ((isset($_GET['selectcat']) && $_GET['selectcat']>0)) {
391
+        if ((isset($_GET['selectcat']) && $_GET['selectcat'] > 0)) {
392 392
             if (!empty($_GET['course'])) {
393
-                $interbreadcrumb[]= array ('url' => $gradebook_dest.'selectcat='.Security::remove_XSS($_GET['selectcat']),'name' => get_lang('Details'));
393
+                $interbreadcrumb[] = array('url' => $gradebook_dest.'selectcat='.Security::remove_XSS($_GET['selectcat']), 'name' => get_lang('Details'));
394 394
             } else {
395
-                $interbreadcrumb[]= array ('url' => $_SESSION['gradebook_dest'].'?selectcat=0','name' => get_lang('Details'));
395
+                $interbreadcrumb[] = array('url' => $_SESSION['gradebook_dest'].'?selectcat=0', 'name' => get_lang('Details'));
396 396
             }
397 397
         }
398 398
         Display :: display_header('');
@@ -402,56 +402,56 @@  discard block
 block discarded – undo
402 402
 }
403 403
 
404 404
 if (isset($_GET['categorymoved'])) {
405
-    Display :: display_confirmation_message(get_lang('CategoryMoved'),false);
405
+    Display :: display_confirmation_message(get_lang('CategoryMoved'), false);
406 406
 }
407 407
 if (isset($_GET['evaluationmoved'])) {
408
-    Display :: display_confirmation_message(get_lang('EvaluationMoved'),false);
408
+    Display :: display_confirmation_message(get_lang('EvaluationMoved'), false);
409 409
 }
410 410
 if (isset($_GET['linkmoved'])) {
411
-    Display :: display_confirmation_message(get_lang('LinkMoved'),false);
411
+    Display :: display_confirmation_message(get_lang('LinkMoved'), false);
412 412
 }
413 413
 if (isset ($_GET['addcat'])) {
414
-    Display :: display_confirmation_message(get_lang('CategoryAdded'),false);
414
+    Display :: display_confirmation_message(get_lang('CategoryAdded'), false);
415 415
 }
416 416
 if (isset ($_GET['linkadded'])) {
417
-    Display :: display_confirmation_message(get_lang('LinkAdded'),false);
417
+    Display :: display_confirmation_message(get_lang('LinkAdded'), false);
418 418
 }
419 419
 if (isset ($_GET['addresult'])) {
420
-    Display :: display_confirmation_message(get_lang('ResultAdded'),false);
420
+    Display :: display_confirmation_message(get_lang('ResultAdded'), false);
421 421
 }
422 422
 if (isset ($_GET['editcat'])) {
423
-    Display :: display_confirmation_message(get_lang('CategoryEdited'),false);
423
+    Display :: display_confirmation_message(get_lang('CategoryEdited'), false);
424 424
 }
425 425
 if (isset ($_GET['editeval'])) {
426
-    Display :: display_confirmation_message(get_lang('EvaluationEdited'),false);
426
+    Display :: display_confirmation_message(get_lang('EvaluationEdited'), false);
427 427
 }
428 428
 if (isset ($_GET['linkedited'])) {
429
-    Display :: display_confirmation_message(get_lang('LinkEdited'),false);
429
+    Display :: display_confirmation_message(get_lang('LinkEdited'), false);
430 430
 }
431 431
 if (isset ($_GET['nolinkitems'])) {
432
-    Display :: display_warning_message(get_lang('NoLinkItems'),false);
432
+    Display :: display_warning_message(get_lang('NoLinkItems'), false);
433 433
 }
434 434
 if (isset ($_GET['addallcat'])) {
435
-    Display :: display_normal_message(get_lang('AddAllCat'),false);
435
+    Display :: display_normal_message(get_lang('AddAllCat'), false);
436 436
 }
437 437
 if (isset ($confirmation_message)) {
438
-    Display :: display_confirmation_message($confirmation_message,$filter_confirm_msg);
438
+    Display :: display_confirmation_message($confirmation_message, $filter_confirm_msg);
439 439
 }
440 440
 if (isset ($warning_message)) {
441
-    Display :: display_warning_message($warning_message,$filter_warning_msg);
441
+    Display :: display_warning_message($warning_message, $filter_warning_msg);
442 442
 }
443 443
 if (isset ($move_form)) {
444
-    Display :: display_normal_message($move_form->toHtml(),false);
444
+    Display :: display_normal_message($move_form->toHtml(), false);
445 445
 }
446 446
 // LOAD DATA & DISPLAY TABLE                             -
447
-$is_platform_admin= api_is_platform_admin();
448
-$is_course_admin= api_is_allowed_to_edit();
447
+$is_platform_admin = api_is_platform_admin();
448
+$is_course_admin = api_is_allowed_to_edit();
449 449
 
450 450
 //load data for category, evaluation and links
451 451
 if (!isset ($_GET['selectcat']) || empty ($_GET['selectcat'])) {
452
-    $category= 0;
452
+    $category = 0;
453 453
 } else {
454
-    $category= Security::remove_XSS($_GET['selectcat']);
454
+    $category = Security::remove_XSS($_GET['selectcat']);
455 455
 }
456 456
 // search form
457 457
 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
     null,
463 463
     api_get_self().'?selectcat='.$selectcat
464 464
 );
465
-$values= $simple_search_form->exportValues();
465
+$values = $simple_search_form->exportValues();
466 466
 $keyword = '';
467 467
 if (isset($_GET['search']) && !empty($_GET['search'])) {
468 468
     $keyword = Security::remove_XSS($_GET['search']);
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
 }
473 473
 
474 474
 if (!empty($keyword)) {
475
-    $cats= Category :: load($category);
476
-    $allcat= array ();
477
-    if ((isset($_GET['selectcat']) && $_GET['selectcat']==0) && isset($_GET['search'])) {
478
-        $allcat= $cats[0]->get_subcategories(null);
479
-        $allcat_info = Category::find_category($keyword,$allcat);
480
-        $alleval=array();
481
-        $alllink=array();
475
+    $cats = Category :: load($category);
476
+    $allcat = array();
477
+    if ((isset($_GET['selectcat']) && $_GET['selectcat'] == 0) && isset($_GET['search'])) {
478
+        $allcat = $cats[0]->get_subcategories(null);
479
+        $allcat_info = Category::find_category($keyword, $allcat);
480
+        $alleval = array();
481
+        $alllink = array();
482 482
     } else {
483 483
         $alleval = Evaluation::find_evaluations($keyword, $cats[0]->get_id());
484 484
         $alllink = LinkFactory::find_links($keyword, $cats[0]->get_id());
@@ -486,13 +486,13 @@  discard block
 block discarded – undo
486 486
 
487 487
 } elseif (isset ($_GET['studentoverview'])) {
488 488
     //@todo this code seems to be deprecated because the gradebook tab is off
489
-    $cats= Category :: load($category);
490
-    $stud_id= (api_is_allowed_to_edit() ? null : api_get_user_id());
491
-    $allcat= array ();
492
-    $alleval= $cats[0]->get_evaluations($stud_id, true);
493
-    $alllink= $cats[0]->get_links($stud_id, true);
489
+    $cats = Category :: load($category);
490
+    $stud_id = (api_is_allowed_to_edit() ? null : api_get_user_id());
491
+    $allcat = array();
492
+    $alleval = $cats[0]->get_evaluations($stud_id, true);
493
+    $alllink = $cats[0]->get_links($stud_id, true);
494 494
     if (isset ($_GET['exportpdf'])) {
495
-        $datagen = new GradebookDataGenerator ($allcat,$alleval, $alllink);
495
+        $datagen = new GradebookDataGenerator($allcat, $alleval, $alllink);
496 496
         $header_names = array(
497 497
             get_lang('Name'),
498 498
             get_lang('Description'),
@@ -500,18 +500,18 @@  discard block
 block discarded – undo
500 500
             get_lang('Date'),
501 501
             get_lang('Results'),
502 502
         );
503
-        $data_array = $datagen->get_data(GradebookDataGenerator :: GDG_SORT_NAME,0,null,true);
503
+        $data_array = $datagen->get_data(GradebookDataGenerator :: GDG_SORT_NAME, 0, null, true);
504 504
         $newarray = array();
505 505
         foreach ($data_array as $data) {
506 506
             $newarray[] = array_slice($data, 1);
507 507
         }
508
-        $pdf= new Cezpdf();
508
+        $pdf = new Cezpdf();
509 509
         $pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
510 510
         $pdf->ezSetMargins(30, 30, 50, 30);
511 511
         $pdf->ezSetY(810);
512
-        $pdf->ezText(get_lang('FlatView').' ('. api_convert_and_format_date(null, DATE_FORMAT_SHORT) . ' ' . api_convert_and_format_date(null, TIME_NO_SEC_FORMAT) .')',12,array('justification'=>'center'));
513
-        $pdf->line(50,790,550,790);
514
-        $pdf->line(50,40,550,40);
512
+        $pdf->ezText(get_lang('FlatView').' ('.api_convert_and_format_date(null, DATE_FORMAT_SHORT).' '.api_convert_and_format_date(null, TIME_NO_SEC_FORMAT).')', 12, array('justification'=>'center'));
513
+        $pdf->line(50, 790, 550, 790);
514
+        $pdf->line(50, 40, 550, 40);
515 515
         $pdf->ezSetY(750);
516 516
         $pdf->ezTable(
517 517
             $newarray,
@@ -528,71 +528,71 @@  discard block
 block discarded – undo
528 528
         $pdf->ezStream();
529 529
         exit;
530 530
     }
531
-} elseif (!empty($_GET['export_certificate'])){
531
+} elseif (!empty($_GET['export_certificate'])) {
532 532
     //@todo this code seems not to be used
533 533
     $user_id = strval(intval($_GET['user']));
534
-    if (!api_is_allowed_to_edit(true,true)) {
534
+    if (!api_is_allowed_to_edit(true, true)) {
535 535
         $user_id = api_get_user_id();
536 536
     }
537
-    $category = Category :: load ($_GET['cat_id']);
537
+    $category = Category :: load($_GET['cat_id']);
538 538
     if ($category[0]->is_certificate_available($user_id)) {
539 539
         $user = api_get_user_info($user_id);
540 540
         $scoredisplay = ScoreDisplay :: instance();
541 541
         $scorecourse = $category[0]->calc_score($user_id);
542
-        $scorecourse_display = (isset($scorecourse) ? $scoredisplay->display_score($scorecourse,SCORE_AVERAGE) : get_lang('NoResultsAvailable'));
542
+        $scorecourse_display = (isset($scorecourse) ? $scoredisplay->display_score($scorecourse, SCORE_AVERAGE) : get_lang('NoResultsAvailable'));
543 543
 
544 544
         $cattotal = Category :: load(0);
545
-        $scoretotal= $cattotal[0]->calc_score($user_id);
546
-        $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal,SCORE_PERCENT) : get_lang('NoResultsAvailable'));
545
+        $scoretotal = $cattotal[0]->calc_score($user_id);
546
+        $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable'));
547 547
 
548 548
         //prepare all necessary variables:
549 549
         $organization_name = api_get_setting('Institution');
550 550
         $portal_name = api_get_setting('siteName');
551 551
         $stud_fn = $user['firstname'];
552 552
         $stud_ln = $user['lastname'];
553
-        $certif_text = sprintf(get_lang('CertificateWCertifiesStudentXFinishedCourseYWithGradeZ'),$organization_name,$stud_fn.' '.$stud_ln,$category[0]->get_name(),$scorecourse_display);
554
-        $certif_text = str_replace("\\n","\n",$certif_text);
553
+        $certif_text = sprintf(get_lang('CertificateWCertifiesStudentXFinishedCourseYWithGradeZ'), $organization_name, $stud_fn.' '.$stud_ln, $category[0]->get_name(), $scorecourse_display);
554
+        $certif_text = str_replace("\\n", "\n", $certif_text);
555 555
         $date = api_convert_and_format_date(null, DATE_FORMAT_SHORT);
556 556
 
557
-        $pdf= new Cezpdf('a4','landscape');
557
+        $pdf = new Cezpdf('a4', 'landscape');
558 558
         $pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
559 559
         $pdf->ezSetMargins(30, 30, 50, 50);
560 560
         //line Y coordinates in landscape mode are upside down (500 is on top, 10 is on the bottom)
561
-        $pdf->line(50,50,790,50);
562
-        $pdf->line(50,550,790,550);
561
+        $pdf->line(50, 50, 790, 50);
562
+        $pdf->line(50, 550, 790, 550);
563 563
         $pdf->ezSetY(450);
564 564
         //@todo replace image
565 565
         //$pdf->ezImage(api_get_path(SYS_CODE_PATH).'img/dokeos_logo_certif.png',1,400,'','center','');
566 566
         $pdf->ezSetY(480);
567
-        $pdf->ezText($certif_text,28,array('justification'=>'center'));
567
+        $pdf->ezText($certif_text, 28, array('justification'=>'center'));
568 568
         //$pdf->ezSetY(750);
569 569
         $pdf->ezSetY(50);
570
-        $pdf->ezText($date,18,array('justification'=>'center'));
570
+        $pdf->ezText($date, 18, array('justification'=>'center'));
571 571
         $pdf->ezSetY(580);
572
-        $pdf->ezText($organization_name,22,array('justification'=>'left'));
572
+        $pdf->ezText($organization_name, 22, array('justification'=>'left'));
573 573
         $pdf->ezSetY(580);
574
-        $pdf->ezText($portal_name,22,array('justification'=>'right'));
574
+        $pdf->ezText($portal_name, 22, array('justification'=>'right'));
575 575
         $pdf->ezStream();
576 576
     }
577 577
     exit;
578 578
 } else {
579
-    $cats= Category :: load($category);
580
-    $stud_id= (api_is_allowed_to_edit() ? null : api_get_user_id());
581
-    $allcat= $cats[0]->get_subcategories($stud_id);
582
-    $alleval= $cats[0]->get_evaluations($stud_id);
583
-    $alllink= $cats[0]->get_links($stud_id);
579
+    $cats = Category :: load($category);
580
+    $stud_id = (api_is_allowed_to_edit() ? null : api_get_user_id());
581
+    $allcat = $cats[0]->get_subcategories($stud_id);
582
+    $alleval = $cats[0]->get_evaluations($stud_id);
583
+    $alllink = $cats[0]->get_links($stud_id);
584 584
 }
585
-$addparams = array ('selectcat' => $cats[0]->get_id());
585
+$addparams = array('selectcat' => $cats[0]->get_id());
586 586
 if (isset($_GET['search'])) {
587 587
     $addparams['search'] = $keyword;
588 588
 }
589 589
 if (isset ($_GET['studentoverview'])) {
590 590
     $addparams['studentoverview'] = '';
591 591
 }
592
-if (isset($allcat_info) && count($allcat_info)>=0 && (isset($_GET['selectcat']) && $_GET['selectcat']==0) && isset($_GET['search']) && strlen(trim($_GET['search']))>0 ) {
593
-    $allcat=$allcat_info;
592
+if (isset($allcat_info) && count($allcat_info) >= 0 && (isset($_GET['selectcat']) && $_GET['selectcat'] == 0) && isset($_GET['search']) && strlen(trim($_GET['search'])) > 0) {
593
+    $allcat = $allcat_info;
594 594
 } else {
595
-    $allcat=$allcat;
595
+    $allcat = $allcat;
596 596
 }
597 597
 $gradebooktable = new GradebookTable(
598 598
     $cats[0],
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
     $addparams
603 603
 );
604 604
 if (((empty ($allcat)) && (empty ($alleval)) && (empty ($alllink)) && (!$is_platform_admin) && ($is_course_admin) && (!isset ($_GET['selectcat']))) && api_is_course_tutor()) {
605
-    Display :: display_normal_message(get_lang('GradebookWelcomeMessage') . '<br /><br /><form name="createcat" method="post" action="' . api_get_self() . '?createallcategories=1"><input type="submit" value="' . get_lang('CreateAllCat') . '"></form>',false);
605
+    Display :: display_normal_message(get_lang('GradebookWelcomeMessage').'<br /><br /><form name="createcat" method="post" action="'.api_get_self().'?createallcategories=1"><input type="submit" value="'.get_lang('CreateAllCat').'"></form>', false);
606 606
 }
607 607
 // Here we are in a sub category
608 608
 if ($category != '0') {
Please login to merge, or discard this patch.
main/gradebook/lib/fe/exportgradebook.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @param	string	View to print as a title for the table
13 13
  * @param	string	Course name to print as title for the table
14 14
  */
15
-function print_table($data_array,$header_names,$view,$coursename)
15
+function print_table($data_array, $header_names, $view, $coursename)
16 16
 {
17 17
 	$printdata = '<!DOCTYPE html
18 18
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 	$count_pages = ceil(count($data_table) / $items_per_page);
162 162
     $content_table = '';
163
-    for ($x = 0; $x<$count_pages; $x++) {
163
+    for ($x = 0; $x < $count_pages; $x++) {
164 164
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
165 165
         // header table
166 166
         $content_table .= '<tr>';
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             foreach ($headers_table as $head_table) {
171 171
                 if (!empty($head_table[0])) {
172
-                    $width = (!empty($head_table[1])?$head_table[1].'%':'');
172
+                    $width = (!empty($head_table[1]) ? $head_table[1].'%' : '');
173 173
                     $content_table .= '<th width="'.$width.'">'.$head_table[0].'</th>';
174 174
                     $i++;
175 175
                 }
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
         $content_table .= '</tr>';
179 179
         // body table
180 180
         if (is_array($data_table) && count($data_table) > 0) {
181
-            $offset = $x*$items_per_page;
182
-            $data_table = array_slice ($data_table, $offset, count($data_table));
181
+            $offset = $x * $items_per_page;
182
+            $data_table = array_slice($data_table, $offset, count($data_table));
183 183
             $i = 1;
184
-            $item = $offset+1;
184
+            $item = $offset + 1;
185 185
             foreach ($data_table as $data) {
186 186
                 $content_table .= '<tr>';
187
-                $content_table .= '<td>'.($item<10?'0'.$item:$item).'</td>';
187
+                $content_table .= '<td>'.($item < 10 ? '0'.$item : $item).'</td>';
188 188
                 foreach ($data as  $key => $content) {
189 189
                     if (isset($content)) {
190
-                        $key == 1 ? $align='align="left"':$align='align="center"';
190
+                        $key == 1 ? $align = 'align="left"' : $align = 'align="center"';
191 191
                         $content_table .= '<td '.$align.' style="padding:4px;" >'.$content.'</td>';
192 192
                     }
193 193
                 }
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
                             <h1>'.$title_pdf.'</h1></td></tr>';
241 241
         foreach ($headers_pdf as $header_pdf) {
242 242
             if (!empty($header_pdf[0]) && !empty($header_pdf[1])) {
243
-                $header.= '<tr><td><strong>'.$header_pdf[0].'</strong> </td><td>'.$header_pdf[1].'</td></tr>';
243
+                $header .= '<tr><td><strong>'.$header_pdf[0].'</strong> </td><td>'.$header_pdf[1].'</td></tr>';
244 244
             }
245 245
         }
246
-        $header.='</table><br />';
246
+        $header .= '</table><br />';
247 247
     }
248 248
 
249 249
     // preparing footer pdf
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     }
268 268
     $items_per_page = 30;
269 269
     $count_pages = ceil(count($data_table) / $items_per_page);
270
-    for ($x = 0; $x<$count_pages; $x++) {
270
+    for ($x = 0; $x < $count_pages; $x++) {
271 271
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
272 272
         // header table
273 273
         $content_table .= '<tr>';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         if (is_array($headers_table)) {
276 276
             foreach ($headers_table as $head_table) {
277 277
                 if (!empty($head_table[0])) {
278
-                    $width = (!empty($head_table[1])?$head_table[1].'%':'');
278
+                    $width = (!empty($head_table[1]) ? $head_table[1].'%' : '');
279 279
                     $content_table .= '<th width="'.$width.'">'.$head_table[0].'</th>';
280 280
                     $i++;
281 281
                 }
@@ -285,16 +285,16 @@  discard block
 block discarded – undo
285 285
         // body table
286 286
 
287 287
         if (is_array($data_table) && count($data_table) > 0) {
288
-            $offset = $x*$items_per_page;
289
-            $data_table = array_slice ($data_table, $offset, count($data_table));
288
+            $offset = $x * $items_per_page;
289
+            $data_table = array_slice($data_table, $offset, count($data_table));
290 290
             $i = 1;
291
-            $item = $offset+1;
291
+            $item = $offset + 1;
292 292
             foreach ($data_table as $data) {
293 293
                 $content_table .= '<tr>';
294
-                $content_table .= '<td>'.($item<10?'0'.$item:$item).'</td>';
294
+                $content_table .= '<td>'.($item < 10 ? '0'.$item : $item).'</td>';
295 295
                 foreach ($data as  $key => $content) {
296 296
                     if (isset($content)) {
297
-                        $key == 1 ? $align='align="left"':$align='align="center"';
297
+                        $key == 1 ? $align = 'align="left"' : $align = 'align="center"';
298 298
                         $content_table .= '<td '.$align.' style="padding:4px;" >'.$content.'</td>';
299 299
                     }
300 300
                 }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     $pdf = new PDF();
313 313
     $pdf->set_custom_footer($footer);
314 314
     $pdf->set_custom_header($headers_in_pdf);
315
-    $pdf->content_to_pdf($header.$content_table, $css, $title_pdf );
315
+    $pdf->content_to_pdf($header.$content_table, $css, $title_pdf);
316 316
     exit;
317 317
 
318 318
 }
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
 function export_pdf($pdf, $newarray, $header_names, $format)
328 328
 {
329 329
 	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
330
-	$pdf->ezSetCmMargins(0,0,0,0);
331
-	$pdf->ezSetY(($format=='portrait')?'820':'570');
330
+	$pdf->ezSetCmMargins(0, 0, 0, 0);
331
+	$pdf->ezSetY(($format == 'portrait') ? '820' : '570');
332 332
 	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
333 333
     if ($format == 'portrait') {
334 334
         $pdf->line(40, 790, 540, 790);
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         $pdf->line(40, 540, 790, 540);
338 338
         $pdf->line(40, 40, 790, 40);
339 339
     }
340
-    $pdf->ezSetY(($format=='portrait')?'750':'520');
340
+    $pdf->ezSetY(($format == 'portrait') ? '750' : '520');
341 341
     $pdf->ezTable($newarray, $header_names, '', array(
342 342
         'showHeadings' => 1,
343 343
         'shaded' => 1,
Please login to merge, or discard this patch.
main/messages/outbox.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
 api_block_anonymous_users();
10 10
 
11 11
 if (isset($_GET['messages_page_nr'])) {
12
-	if (api_get_setting('allow_social_tool')=='true' &&
13
-        api_get_setting('allow_message_tool')=='true'
12
+	if (api_get_setting('allow_social_tool') == 'true' &&
13
+        api_get_setting('allow_message_tool') == 'true'
14 14
     ) {
15 15
 		$social_link = '';
16
-		if ($_REQUEST['f']=='social') {
16
+		if ($_REQUEST['f'] == 'social') {
17 17
 			$social_link = '&f=social';
18 18
 		}
19 19
 		header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.'');
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 	}
22 22
 }
23 23
 
24
-if (api_get_setting('allow_message_tool')!='true'){
24
+if (api_get_setting('allow_message_tool') != 'true') {
25 25
 	api_not_allowed();
26 26
 }
27 27
 //jquery thickbox already called from main/inc/header.inc.php
28 28
 
29
-$htmlHeadXtra[]='<script language="javascript">
29
+$htmlHeadXtra[] = '<script language="javascript">
30 30
 function enviar(miforma) {
31 31
 	if(confirm("'.get_lang('SureYouWantToDeleteSelectedMessages', '').'"))
32 32
 		miforma.submit();
@@ -53,44 +53,44 @@  discard block
 block discarded – undo
53 53
 /*
54 54
 		MAIN CODE
55 55
 */
56
-if (isset($_GET['f']) && $_GET['f']=='social') {
56
+if (isset($_GET['f']) && $_GET['f'] == 'social') {
57 57
 	$this_section = SECTION_SOCIAL;
58
-	$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social'));
59
-	$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
58
+	$interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/social/home.php', 'name' => get_lang('Social'));
59
+	$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Outbox'));
60 60
 } else {
61 61
 	$this_section = SECTION_MYPROFILE;
62
-	$interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile'));
63
-	$interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox'));
62
+	$interbreadcrumb[] = array('url' => api_get_path(WEB_PATH).'main/auth/profile.php', 'name' => get_lang('Profile'));
63
+	$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Outbox'));
64 64
 }
65 65
 
66 66
 $actions = '';
67 67
 if (api_get_setting('extended_profile') == 'true') {
68 68
     if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
69
-        $actions .=  '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
69
+        $actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
70 70
     }
71 71
     if (api_get_setting('allow_message_tool') == 'true') {
72 72
         //echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>';
73
-        $actions .=  '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>';
74
-        $actions .=  '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).'</a>';
75
-        $actions .=  '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).'</a>';
73
+        $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
74
+        $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
75
+        $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png', get_lang('Outbox')).'</a>';
76 76
     }
77 77
 }
78 78
 
79 79
 
80
-$info_delete_outbox =array();
81
-$info_delete_outbox = isset($_GET['form_delete_outbox']) ? explode(',',$_GET['form_delete_outbox']) : '';
80
+$info_delete_outbox = array();
81
+$info_delete_outbox = isset($_GET['form_delete_outbox']) ? explode(',', $_GET['form_delete_outbox']) : '';
82 82
 $count_delete_outbox = count($info_delete_outbox) - 1;
83 83
 
84
-if (isset($info_delete_outbox[0]) && trim($info_delete_outbox[0])=='delete') {
84
+if (isset($info_delete_outbox[0]) && trim($info_delete_outbox[0]) == 'delete') {
85 85
     for ($i = 1; $i <= $count_delete_outbox; $i++) {
86
-		MessageManager::delete_message_by_user_sender(api_get_user_id(),$info_delete_outbox[$i]);
86
+		MessageManager::delete_message_by_user_sender(api_get_user_id(), $info_delete_outbox[$i]);
87 87
 	}
88
-    $message_box=get_lang('SelectedMessagesDeleted').
88
+    $message_box = get_lang('SelectedMessagesDeleted').
89 89
         '&nbsp
90 90
         <br><a href="../social/index.php?#remote-tab-3">'.
91 91
         get_lang('BackToOutbox').
92 92
         '</a>';
93
-    Display::display_normal_message(api_xml_http_response_encode($message_box),false);
93
+    Display::display_normal_message(api_xml_http_response_encode($message_box), false);
94 94
     exit;
95 95
 }
96 96
 
@@ -117,23 +117,23 @@  discard block
 block discarded – undo
117 117
 }
118 118
 //MAIN CONTENT
119 119
 if ($action == 'delete') {
120
-    $delete_list_id=array();
120
+    $delete_list_id = array();
121 121
     if (isset($_POST['out'])) {
122
-        $delete_list_id=$_POST['out'];
122
+        $delete_list_id = $_POST['out'];
123 123
     }
124 124
     if (isset($_POST['id'])) {
125
-        $delete_list_id=$_POST['id'];
125
+        $delete_list_id = $_POST['id'];
126 126
     }
127 127
     for ($i = 0; $i < count($delete_list_id); $i++) {
128 128
         MessageManager::delete_message_by_user_sender(api_get_user_id(), $delete_list_id[$i]);
129 129
     }
130
-    $delete_list_id=array();
130
+    $delete_list_id = array();
131 131
     $social_right_content .= MessageManager::outbox_display($keyword);
132 132
 } elseif ($action == 'deleteone') {
133 133
     $delete_list_id = array();
134 134
     $id = Security::remove_XSS($_GET['id']);
135 135
     MessageManager::delete_message_by_user_sender(api_get_user_id(), $id);
136
-    $delete_list_id=array();
136
+    $delete_list_id = array();
137 137
     $social_right_content .= MessageManager::outbox_display($keyword);
138 138
 } else {
139 139
     $social_right_content .= MessageManager::outbox_display($keyword);
Please login to merge, or discard this patch.
main/group/group_creation.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         case 'create_groups':
25 25
             $groups = array();
26 26
 
27
-            for ($i = 0; $i < $_POST['number_of_groups']; $i ++) {
27
+            for ($i = 0; $i < $_POST['number_of_groups']; $i++) {
28 28
                 $group1['name'] = empty($_POST['group_'.$i.'_name']) ? get_lang('Group').' '.$i : $_POST['group_'.$i.'_name'];
29 29
                 $group1['category'] = isset($_POST['group_'.$i.'_category']) ? $_POST['group_'.$i.'_category'] : null;
30 30
                 $group1['tutor'] = isset($_POST['group_'.$i.'_tutor']) ? $_POST['group_'.$i.'_tutor'] : null;
@@ -167,16 +167,16 @@  discard block
 block discarded – undo
167 167
 		$form->addGroup($group_el, 'groups', null, "</td><td>", false);
168 168
 		// Checkboxes
169 169
 		if ($_POST['number_of_groups'] > 1) {
170
-			$group_el = array ();
170
+			$group_el = array();
171 171
 			$group_el[] = $form->createElement('static', null, null, ' ');
172 172
 			if (api_get_setting('allow_group_categories') == 'true') {
173 173
 				$group_el[] = $form->createElement('checkbox', 'same_category', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('category');"));
174 174
 			}
175
-			$group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array ('onclick' => "javascript: switch_state('places');"));
175
+			$group_el[] = $form->createElement('checkbox', 'same_places', null, get_lang('SameForAll'), array('onclick' => "javascript: switch_state('places');"));
176 176
 			$form->addGroup($group_el, 'groups', null, '</td><td>', false);
177 177
 		}
178 178
 		// Properties for all groups
179
-		for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number ++) {
179
+		for ($group_number = 0; $group_number < $_POST['number_of_groups']; $group_number++) {
180 180
 			$group_el = array();
181 181
 			$group_el[] = $form->createElement('text', 'group_'.$group_number.'_name');
182 182
 			if (api_get_setting('allow_group_categories') == 'true') {
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
 					$prev = '000';
201 201
 				} elseif ($group_id < 100) {
202 202
 					$prev = '00';
203
-				} elseif ($group_id<1000) {
203
+				} elseif ($group_id < 1000) {
204 204
 					$prev = '0';
205 205
 				} else {
206 206
 					$prev = '';
207 207
 				}
208 208
 			}
209 209
 
210
-			$defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id ++;
210
+			$defaults['group_'.$group_number.'_name'] = get_lang('GroupSingle').' '.$prev.$group_id++;
211 211
 			$form->addGroup($group_el, 'group_'.$group_number, null, '</td><td>', false);
212 212
 		}
213 213
 		$defaults['action'] = 'create_groups';
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
 
224 224
 	$create_groups_form = new FormValidator('create_groups', 'post', api_get_self().'?'.api_get_cidreq());
225 225
 	$create_groups_form->addElement('header', $nameTools);
226
-    $create_groups_form->addText('number_of_groups',get_lang('NumberOfGroupsToCreate'),null,array('value'=>'1'));
227
-    $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'),'plus','primary');
226
+    $create_groups_form->addText('number_of_groups', get_lang('NumberOfGroupsToCreate'), null, array('value'=>'1'));
227
+    $create_groups_form->addButton('submit', get_lang('ProceedToCreateGroup'), 'plus', 'primary');
228 228
 	$defaults = array();
229 229
 	$defaults['number_of_groups'] = 1;
230 230
 	$create_groups_form->setDefaults($defaults);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 	 * Show form to generate subgroups
235 235
 	 */
236 236
 	if (api_get_setting('allow_group_categories') == 'true' && count(GroupManager :: get_group_list()) > 0) {
237
-		$base_group_options = array ();
237
+		$base_group_options = array();
238 238
 		$groups = GroupManager :: get_group_list();
239 239
 		foreach ($groups as $index => $group) {
240 240
 			$number_of_students = GroupManager :: number_of_students($group['id']);
Please login to merge, or discard this patch.
main/exercice/hotpotatoes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 }
32 32
 // The breadcrumbs.
33 33
 $interbreadcrumb[] = array(
34
-    'url' => api_get_path(WEB_CODE_PATH) . '.exercice/exercise.php?' . api_get_cidreq(),
34
+    'url' => api_get_path(WEB_CODE_PATH).'.exercice/exercise.php?'.api_get_cidreq(),
35 35
     'name' => get_lang('Exercises')
36 36
 );
37 37
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 $_course,
154 154
                 $_FILES['userFile'],
155 155
                 $document_sys_path,
156
-                $uploadPath . '/' . $fld,
156
+                $uploadPath.'/'.$fld,
157 157
                 api_get_user_id(),
158 158
                 null,
159 159
                 null,
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                     $imgparams = $_POST['imgparams'];
166 166
                     $checked = CheckImageName($imgparams, $filename);
167 167
                     if ($checked) {
168
-                        $imgcount = $imgcount-1;
168
+                        $imgcount = $imgcount - 1;
169 169
                     } else {
170 170
                         $dialogBox .= $filename.' '.get_lang('NameNotEqual');
171 171
                         my_delete($document_sys_path.$uploadPath.'/'.$fld.'/'.$filename);
Please login to merge, or discard this patch.
main/session/session_user_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
31
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
32 32
 $interbreadcrumb[] = array(
33 33
     'url' => "resume_session.php?id_session=".$sessionId,
34 34
     "name" => get_lang('SessionOverview')
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     if ($days > 0) {
61 61
         $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateInZDays'), $firstAccessString, $duration, $days);
62 62
     } else {
63
-        $endDateInSeconds = $firstAccess + $duration * 24*60*60;
63
+        $endDateInSeconds = $firstAccess + $duration * 24 * 60 * 60;
64 64
         $last = api_convert_and_format_date($endDateInSeconds, DATE_FORMAT_SHORT);
65 65
         $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateWasZ'), $firstAccessString, $duration, $last);
66 66
     }
Please login to merge, or discard this patch.
main/session/resume_session.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $tool_name = get_lang('SessionOverview');
30 30
 
31 31
 //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
32
-$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
32
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
33 33
 
34 34
 $orig_param = '&origin=resume_session';
35 35
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$coachs = array();
185 185
 		if (Database::num_rows($rs) > 0) {
186
-			while($info_coach = Database::fetch_array($rs)) {
186
+			while ($info_coach = Database::fetch_array($rs)) {
187 187
                 $coachs[] = api_get_person_name(
188 188
                         $info_coach['firstname'],
189 189
                         $info_coach['lastname']
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		}
195 195
 
196 196
 		if (count($coachs) > 0) {
197
-			$coach = implode('<br />',$coachs);
197
+			$coach = implode('<br />', $coachs);
198 198
 		} else {
199 199
 			$coach = get_lang('None');
200 200
 		}
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $downIcon = 'down.png';
218 218
         $downUrl = api_get_self().'?id_session='.$sessionId.'&course_id='.$course->getId().'&action=move_down';
219 219
 
220
-        if ($count +1 == count($courses)) {
220
+        if ($count + 1 == count($courses)) {
221 221
             $downIcon = 'down_na.png';
222 222
             $downUrl = '#';
223 223
         }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			<td>'.$coach.'</td>
245 245
 			<td>'.$numberOfUsers.'</td>
246 246
 			<td>
247
-                <a href="'. $courseUrl . '">'.
247
+                <a href="'. $courseUrl.'">'.
248 248
                 Display::return_icon('course_home.gif', get_lang('Course')).'</a>
249 249
                 '.$orderButtons.'
250 250
                 <a href="session_course_user_list.php?id_session='.$sessionId.'&course_code='.$course->getCode().'">'.
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             array('onclick' => "javascript:if(!confirm('".get_lang('ConfirmYourChoice')."')) return false;")
310 310
         );
311 311
 
312
-        $addUserToUrlLink= '';
312
+        $addUserToUrlLink = '';
313 313
         if ($multiple_url_is_on) {
314 314
             if ($user['access_url_id'] != $url_id) {
315 315
                 $userLink .= ' '.Display::return_icon(
Please login to merge, or discard this patch.