Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
plugin/buycourses/src/success.php 1 patch
Braces   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,20 +11,20 @@  discard block
 block discarded – undo
11 11
 $plugin = BuyCoursesPlugin::create();
12 12
 $paypalEnabled = $plugin->get('paypal_enable') === 'true';
13 13
 
14
-if (!$paypalEnabled) {
14
+if (!$paypalEnabled) {
15 15
     api_not_allowed(true);
16 16
 }
17 17
 
18 18
 $sale = $plugin->getSale($_SESSION['bc_sale_id']);
19 19
 
20
-if (empty($sale)) {
20
+if (empty($sale)) {
21 21
     api_not_allowed(true);
22 22
 }
23 23
 
24 24
 $buyingCourse = false;
25 25
 $buyingSession = false;
26 26
 
27
-switch ($sale['product_type']) {
27
+switch ($sale['product_type']) {
28 28
     case BuyCoursesPlugin::PRODUCT_TYPE_COURSE:
29 29
         $buyingCourse = true;
30 30
         $course = $plugin->getCourseInfo($sale['product_id']);
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 $form->addButton('confirm', $plugin->get_lang('ConfirmOrder'), 'check', 'success');
55 55
 $form->addButtonCancel($plugin->get_lang('CancelOrder'), 'cancel');
56 56
 
57
-if ($form->validate()) {
57
+if ($form->validate()) {
58 58
     $formValues = $form->getSubmitValues();
59
-    if (isset($formValues['cancel'])) {
59
+    if (isset($formValues['cancel'])) {
60 60
         $plugin->cancelSale($sale['id']);
61 61
         unset($_SESSION['bc_sale_id']);
62 62
         header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     $confirmPayments = ConfirmPayment($sale['price']);
67 67
 
68
-    if ($confirmPayments['ACK'] !== 'Success') {
68
+    if ($confirmPayments['ACK'] !== 'Success') {
69 69
         $erroMessage = vsprintf(
70 70
             $plugin->get_lang('ErrorOccurred'),
71 71
             [$expressCheckout['L_ERRORCODE0'], $confirmPayments['L_LONGMESSAGE0']]
@@ -80,10 +80,10 @@  discard block
 block discarded – undo
80 80
     $transactionId = $confirmPayments['PAYMENTINFO_0_TRANSACTIONID'];
81 81
     $transactionType = $confirmPayments['PAYMENTINFO_0_TRANSACTIONTYPE'];
82 82
 
83
-    switch ($confirmPayments['PAYMENTINFO_0_PAYMENTSTATUS']) {
83
+    switch ($confirmPayments['PAYMENTINFO_0_PAYMENTSTATUS']) {
84 84
         case 'Completed':
85 85
             $saleIsCompleted = $plugin->completeSale($sale['id']);
86
-            if ($saleIsCompleted && $buyingSession) {
86
+            if ($saleIsCompleted && $buyingSession) {
87 87
                 Display::addFlash(
88 88
                     Display::return_message(
89 89
                         sprintf($plugin->get_lang('SubscriptionToCourseXSuccessful'), $session['name']),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 break;
95 95
             }
96 96
 
97
-            if ($saleIsCompleted && $buyingCourse) {
97
+            if ($saleIsCompleted && $buyingCourse) {
98 98
                 Display::addFlash(
99 99
                     Display::return_message(
100 100
                         sprintf($plugin->get_lang('SubscriptionToCourseXSuccessful'), $course['title']),
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             );
111 111
             break;
112 112
         case 'Pending':
113
-            switch ($confirmPayments["PAYMENTINFO_0_PENDINGREASON"]) {
113
+            switch ($confirmPayments["PAYMENTINFO_0_PENDINGREASON"]) {
114 114
                 case 'address':
115 115
                     $purchaseStatus = $plugin->get_lang('PendingReasonByAddress');
116 116
                     break;
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
 
174 174
 $token = isset($_GET['token']) ? $_GET['token'] : null;
175 175
 
176
-if (empty($token)) {
176
+if (empty($token)) {
177 177
     api_not_allowed(true);
178 178
 }
179 179
 
180 180
 $shippingDetails = GetShippingDetails($token);
181 181
 
182
-if ($shippingDetails['ACK'] !== 'Success') {
182
+if ($shippingDetails['ACK'] !== 'Success') {
183 183
     $erroMessage = vsprintf(
184 184
         $plugin->get_lang('ErrorOccurred'),
185 185
         [$expressCheckout['L_ERRORCODE0'], $shippingDetails['L_LONGMESSAGE0']]
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 $templateName = $plugin->get_lang('PaymentMethods');
197 197
 $tpl = new Template($templateName);
198 198
 
199
-if ($buyingCourse) {
199
+if ($buyingCourse) {
200 200
     $tpl->assign('course', $course);
201
-} elseif ($buyingSession) {
201
+} elseif ($buyingSession) {
202 202
     $tpl->assign('session', $session);
203 203
 }
204 204
 
Please login to merge, or discard this patch.
plugin/buycourses/src/service_catalog.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     FormValidator::LAYOUT_INLINE
28 28
 );
29 29
 
30
-if ($form->validate()) {
30
+if ($form->validate()) {
31 31
     $formValues = $form->getSubmitValues();
32 32
     $nameFilter = isset($formValues['name']) ? $formValues['name'] : null;
33 33
     $minFilter = isset($formValues['min']) ? $formValues['min'] : 0;
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $serviceList = $plugin->getCatalogServiceList($nameFilter, $minFilter, $maxFilter, $appliesToFilter);
65 65
 
66 66
 //View
67
-if (api_is_platform_admin()) {
67
+if (api_is_platform_admin()) {
68 68
     $interbreadcrumb[] = [
69 69
         'url' => 'configuration.php',
70 70
         'name' => $plugin->get_lang('AvailableCoursesConfiguration')
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         'url' => 'paymentsetup.php',
74 74
         'name' => $plugin->get_lang('PaymentsConfiguration')
75 75
     ];
76
-} else {
76
+} else {
77 77
     $interbreadcrumb[] = [
78 78
         'url' => '../index.php',
79 79
         'name' => $plugin->get_lang('UserPanel')
Please login to merge, or discard this patch.
plugin/buycourses/src/service_process_confirm.php 1 patch
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 $serviceSaleId = $_SESSION['bc_service_sale_id'];
14 14
 
15
-if (empty($serviceSaleId)) {
15
+if (empty($serviceSaleId)) {
16 16
     api_not_allowed(true);
17 17
 }
18 18
 
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 
21 21
 $userInfo = api_get_user_info($serviceSale['buyer']['id']);
22 22
 
23
-if (empty($serviceSale)) {
23
+if (empty($serviceSale)) {
24 24
     api_not_allowed(true);
25 25
 }
26 26
 
27 27
 $currency = $plugin->getCurrency($serviceSale['currency_id']);
28 28
 $terms = $plugin->getGlobalParameters();
29 29
 
30
-switch ($serviceSale['payment_type']) {
30
+switch ($serviceSale['payment_type']) {
31 31
     case BuyCoursesPlugin::PAYMENT_TYPE_PAYPAL:
32 32
         $paypalParams = $plugin->getPaypalParams();
33 33
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $extra
64 64
         );
65 65
 
66
-        if ($expressCheckout["ACK"] !== 'Success') {
66
+        if ($expressCheckout["ACK"] !== 'Success') {
67 67
             $erroMessage = vsprintf(
68 68
                 $plugin->get_lang('ErrorOccurred'),
69 69
                 [$expressCheckout['L_ERRORCODE0'], $expressCheckout['L_LONGMESSAGE0']]
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
             FormValidator::LAYOUT_INLINE
93 93
         );
94 94
 
95
-        if ($form->validate()) {
95
+        if ($form->validate()) {
96 96
             $formValues = $form->getSubmitValues();
97 97
 
98
-            if (isset($formValues['cancel'])) {
98
+            if (isset($formValues['cancel'])) {
99 99
                 $plugin->cancelServiceSale(intval($serviceSale['id']));
100 100
 
101 101
                 unset($_SESSION['bc_service_sale_id']);
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
             FormValidator::LAYOUT_INLINE
181 181
         );
182 182
 
183
-        if ($form->validate()) {
183
+        if ($form->validate()) {
184 184
             $formValues = $form->getSubmitValues();
185
-            if (isset($formValues['cancel'])) {
185
+            if (isset($formValues['cancel'])) {
186 186
                 $plugin->cancelServiceSale($serviceSale['id']);
187 187
 
188 188
                 unset($_SESSION['bc_service_sale_id']);
Please login to merge, or discard this patch.
main/exercise/exercise.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1113,7 +1113,8 @@  discard block
 block discarded – undo
1113 1113
                 $nbrActiveTests = $nbrActiveTests + 1;
1114 1114
                 $actions .= '      <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=disable&page='.$page.'&file='.$path.'">'.
1115 1115
                     Display::return_icon('visible.png', get_lang('Deactivate'), '', ICON_SIZE_SMALL).'</a>';
1116
-            } else { // else if not active
1116
+            } else {
1117
+// else if not active
1117 1118
                 $actions .= '    <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=enable&page='.$page.'&file='.$path.'">'.
1118 1119
                     Display::return_icon('invisible.png', get_lang('Activate'), '', ICON_SIZE_SMALL).'</a>';
1119 1120
             }
@@ -1219,6 +1220,7 @@  discard block
 block discarded – undo
1219 1220
     echo '</div>';
1220 1221
 }
1221 1222
 
1222
-if ($origin != 'learnpath') { //so we are not in learnpath tool
1223
+if ($origin != 'learnpath') {
1224
+//so we are not in learnpath tool
1223 1225
     Display :: display_footer();
1224 1226
 }
Please login to merge, or discard this patch.
main/mySpace/user_import.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 $interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('MySpace'));
19 19
 $id_session = '';
20 20
 if (isset($_GET['id_session']) && $_GET['id_session'] != '') {
21
- 	$id_session = intval($_GET['id_session']);
22
-	$interbreadcrumb[] = array('url' => 'session.php', 'name' => get_lang('Sessions'));
23
-	$interbreadcrumb[] = array('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course'));
21
+        $id_session = intval($_GET['id_session']);
22
+    $interbreadcrumb[] = array('url' => 'session.php', 'name' => get_lang('Sessions'));
23
+    $interbreadcrumb[] = array('url' => 'course.php?id_session='.$id_session.'', 'name' => get_lang('Course'));
24 24
 }
25 25
 
26 26
 // Set this option to true to enforce strict purification for usenames.
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 Display :: display_header($tool_name);
90 90
 
91 91
 if ($_FILES['import_file']['size'] == 0 && $_POST) {
92
-	echo Display::return_message(get_lang('ThisFieldIsRequired'), 'error');
92
+    echo Display::return_message(get_lang('ThisFieldIsRequired'), 'error');
93 93
 }
94 94
 
95 95
 if (count($errors) != 0) {
Please login to merge, or discard this patch.
main/mySpace/progression.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -33,36 +33,36 @@
 block discarded – undo
33 33
 $result_course = Database::query($sql_course);
34 34
 
35 35
 if (Database::num_rows($result_course) > 0) {
36
-	if (isset($_POST['export'])) {
37
-		$export_result = export_csv($header, $data, 'test.csv'); // TODO: There is no data for exporting yet.
38
-		echo Display::return_message($export_result, 'error');
39
-	}
40
-	echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('TempsFrequentation').'</th><th>'.get_lang('Progression').'</th><th>'.get_lang('MoyenneTest').'</th></tr>';
41
-	$header = array(get_lang('Course', ''), get_lang('TempsFrequentation', ''), get_lang('Progression', ''), get_lang('MoyenneTest', ''));
42
-	while ($a_course = Database::fetch_array($result_course)) {
43
-		// TODO: This query is to be checked, there are no HotPotatoes tests results.
44
-		$sql_moy_test = "SELECT exe_result,exe_weighting
36
+    if (isset($_POST['export'])) {
37
+        $export_result = export_csv($header, $data, 'test.csv'); // TODO: There is no data for exporting yet.
38
+        echo Display::return_message($export_result, 'error');
39
+    }
40
+    echo '<table class="data_table"><tr><th>'.get_lang('Course').'</th><th>'.get_lang('TempsFrequentation').'</th><th>'.get_lang('Progression').'</th><th>'.get_lang('MoyenneTest').'</th></tr>';
41
+    $header = array(get_lang('Course', ''), get_lang('TempsFrequentation', ''), get_lang('Progression', ''), get_lang('MoyenneTest', ''));
42
+    while ($a_course = Database::fetch_array($result_course)) {
43
+        // TODO: This query is to be checked, there are no HotPotatoes tests results.
44
+        $sql_moy_test = "SELECT exe_result,exe_weighting
45 45
 			FROM $tbl_track_exercice
46 46
 			WHERE c_id = ".$a_course['id'];
47
-		$result_moy_test = Database::query($sql_moy_test);
48
-		$result = 0;
49
-		$weighting = 0;
50
-		while ($moy_test = Database::fetch_array($result_moy_test)) {
51
-			$result = $result + $moy_test['exe_result'];
52
-			$weighting = $weighting + $moy_test['exe_weighting'];
53
-		}
54
-		if ($weighting != 0) {
55
-			$moyenne_test = round(($result * 100) / $weighting);
56
-		} else {
57
-			$moyenne_test = null;
58
-		}
59
-		echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>';
60
-	}
61
-	echo '</table>';
62
-	echo "<br /><br />";
63
-	echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>";
47
+        $result_moy_test = Database::query($sql_moy_test);
48
+        $result = 0;
49
+        $weighting = 0;
50
+        while ($moy_test = Database::fetch_array($result_moy_test)) {
51
+            $result = $result + $moy_test['exe_result'];
52
+            $weighting = $weighting + $moy_test['exe_weighting'];
53
+        }
54
+        if ($weighting != 0) {
55
+            $moyenne_test = round(($result * 100) / $weighting);
56
+        } else {
57
+            $moyenne_test = null;
58
+        }
59
+        echo '<tr><td>'.$a_course['title'].'</td><td> </td><td> </td><td>'.(is_null($moyenne_test) ? '' : $moyenne_test.'%').'</td> </tr>';
60
+    }
61
+    echo '</table>';
62
+    echo "<br /><br />";
63
+    echo "<form method='post'><input type='submit' name='export' value='".get_lang('ExportExcel')."'/><form>";
64 64
 } else {
65
-	echo get_lang('NoCourse');
65
+    echo get_lang('NoCourse');
66 66
 }
67 67
 
68 68
 Display :: display_footer();
Please login to merge, or discard this patch.
main/search/index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 $this_section = SECTION_COURSES;
11 11
 
12 12
 if (extension_loaded('xapian')) {
13
-	require '../lp/lp_list_search.php';
13
+    require '../lp/lp_list_search.php';
14 14
 } else {
15 15
     Display::display_header(get_lang('Search'));
16 16
     echo Display::return_message(get_lang('SearchXapianModuleNotInstalled'), 'error');
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 4 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1397,11 +1397,11 @@  discard block
 block discarded – undo
1397 1397
             }
1398 1398
 
1399 1399
             $sql .= ' FROM '.Database::get_main_table(TABLE_MAIN_USER).' as user '
1400
-                  . ' LEFT JOIN '.Database::get_main_table(TABLE_MAIN_COURSE_USER).' as course_rel_user
1400
+                    . ' LEFT JOIN '.Database::get_main_table(TABLE_MAIN_COURSE_USER).' as course_rel_user
1401 1401
                       ON 
1402 1402
                         user.id = course_rel_user.user_id AND
1403 1403
                         course_rel_user.relation_type <> ' . COURSE_RELATION_TYPE_RRHH.'  '
1404
-                  . " INNER JOIN $course_table course ON course_rel_user.c_id = course.id ";
1404
+                    . " INNER JOIN $course_table course ON course_rel_user.c_id = course.id ";
1405 1405
 
1406 1406
             if (!empty($course_code)) {
1407 1407
                 $sql .= ' AND course_rel_user.c_id = "'.$courseId.'"';
@@ -1745,7 +1745,7 @@  discard block
 block discarded – undo
1745 1745
 
1746 1746
         // We get the coach for the given course in a given session.
1747 1747
         $sql = 'SELECT user_id FROM '.Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER).
1748
-               ' WHERE session_id ="'.$session_id.'" AND c_id="'.$courseId.'" AND status = 2';
1748
+                ' WHERE session_id ="'.$session_id.'" AND c_id="'.$courseId.'" AND status = 2';
1749 1749
         $rs = Database::query($sql);
1750 1750
         while ($user = Database::fetch_array($rs)) {
1751 1751
             $userInfo = api_get_user_info($user['user_id']);
@@ -3561,13 +3561,13 @@  discard block
 block discarded – undo
3561 3561
                     $params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course['code'];
3562 3562
                     if ($load_dirs) {
3563 3563
                         $params['document'] = '<a id="document_preview_'.$courseId.'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
3564
-                           . Display::returnFontAwesomeIcon('folder-open').'</a>';
3564
+                            . Display::returnFontAwesomeIcon('folder-open').'</a>';
3565 3565
                         $params['document'] .= Display::div('', ['id' => 'document_result_'.$courseId.'_0', 'class' => 'document_preview_container']);
3566 3566
                     }
3567 3567
                 } else {
3568 3568
                     if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED && $load_dirs) {
3569 3569
                         $params['document'] = '<a id="document_preview_'.$courseId.'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
3570
-                           . Display::returnFontAwesomeIcon('folder-open').'</a>';
3570
+                            . Display::returnFontAwesomeIcon('folder-open').'</a>';
3571 3571
                         $params['document'] .= Display::div('', ['id' => 'document_result_'.$courseId.'_0', 'class' => 'document_preview_container']);
3572 3572
                     }
3573 3573
                 }
@@ -3761,7 +3761,7 @@  discard block
 block discarded – undo
3761 3761
                 $params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course_info['code'];
3762 3762
                 if ($load_dirs) {
3763 3763
                     $params['document'] = '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
3764
-                               . Display::returnFontAwesomeIcon('folder-open').'</a>';
3764
+                                . Display::returnFontAwesomeIcon('folder-open').'</a>';
3765 3765
                     $params['document'] .= Display::div('', array('id' => 'document_result_'.$course_info['real_id'].'_0', 'class' => 'document_preview_container'));
3766 3766
                 }
3767 3767
             }
@@ -3904,7 +3904,7 @@  discard block
 block discarded – undo
3904 3904
                 $params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cidReq='.$course_info['code'];
3905 3905
                 if ($load_dirs) {
3906 3906
                     $params['document'] = '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
3907
-                               . Display::returnFontAwesomeIcon('folder-open').'</a>';
3907
+                                . Display::returnFontAwesomeIcon('folder-open').'</a>';
3908 3908
                     $params['document'] .= Display::div('', array('id' => 'document_result_'.$course_info['real_id'].'_0', 'class' => 'document_preview_container'));
3909 3909
                 }
3910 3910
             }
@@ -4852,7 +4852,7 @@  discard block
 block discarded – undo
4852 4852
                     get_lang('Subscribe').' '.
4853 4853
                     Display::returnFontAwesomeIcon('sign-in'),
4854 4854
                     api_get_path(WEB_COURSE_PATH).$course_info['path'].
4855
-                     '/index.php?action=subscribe&sec_token='.$stok,
4855
+                        '/index.php?action=subscribe&sec_token='.$stok,
4856 4856
                     array(
4857 4857
                         'class' => 'btn btn-success btn-sm',
4858 4858
                         'title' => get_lang('Subscribe'),
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         $courseId = intval($courseId);
303 303
         $isTutor = intval($isTutor);
304 304
 
305
-        $sql = "UPDATE $table SET is_tutor = '".$isTutor."'
305
+        $sql = "update $table SET is_tutor = '".$isTutor."'
306 306
 			    WHERE
307 307
 				    user_id = '".$userId."' AND
308 308
 				    c_id = '".$courseId."'";
@@ -2333,7 +2333,7 @@  discard block
 block discarded – undo
2333 2333
 
2334 2334
             // Update ticket
2335 2335
             $table = Database::get_main_table(TABLE_TICKET_TICKET);
2336
-            $sql = "UPDATE $table SET course_id = NULL WHERE course_id = $courseId";
2336
+            $sql = "update $table SET course_id = NULL WHERE course_id = $courseId";
2337 2337
             Database::query($sql);
2338 2338
 
2339 2339
             // Class
@@ -2345,7 +2345,7 @@  discard block
 block discarded – undo
2345 2345
             // Skills
2346 2346
             $table = Database::get_main_table(TABLE_MAIN_SKILL_REL_USER);
2347 2347
             $argumentation = Database::escape_string(sprintf(get_lang('SkillFromCourseXDeletedSinceThen'), $course['code']));
2348
-            $sql = "UPDATE $table SET course_id = NULL, session_id = NULL, argumentation = '$argumentation' WHERE course_id = $courseId";
2348
+            $sql = "update $table SET course_id = NULL, session_id = NULL, argumentation = '$argumentation' WHERE course_id = $courseId";
2349 2349
             Database::query($sql);
2350 2350
 
2351 2351
             // Delete the course from the database
@@ -2954,7 +2954,7 @@  discard block
 block discarded – undo
2954 2954
     {
2955 2955
         $id = (int) $id;
2956 2956
         $table = Database::get_main_table(TABLE_MAIN_COURSE);
2957
-        $sql = "UPDATE $table SET $name = '".Database::escape_string($value)."'
2957
+        $sql = "update $table SET $name = '".Database::escape_string($value)."'
2958 2958
                 WHERE id = '$id'";
2959 2959
 
2960 2960
         return Database::query($sql);
@@ -2972,7 +2972,7 @@  discard block
 block discarded – undo
2972 2972
     {
2973 2973
         $id = (int) $id;
2974 2974
         $table = Database::get_main_table(TABLE_MAIN_COURSE);
2975
-        $sql = "UPDATE $table SET ";
2975
+        $sql = "update $table SET ";
2976 2976
         $i = 0;
2977 2977
         foreach ($attributes as $name => $value) {
2978 2978
             if ($value != '') {
@@ -4434,12 +4434,12 @@  discard block
 block discarded – undo
4434 4434
 
4435 4435
         if (empty($session_id)) {
4436 4436
             $table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
4437
-            $sql = "UPDATE $table SET legal_agreement = '1'
4437
+            $sql = "update $table SET legal_agreement = '1'
4438 4438
                     WHERE user_id = $user_id AND c_id  = $courseId ";
4439 4439
             Database::query($sql);
4440 4440
         } else {
4441 4441
             $table = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
4442
-            $sql = "UPDATE  $table SET legal_agreement = '1'
4442
+            $sql = "update  $table SET legal_agreement = '1'
4443 4443
                     WHERE user_id = $user_id AND c_id = $courseId AND session_id = $session_id";
4444 4444
             Database::query($sql);
4445 4445
         }
Please login to merge, or discard this 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.
Doc Comments   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
      * @param  string $courseCode the course code
785 785
      * @param  int $visible (optional) The course visibility in the catalogue to the user (1=visible, 0=invisible)
786 786
      *
787
-     * @return boolean true if added succesfully, false otherwise.
787
+     * @return boolean|string true if added succesfully, false otherwise.
788 788
      */
789 789
     public static function addUserVisibilityToCourseInCatalogue(
790 790
         $userId,
@@ -1107,6 +1107,7 @@  discard block
 block discarded – undo
1107 1107
      * @param  int $user_id
1108 1108
      * @param  string $course_code , if this parameter is null, it'll check for all courses
1109 1109
      * @param  bool $in_a_session True for checking inside sessions too, by default is not checked
1110
+     * @param integer $session_id
1110 1111
      * @return bool   $session_id true if the user is registered in the course, false otherwise
1111 1112
      */
1112 1113
     public static function is_user_subscribed_in_course(
@@ -4657,6 +4658,7 @@  discard block
 block discarded – undo
4657 4658
      * @param int   session id
4658 4659
      * @param id    url id
4659 4660
      * @param integer $session_id
4661
+     * @param integer $url_id
4660 4662
      * @return array
4661 4663
      **/
4662 4664
     public static function update_course_ranking(
@@ -5918,7 +5920,6 @@  discard block
 block discarded – undo
5918 5920
     /**
5919 5921
      * Shows the form for sending a message to a specific group or user.
5920 5922
      * @param FormValidator $form
5921
-     * @param int $group_id id
5922 5923
      * @param array $to
5923 5924
      *
5924 5925
      * @return HTML_QuickForm_element
Please login to merge, or discard this patch.
src/Chamilo/PageBundle/Entity/User.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
     /**
829 829
      * Get status
830 830
      *
831
-     * @return boolean
831
+     * @return integer
832 832
      */
833 833
     public function getStatus()
834 834
     {
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
     /**
898 898
      * Get pictureUri
899 899
      *
900
-     * @return Media
900
+     * @return string
901 901
      */
902 902
     public function getPictureUri()
903 903
     {
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
     /**
1129 1129
      * Get active
1130 1130
      *
1131
-     * @return boolean
1131
+     * @return integer
1132 1132
      */
1133 1133
     public function getActive()
1134 1134
     {
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
     }
1206 1206
 
1207 1207
     /**
1208
-     * @return Media
1208
+     * @return string
1209 1209
      */
1210 1210
     public function getAvatar()
1211 1211
     {
@@ -1972,7 +1972,7 @@  discard block
 block discarded – undo
1972 1972
     /**
1973 1973
      * Returns the user roles
1974 1974
      *
1975
-     * @return array The roles
1975
+     * @return string[] The roles
1976 1976
      */
1977 1977
     public function getRoles()
1978 1978
     {
Please login to merge, or discard this patch.