Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
main/admin/user_import.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -535,8 +535,14 @@
 block discarded – undo
535 535
 <p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
536 536
 <blockquote>
537 537
 <pre>
538
-<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) echo implode(';', $list).';'; ?></span>Courses;ClassId;
539
-<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br />
538
+<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) {
539
+    echo implode(';', $list).';';
540
+}
541
+?></span>Courses;ClassId;
542
+<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) {
543
+    echo implode(';', $list_reponse).';';
544
+}
545
+?></span>xxx1|xxx2|xxx3;1;<br />
540 546
 </pre>
541 547
 </blockquote>
542 548
 <p><?php echo get_lang('XMLMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Driver/DropBoxDriver.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -305,7 +305,8 @@
 block discarded – undo
305 305
     protected function loadFilePath($path)
306 306
     {
307 307
         $realPath = realpath($path);
308
-        if (DIRECTORY_SEPARATOR == '\\') { // windows
308
+        if (DIRECTORY_SEPARATOR == '\\') {
309
+// windows
309 310
             $realPath = str_replace('\\', '\\\\', $realPath);
310 311
         }
311 312
         return $this->db->real_escape_string($realPath);
Please login to merge, or discard this patch.
main/exercise/multiple_answer.class.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
      * @inheritdoc
186 186
      */
187 187
 	public function processAnswersCreation($form, $exercise)
188
-    {
188
+	{
189 189
         $questionWeighting = $nbrGoodAnswers = 0;
190 190
         $objAnswer  = new Answer($this->id);
191 191
         $nb_answers = $form->getSubmitValue('nb_answers');
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5819,7 +5819,8 @@  discard block
 block discarded – undo
5819 5819
                         "GROUP:".$this_group['id'],
5820 5820
                         $to_already_selected
5821 5821
                     )
5822
-                    ) { // $to_already_selected is the array containing the groups (and users) that are already selected
5822
+                    ) {
5823
+// $to_already_selected is the array containing the groups (and users) that are already selected
5823 5824
                         $user_label = ($this_group['userNb'] > 0) ? get_lang('Users') : get_lang('LowerCaseUser');
5824 5825
                         $user_disabled = ($this_group['userNb'] > 0) ? "" : "disabled=disabled";
5825 5826
                         $result[] = array(
@@ -5840,7 +5841,8 @@  discard block
 block discarded – undo
5840 5841
                         "USER:".$user['user_id'],
5841 5842
                         $to_already_selected
5842 5843
                     )
5843
-                    ) { // $to_already_selected is the array containing the users (and groups) that are already selected
5844
+                    ) {
5845
+// $to_already_selected is the array containing the users (and groups) that are already selected
5844 5846
 
5845 5847
                         $result[] = array(
5846 5848
                             'value' => "USER:".$user['user_id'],
Please login to merge, or discard this patch.
main/user/add_users_to_session.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -488,7 +488,10 @@  discard block
 block discarded – undo
488 488
     <div class="actions">
489 489
         <?php echo $link_add_type_unique ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple ?>&nbsp;|&nbsp;<?php echo $link_add_group; ?>
490 490
     </div>
491
-    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
491
+    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($_GET['add'])) {
492
+    echo '&add=true';
493
+}
494
+?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
492 495
     <?php echo '<legend>'.$tool_name.' ('.$session->getName().') </legend>'; ?>
493 496
     <?php
494 497
     if ($add_type === 'multiple') {
@@ -549,7 +552,10 @@  discard block
 block discarded – undo
549 552
                   <?php
550 553
                   foreach ($nosessionUsersList as $uid => $enreg) {
551 554
                   ?>
552
-                      <option value="<?php echo $uid; ?>" <?php if (in_array($uid, $UserList)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option>
555
+                      <option value="<?php echo $uid; ?>" <?php if (in_array($uid, $UserList)) {
556
+    echo 'selected="selected"';
557
+}
558
+?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option>
553 559
                   <?php
554 560
                   }
555 561
                   ?>
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
@@ -205,7 +205,10 @@  discard block
 block discarded – undo
205 205
 
206 206
 unset($Courses);
207 207
 ?>
208
-<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();"'; }?>>
208
+<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'])) {
209
+    echo '&add=true';
210
+}
211
+?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
209 212
     <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend>
210 213
     <input type="hidden" name="formSent" value="1" />
211 214
     <div id="multiple-add-session" class="row">
@@ -222,7 +225,10 @@  discard block
 block discarded – undo
222 225
                 <div id="ajax_list_courses_multiple">
223 226
                     <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control">
224 227
                         <?php foreach ($nosessionCourses as $enreg) { ?>
225
-                            <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"'; ?>>
228
+                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')', ENT_QUOTES).'"'; if (in_array($enreg['code'], $CourseList)) {
229
+    echo 'selected="selected"';
230
+}
231
+?>>
226 232
                                 <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?>
227 233
                             </option>
228 234
                         <?php } ?>
Please login to merge, or discard this patch.
main/lp/learnpathItem.class.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -745,7 +745,8 @@  discard block
 block discarded – undo
745 745
     public function get_lesson_mode()
746 746
     {
747 747
         $mode = 'normal';
748
-        if ($this->get_prevent_reinit() != 0) { // If prevent_reinit == 0
748
+        if ($this->get_prevent_reinit() != 0) {
749
+// If prevent_reinit == 0
749 750
             $my_status = $this->get_status();
750 751
             if ($my_status != $this->possible_status[0]
751 752
                     && $my_status != $this->possible_status[1]) {
@@ -2037,11 +2038,13 @@  discard block
 block discarded – undo
2037 2038
         $restart = 1;
2038 2039
         $mystatus = $this->get_status(true);
2039 2040
         if ($this->get_prevent_reinit() > 0
2040
-        ) { // If prevent_reinit == 1 (or more)
2041
+        ) {
2042
+// If prevent_reinit == 1 (or more)
2041 2043
             // If status is not attempted or incomplete, authorize retaking (of the same) anyway. Otherwise:
2042 2044
             if ($mystatus != $this->possible_status[0] && $mystatus != $this->possible_status[1]) {
2043 2045
                 $restart = -1;
2044
-            } else { //status incompleted or not attempted
2046
+            } else {
2047
+//status incompleted or not attempted
2045 2048
                 $restart = 0;
2046 2049
             }
2047 2050
         } else {
@@ -2982,7 +2985,8 @@  discard block
 block discarded – undo
2982 2985
                     // Do nothing, just let the local attributes be used.
2983 2986
                 }
2984 2987
             }
2985
-        } else { // If not SCO, such messages should not be expected.
2988
+        } else {
2989
+// If not SCO, such messages should not be expected.
2986 2990
             $type = strtolower($this->type);
2987 2991
             switch ($type) {
2988 2992
                 case 'asset':
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 1 patch
Braces   +17 added lines, -10 removed lines patch added patch discarded remove patch
@@ -166,7 +166,8 @@  discard block
 block discarded – undo
166 166
     $purified = false,
167 167
     $check_sub_language = false,
168 168
     $setParentLanguageName = true
169
-) {
169
+)
170
+{
170 171
     global $language_interface;
171 172
 
172 173
     if (empty($language_interface)) {
@@ -408,7 +409,8 @@  discard block
 block discarded – undo
408 409
     $time = null,
409 410
     $return_null_if_invalid_date = false,
410 411
     $returnObj = false
411
-) {
412
+)
413
+{
412 414
     $from_timezone = api_get_timezone();
413 415
     $to_timezone = 'UTC';
414 416
     if (is_null($time) || empty($time) || $time === '0000-00-00 00:00:00') {
@@ -459,7 +461,8 @@  discard block
 block discarded – undo
459 461
     $return_null_if_invalid_date = false,
460 462
     $showTime = true,
461 463
     $humanForm = false
462
-) {
464
+)
465
+{
463 466
     // Determining the timezone to be converted from
464 467
     if (is_null($from_timezone)) {
465 468
         $from_timezone = 'UTC';
@@ -823,7 +826,8 @@  discard block
 block discarded – undo
823 826
     $language = null,
824 827
     $encoding = null,
825 828
     $username = null
826
-) {
829
+)
830
+{
827 831
     static $valid = array();
828 832
     if (empty($format)) {
829 833
         $format = PERSON_NAME_COMMON_CONVENTION;
@@ -1505,7 +1509,8 @@  discard block
 block discarded – undo
1505 1509
     $flags = 0,
1506 1510
     $offset = 0,
1507 1511
     $encoding = null
1508
-) {
1512
+)
1513
+{
1509 1514
     if (empty($encoding)) {
1510 1515
         $encoding = _api_mb_internal_encoding();
1511 1516
     }
@@ -1528,7 +1533,8 @@  discard block
 block discarded – undo
1528 1533
  * @return int|boolean					Returns the number of full pattern matches (which might be zero), or FALSE if an error occurred.
1529 1534
  * @link http://php.net/preg_match_all
1530 1535
  */
1531
-function api_preg_match_all($pattern, $subject, &$matches, $flags = PREG_PATTERN_ORDER, $offset = 0, $encoding = null) {
1536
+function api_preg_match_all($pattern, $subject, &$matches, $flags = PREG_PATTERN_ORDER, $offset = 0, $encoding = null)
1537
+{
1532 1538
     if (empty($encoding)) {
1533 1539
         $encoding = _api_mb_internal_encoding();
1534 1540
     }
@@ -1581,7 +1587,8 @@  discard block
 block discarded – undo
1581 1587
  * @return array						Returns an array containing substrings of $subject split along boundaries matched by $pattern.
1582 1588
  * @link http://php.net/preg_split
1583 1589
  */
1584
-function api_preg_split($pattern, $subject, $limit = -1, $flags = 0, $encoding = null) {
1590
+function api_preg_split($pattern, $subject, $limit = -1, $flags = 0, $encoding = null)
1591
+{
1585 1592
     if (empty($encoding)) {
1586 1593
         $encoding = _api_mb_internal_encoding();
1587 1594
     }
@@ -1708,8 +1715,7 @@  discard block
 block discarded – undo
1708 1715
             }
1709 1716
         }
1710 1717
         return false;
1711
-    }
1712
-    elseif (is_array($encoding2)) {
1718
+    } elseif (is_array($encoding2)) {
1713 1719
         foreach ($encoding2 as $encoding) {
1714 1720
             if (api_equal_encodings($encoding1, $encoding, $strict)) {
1715 1721
                 return true;
@@ -1838,7 +1844,8 @@  discard block
 block discarded – undo
1838 1844
  * @param string $pluginName the Plugin name
1839 1845
  * @return string the variable translated
1840 1846
  */
1841
-function get_plugin_lang($variable, $pluginName) {
1847
+function get_plugin_lang($variable, $pluginName)
1848
+{
1842 1849
     $plugin = $pluginName::create();
1843 1850
     return $plugin->get_lang($variable);
1844 1851
 }
Please login to merge, or discard this patch.
main/wiki/wiki.inc.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4577,7 +4577,8 @@  discard block
 block discarded – undo
4577 4577
         echo '</div>';
4578 4578
 
4579 4579
         if (api_is_allowed_to_edit(false, true) || api_is_platform_admin(
4580
-            )) { //only by professors if page is hidden
4580
+            )) {
4581
+//only by professors if page is hidden
4581 4582
             $sql = 'SELECT  *
4582 4583
                     FROM  '.$tbl_wiki.' s1
4583 4584
         		    WHERE s1.c_id = '.$course_id.' AND id=(
@@ -5364,7 +5365,8 @@  discard block
 block discarded – undo
5364 5365
 
5365 5366
         if (api_is_allowed_to_edit(false, true) ||
5366 5367
             api_is_platform_admin()
5367
-        ) { //only by professors if page is hidden
5368
+        ) {
5369
+//only by professors if page is hidden
5368 5370
             $sql = 'SELECT *, MAX(version) AS MAX FROM '.$tbl_wiki.'
5369 5371
                     WHERE c_id = '.$course_id.' AND '.$groupfilter.$condition_session.'
5370 5372
                     GROUP BY reflink';//TODO:check MAX and group by return last version
@@ -6029,7 +6031,8 @@  discard block
 block discarded – undo
6029 6031
         echo '<div class="actions">'.get_lang('MostVisitedPages').'</div>';
6030 6032
 
6031 6033
         if (api_is_allowed_to_edit(false, true) || api_is_platform_admin(
6032
-            )) { //only by professors if page is hidden
6034
+            )) {
6035
+//only by professors if page is hidden
6033 6036
             $sql = 'SELECT *, SUM(hits) AS tsum FROM '.$tbl_wiki.'
6034 6037
                     WHERE c_id = '.$course_id.' AND '.$groupfilter.$condition_session.'
6035 6038
                     GROUP BY reflink';
@@ -6877,7 +6880,8 @@  discard block
 block discarded – undo
6877 6880
                         'ShowDifferences'
6878 6881
                     ).' '.get_lang('WordsDiff').'</button>';
6879 6882
                 echo '</ul></form>';
6880
-            } else { // We show the differences between two versions
6883
+            } else {
6884
+// We show the differences between two versions
6881 6885
                 $version_old = array();
6882 6886
                 if (isset($_POST['old'])) {
6883 6887
                     $sql_old = "SELECT * FROM $tbl_wiki
Please login to merge, or discard this patch.