Completed
Push — 1.11.x ( ae642b...8fe553 )
by José
74:31 queued 35:16
created
main/lp/openoffice_text.class.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
 
120 120
         for ($i = 0; $i<count($matches[0]); $i++) {
121 121
 
122
-            if (empty($matches[1][$i]))
123
-                continue;
122
+            if (empty($matches[1][$i])) {
123
+                            continue;
124
+            }
124 125
 
125 126
             $content = api_strstr($content, $matches[0][$i]);
126 127
             if ($i + 1 !== count($matches[0])) {
Please login to merge, or discard this patch.
main/lp/resourcelinker.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -341,8 +341,7 @@
 block discarded – undo
341 341
         case '1': // coming from Agenda
342 342
             if ($action == 'edit') {
343 343
                 $url = "../calendar/agenda.php?action=edit&id=49&originalresource=$originalresource";
344
-            }
345
-            elseif ($action == 'add') {
344
+            } elseif ($action == 'add') {
346 345
                 $url = "../calendar/agenda.php?action=add&originalresource=$originalresource";
347 346
             } else {
348 347
                 $url = "../calendar/agenda.php?action=add";
Please login to merge, or discard this patch.
main/lp/lp_impress.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         //just showing the src in a iframe ...
82 82
         $html .= '<h2>'.$toc['title'].'</h2>';
83 83
         $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="' . $src . '"></iframe>';
84
-    }else{
84
+    } else{
85 85
         $html .= "<div class='impress-title'>";
86 86
         $html .= '<h1>'.$toc['title'].'</h1>';
87 87
         $html .= "</div>";
Please login to merge, or discard this patch.
main/lp/openoffice_text_document.class.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
 
120 120
         for ($i = 0; $i<count($matches[0]); $i++) {
121 121
 
122
-            if (empty($matches[1][$i]))
123
-                continue;
122
+            if (empty($matches[1][$i])) {
123
+                            continue;
124
+            }
124 125
 
125 126
             $content = api_strstr($content, $matches[0][$i]);
126 127
             if ($i + 1 !== count($matches[0])) {
Please login to merge, or discard this patch.
main/lp/resourcelinker.inc.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -337,9 +337,14 @@  discard block
 block discarded – undo
337 337
 
338 338
     $length = ((($builder == 'builder') && ($icon == 'nolink')) ? 65 : 32);
339 339
 
340
-    if ($builder != 'builder') $origin = 'learnpath'; //origin = learnpath in student view
340
+    if ($builder != 'builder') {
341
+        $origin = 'learnpath';
342
+    }
343
+    //origin = learnpath in student view
341 344
     $linktype = $type;
342
-    if (($type == 'Link _self') or ($type == 'Link _blank')) $type = 'Link';
345
+    if (($type == 'Link _self') or ($type == 'Link _blank')) {
346
+        $type = 'Link';
347
+    }
343 348
 
344 349
     // YW switched litteral tool names to use of constants declared in main_api.lib.php
345 350
     switch ($type) {
@@ -1371,11 +1376,12 @@  discard block
 block discarded – undo
1371 1376
             WHERE c_id = $course_id AND source_type='$type' and source_id='$id'";
1372 1377
     $result = Database::query($sql);
1373 1378
     $number_added = Database::num_rows($result);
1374
-    if ($number_added != 0)
1375
-        return true;
1376
-    else
1377
-        return false;
1378
-}
1379
+    if ($number_added != 0) {
1380
+            return true;
1381
+    } else {
1382
+            return false;
1383
+    }
1384
+    }
1379 1385
 
1380 1386
 /**
1381 1387
  * This function is to load the resources that were added to a specific item
@@ -1496,8 +1502,7 @@  discard block
 block discarded – undo
1496 1502
             next($addedresource);
1497 1503
         }
1498 1504
         echo '</table>';
1499
-    }
1500
-    else { // it is a string
1505
+    } else { // it is a string
1501 1506
         echo '';
1502 1507
     }
1503 1508
 } // end of the display_resources function
@@ -1533,8 +1538,7 @@  discard block
 block discarded – undo
1533 1538
                 echo "<a href='".api_get_self()."?content=".$type."&source_forum=".$_GET['source_forum']."&add=".$id."&source_id=$source_id&action=$action&lp_id=$learningPathId&parent_item_id=$chapter_id&originalresource=no&target=$target'>".$lang_add_it_or_resource."</a>";
1534 1539
             }
1535 1540
         }
1536
-    }
1537
-    else { // if it is not an array, it is a string
1541
+    } else { // if it is not an array, it is a string
1538 1542
         if ($_SESSION['addedresource'] !== $type || $_SESSION['addedresourceid'] !== $id) {
1539 1543
             if ($from_learnpath) { $lang_add_it_or_resource = get_lang('AddIt'); } else { $lang_add_it_or_resource = get_lang('AddResource'); }
1540 1544
             echo "<a href='".api_get_self()."?content=".$type."&folder=".$folder."&source_forum=".$_GET['source_forum']."&add=".$id."&source_id=$source_id&action=$action&lp_id=$learningPathId&parent_item_id=$chapter_id&originalresource=no&target=$target'>".$lang_add_it_or_resource."</a>";
@@ -1561,7 +1565,9 @@  discard block
 block discarded – undo
1561 1565
     $course_id = api_get_course_int_id();
1562 1566
 
1563 1567
     // Styling the link of the added resource
1564
-    if ($style != '') $styling = ' class="'.$style.'"';
1568
+    if ($style != '') {
1569
+        $styling = ' class="'.$style.'"';
1570
+    }
1565 1571
     if ($new_window) { $target = ' target = "_blank" '; } else { $target = ' target = "_self" '; }
1566 1572
 
1567 1573
     $output = '';
Please login to merge, or discard this patch.
main/session/add_courses_to_session.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,7 +207,10 @@  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'])) {
211
+    echo '&add=true' ;
212
+}
213
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
211 214
     <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend>
212 215
     <input type="hidden" name="formSent" value="1" />
213 216
 
@@ -230,7 +233,10 @@  discard block
 block discarded – undo
230 233
                 <div id="ajax_list_courses_multiple">
231 234
                     <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control">
232 235
                         <?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"'; ?>>
236
+                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) {
237
+    echo 'selected="selected"';
238
+}
239
+?>>
234 240
                                 <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?>
235 241
                             </option>
236 242
                         <?php } ?>
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3342,7 +3342,7 @@  discard block
 block discarded – undo
3342 3342
             $html .= '<a class="thumbnail" href="'.$params['link'].'">';
3343 3343
             $html .= $params['icon'];
3344 3344
             $html .= '</a>';
3345
-        }else{
3345
+        } else{
3346 3346
             $html .= $params['icon'];
3347 3347
         }
3348 3348
         $html .= '</div>';
@@ -3423,7 +3423,7 @@  discard block
 block discarded – undo
3423 3423
                                . Display::returnFontAwesomeIcon('folder-open') . '</a>';
3424 3424
                             $params['document'] .= Display::div('', ['id' => 'document_result_' . $course_info['real_id'] . '_0', 'class' => 'document_preview_container']);
3425 3425
                         }
3426
-                    }else{
3426
+                    } else{
3427 3427
                         if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED && $load_dirs) {
3428 3428
                             $params['document'] = '<a id="document_preview_' . $course_info['real_id'] . '_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
3429 3429
                                . Display::returnFontAwesomeIcon('folder-open') . '</a>';
@@ -3598,7 +3598,7 @@  discard block
 block discarded – undo
3598 3598
             if ($showCustomIcon === 'true' && $iconName != 'course.png') {
3599 3599
                 $thumbnails = $course_info['course_image'];
3600 3600
                 $image = $course_info['course_image_large'];
3601
-            }else{
3601
+            } else{
3602 3602
                 $image = Display::return_icon('session_default.png', null, null, null,null, true);
3603 3603
             }
3604 3604
 
@@ -3736,7 +3736,7 @@  discard block
 block discarded – undo
3736 3736
             if ($showCustomIcon === 'true' && $iconName != 'course.png') {
3737 3737
                 $thumbnails = $course_info['course_image'];
3738 3738
                 $image = $course_info['course_image_large'];
3739
-            }else{
3739
+            } else{
3740 3740
                 $image = Display::return_icon('session_default.png', null, null, null,null, true);
3741 3741
             }
3742 3742
 
@@ -3998,7 +3998,7 @@  discard block
 block discarded – undo
3998 3998
         if ($showCustomIcon === 'true' && $iconName != 'course.png') {
3999 3999
             $thumbnails = $course_info['course_image'];
4000 4000
             $image = $course_info['course_image_large'];
4001
-        }else{
4001
+        } else{
4002 4002
             $image = Display::return_icon('session_default.png', null, null, null,null, true);
4003 4003
         }
4004 4004
         $params['thumbnails'] = $thumbnails;
Please login to merge, or discard this patch.
main/course_progress/thematic_plan.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,10 @@
 block discarded – undo
9 9
 
10 10
 // actions menu
11 11
 $new_thematic_plan_data = array();
12
-if (!empty($thematic_plan_data))
13
-foreach($thematic_plan_data as $thematic_item) {
12
+if (!empty($thematic_plan_data)) {
13
+    foreach($thematic_plan_data as $thematic_item) {
14 14
     $thematic_simple_list[] = $thematic_item['description_type'];
15
+}
15 16
     $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
16 17
 }
17 18
 
Please login to merge, or discard this patch.
main/admin/subscribe_user2course.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -287,7 +287,10 @@  discard block
 block discarded – undo
287 287
     <td width="40%" align="center">
288 288
      <select name="UserList[]" multiple="multiple" size="20" style="width:300px;">
289 289
     <?php foreach ($db_users as $user) { ?>
290
-          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) echo 'selected="selected"'; ?>>
290
+          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) {
291
+    echo 'selected="selected"';
292
+}
293
+?>>
291 294
       <?php
292 295
         $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')';
293 296
         if ($showOfficialCode) {
@@ -308,7 +311,10 @@  discard block
 block discarded – undo
308 311
    <td width="40%" align="center">
309 312
     <select name="CourseList[]" multiple="multiple" size="20" style="width:300px;">
310 313
     <?php foreach ($db_courses as $course) { ?>
311
-         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>>
314
+         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) {
315
+    echo 'selected="selected"';
316
+}
317
+?>>
312 318
              <?php echo '('.$course['visual_code'].') '.$course['title']; ?>
313 319
          </option>
314 320
     <?php } ?>
Please login to merge, or discard this patch.