Completed
Push — 1.11.x ( ac8a66...46c8b4 )
by José
126:29 queued 89:25
created
main/exercise/exercise_admin.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
         $gradebook = $_SESSION['gradebook'];
167 167
     }
168 168
 
169
-    if (!empty($gradebook) && $gradebook=='view') {
170
-        $interbreadcrumb[]= array (
169
+    if (!empty($gradebook) && $gradebook == 'view') {
170
+        $interbreadcrumb[] = array(
171 171
             'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
172 172
             'name' => get_lang('ToolGradebook')
173 173
         );
@@ -187,19 +187,19 @@  discard block
 block discarded – undo
187 187
     echo '<div class="actions">';
188 188
 
189 189
     if ($objExercise->id != 0) {
190
-        echo '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'">' .
190
+        echo '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'">'.
191 191
             Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>';
192 192
     } else {
193
-        if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])){
194
-            if (!empty($_POST['lp_id'])){
193
+        if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])) {
194
+            if (!empty($_POST['lp_id'])) {
195 195
                 $lp_id = intval($_POST['lp_id']);
196 196
                 //TODO:this remains to be implemented after press the first post
197 197
             } else {
198 198
                 $lp_id = intval($_GET['lp_id']);
199 199
             }
200
-            echo "<a href=\"../lp/lp_controller.php?".api_get_cidreq()."&gradebook=&action=add_item&type=step&lp_id=".$lp_id."#resource_tab-2\">".Display::return_icon('back.png', get_lang("BackTo").' '.get_lang("LearningPaths"),'',ICON_SIZE_MEDIUM)."</a>";
200
+            echo "<a href=\"../lp/lp_controller.php?".api_get_cidreq()."&gradebook=&action=add_item&type=step&lp_id=".$lp_id."#resource_tab-2\">".Display::return_icon('back.png', get_lang("BackTo").' '.get_lang("LearningPaths"), '', ICON_SIZE_MEDIUM)."</a>";
201 201
         } else {
202
-            echo '<a href="exercise.php?'.api_get_cidreq().'">' .
202
+            echo '<a href="exercise.php?'.api_get_cidreq().'">'.
203 203
                 Display :: return_icon('back.png', get_lang('BackToExercisesList'), '', ICON_SIZE_MEDIUM).
204 204
                 '</a>';
205 205
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             get_lang('DirectFeedbackCantModifyTypeQuestion')
212 212
         );
213 213
 
214
-    if (api_get_setting('search_enabled')=='true' && !extension_loaded('xapian')) {
214
+    if (api_get_setting('search_enabled') == 'true' && !extension_loaded('xapian')) {
215 215
         Display::display_error_message(get_lang('SearchXapianModuleNotInstalled'));
216 216
     }
217 217
 
Please login to merge, or discard this patch.
main/upload/form.document.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
  */
13 13
 $noPHP_SELF = false;
14 14
 $nameTools = get_lang('FileUpload');
15
-$interbreadcrumb[]= array ("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT));
16
-Display::display_header($nameTools,"Doc");
15
+$interbreadcrumb[] = array("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT));
16
+Display::display_header($nameTools, "Doc");
17 17
 //show the title
18 18
 api_display_tool_title($nameTools.$add_group_to_title);
19 19
 ?>
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 <div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;">
22 22
 </div>
23 23
 <div id="upload_form_div" name="form_div" style="display:block;">
24
-	<form method="POST" action="upload.php" id="upload_form" enctype="multipart/form-data" onsubmit="javascript: myUpload.start('dynamic_div','progressbar_green.gif','<?php echo(get_lang('Uploading', ''));?>','upload_form_div');">
24
+	<form method="POST" action="upload.php" id="upload_form" enctype="multipart/form-data" onsubmit="javascript: myUpload.start('dynamic_div','progressbar_green.gif','<?php echo(get_lang('Uploading', '')); ?>','upload_form_div');">
25 25
 		<input type="hidden" name="curdirpath" value="<?php echo $path; ?>">
26 26
 		<input type="hidden" name="tool" value="<?php echo $my_tool; ?>">
27 27
 		<input type="file" name="user_file">
Please login to merge, or discard this patch.
main/mySpace/lp_tracking.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	$this_section = SECTION_COURSES;
18 18
 }
19 19
 
20
-$session_id  = isset($_REQUEST['id_session']) && !empty($_REQUEST['id_session']) ? intval($_REQUEST['id_session']) : api_get_session_id();
20
+$session_id = isset($_REQUEST['id_session']) && !empty($_REQUEST['id_session']) ? intval($_REQUEST['id_session']) : api_get_session_id();
21 21
 $export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
22 22
 $user_id = isset($_GET['student_id']) ? intval($_GET['student_id']) : api_get_user_id();
23 23
 $courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : api_get_course_id();
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
 }
40 40
 
41 41
 if ($origin == 'user_course') {
42
-	$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['name']);
43
-	$interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$courseCode, "name" => get_lang("Users"));
44
-} else if($origin == 'tracking_course') {
45
-	$interbreadcrumb[] = array ("url" => "../tracking/courseLog.php?cidReq=".$courseCode.'&id_session='.$session_id, "name" => get_lang("Tracking"));
42
+	$interbreadcrumb[] = array("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['name']);
43
+	$interbreadcrumb[] = array("url" => "../user/user.php?cidReq=".$courseCode, "name" => get_lang("Users"));
44
+} else if ($origin == 'tracking_course') {
45
+	$interbreadcrumb[] = array("url" => "../tracking/courseLog.php?cidReq=".$courseCode.'&id_session='.$session_id, "name" => get_lang("Tracking"));
46 46
 } else {
47
-	$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
48
-	$interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents"));
49
- 	$interbreadcrumb[] = array ("url" => "myStudents.php?student=".$user_id, "name" => get_lang("StudentDetails"));
50
- 	$nameTools=get_lang("DetailsStudentInCourse");
47
+	$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
48
+	$interbreadcrumb[] = array("url" => "student.php", "name" => get_lang("MyStudents"));
49
+ 	$interbreadcrumb[] = array("url" => "myStudents.php?student=".$user_id, "name" => get_lang("StudentDetails"));
50
+ 	$nameTools = get_lang("DetailsStudentInCourse");
51 51
 }
52 52
 
53
-$interbreadcrumb[] = array("url" => "myStudents.php?student=".$user_id."&course=".$courseCode."&details=true&origin=".$origin , "name" => get_lang("DetailsStudentInCourse"));
53
+$interbreadcrumb[] = array("url" => "myStudents.php?student=".$user_id."&course=".$courseCode."&details=true&origin=".$origin, "name" => get_lang("DetailsStudentInCourse"));
54 54
 $nameTools = get_lang('LearningPathDetails');
55 55
 $sql = 'SELECT name	FROM '.Database::get_course_table(TABLE_LP_MAIN).' WHERE c_id = '.$course_info['real_id'].' AND id='.$lp_id;
56 56
 $rs  = Database::query($sql);
@@ -58,19 +58,19 @@  discard block
 block discarded – undo
58 58
 
59 59
 $origin = 'tracking';
60 60
 
61
-$output = require_once api_get_path(SYS_CODE_PATH) . 'lp/lp_stats.php';
61
+$output = require_once api_get_path(SYS_CODE_PATH).'lp/lp_stats.php';
62 62
 
63 63
 Display :: display_header($nameTools);
64 64
 echo '<div class ="actions">';
65
-echo '<a href="javascript:history.back();">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
65
+echo '<a href="javascript:history.back();">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
66 66
 echo '<a href="javascript: void(0);" onclick="javascript: window.print();">
67
-        '.Display::return_icon('printer.png',get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
67
+        '.Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
68 68
 echo '<a href="'.api_get_self().'?export=csv&'.Security::remove_XSS($_SERVER['QUERY_STRING']).'">
69
-        '.Display::return_icon('export_csv.png',get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a>';
69
+        '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
70 70
 echo '</div>';
71 71
 echo '<div class="clear"></div>';
72 72
 $session_name = api_get_session_name($session_id);
73
-$table_title = ($session_name? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ':' ').
73
+$table_title = ($session_name ? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ' : ' ').
74 74
     Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_info['name'].' '.
75 75
     Display::return_icon('user.png', get_lang('User'), array(), ICON_SIZE_SMALL).' '.$name;
76 76
 echo Display::page_header($table_title);
Please login to merge, or discard this patch.
main/gamification/my_progress.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     $UserIsSubscribedToSession = SessionManager::isUserSubscribedAsStudent($lastSessionId, $user->getId());
43 43
 
44 44
     if (!empty($lastSessionId) && $UserIsSubscribedToSession) {
45
-        $urlWithSession = api_get_self() . '?' . http_build_query([
45
+        $urlWithSession = api_get_self().'?'.http_build_query([
46 46
             'session_id' => $lastCourseAccess->getSessionId()
47 47
         ]);
48 48
 
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
         foreach ($learningPathList->list as $learningPathId => $learningPath) {
117 117
             $courseData['stats'][] = [
118 118
                 $learningPath['lp_name'],
119
-                'lp/lp_controller.php?' . http_build_query([
119
+                'lp/lp_controller.php?'.http_build_query([
120 120
                     'action' => 'stats',
121 121
                     'cidReq' => $course->getCode(),
122 122
                     'id_session' => $currentSession->getId(),
123 123
                     'gidReq' => 0,
124 124
                     'lp_id' => $learningPathId
125
-                ]) . api_get_cidreq()
125
+                ]).api_get_cidreq()
126 126
             ];
127 127
         }
128 128
 
Please login to merge, or discard this patch.
main/webservices/lp.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     }
66 66
 
67 67
     if ($debug) {
68
-        error_log("checkip " . intval($check_ip));
68
+        error_log("checkip ".intval($check_ip));
69 69
     }
70 70
 
71 71
     if ($check_ip) {
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
 );
121 121
 
122 122
 // Register the method to expose
123
-$server->register('WSImportLP',                            // method name
124
-    array('params' => 'tns:params'),  // input parameters
125
-    array('return' => 'xsd:string'),                                        // output parameters
126
-    'urn:WSLP',                                                   // namespace
127
-    'urn:WSLP#WSImportLP',                       // soapaction
128
-    'rpc',                                                                  // style
129
-    'encoded',                                                              // use
123
+$server->register('WSImportLP', // method name
124
+    array('params' => 'tns:params'), // input parameters
125
+    array('return' => 'xsd:string'), // output parameters
126
+    'urn:WSLP', // namespace
127
+    'urn:WSLP#WSImportLP', // soapaction
128
+    'rpc', // style
129
+    'encoded', // use
130 130
     'This service adds users'                                               // documentation
131 131
 );
132 132
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
     $uniqueFile = uniqid();
185 185
     $userId = 1; // admin
186
-    $filePath = api_get_path(SYS_ARCHIVE_PATH) . $uniqueFile;
186
+    $filePath = api_get_path(SYS_ARCHIVE_PATH).$uniqueFile;
187 187
     file_put_contents($filePath, $fileData);
188 188
 
189 189
     $fileName = $params['filename'];
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
     'all',
258 258
     '',
259 259
     array(
260
-        'id'    => array('name' => 'id',    'type' => 'xsd:string'),
261
-        'name'  => array('name' => 'name',  'type' => 'xsd:string'),
260
+        'id'    => array('name' => 'id', 'type' => 'xsd:string'),
261
+        'name'  => array('name' => 'name', 'type' => 'xsd:string'),
262 262
     )
263 263
 );
264 264
 
@@ -274,13 +274,13 @@  discard block
 block discarded – undo
274 274
 );
275 275
 
276 276
 // Register the method to expose
277
-$server->register('WSGetLpList',                            // method name
278
-    array('params' => 'tns:paramsGetLpList'),  // input parameters
279
-    array('return' => 'tns:lpList'),                                        // output parameters
280
-    'urn:WSLP',                                                   // namespace
281
-    'urn:WSLP#WSGetLpList',                       // soapaction
282
-    'rpc',                                                                  // style
283
-    'encoded',                                                              // use
277
+$server->register('WSGetLpList', // method name
278
+    array('params' => 'tns:paramsGetLpList'), // input parameters
279
+    array('return' => 'tns:lpList'), // output parameters
280
+    'urn:WSLP', // namespace
281
+    'urn:WSLP#WSGetLpList', // soapaction
282
+    'rpc', // style
283
+    'encoded', // use
284 284
     'This service adds users'                                               // documentation
285 285
 );
286 286
 
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
         return return_error(WS_ERROR_SECRET_KEY);
296 296
     }
297 297
 
298
-    require_once api_get_path(SYS_CODE_PATH) . 'lp/learnpathList.class.php';
299
-    require_once api_get_path(SYS_CODE_PATH) . 'lp/learnpath.class.php';
300
-    require_once api_get_path(SYS_CODE_PATH) . 'lp/learnpathItem.class.php';
298
+    require_once api_get_path(SYS_CODE_PATH).'lp/learnpathList.class.php';
299
+    require_once api_get_path(SYS_CODE_PATH).'lp/learnpath.class.php';
300
+    require_once api_get_path(SYS_CODE_PATH).'lp/learnpathItem.class.php';
301 301
 
302 302
     $courseIdName = $params['course_id_name'];
303 303
     $courseIdValue = $params['course_id_value'];
@@ -369,13 +369,13 @@  discard block
 block discarded – undo
369 369
 );
370 370
 
371 371
 // Register the method to expose
372
-$server->register('WSDeleteLp',                            // method name
373
-    array('params' => 'tns:paramsDeleteLp'),  // input parameters
374
-    array('return' => 'xsd:string'),                                        // output parameters
375
-    'urn:WSLP',                                                   // namespace
376
-    'urn:WSLP#WSDeleteLp',                       // soapaction
377
-    'rpc',                                                                  // style
378
-    'encoded',                                                              // use
372
+$server->register('WSDeleteLp', // method name
373
+    array('params' => 'tns:paramsDeleteLp'), // input parameters
374
+    array('return' => 'xsd:string'), // output parameters
375
+    'urn:WSLP', // namespace
376
+    'urn:WSLP#WSDeleteLp', // soapaction
377
+    'rpc', // style
378
+    'encoded', // use
379 379
     'This service deletes a LP'                                               // documentation
380 380
 );
381 381
 
@@ -390,9 +390,9 @@  discard block
 block discarded – undo
390 390
         return return_error(WS_ERROR_SECRET_KEY);
391 391
     }
392 392
 
393
-    require_once api_get_path(SYS_CODE_PATH) . 'lp/learnpathList.class.php';
394
-    require_once api_get_path(SYS_CODE_PATH) . 'lp/learnpath.class.php';
395
-    require_once api_get_path(SYS_CODE_PATH) . 'lp/learnpathItem.class.php';
393
+    require_once api_get_path(SYS_CODE_PATH).'lp/learnpathList.class.php';
394
+    require_once api_get_path(SYS_CODE_PATH).'lp/learnpath.class.php';
395
+    require_once api_get_path(SYS_CODE_PATH).'lp/learnpathItem.class.php';
396 396
 
397 397
     $courseIdName = $params['course_id_name'];
398 398
     $courseIdValue = $params['course_id_value'];
@@ -434,9 +434,9 @@  discard block
 block discarded – undo
434 434
     if ($lp) {
435 435
         if ($debug) error_log("LP deleted $lpId");
436 436
 
437
-        $course_dir = $courseInfo['directory'] . '/document';
437
+        $course_dir = $courseInfo['directory'].'/document';
438 438
         $sys_course_path = api_get_path(SYS_COURSE_PATH);
439
-        $base_work_dir = $sys_course_path . $course_dir;
439
+        $base_work_dir = $sys_course_path.$course_dir;
440 440
 
441 441
         $items = $lp->get_flat_ordered_items_list($lpId, 0, $courseId);
442 442
 
@@ -495,9 +495,9 @@  discard block
 block discarded – undo
495 495
     'all',
496 496
     '',
497 497
     array(
498
-        'data'  => array('name' => 'data',  'type' => 'xsd:string'),
499
-        'title'  => array('name' => 'title',  'type' => 'xsd:string'),
500
-        'filename'  => array('name' => 'filename',  'type' => 'xsd:string'),
498
+        'data'  => array('name' => 'data', 'type' => 'xsd:string'),
499
+        'title'  => array('name' => 'title', 'type' => 'xsd:string'),
500
+        'filename'  => array('name' => 'filename', 'type' => 'xsd:string'),
501 501
     )
502 502
 );
503 503
 
@@ -548,13 +548,13 @@  discard block
 block discarded – undo
548 548
 );
549 549
 
550 550
 // Register the method to expose
551
-$server->register('WSCreateLp',                            // method name
552
-    array('params' => 'tns:paramsCreateLp'),  // input parameters
553
-    array('return' => 'xsd:string'),                                        // output parameters
554
-    'urn:WSLP',                                                   // namespace
555
-    'urn:WSLP#WSCreateLp',                       // soapaction
556
-    'rpc',                                                                  // style
557
-    'encoded',                                                              // use
551
+$server->register('WSCreateLp', // method name
552
+    array('params' => 'tns:paramsCreateLp'), // input parameters
553
+    array('return' => 'xsd:string'), // output parameters
554
+    'urn:WSLP', // namespace
555
+    'urn:WSLP#WSCreateLp', // soapaction
556
+    'rpc', // style
557
+    'encoded', // use
558 558
     'This service creates a LP'                                               // documentation
559 559
 );
560 560
 
Please login to merge, or discard this patch.
main/search/search_suggestions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @package chamilo.search
7 7
  */
8 8
 
9
-require_once dirname(__FILE__) . '/../inc/global.inc.php';
9
+require_once dirname(__FILE__).'/../inc/global.inc.php';
10 10
 
11 11
 function get_suggestions_from_search_engine($q)
12 12
 {
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
     $i = 0;
28 28
     while ($row = Database::fetch_array($sql_result)) {
29 29
         $json[] = [
30
-            'id' => api_convert_encoding($row['value'],'UTF-8',$charset),
31
-            'value' => api_convert_encoding($row['value'],'UTF-8',$charset),
32
-            'label' => api_convert_encoding($row['value'],'UTF-8',$charset)
30
+            'id' => api_convert_encoding($row['value'], 'UTF-8', $charset),
31
+            'value' => api_convert_encoding($row['value'], 'UTF-8', $charset),
32
+            'label' => api_convert_encoding($row['value'], 'UTF-8', $charset)
33 33
         ];
34 34
 
35
-        if ($i<20) {
36
-            $data[ $row['course_code'] ] [ $row['tool_id'] ] [ $row['ref_id'] ] = 1;
35
+        if ($i < 20) {
36
+            $data[$row['course_code']] [$row['tool_id']] [$row['ref_id']] = 1;
37 37
         }
38 38
         $i++;
39 39
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                     }
96 96
                 }
97 97
                 foreach ($output as $i=>$out) {
98
-                    if (api_stristr($out,$q) === false) {continue;}
98
+                    if (api_stristr($out, $q) === false) {continue; }
99 99
                     $s = api_convert_encoding(substr($out, 0, -3), 'UTF-8', $charset);
100 100
                     if (!in_array($s, $more_sugg)) {
101 101
                         $more_sugg[] = $s;
Please login to merge, or discard this patch.
main/gradebook/gradebook_add_user.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
 api_block_anonymous_users();
15 15
 GradebookUtils::block_students();
16 16
 
17
-$evaluation= Evaluation :: load($_GET['selecteval']);
17
+$evaluation = Evaluation :: load($_GET['selecteval']);
18 18
 $newstudents = $evaluation[0]->get_not_subscribed_students();
19 19
 
20 20
 if (count($newstudents) == '0') {
21
-	header('Location: gradebook_view_result.php?nouser=&selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq());
21
+	header('Location: gradebook_view_result.php?nouser=&selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq());
22 22
 	exit;
23 23
 }
24 24
 $add_user_form = new EvalForm(
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
     }
66 66
 }
67 67
 
68
-$interbreadcrumb[]= array ('url' => Security::remove_XSS($_SESSION['gradebook_dest']),'name' => get_lang('Gradebook'));
69
-$interbreadcrumb[]= array(
70
-	'url' => 'gradebook_view_result.php?selecteval=' .Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(),
68
+$interbreadcrumb[] = array('url' => Security::remove_XSS($_SESSION['gradebook_dest']), 'name' => get_lang('Gradebook'));
69
+$interbreadcrumb[] = array(
70
+	'url' => 'gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(),
71 71
 	'name' => get_lang('ViewResult')
72 72
 );
73 73
 Display :: display_header(get_lang('AddUserToEval'));
74
-if (isset ($_GET['erroroneuser'])){
75
-	Display :: display_warning_message(get_lang('AtLeastOneUser'),false);
74
+if (isset ($_GET['erroroneuser'])) {
75
+	Display :: display_warning_message(get_lang('AtLeastOneUser'), false);
76 76
 }
77
-DisplayGradebook :: display_header_result($evaluation[0], null, 0,0);
77
+DisplayGradebook :: display_header_result($evaluation[0], null, 0, 0);
78 78
 echo '<div class="main">';
79 79
 echo $add_user_form->toHtml();
80 80
 echo '</div>';
Please login to merge, or discard this patch.
main/gradebook/get_badges.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 foreach ($userSkills as $skill) {
34 34
     $skillId = current($skill);
35 35
 
36
-    $assertionUrl = api_get_path(WEB_CODE_PATH) . "badge/assertion.php?";
36
+    $assertionUrl = api_get_path(WEB_CODE_PATH)."badge/assertion.php?";
37 37
     $assertionUrl .= http_build_query(array(
38 38
         'user' => $userId,
39 39
         'skill' => $skillId,
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     $backpack = $configBackpack;
52 52
 }
53 53
 
54
-$htmlHeadXtra[] = '<script src="' . $backpack . 'issuer.js"></script>';
54
+$htmlHeadXtra[] = '<script src="'.$backpack.'issuer.js"></script>';
55 55
 
56 56
 $tpl = new Template(get_lang('Badges'), false, false);
57 57
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     'content',
60 60
     "<script>
61 61
     $(document).on('ready', function (){ 
62
-        OpenBadges.issue_no_modal(" . json_encode($assertions) . "); 
62
+        OpenBadges.issue_no_modal(" . json_encode($assertions)."); 
63 63
     });
64 64
     </script>"
65 65
 );
Please login to merge, or discard this patch.
main/session/add_courses_to_session.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 // setting breadcrumbs
26 26
 //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
27
-$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
27
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
28 28
 $interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$sessionId, "name" => get_lang('SessionOverview'));
29 29
 
30 30
 // Database Table Definitions
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
36 36
 
37 37
 // setting the name of the tool
38
-$tool_name= get_lang('SubscribeCoursesToSession');
38
+$tool_name = get_lang('SubscribeCoursesToSession');
39 39
 
40 40
 $add_type = 'multiple';
41
-if (isset($_GET['add_type']) && $_GET['add_type']!=''){
41
+if (isset($_GET['add_type']) && $_GET['add_type'] != '') {
42 42
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
43 43
 }
44 44
 
@@ -124,18 +124,18 @@  discard block
 block discarded – undo
124 124
 $nosessionCourses = $sessionCourses = array();
125 125
 if ($ajax_search) {
126 126
 
127
-    $sql="SELECT course.id, code, title, visual_code, session_id
127
+    $sql = "SELECT course.id, code, title, visual_code, session_id
128 128
 			FROM $tbl_course course
129 129
 			INNER JOIN $tbl_session_rel_course session_rel_course
130 130
             ON
131 131
                 course.id = session_rel_course.c_id AND
132 132
                 session_rel_course.session_id = ".intval($sessionId)."
133
-			ORDER BY ".(sizeof($courses)?"(code IN(".implode(',', $courses).")) DESC,":"")." title";
133
+			ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title";
134 134
 
135 135
     if (api_is_multiple_url_enabled()) {
136 136
         $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
137 137
         $access_url_id = api_get_current_access_url_id();
138
-        if ($access_url_id != -1){
138
+        if ($access_url_id != -1) {
139 139
             $sql = "SELECT course.id, code, title, visual_code, session_id
140 140
                     FROM $tbl_course course
141 141
                     INNER JOIN $tbl_session_rel_course session_rel_course
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                         INNER JOIN $tbl_course_rel_access_url url_course
145 145
                         ON (url_course.c_id = course.id)
146 146
                     WHERE access_url_id = $access_url_id
147
-                    ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title";
147
+                    ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title";
148 148
         }
149 149
     }
150 150
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     $Courses = Database::store_result($result);
153 153
 
154 154
     foreach ($Courses as $course) {
155
-        $sessionCourses[$course['id']] = $course ;
155
+        $sessionCourses[$course['id']] = $course;
156 156
     }
157 157
 } else {
158 158
     $sql = "SELECT course.id, code, title, visual_code, session_id
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
             ON
162 162
                 course.id = session_rel_course.c_id AND
163 163
                 session_rel_course.session_id = ".intval($sessionId)."
164
-			ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title";
164
+			ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title";
165 165
 
166 166
     if (api_is_multiple_url_enabled()) {
167 167
         $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
168 168
         $access_url_id = api_get_current_access_url_id();
169
-        if ($access_url_id != -1){
169
+        if ($access_url_id != -1) {
170 170
             $sql = "SELECT course.id, code, title, visual_code, session_id
171 171
                     FROM $tbl_course course
172 172
                     LEFT JOIN $tbl_session_rel_course session_rel_course
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
                     INNER JOIN $tbl_course_rel_access_url url_course
177 177
                     ON (url_course.c_id = course.id)
178 178
                     WHERE access_url_id = $access_url_id
179
-                    ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title";
179
+                    ORDER BY ".(sizeof($courses) ? "(code IN(".implode(',', $courses).")) DESC," : "")." title";
180 180
         }
181 181
     }
182 182
     $result = Database::query($sql);
183 183
     $Courses = Database::store_result($result);
184 184
     foreach ($Courses as $course) {
185 185
         if ($course['session_id'] == $sessionId) {
186
-            $sessionCourses[$course['id']] = $course ;
186
+            $sessionCourses[$course['id']] = $course;
187 187
         } else {
188
-            $nosessionCourses[$course['id']] = $course ;
188
+            $nosessionCourses[$course['id']] = $course;
189 189
         }
190 190
     }
191 191
 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
 unset($Courses);
209 209
 ?>
210
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
210
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
211 211
     <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend>
212 212
     <input type="hidden" name="formSent" value="1" />
213 213
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
                 <div id="ajax_list_courses_multiple">
231 231
                     <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control">
232 232
                         <?php foreach ($nosessionCourses as $enreg) { ?>
233
-                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>>
233
+                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES).'"'; if (in_array($enreg['code'], $CourseList)) echo 'selected="selected"'; ?>>
234 234
                                 <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?>
235 235
                             </option>
236 236
                         <?php } ?>
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             ?>
243 243
         </div>
244 244
         <div class="col-md-4">
245
-            <?php if($add_type == 'multiple') { ?>
245
+            <?php if ($add_type == 'multiple') { ?>
246 246
                 <div class="code-course">
247 247
                     <?php echo get_lang('FirstLetterCourse'); ?> :
248 248
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                         <option value="%">--</option>
251 251
                         <?php
252 252
                         echo Display :: get_alphabet_options();
253
-                        echo Display :: get_numeric_options(0,9,'');
253
+                        echo Display :: get_numeric_options(0, 9, '');
254 254
                         ?>
255 255
                     </select>
256 256
                 </div>
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
             <select id='destination' name="SessionCoursesList[]" multiple="multiple" size="20" class="form-control">
307 307
 
308 308
                 <?php
309
-                foreach($sessionCourses as $enreg) {
309
+                foreach ($sessionCourses as $enreg) {
310 310
                     ?>
311
-                    <option value="<?php echo $enreg['id']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES); ?>">
311
+                    <option value="<?php echo $enreg['id']; ?>" title="<?php echo htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES); ?>">
312 312
                         <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?>
313 313
                     </option>
314 314
                 <?php
Please login to merge, or discard this patch.