Completed
Pull Request — 1.11.x (#1421)
by José
46:34 queued 10:32
created
plugin/buycourses/src/buy_course_plugin.class.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             return false;
92 92
         }
93 93
 
94
-        require_once api_get_path(SYS_PLUGIN_PATH) . 'buycourses/database.php';
94
+        require_once api_get_path(SYS_PLUGIN_PATH).'buycourses/database.php';
95 95
     }
96 96
 
97 97
     /**
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
             $item = $this->getItemByProduct(intval($productId), $productType);
136 136
             $return['html'] = '<div class="buycourses-price">';
137 137
             if ($item) {
138
-                $return['html'] .= '<span class="label label-primary"><b>'. $item['iso_code'] .' ' . $item['price'] . '</b></span>';
138
+                $return['html'] .= '<span class="label label-primary"><b>'.$item['iso_code'].' '.$item['price'].'</b></span>';
139 139
                 $return['verificator'] = true;
140 140
             } else {
141
-                $return['html'] .= '<span class="label label-primary"><b>'. $this->get_lang('Free'). '</b></span>';
141
+                $return['html'] .= '<span class="label label-primary"><b>'.$this->get_lang('Free').'</b></span>';
142 142
                 $return['verificator'] = false;
143 143
             }
144 144
             $return['html'] .= '</div>';
@@ -156,15 +156,15 @@  discard block
 block discarded – undo
156 156
      * @return string $html
157 157
      */
158 158
     public function returnBuyCourseButton($productId, $productType) {
159
-        $url = api_get_path(WEB_PLUGIN_PATH) .
160
-            'buycourses/src/process.php?i=' .
161
-            intval($productId) .
162
-            '&t=' .
159
+        $url = api_get_path(WEB_PLUGIN_PATH).
160
+            'buycourses/src/process.php?i='.
161
+            intval($productId).
162
+            '&t='.
163 163
             $productType
164 164
         ;
165 165
 
166
-        $html = ' <a class="btn btn-success btn-sm" title="' . $this->get_lang('Buy') . '" href="' . $url . '">' .
167
-            Display::returnFontAwesomeIcon('fa fa-shopping-cart') . '</a>';
166
+        $html = ' <a class="btn btn-success btn-sm" title="'.$this->get_lang('Buy').'" href="'.$url.'">'.
167
+            Display::returnFontAwesomeIcon('fa fa-shopping-cart').'</a>';
168 168
 
169 169
         return $html;
170 170
     }
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
         );
710 710
 
711 711
         if (!empty($sessionImage)) {
712
-            $sessionInfo['image'] = api_get_path(WEB_UPLOAD_PATH) . $sessionImage['value'];
712
+            $sessionInfo['image'] = api_get_path(WEB_UPLOAD_PATH).$sessionImage['value'];
713 713
         }
714 714
 
715 715
         $sessionCourses = $session->getCourses();
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
 
1152 1152
         $str = '';
1153 1153
 
1154
-        srand((double)microtime() * 1000000);
1154
+        srand((double) microtime() * 1000000);
1155 1155
 
1156 1156
         for ($i = 0; $i < $length; $i++) {
1157 1157
             $numbers = rand(0, strlen($salt) - 1);
@@ -1498,8 +1498,8 @@  discard block
 block discarded – undo
1498 1498
      */
1499 1499
     public function getPayouts($status = self::PAYOUT_STATUS_PENDING, $payoutId = false, $userId = false)
1500 1500
     {
1501
-        $condition = ($payoutId) ? 'AND p.id = '. intval($payoutId) : '';
1502
-        $condition2 = ($userId) ? ' AND p.user_id = ' . intval($userId) : '';
1501
+        $condition = ($payoutId) ? 'AND p.id = '.intval($payoutId) : '';
1502
+        $condition2 = ($userId) ? ' AND p.user_id = '.intval($userId) : '';
1503 1503
         $typeResult = ($condition) ? 'first' : 'all';
1504 1504
         $payoutsTable = Database::get_main_table(BuyCoursesPlugin::TABLE_PAYPAL_PAYOUTS);
1505 1505
         $saleTable = Database::get_main_table(BuyCoursesPlugin::TABLE_SALE);
@@ -1526,14 +1526,14 @@  discard block
 block discarded – undo
1526 1526
             INNER JOIN $saleTable s ON s.id = p.sale_id
1527 1527
             INNER JOIN $currencyTable c ON s.currency_id = c.id
1528 1528
             LEFT JOIN  $extraFieldValues efv ON p.user_id = efv.item_id 
1529
-            AND field_id = " . intval($paypalExtraField['id']) . "
1529
+            AND field_id = ".intval($paypalExtraField['id'])."
1530 1530
         ";
1531 1531
 
1532 1532
         $payouts = Database::select(
1533 1533
             "p.* , u.firstname, u.lastname, efv.value as paypal_account, s.reference as sale_reference, s.price as item_price, c.iso_code",
1534 1534
             "$payoutsTable p $innerJoins",
1535 1535
             [
1536
-                'where' => ['p.status = ? '.$condition . ' ' .$condition2 => $status]
1536
+                'where' => ['p.status = ? '.$condition.' '.$condition2 => $status]
1537 1537
             ],
1538 1538
             $typeResult
1539 1539
         );
@@ -1597,7 +1597,7 @@  discard block
 block discarded – undo
1597 1597
         $platformCommission = $this->getPlatformCommission();
1598 1598
 
1599 1599
         $sale = $this->getSale($saleId);
1600
-        $teachersCommission = number_format((floatval($sale['price']) * intval($platformCommission['commission']))/100, 2);
1600
+        $teachersCommission = number_format((floatval($sale['price']) * intval($platformCommission['commission'])) / 100, 2);
1601 1601
 
1602 1602
 
1603 1603
         $beneficiaries = $this->getBeneficiariesBySale($saleId);
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
                     'payout_date' => getdate(),
1610 1610
                     'sale_id' => intval($saleId),
1611 1611
                     'user_id' => $beneficiary['user_id'],
1612
-                    'commission' => number_format((floatval($teachersCommission) * intval($beneficiary['commissions']))/100, 2),
1612
+                    'commission' => number_format((floatval($teachersCommission) * intval($beneficiary['commissions'])) / 100, 2),
1613 1613
                     'status' => self::PAYOUT_STATUS_PENDING
1614 1614
                 ]
1615 1615
             );
Please login to merge, or discard this patch.
main/auth/inscription.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             };
78 78
 
79 79
             var geoError = function(error) {
80
-                alert("Geocode ' . get_lang('Error') . ': " + error);
80
+                alert("Geocode ' . get_lang('Error').': " + error);
81 81
             };
82 82
 
83 83
             var geoOptions = {
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
                             infowindow.open(map, marker);
129 129
                         });
130 130
                     } else {
131
-                        alert("' . get_lang("NotFound") . '");
131
+                        alert("' . get_lang("NotFound").'");
132 132
                     }
133 133
 
134 134
                 } else {
135
-                    alert("Geocode ' . get_lang('Error') . ': " + status);
135
+                    alert("Geocode ' . get_lang('Error').': " + status);
136 136
                 }
137 137
             });
138 138
         }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         if (api_get_setting('registration', 'email') != 'true') {
183 183
             $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
184 184
         }
185
-        $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
185
+        $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
186 186
         $form->addRule('email', get_lang('UserTaken'), 'username_available');
187 187
     }
188 188
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $form->addElement('text', 'username', get_lang('UserName'), array('id' => 'username', 'size' => USERNAME_MAX_LENGTH));
216 216
         $form->applyFilter('username', 'trim');
217 217
         $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
218
-        $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
218
+        $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
219 219
         $form->addRule('username', get_lang('UsernameWrong'), 'username');
220 220
         $form->addRule('username', get_lang('UserTaken'), 'username_available');
221 221
     }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     if (CHECK_PASS_EASY_TO_FIND) {
247 247
         $form->addRule(
248 248
             'password1',
249
-            get_lang('PassTooEasy') . ': ' . api_generate_password(),
249
+            get_lang('PassTooEasy').': '.api_generate_password(),
250 250
             'callback',
251 251
             'api_check_password'
252 252
         );
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
                 <div class="form-group">
277 277
                     <label for="geolocalization" class="col-sm-2 control-label"></label>
278 278
                     <div class="col-sm-8">
279
-                        <button class="null btn btn-default " id="geolocalization" name="geolocalization" type="submit"><em class="fa fa-map-marker"></em> ' . get_lang('Geolocalization') . '</button>
280
-                        <button class="null btn btn-default " id="myLocation" name="myLocation" type="submit"><em class="fa fa-crosshairs"></em> ' . get_lang('MyLocation') . '</button>
279
+                        <button class="null btn btn-default " id="geolocalization" name="geolocalization" type="submit"><em class="fa fa-map-marker"></em> ' . get_lang('Geolocalization').'</button>
280
+                        <button class="null btn btn-default " id="myLocation" name="myLocation" type="submit"><em class="fa fa-crosshairs"></em> ' . get_lang('MyLocation').'</button>
281 281
                     </div>
282 282
                 </div>
283 283
             ');
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $form->addHtml('
286 286
                 <div class="form-group">
287 287
                     <label for="map" class="col-sm-2 control-label">
288
-                        ' . get_lang('Map') . '
288
+                        ' . get_lang('Map').'
289 289
                     </label>
290 290
                     <div class="col-sm-8">
291 291
                         <div name="map" id="map" style="width:100%; height:300px;">
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             )
346 346
         );
347 347
 
348
-        $captcha_question =  $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);
348
+        $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);
349 349
         $form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne'));
350 350
 
351 351
         $form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), array('size' => 40));
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
         }
487 487
     }
488 488
 
489
-    $tool_name = get_lang('Registration', null, (!empty($_POST['language'])?$_POST['language']: $_user['language']));
489
+    $tool_name = get_lang('Registration', null, (!empty($_POST['language']) ? $_POST['language'] : $_user['language']));
490 490
 
491 491
     if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_registered_show_terms) {
492 492
         $tool_name = get_lang('TermsAndConditions');
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     }
508 508
 
509 509
     if (file_exists($home.'register_top_'.$user_selected_language.'.html')) {
510
-        $home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html');
510
+        $home_top_temp = @(string) file_get_contents($home.'register_top_'.$user_selected_language.'.html');
511 511
         $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
512 512
         $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
513 513
         if (!empty($open)) {
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
         if (api_get_setting('show_terms_if_profile_completed') === 'true') {
538 538
             $userInfo = api_get_user_info();
539 539
             if ($userInfo) {
540
-                if ((int)$userInfo['profile_completed'] !== 1) {
540
+                if ((int) $userInfo['profile_completed'] !== 1) {
541 541
                     api_not_allowed(true);
542 542
                 }
543 543
             }
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
                 Database::query($sql);
748 748
 
749 749
                 // 2. Send mail to all platform admin
750
-                $emailsubject  = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username'];
750
+                $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username'];
751 751
                 $emailbody = get_lang('ApprovalForNewAccount', null, $values['language'])."\n";
752 752
                 $emailbody .= get_lang('UserName', null, $values['language']).': '.$values['username']."\n";
753 753
 
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
         '<p>'.
851 851
         get_lang('Dear', null, $_user['language']).' '.
852 852
         stripslashes(Security::remove_XSS($recipient_name)).',<br /><br />'.
853
-        get_lang('PersonalSettings',null,$_user['language']).".</p>";
853
+        get_lang('PersonalSettings', null, $_user['language']).".</p>";
854 854
 
855 855
     $form_data = array(
856 856
         'button' => Display::button('next', get_lang('Next', null, $_user['language']), array('class' => 'btn btn-primary btn-large')),
@@ -874,14 +874,14 @@  discard block
 block discarded – undo
874 874
         }
875 875
     } else {
876 876
         if (!empty($values['email'])) {
877
-            $text_after_registration.= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>';
877
+            $text_after_registration .= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>';
878 878
         }
879 879
 
880 880
         if ($is_allowedCreateCourse) {
881 881
             if ($usersCanCreateCourse) {
882
-                $form_data['message'] = '<p>'. get_lang('NowGoCreateYourCourse', null, $_user['language']). "</p>";
882
+                $form_data['message'] = '<p>'.get_lang('NowGoCreateYourCourse', null, $_user['language'])."</p>";
883 883
             }
884
-            $form_data['action']  = api_get_path(WEB_CODE_PATH).'create_course/add_course.php';
884
+            $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php';
885 885
 
886 886
             if (api_get_setting('course_validation') === 'true') {
887 887
                 $form_data['button'] = Display::button(
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
         } else {
905 905
             if (api_get_setting('allow_students_to_browse_courses') == 'true') {
906 906
                 $form_data['action'] = 'courses.php?action=subscribe';
907
-                $form_data['message'] = '<p>'. get_lang('NowGoChooseYourCourses', null, $_user['language']). ".</p>";
907
+                $form_data['message'] = '<p>'.get_lang('NowGoChooseYourCourses', null, $_user['language']).".</p>";
908 908
             } else {
909 909
                 $form_data['action'] = api_get_path(WEB_PATH).'user_portal.php';
910 910
             }
Please login to merge, or discard this patch.
main/coursecopy/create_backup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 
71 71
     $zip_file = CourseArchiver::write_course($course);
72 72
     Display::display_confirmation_message(get_lang('BackupCreated'));
73
-    echo '<br /><a class="btn btn-primary btn-large" href="' . api_get_path(WEB_CODE_PATH) . 'course_info/download.php?archive=' . $zip_file . '&' . api_get_cidreq() . '">
74
-    ' . get_lang('Download') . '</a>';
73
+    echo '<br /><a class="btn btn-primary btn-large" href="'.api_get_path(WEB_CODE_PATH).'course_info/download.php?archive='.$zip_file.'&'.api_get_cidreq().'">
74
+    ' . get_lang('Download').'</a>';
75 75
 
76 76
 } elseif (Security::check_token('post') && (
77 77
         isset($_POST['backup_option']) &&
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $form = new FormValidator(
97 97
             'create_backup_form',
98 98
             'post',
99
-            api_get_self() . '?' . api_get_cidreq()
99
+            api_get_self().'?'.api_get_cidreq()
100 100
         );
101 101
         $form->addElement('header', get_lang('SelectOptionForBackup'));
102 102
         $form->addElement('radio', 'backup_option', '', get_lang('CreateFullBackup'), 'full_backup');
Please login to merge, or discard this patch.
custompages/language.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     }
29 29
     krsort($langs, SORT_NUMERIC);
30 30
     // Choosing the best match
31
-    foreach($langs as $weight => $codes) {
31
+    foreach ($langs as $weight => $codes) {
32 32
 		foreach ($codes as $code) {
33 33
         	if (in_array($code, $available_langs)) {
34 34
             	return $code;
Please login to merge, or discard this patch.
custompages/language.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @package chamilo.custompages
7 7
  */
8 8
 // Get helper functions
9
-require_once __DIR__ . '/language.inc.php';
9
+require_once __DIR__.'/language.inc.php';
10 10
 
11 11
 // Define the languages you want to make available for auto-detection here
12 12
 $available_langs = array('en', 'fr', 'es', 'gl', 'eu');
Please login to merge, or discard this patch.
main/admin/add_courses_to_usergroup.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 api_protect_admin_script(true);
20 20
 
21 21
 // Setting breadcrumbs.
22
-$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
23
-$interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes'));
22
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
24 24
 
25 25
 // Setting the name of the tool.
26 26
 $tool_name = get_lang('SubscribeClassToCourses');
27 27
 
28 28
 $add_type = 'multiple';
29
-if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){
29
+if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
30 30
     $add_type = Security::remove_XSS($_REQUEST['add_type']);
31 31
 }
32 32
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
99 99
 $searchForm->addHeader(get_lang('AdvancedSearch'));
100
-$renderer =& $searchForm->defaultRenderer();
100
+$renderer = & $searchForm->defaultRenderer();
101 101
 $searchForm->addElement('hidden', 'id', $id);
102 102
 foreach ($filters as $param) {
103 103
     $searchForm->addElement($param['type'], $param['name'], $param['label']);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 //checking for extra field with filter on
143 143
 
144
-function search($needle,$type)
144
+function search($needle, $type)
145 145
 {
146 146
     global $elements_in;
147 147
     $xajax_response = new xajaxResponse();
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 }
181 181
 
182 182
 echo '<div class="actions">';
183
-echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
183
+echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>';
184 184
 echo Display::url(get_lang('AdvancedSearch'), '#', array('class' => 'advanced_options', 'id' => 'advanced_search'));
185 185
 echo '</div>';
186 186
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 ?>
192 192
 
193
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
193
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
194 194
 
195 195
 <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>';
196 196
 echo Display::input('hidden', 'id', $id);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
   <td align="center"><b><?php echo get_lang('CoursesInGroup') ?> :</b></td>
210 210
 </tr>
211 211
 
212
-<?php if ($add_type=='multiple') { ?>
212
+<?php if ($add_type == 'multiple') { ?>
213 213
 <tr>
214 214
 <td align="center">
215 215
 <?php echo get_lang('FirstLetterCourseTitle'); ?> :
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
   <td align="center">
228 228
   <div id="content_source">
229 229
       <?php
230
-      if (!($add_type=='multiple')) {
230
+      if (!($add_type == 'multiple')) {
231 231
         ?>
232 232
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
233 233
         <div id="ajax_list_users_single"></div>
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
       } else {
236 236
       ?>
237 237
       <div id="ajax_list_multiple">
238
-        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?>
238
+        <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
239 239
       </div>
240 240
     <?php
241 241
       }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
   </td>
267 267
   <td align="center">
268 268
 <?php
269
-    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false );
269
+    echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false);
270 270
     unset($sessionUsersList);
271 271
 ?>
272 272
  </td>
Please login to merge, or discard this patch.
main/tracking/course_log_tools.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 
66 66
 // Breadcrumbs.
67 67
 if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') {
68
-    $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin'));
69
-    $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList'));
68
+    $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin'));
69
+    $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList'));
70 70
     $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.api_get_session_id(), 'name' => get_lang('SessionOverview'));
71 71
 }
72 72
 
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
 
135 135
 echo '<span style="float:right; padding-top:0px;">';
136 136
 echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
137
-    Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
137
+    Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
138 138
 
139 139
 echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&id_session='.api_get_session_id().'&export=csv">
140
-	'.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a>';
140
+	'.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
141 141
 
142 142
 echo '</span>';
143 143
 echo '</div>';
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             $quiz_avg_score = round(($quiz_avg_score / $studentCount), 2).'%';
251 251
             $url = api_get_path(
252 252
                     WEB_CODE_PATH
253
-                ) . 'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params;
253
+                ).'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params;
254 254
 
255 255
             echo '<tr><td>'.Display::url(
256 256
                     $quiz['title'],
Please login to merge, or discard this patch.
main/exercise/live_stats.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 $url = api_get_path(WEB_AJAX_PATH).'exercise.ajax.php?a=get_live_stats&exercise_id='.$objExercise->id.'&minutes='.$minutes;
42 42
 
43 43
 //The order is important you need to check the the $column variable in the model.ajax.php file
44
-$columns        = array(get_lang('FirstName'), get_lang('LastName'), get_lang('Time'), get_lang('QuestionsAlreadyAnswered'), get_lang('Score'));
44
+$columns = array(get_lang('FirstName'), get_lang('LastName'), get_lang('Time'), get_lang('QuestionsAlreadyAnswered'), get_lang('Score'));
45 45
 
46 46
 //Column config
47 47
 $column_model = array(
@@ -93,15 +93,15 @@  discard block
 block discarded – undo
93 93
 
94 94
 $(function() {
95 95
     <?php
96
-        echo Display::grid_js('live_stats',  $url, $columns, $column_model, $extra_params, array(), null, true);
96
+        echo Display::grid_js('live_stats', $url, $columns, $column_model, $extra_params, array(), null, true);
97 97
     ?>
98 98
     refreshGrid();
99 99
 });
100 100
 </script>
101 101
 <?php
102 102
 
103
-$actions = '<a href="exercise_report.php?exerciseId='.intval($_GET['exerciseId']).'&'.api_get_cidreq().'">' .
104
-    Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';
103
+$actions = '<a href="exercise_report.php?exerciseId='.intval($_GET['exerciseId']).'&'.api_get_cidreq().'">'.
104
+    Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>';
105 105
 echo $actions = Display::div($actions, array('class'=> 'actions'));
106 106
 
107 107
 echo Display::grid_html('live_stats');
Please login to merge, or discard this patch.
main/exercise/multiple_answer_combination.class.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
         $html = '<table class="table table-striped table-hover">';
40 40
         $html .= '<thead>';
41 41
         $html .= '<tr>';
42
-        $html .= '<th width="10">' . get_lang('Number') . '</th>';
43
-        $html .= '<th width="10">' . get_lang('True') . '</th>';
44
-        $html .= '<th width="50%">' . get_lang('Comment') . '</th>';
45
-        $html .= '<th width="50%">' . get_lang('Answer') . '</th>';
42
+        $html .= '<th width="10">'.get_lang('Number').'</th>';
43
+        $html .= '<th width="10">'.get_lang('True').'</th>';
44
+        $html .= '<th width="50%">'.get_lang('Comment').'</th>';
45
+        $html .= '<th width="50%">'.get_lang('Answer').'</th>';
46 46
         $html .= '</tr>';
47 47
         $html .= '</thead>';
48 48
         $html .= '<tbody>';
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
             $form->addHtml('<tr>');
75 75
 
76 76
             if (is_object($answer)) {
77
-                $defaults['answer[' . $i . ']'] = $answer->answer[$i];
78
-                $defaults['comment[' . $i . ']'] = $answer->comment[$i];
79
-                $defaults['weighting[' . $i . ']'] = float_format($answer->weighting[$i], 1);
80
-                $defaults['correct[' . $i . ']'] = $answer->correct[$i];
77
+                $defaults['answer['.$i.']'] = $answer->answer[$i];
78
+                $defaults['comment['.$i.']'] = $answer->comment[$i];
79
+                $defaults['weighting['.$i.']'] = float_format($answer->weighting[$i], 1);
80
+                $defaults['correct['.$i.']'] = $answer->correct[$i];
81 81
             } else {
82 82
                 $defaults['answer[1]'] = get_lang('DefaultMultipleAnswer2');
83 83
                 $defaults['comment[1]'] = get_lang('DefaultMultipleComment2');
@@ -93,44 +93,44 @@  discard block
 block discarded – undo
93 93
 
94 94
             $renderer->setElementTemplate(
95 95
                 '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>',
96
-                'correct[' . $i . ']'
96
+                'correct['.$i.']'
97 97
             );
98 98
             $renderer->setElementTemplate(
99 99
                 '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>',
100
-                'counter[' . $i . ']'
100
+                'counter['.$i.']'
101 101
             );
102 102
             $renderer->setElementTemplate(
103 103
                 '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>',
104
-                'answer[' . $i . ']'
104
+                'answer['.$i.']'
105 105
             );
106 106
             $renderer->setElementTemplate(
107 107
                 '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>',
108
-                'comment[' . $i . ']'
108
+                'comment['.$i.']'
109 109
             );
110 110
 
111
-            $answer_number = $form->addElement('text', 'counter[' . $i . ']', null, 'value="' . $i . '"');
111
+            $answer_number = $form->addElement('text', 'counter['.$i.']', null, 'value="'.$i.'"');
112 112
             $answer_number->freeze();
113 113
 
114 114
             $form->addElement('checkbox',
115
-                'correct[' . $i . ']',
115
+                'correct['.$i.']',
116 116
                 null,
117 117
                 null,
118 118
                 'class="checkbox" style="margin-left: 0em;"'
119 119
             );
120
-            $boxes_names[] = 'correct[' . $i . ']';
120
+            $boxes_names[] = 'correct['.$i.']';
121 121
 
122 122
             $form->addElement(
123 123
                 'html_editor',
124
-                'answer[' . $i . ']',
124
+                'answer['.$i.']',
125 125
                 null,
126 126
                 array(),
127 127
                 array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')
128 128
             );
129
-            $form->addRule('answer[' . $i . ']', get_lang('ThisFieldIsRequired'), 'required');
129
+            $form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required');
130 130
 
131 131
             $form->addElement(
132 132
                 'html_editor',
133
-                'comment[' . $i . ']',
133
+                'comment['.$i.']',
134 134
                 null,
135 135
                 array(),
136 136
                 array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100')
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     function return_header($feedback_type = null, $counter = null, $score = null)
227 227
     {
228 228
         $header = parent::return_header($feedback_type, $counter, $score);
229
-        $header .= '<table class="'.$this->question_table_class .'">
229
+        $header .= '<table class="'.$this->question_table_class.'">
230 230
             <tr>
231 231
                 <th>'.get_lang("Choice").'</th>
232 232
                 <th>'. get_lang("ExpectedChoice").'</th>
Please login to merge, or discard this patch.