Completed
Push — 1.10.x ( 3658ba...81c9ff )
by
unknown
91:59 queued 46:43
created
plugin/buycourses/src/panel.ajax.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 
38 38
         $userInfo = api_get_user_info($sale['user_id']);
39 39
 
40
-        $html = '<h2>' . $sale['product_name'] .'</h2>';
40
+        $html = '<h2>'.$sale['product_name'].'</h2>';
41 41
         $html .= '<div class="row">';
42 42
         $html .= '<div class="col-sm-6 col-md-6">';
43 43
         $html .= '<ul>';
44
-        $html .= '<li><b>'. $plugin->get_lang('OrderPrice') . ':</b> '. $sale['price'] . '</li>';
45
-        $html .= '<li><b>'. $plugin->get_lang('CurrencyType') . ':</b> '. $currency['iso_code'] . '</li>';
46
-        $html .= '<li><b>'. $plugin->get_lang('ProductType') . ':</b> '. $productType . '</li>';
47
-        $html .= '<li><b>'. $plugin->get_lang('OrderDate') . ':</b> '. api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H) . '</li>';
48
-        $html .= '<li><b>'. $plugin->get_lang('Buyer') . ':</b> '. $userInfo['complete_name'] . '</li>';
49
-        $html .= '<li><b>'. $plugin->get_lang('PaymentMethods') . ':</b> '. $paymentType . '</li>';
44
+        $html .= '<li><b>'.$plugin->get_lang('OrderPrice').':</b> '.$sale['price'].'</li>';
45
+        $html .= '<li><b>'.$plugin->get_lang('CurrencyType').':</b> '.$currency['iso_code'].'</li>';
46
+        $html .= '<li><b>'.$plugin->get_lang('ProductType').':</b> '.$productType.'</li>';
47
+        $html .= '<li><b>'.$plugin->get_lang('OrderDate').':</b> '.api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H).'</li>';
48
+        $html .= '<li><b>'.$plugin->get_lang('Buyer').':</b> '.$userInfo['complete_name'].'</li>';
49
+        $html .= '<li><b>'.$plugin->get_lang('PaymentMethods').':</b> '.$paymentType.'</li>';
50 50
         $html .= '</ul>';
51 51
         $html .= '</div>';
52 52
         $html .= '<div class="col-sm-6 col-md-6">';
53
-        $html .= '<img class="thumbnail" src="'. $productImage .'" >';
53
+        $html .= '<img class="thumbnail" src="'.$productImage.'" >';
54 54
         $html .= '</div>';
55 55
         $html .= '</div>';
56 56
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         $html = '<div class="row">'
96 96
         . '<p>'
97 97
             . '<ul>'
98
-                . '<li>'. get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin") .' <b>'. $stats['completed_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['completed_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
99
-                . '<li>'. get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin") .' <b>'. $stats['pending_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['pending_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
100
-                . '<li>'. get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin") .' <b>'. $stats['canceled_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['canceled_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
98
+                . '<li>'.get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin").' <b>'.$stats['completed_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['completed_total_amount'].' '.$currency['iso_code'].'</b></li>'
99
+                . '<li>'.get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin").' <b>'.$stats['pending_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['pending_total_amount'].' '.$currency['iso_code'].'</b></li>'
100
+                . '<li>'.get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin").' <b>'.$stats['canceled_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['canceled_total_amount'].' '.$currency['iso_code'].'</b></li>'
101 101
             . '</ul>'
102 102
         . '</p>';
103 103
         $html .= '</div>';
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 
138 138
         $isoCode = $currentCurrency['iso_code'];
139 139
 
140
-        $html .= '<p>'. get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin") .'</p>';
140
+        $html .= '<p>'.get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin").'</p>';
141 141
         $html .= ''
142 142
         . '<p>'
143 143
             . '<ul>'
144
-                . '<li>'. get_plugin_lang("TotalAcounts", "BuyCoursesPlugin") .' <b>'. $totalAccounts .'</b></li>'
145
-                . '<li>'. get_plugin_lang("TotalPayout", "BuyCoursesPlugin") .' <b>'. $isoCode .' '. $totalPayout .'</b></li>'
144
+                . '<li>'.get_plugin_lang("TotalAcounts", "BuyCoursesPlugin").' <b>'.$totalAccounts.'</b></li>'
145
+                . '<li>'.get_plugin_lang("TotalPayout", "BuyCoursesPlugin").' <b>'.$isoCode.' '.$totalPayout.'</b></li>'
146 146
             . '</ul>'
147 147
         . '</p>';
148
-        $html .= '<p>'. get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin") .'</p>';
148
+        $html .= '<p>'.get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin").'</p>';
149 149
         $html .= '<br /><br />';
150 150
         $html .= '<div id="spinner" class="text-center"></div>';
151 151
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         } else {
201 201
 
202
-            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'. $result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
202
+            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'.$result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
203 203
 
204 204
         }
205 205
 
Please login to merge, or discard this patch.
main/inc/lib/grade_model.lib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function __construct()
17 17
     {
18
-        $this->table =  Database::get_main_table(TABLE_GRADE_MODEL);
18
+        $this->table = Database::get_main_table(TABLE_GRADE_MODEL);
19 19
     }
20 20
 
21 21
     /**
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     {
55 55
 		// action links
56 56
 		echo '<div class="actions" style="margin-bottom:20px">';
57
-        echo '<a href="grade_models.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
58
-		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png',get_lang('Add'),'','32').'</a>';
57
+        echo '<a href="grade_models.php">'.Display::return_icon('back.png', get_lang('Back'), '', '32').'</a>';
58
+		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'), '', '32').'</a>';
59 59
 		echo '</div>';
60 60
         echo Display::grid_html('grade_model');
61 61
 	}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         if ($action == 'edit') {
112 112
             if (!empty($components)) {
113
-                $nr_items = count($components) -1;
113
+                $nr_items = count($components) - 1;
114 114
             }
115 115
         }
116 116
 
@@ -123,12 +123,12 @@  discard block
 block discarded – undo
123 123
         for ($i = 0; $i <= $max; $i++) {
124 124
             $counter = $i;
125 125
             $form->addElement('text', 'components['.$i.'][percentage]', null);
126
-            $form->addElement('text', 'components['.$i.'][acronym]',    null);
127
-            $form->addElement('text', 'components['.$i.'][title]',      null);
128
-            $form->addElement('hidden', 'components['.$i.'][id]',       null);
126
+            $form->addElement('text', 'components['.$i.'][acronym]', null);
127
+            $form->addElement('text', 'components['.$i.'][title]', null);
128
+            $form->addElement('hidden', 'components['.$i.'][id]', null);
129 129
 
130 130
              $template_percentage =
131
-            '<div id=' . $i . ' style="display: '.(($i<=$nr_items)?'inline':'none').';" class="control-group">
131
+            '<div id='.$i.' style="display: '.(($i <= $nr_items) ? 'inline' : 'none').';" class="control-group">
132 132
                 <p>
133 133
                 <label class="control-label">{label}</label>
134 134
                 <div class="controls">
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 
142 142
             $template_title =
143 143
             '&nbsp{element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error -->
144
-             <a href="javascript:plusItem(' . ($counter+1) . ')">
145
-                <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="'.Display::return_icon('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'">
144
+             <a href="javascript:plusItem(' . ($counter + 1).')">
145
+                <img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="plus-'.($counter + 1).'" src="'.Display::return_icon('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'">
146 146
             </a>
147
-            <a href="javascript:minItem(' . ($counter) . ')">
148
-                <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="min-' . $counter . '" src="'.Display::return_icon('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'">
147
+            <a href="javascript:minItem(' . ($counter).')">
148
+                <img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="min-'.$counter.'" src="'.Display::return_icon('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'">
149 149
             </a>
150 150
             </div></p></div>';
151 151
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
 	public function __construct()
294 294
     {
295
-        $this->table =  Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
295
+        $this->table = Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
296 296
 	}
297 297
 
298 298
     public function save($params, $show_query = false)
Please login to merge, or discard this patch.
main/gradebook/lib/fe/scoredisplayform.class.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -14,28 +14,28 @@  discard block
 block discarded – undo
14 14
 	 * @param $form_name
15 15
 	 * @param null $action
16 16
 	 */
17
-	public function ScoreDisplayForm($form_name, $action= null)
17
+	public function ScoreDisplayForm($form_name, $action = null)
18 18
 	{
19 19
 		parent :: __construct($form_name, 'post', $action);
20 20
 		$displayscore = ScoreDisplay :: instance();
21 21
 		$customdisplays = $displayscore->get_custom_score_display_settings();
22 22
 
23
-		$nr_items = (count($customdisplays)!='0') ? count($customdisplays) : '1';
24
-		$this->setDefaults(array (
23
+		$nr_items = (count($customdisplays) != '0') ? count($customdisplays) : '1';
24
+		$this->setDefaults(array(
25 25
             'scorecolpercent' => $displayscore->get_color_split_value()
26 26
 		));
27 27
 
28 28
 		$this->addElement('hidden', 'maxvalue', '100');
29 29
 		$this->addElement('hidden', 'minvalue', '0');
30
-		$counter= 1;
30
+		$counter = 1;
31 31
 
32 32
 		//setting the default values
33 33
 
34
-		if(is_array($customdisplays)) {
34
+		if (is_array($customdisplays)) {
35 35
 			foreach ($customdisplays as $customdisplay) {
36
-				$this->setDefaults(array (
37
-					'endscore[' . $counter . ']' => $customdisplay['score'],
38
-					'displaytext[' . $counter . ']' => $customdisplay['display']
36
+				$this->setDefaults(array(
37
+					'endscore['.$counter.']' => $customdisplay['score'],
38
+					'displaytext['.$counter.']' => $customdisplay['display']
39 39
 				));
40 40
 				$counter++;
41 41
 			}
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		$this->addElement('header', get_lang('ScoreEdit'));
47 47
 
48 48
         if ($displayscore->is_coloring_enabled()) {
49
-            $this->addElement('html', '<b>' . get_lang('ScoreColor') . '</b>');
49
+            $this->addElement('html', '<b>'.get_lang('ScoreColor').'</b>');
50 50
             $this->addElement('text', 'scorecolpercent', array(get_lang('Below'), get_lang('WillColorRed'), '%'), array(
51 51
                 'size' => 5,
52 52
                 'maxlength' => 5,
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
             }
59 59
 
60 60
             $this->addRule('scorecolpercent', get_lang('OnlyNumbers'), 'numeric');
61
-            $this->addRule(array('scorecolpercent','maxvalue'), get_lang('Over100'), 'compare', '<=');
62
-            $this->addRule(array('scorecolpercent','minvalue'), get_lang('UnderMin'), 'compare', '>');
61
+            $this->addRule(array('scorecolpercent', 'maxvalue'), get_lang('Over100'), 'compare', '<=');
62
+            $this->addRule(array('scorecolpercent', 'minvalue'), get_lang('UnderMin'), 'compare', '>');
63 63
         }
64 64
 
65 65
 		//Settings for the scoring system
66 66
 
67 67
 		if ($displayscore->is_custom()) {
68
-            $this->addElement('html', '<br /><b>' . get_lang('ScoringSystem') . '</b>');
68
+            $this->addElement('html', '<br /><b>'.get_lang('ScoringSystem').'</b>');
69 69
 			$this->addElement('static', null, null, get_lang('ScoreInfo'));
70 70
 			$this->setDefaults(array(
71 71
 				'beginscore' => '0'
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
 				'input-size' => 2
78 78
 			));
79 79
 
80
-			for ($counter= 1; $counter <= 20; $counter++) {
81
-				$renderer =& $this->defaultRenderer();
80
+			for ($counter = 1; $counter <= 20; $counter++) {
81
+				$renderer = & $this->defaultRenderer();
82 82
 				$elementTemplateTwoLabel =
83
-				'<div id=' . $counter . ' style="display: '.(($counter<=$nr_items)?'inline':'none').';">
83
+				'<div id='.$counter.' style="display: '.(($counter <= $nr_items) ? 'inline' : 'none').';">
84 84
 
85 85
 				<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->
86 86
 
@@ -105,39 +105,39 @@  discard block
 block discarded – undo
105 105
 
106 106
 				';
107 107
 
108
-				$elementTemplateTwoLabel2 ='
108
+				$elementTemplateTwoLabel2 = '
109 109
 				<div class="col-sm-2">
110 110
 					<!-- BEGIN error --><span class="form_error">{error}</span>
111 111
 					<!-- END error -->
112 112
 					{element}
113 113
 				</div>
114 114
 				<div class="col-sm-1">
115
-                    <a href="javascript:plusItem(' . ($counter+1) . ')">
116
-                    <img style="display: '.(($counter>=$nr_items)?'inline':'none').';" id="plus-' . ($counter+1) . '" src="'.Display::returnIconPath('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></a>
117
-        			<a href="javascript:minItem(' . ($counter) . ')">
118
-        			<img style="display: '.(($counter>=$nr_items && $counter!=1)?'inline':'none').';" id="min-' . $counter . '" src="'.Display::returnIconPath('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></a>
115
+                    <a href="javascript:plusItem(' . ($counter + 1).')">
116
+                    <img style="display: '.(($counter >= $nr_items) ? 'inline' : 'none').';" id="plus-'.($counter + 1).'" src="'.Display::returnIconPath('add.png').'" alt="'.get_lang('Add').'" title="'.get_lang('Add').'"></a>
117
+        			<a href="javascript:minItem(' . ($counter).')">
118
+        			<img style="display: '.(($counter >= $nr_items && $counter != 1) ? 'inline' : 'none').';" id="min-'.$counter.'" src="'.Display::returnIconPath('delete.png').'" alt="'.get_lang('Delete').'" title="'.get_lang('Delete').'"></a>
119 119
 				</div>
120 120
 				</div>
121 121
 				</div>';
122 122
 
123 123
 				$scorebetw = array();
124
-				$this->addElement('text', 'endscore[' . $counter . ']', null, array (
124
+				$this->addElement('text', 'endscore['.$counter.']', null, array(
125 125
 					'size' => 5,
126 126
 					'maxlength' => 5,
127 127
 					'id' => 'txta-'.$counter,
128 128
 					'input-size' => 2
129 129
 				));
130 130
 
131
-				$this->addElement('text', 'displaytext[' . $counter . ']', null,array (
131
+				$this->addElement('text', 'displaytext['.$counter.']', null, array(
132 132
 					'size' => 40,
133 133
 					'maxlength' => 40,
134 134
 					'id' => 'txtb-'.$counter
135 135
 				));
136
-				$renderer->setElementTemplate($elementTemplateTwoLabel, 'endscore[' . $counter . ']');
137
-				$renderer->setElementTemplate($elementTemplateTwoLabel2, 'displaytext[' . $counter . ']');
138
-				$this->addRule('endscore[' . $counter . ']', get_lang('OnlyNumbers'), 'numeric');
139
-				$this->addRule(array ('endscore[' . $counter . ']', 'maxvalue'), get_lang('Over100'), 'compare', '<=');
140
-				$this->addRule(array ('endscore[' . $counter . ']', 'minvalue'), get_lang('UnderMin'), 'compare', '>');
136
+				$renderer->setElementTemplate($elementTemplateTwoLabel, 'endscore['.$counter.']');
137
+				$renderer->setElementTemplate($elementTemplateTwoLabel2, 'displaytext['.$counter.']');
138
+				$this->addRule('endscore['.$counter.']', get_lang('OnlyNumbers'), 'numeric');
139
+				$this->addRule(array('endscore['.$counter.']', 'maxvalue'), get_lang('Over100'), 'compare', '<=');
140
+				$this->addRule(array('endscore['.$counter.']', 'minvalue'), get_lang('UnderMin'), 'compare', '>');
141 141
 			}
142 142
 		}
143 143
 
Please login to merge, or discard this patch.
plugin/buycourses/src/buycourses.ajax.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 
38 38
         $userInfo = api_get_user_info($sale['user_id']);
39 39
 
40
-        $html = '<h2>' . $sale['product_name'] .'</h2>';
40
+        $html = '<h2>'.$sale['product_name'].'</h2>';
41 41
         $html .= '<div class="row">';
42 42
         $html .= '<div class="col-sm-6 col-md-6">';
43 43
         $html .= '<ul>';
44
-        $html .= '<li><b>'. $plugin->get_lang('OrderPrice') . ':</b> '. $sale['price'] . '</li>';
45
-        $html .= '<li><b>'. $plugin->get_lang('CurrencyType') . ':</b> '. $currency['iso_code'] . '</li>';
46
-        $html .= '<li><b>'. $plugin->get_lang('ProductType') . ':</b> '. $productType . '</li>';
47
-        $html .= '<li><b>'. $plugin->get_lang('OrderDate') . ':</b> '. api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H) . '</li>';
48
-        $html .= '<li><b>'. $plugin->get_lang('Buyer') . ':</b> '. $userInfo['complete_name'] . '</li>';
49
-        $html .= '<li><b>'. $plugin->get_lang('PaymentMethods') . ':</b> '. $paymentType . '</li>';
44
+        $html .= '<li><b>'.$plugin->get_lang('OrderPrice').':</b> '.$sale['price'].'</li>';
45
+        $html .= '<li><b>'.$plugin->get_lang('CurrencyType').':</b> '.$currency['iso_code'].'</li>';
46
+        $html .= '<li><b>'.$plugin->get_lang('ProductType').':</b> '.$productType.'</li>';
47
+        $html .= '<li><b>'.$plugin->get_lang('OrderDate').':</b> '.api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H).'</li>';
48
+        $html .= '<li><b>'.$plugin->get_lang('Buyer').':</b> '.$userInfo['complete_name'].'</li>';
49
+        $html .= '<li><b>'.$plugin->get_lang('PaymentMethods').':</b> '.$paymentType.'</li>';
50 50
         $html .= '</ul>';
51 51
         $html .= '</div>';
52 52
         $html .= '<div class="col-sm-6 col-md-6">';
53
-        $html .= '<img class="thumbnail" src="'. $productImage .'" >';
53
+        $html .= '<img class="thumbnail" src="'.$productImage.'" >';
54 54
         $html .= '</div>';
55 55
         $html .= '</div>';
56 56
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         $html = '<div class="row">'
96 96
         . '<p>'
97 97
             . '<ul>'
98
-                . '<li>'. get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin") .' <b>'. $stats['completed_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['completed_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
99
-                . '<li>'. get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin") .' <b>'. $stats['pending_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['pending_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
100
-                . '<li>'. get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin") .' <b>'. $stats['canceled_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['canceled_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
98
+                . '<li>'.get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin").' <b>'.$stats['completed_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['completed_total_amount'].' '.$currency['iso_code'].'</b></li>'
99
+                . '<li>'.get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin").' <b>'.$stats['pending_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['pending_total_amount'].' '.$currency['iso_code'].'</b></li>'
100
+                . '<li>'.get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin").' <b>'.$stats['canceled_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['canceled_total_amount'].' '.$currency['iso_code'].'</b></li>'
101 101
             . '</ul>'
102 102
         . '</p>';
103 103
         $html .= '</div>';
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 
138 138
         $isoCode = $currentCurrency['iso_code'];
139 139
 
140
-        $html .= '<p>'. get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin") .'</p>';
140
+        $html .= '<p>'.get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin").'</p>';
141 141
         $html .= ''
142 142
         . '<p>'
143 143
             . '<ul>'
144
-                . '<li>'. get_plugin_lang("TotalAcounts", "BuyCoursesPlugin") .' <b>'. $totalAccounts .'</b></li>'
145
-                . '<li>'. get_plugin_lang("TotalPayout", "BuyCoursesPlugin") .' <b>'. $isoCode .' '. $totalPayout .'</b></li>'
144
+                . '<li>'.get_plugin_lang("TotalAcounts", "BuyCoursesPlugin").' <b>'.$totalAccounts.'</b></li>'
145
+                . '<li>'.get_plugin_lang("TotalPayout", "BuyCoursesPlugin").' <b>'.$isoCode.' '.$totalPayout.'</b></li>'
146 146
             . '</ul>'
147 147
         . '</p>';
148
-        $html .= '<p>'. get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin") .'</p>';
148
+        $html .= '<p>'.get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin").'</p>';
149 149
         $html .= '<br /><br />';
150 150
         $html .= '<div id="spinner" class="text-center"></div>';
151 151
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         } else {
201 201
 
202
-            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'. $result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
202
+            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'.$result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
203 203
 
204 204
         }
205 205
 
Please login to merge, or discard this patch.
main/inc/lib/search/tool_processors/quiz_processor.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 /**
9 9
  * Code
10 10
  */
11
-include_once dirname(__FILE__) . '/../../../global.inc.php';
12
-require_once dirname(__FILE__) . '/search_processor.class.php';
11
+include_once dirname(__FILE__).'/../../../global.inc.php';
12
+require_once dirname(__FILE__).'/search_processor.class.php';
13 13
 
14 14
 /**
15 15
  * Process exercises before pass it to search listing scripts
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     $visibility = api_get_item_visibility(api_get_course_info($courseid), TOOL_QUIZ, $exercise_id);
71 71
                     if ($visibility) {
72 72
                         list($thumbnail, $image, $name, $author) = $this->get_information($courseid, $exercise_id);
73
-                        $url = api_get_path(WEB_PATH) . 'main/exercice/exercise_submit.php?cidReq=%s&exerciseId=%s';
73
+                        $url = api_get_path(WEB_PATH).'main/exercice/exercise_submit.php?cidReq=%s&exerciseId=%s';
74 74
                         $url = sprintf($url, $courseid, $exercise_id);
75 75
                         $result = array(
76 76
                             'toolid' => TOOL_QUIZ,
Please login to merge, or discard this patch.
plugin/ticket/src/ticket.class.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public static function get_all_tickets_status()
43 43
     {
44 44
         $table_support_status = Database::get_main_table(TABLE_TICKET_STATUS);
45
-        $sql = "SELECT * FROM " . $table_support_status;
45
+        $sql = "SELECT * FROM ".$table_support_status;
46 46
         $result = Database::query($sql);
47 47
         $types = array();
48 48
         while ($row = Database::fetch_assoc($result)) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
 
159 159
         if ($ticket_id != 0) {
160
-            $ticket_code = "A" . str_pad(
160
+            $ticket_code = "A".str_pad(
161 161
                 (int) $ticket_id, 11, "0", STR_PAD_LEFT
162 162
             );
163 163
             $sql_update_code = "UPDATE $table_support_tickets
@@ -175,24 +175,24 @@  discard block
 block discarded – undo
175 175
                     $user = api_get_user_info($request_user);
176 176
                     $helpDeskMessage = '<table>
177 177
                                             <tr>
178
-                                                <td width="100px"><b>' . get_lang('User') . '</b></td>
179
-                                                <td width="400px">' . $user['firstname']. ' ' . $user['lastname'] . '</td>
178
+                                                <td width="100px"><b>' . get_lang('User').'</b></td>
179
+                                                <td width="400px">' . $user['firstname'].' '.$user['lastname'].'</td>
180 180
                                             </tr>
181 181
                                             <tr>
182
-                                                <td width="100px"><b>' . get_lang('Username') . '</b></td>
183
-                                                <td width="400px">' . $user['username'] . '</td>
182
+                                                <td width="100px"><b>' . get_lang('Username').'</b></td>
183
+                                                <td width="400px">' . $user['username'].'</td>
184 184
                                             </tr>
185 185
                                             <tr>
186
-                                                <td width="100px"><b>' . get_lang('Date') . '</b></td>
187
-                                                <td width="400px">' . api_convert_and_format_date($now, DATE_TIME_FORMAT_LONG) . '</td>
186
+                                                <td width="100px"><b>' . get_lang('Date').'</b></td>
187
+                                                <td width="400px">' . api_convert_and_format_date($now, DATE_TIME_FORMAT_LONG).'</td>
188 188
                                             </tr>
189 189
                                             <tr>
190
-                                                <td width="100px"><b>' . get_lang('Topic') . '</b></td>
191
-                                                <td width="400px">' . $subject . '</td>
190
+                                                <td width="100px"><b>' . get_lang('Topic').'</b></td>
191
+                                                <td width="400px">' . $subject.'</td>
192 192
                                             </tr>
193 193
                                             <tr>
194
-                                                <td width="100px"><b>' . get_lang('Description') . '</b></td>
195
-                                                <td width="400px">' . $content . '</td>
194
+                                                <td width="100px"><b>' . get_lang('Description').'</b></td>
195
+                                                <td width="400px">' . $content.'</td>
196 196
                                             </tr>
197 197
                                         </table>';
198 198
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
             if ($insert_id != $user_id) {
275 275
                 $info = api_get_user_info($user_id);
276 276
                 $sender = api_get_user_info($insert_id);
277
-                $href = api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/ticket_details.php?ticket_id=' . $ticket_id;
277
+                $href = api_get_path(WEB_PLUGIN_PATH).PLUGIN_NAME.'/src/ticket_details.php?ticket_id='.$ticket_id;
278 278
                 $message = sprintf($plugin->get_lang('TicketAssignedMsg'), $info['complete_name'], $href, $ticket_id);
279 279
                 $mailTitle = sprintf($plugin->get_lang('TicketAssignX'), $ticket_id);
280 280
                 api_mail_html(
@@ -319,10 +319,10 @@  discard block
 block discarded – undo
319 319
         $table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
320 320
         $table_support_message_attachments = Database::get_main_table(TABLE_TICKET_MESSAGE_ATTACHMENTS);
321 321
         if ($sendConfirmation) {
322
-            $form = '<form action="ticket_details.php?ticket_id=' . $ticket_id . '" id="confirmticket" method="POST" >
323
-                         <p>' . $plugin->get_lang('TicketWasThisAnswerSatisfying') . '</p>
324
-                         <button name="response" id="responseyes" value="1">' . get_lang('Yes') . '</button>
325
-                         <button name="response" id="responseno" value="0">' . get_lang('No') . '</button>
322
+            $form = '<form action="ticket_details.php?ticket_id='.$ticket_id.'" id="confirmticket" method="POST" >
323
+                         <p>' . $plugin->get_lang('TicketWasThisAnswerSatisfying').'</p>
324
+                         <button name="response" id="responseyes" value="1">' . get_lang('Yes').'</button>
325
+                         <button name="response" id="responseno" value="0">' . get_lang('No').'</button>
326 326
                      </form>';
327 327
             $content .= $form;
328 328
             Database::query(
@@ -353,11 +353,11 @@  discard block
 block discarded – undo
353 353
             '$message_id',
354 354
             '$subject',
355 355
             '$content',
356
-            '" . Database::escape_string($_SERVER['REMOTE_ADDR']) . "',
356
+            '".Database::escape_string($_SERVER['REMOTE_ADDR'])."',
357 357
             '$user_id',
358
-            '" . $now . "',
358
+            '".$now."',
359 359
             '$user_id',
360
-            '" . $now . "',
360
+            '".$now."',
361 361
             '$status'
362 362
         )";
363 363
         Database::query($sql_insert_message);
@@ -428,11 +428,11 @@  discard block
 block discarded – undo
428 428
         } else {
429 429
             $new_file_name = uniqid('');
430 430
             $path_attachment = api_get_path(SYS_ARCHIVE_PATH);
431
-            $path_message_attach = $path_attachment . 'plugin_ticket_messageattch/';
431
+            $path_message_attach = $path_attachment.'plugin_ticket_messageattch/';
432 432
             if (!file_exists($path_message_attach)) {
433 433
                 @mkdir($path_message_attach, api_get_permissions_for_new_directories(), true);
434 434
             }
435
-            $new_path = $path_message_attach . $new_file_name;
435
+            $new_path = $path_message_attach.$new_file_name;
436 436
             if (is_uploaded_file($file_attach['tmp_name'])) {
437 437
                 @copy($file_attach['tmp_name'], $new_path);
438 438
             }
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
                     '$ticket_id',
456 456
                     '$message_id',
457 457
                     '$message_attch_id',
458
-                    '" . $file_attach['size'] . "',
458
+                    '".$file_attach['size']."',
459 459
                     '$user_id',
460 460
                     '$now',
461 461
                     '$user_id',
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
             Database::query($sql);
465 465
 
466 466
             return array(
467
-                'path' => $path_message_attach . $safe_new_file_name,
467
+                'path' => $path_message_attach.$safe_new_file_name,
468 468
                 'filename' => $safe_file_name
469 469
             );
470 470
         }
@@ -689,14 +689,14 @@  discard block
 block discarded – undo
689 689
             $result_unread = Database::query($sql_unread);
690 690
             $unread = Database::fetch_object($result_unread)->unread;
691 691
             $userInfo = api_get_user_info($row['user_id']);
692
-            $hrefUser = $webPath . 'main/admin/user_information.php?user_id=' . $row['user_id'];
692
+            $hrefUser = $webPath.'main/admin/user_information.php?user_id='.$row['user_id'];
693 693
             $name = "<a href='$hrefUser'> {$userInfo['username']} </a>";
694 694
             $actions = "";
695 695
 
696 696
             if ($row['responsible'] != 0) {
697 697
                 $row['responsible'] = api_get_user_info($row['responsible']);
698 698
                 if (!empty($row['responsible'])) {
699
-                    $hrefResp = $webPath . 'main/admin/user_information.php?user_id=' . $row['responsible']['user_id'];
699
+                    $hrefResp = $webPath.'main/admin/user_information.php?user_id='.$row['responsible']['user_id'];
700 700
                     $row['responsible'] = "<a href='$hrefResp'> {$row['responsible']['username']} </a>";
701 701
                 } else {
702 702
                     $row['responsible'] = get_lang('UnknownUser');
@@ -704,9 +704,9 @@  discard block
 block discarded – undo
704 704
 
705 705
             } else {
706 706
                 if ($row['status_id'] != 'REE') {
707
-                    $row['responsible'] = '<span style="color:#ff0000;">' . $plugin->get_lang('ToBeAssigned') . '</span>';
707
+                    $row['responsible'] = '<span style="color:#ff0000;">'.$plugin->get_lang('ToBeAssigned').'</span>';
708 708
                 } else {
709
-                    $row['responsible'] = '<span style="color:#00ff00;">' . get_lang('MessageResent') . '</span>';
709
+                    $row['responsible'] = '<span style="color:#00ff00;">'.get_lang('MessageResent').'</span>';
710 710
                 }
711 711
             }
712 712
 
@@ -727,17 +727,17 @@  discard block
 block discarded – undo
727 727
             $row['col1'] = api_get_local_time($row['col1']);
728 728
             $row['col2'] = api_get_local_time($row['col2']);
729 729
             if ($isAdmin) {
730
-                $actions .= '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . Display::return_icon(
730
+                $actions .= '<a href="ticket_details.php?ticket_id='.$row['col0'].'">'.Display::return_icon(
731 731
                                 'synthese_view.gif', get_lang('Info')
732
-                        ) . '</a>&nbsp;&nbsp;';
732
+                        ).'</a>&nbsp;&nbsp;';
733 733
                 if ($row['priority_id'] == 'HGH' && $row['status_id'] != 'CLS') {
734
-                    $actions .= '<img src="' . $webCodePath . 'img/exclamation.png" border="0" />';
734
+                    $actions .= '<img src="'.$webCodePath.'img/exclamation.png" border="0" />';
735 735
                 }
736 736
                 $row['col0'] = Display::return_icon(
737 737
                                 $img_source, get_lang('Info')
738
-                        ) . '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . $row['ticket_code'] . '</a>';
738
+                        ).'<a href="ticket_details.php?ticket_id='.$row['col0'].'">'.$row['ticket_code'].'</a>';
739 739
                 if ($row['col7'] == 'PENDIENTE') {
740
-                    $row['col7'] = '<span style="color: #f00; font-weight:bold;">' . $row['col7'] . '</span>';
740
+                    $row['col7'] = '<span style="color: #f00; font-weight:bold;">'.$row['col7'].'</span>';
741 741
                 }
742 742
 
743 743
                 $ticket = array(
@@ -754,22 +754,22 @@  discard block
 block discarded – undo
754 754
                 );
755 755
             } else {
756 756
                 $actions = "";
757
-                $actions .= '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . Display::return_icon(
757
+                $actions .= '<a href="ticket_details.php?ticket_id='.$row['col0'].'">'.Display::return_icon(
758 758
                                 'synthese_view.gif', get_lang('Info')
759
-                        ) . '</a>&nbsp;&nbsp;';
759
+                        ).'</a>&nbsp;&nbsp;';
760 760
                 $row['col0'] = Display::return_icon(
761 761
                                 $img_source, get_lang('Info')
762
-                        ) . '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . $row['ticket_code'] . '</a>';
762
+                        ).'<a href="ticket_details.php?ticket_id='.$row['col0'].'">'.$row['ticket_code'].'</a>';
763 763
                 $now = api_strtotime(api_get_utc_datetime());
764 764
                 $last_edit_date = api_strtotime($row['sys_lastedit_datetime']);
765 765
                 $dif = $now - $last_edit_date;
766 766
 
767 767
                 if ($dif > 172800 && $row['priority_id'] == 'NRM' && $row['status_id'] != 'CLS') {
768
-                    $actions .= '<a href="myticket.php?ticket_id=' . $row['ticket_id'] . '&amp;action=alert">
769
-                                 <img src="' . Display::returnIconPath('exclamation.png') . '" border="0" /></a>';
768
+                    $actions .= '<a href="myticket.php?ticket_id='.$row['ticket_id'].'&amp;action=alert">
769
+                                 <img src="' . Display::returnIconPath('exclamation.png').'" border="0" /></a>';
770 770
                 }
771 771
                 if ($row['priority_id'] == 'HGH') {
772
-                    $actions .= '<img src="' . Display::returnIconPath('admin_star.png') . '" border="0" />';
772
+                    $actions .= '<img src="'.Display::returnIconPath('admin_star.png').'" border="0" />';
773 773
                 }
774 774
                 $ticket = array(
775 775
                     $row['col0'],
@@ -781,14 +781,14 @@  discard block
 block discarded – undo
781 781
                 );
782 782
             }
783 783
             if ($unread > 0) {
784
-                $ticket['0'] = $ticket['0'] . '&nbsp;&nbsp;(' . $unread . ')<a href="ticket_details.php?ticket_id=' . $row['ticket_id'] . '">
785
-                                <img src="' . Display::returnIconPath('message_new.png') . '" border="0" title="' . $unread . ' ' . get_lang('Messages') . '"/>
784
+                $ticket['0'] = $ticket['0'].'&nbsp;&nbsp;('.$unread.')<a href="ticket_details.php?ticket_id='.$row['ticket_id'].'">
785
+                                <img src="' . Display::returnIconPath('message_new.png').'" border="0" title="'.$unread.' '.get_lang('Messages').'"/>
786 786
                                 </a>';
787 787
             }
788 788
             if ($isAdmin) {
789
-                $ticket['0'] .= '&nbsp;&nbsp;<a  href="javascript:void(0)" onclick="load_history_ticket(\'div_' . $row['ticket_id'] . '\',' . $row['ticket_id'] . ')">
790
-					<img onclick="load_course_list(\'div_' . $row['ticket_id'] . '\',' . $row['ticket_id'] . ')" onmouseover="clear_course_list (\'div_' . $row['ticket_id'] . '\')" src="' . Display::returnIconPath('history.gif') . '" title="' . get_lang('Historial') . '" alt="' . get_lang('Historial') . '"/>
791
-					<div class="blackboard_hide" id="div_' . $row['ticket_id'] . '">&nbsp;&nbsp;</div>
789
+                $ticket['0'] .= '&nbsp;&nbsp;<a  href="javascript:void(0)" onclick="load_history_ticket(\'div_'.$row['ticket_id'].'\','.$row['ticket_id'].')">
790
+					<img onclick="load_course_list(\'div_' . $row['ticket_id'].'\','.$row['ticket_id'].')" onmouseover="clear_course_list (\'div_'.$row['ticket_id'].'\')" src="'.Display::returnIconPath('history.gif').'" title="'.get_lang('Historial').'" alt="'.get_lang('Historial').'"/>
791
+					<div class="blackboard_hide" id="div_' . $row['ticket_id'].'">&nbsp;&nbsp;</div>
792 792
 					</a>&nbsp;&nbsp;';
793 793
             }
794 794
             $tickets[] = $ticket;
@@ -1026,8 +1026,8 @@  discard block
 block discarded – undo
1026 1026
                     }
1027 1027
                 }
1028 1028
                 $userInfo = api_get_user_info($row['request_user']);
1029
-                $row['user_url'] = '<a href="' . api_get_path(WEB_PATH) . 'main/admin/user_information.php?user_id=' . $row['request_user'] . '">
1030
-                ' . api_get_person_name($userInfo['firstname'], $userInfo['lastname']) . '</a>';
1029
+                $row['user_url'] = '<a href="'.api_get_path(WEB_PATH).'main/admin/user_information.php?user_id='.$row['request_user'].'">
1030
+                ' . api_get_person_name($userInfo['firstname'], $userInfo['lastname']).'</a>';
1031 1031
                 $ticket['usuario'] = $userInfo;
1032 1032
                 $ticket['ticket'] = $row;
1033 1033
             }
@@ -1044,10 +1044,10 @@  discard block
 block discarded – undo
1044 1044
             while ($row = Database::fetch_assoc($result)) {
1045 1045
                 $message = $row;
1046 1046
                 $completeName = api_get_person_name($row['firstname'], $row['lastname']);
1047
-                $href = $webPath . 'main/admin/user_information.php?user_id=' . $row['user_id'];
1047
+                $href = $webPath.'main/admin/user_information.php?user_id='.$row['user_id'];
1048 1048
                 //Check if user is an admin
1049 1049
                 $sql_admin = "SELECT user_id FROM $admin_table
1050
-		              WHERE user_id = '" . intval($message['user_id']) . "'
1050
+		              WHERE user_id = '".intval($message['user_id'])."'
1051 1051
                               LIMIT 1";
1052 1052
                 $result_admin = Database::query($sql_admin);
1053 1053
                 $message['admin'] = false;
@@ -1059,12 +1059,12 @@  discard block
 block discarded – undo
1059 1059
                 $sql = "SELECT *
1060 1060
                         FROM $table_support_message_attachments
1061 1061
                         WHERE
1062
-                            message_id = " . $row['message_id'] . " AND
1062
+                            message_id = ".$row['message_id']." AND
1063 1063
                             ticket_id= '$ticket_id'  ";
1064 1064
                 $result_attach = Database::query($sql);
1065 1065
                 while ($row2 = Database::fetch_assoc($result_attach)) {
1066
-                    $archiveURL = $archiveURL = $webPath . "plugin/" . PLUGIN_NAME . '/src/download.php?ticket_id=' . $ticket_id . '&file=';
1067
-                    $row2['attachment_link'] = $attach_icon . '&nbsp;<a href="' . $archiveURL . $row2['path'] . '&title=' . $row2['filename'] . '">' . $row2['filename'] . '</a>&nbsp;(' . $row2['size'] . ')';
1066
+                    $archiveURL = $archiveURL = $webPath."plugin/".PLUGIN_NAME.'/src/download.php?ticket_id='.$ticket_id.'&file=';
1067
+                    $row2['attachment_link'] = $attach_icon.'&nbsp;<a href="'.$archiveURL.$row2['path'].'&title='.$row2['filename'].'">'.$row2['filename'].'</a>&nbsp;('.$row2['size'].')';
1068 1068
                     $message['atachments'][] = $row2;
1069 1069
                 }
1070 1070
                 $ticket['messages'][] = $message;
@@ -1088,9 +1088,9 @@  discard block
 block discarded – undo
1088 1088
         );
1089 1089
         $table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
1090 1090
         $now = api_get_utc_datetime();
1091
-        $sql = "UPDATE " . $table_support_messages . "
1092
-                SET status = 'LEI', sys_lastedit_user_id ='" . api_get_user_id() . "',
1093
-                sys_lastedit_datetime ='" . $now . "'
1091
+        $sql = "UPDATE ".$table_support_messages."
1092
+                SET status = 'LEI', sys_lastedit_user_id ='" . api_get_user_id()."',
1093
+                sys_lastedit_datetime ='" . $now."'
1094 1094
                 WHERE ticket_id ='$ticket_id' ";
1095 1095
 
1096 1096
         if (api_is_platform_admin()) {
@@ -1189,10 +1189,10 @@  discard block
 block discarded – undo
1189 1189
         $user_id = intval($user_id);
1190 1190
 
1191 1191
         $now = api_get_utc_datetime();
1192
-        $sql = "UPDATE " . $table_support_tickets . " SET
1192
+        $sql = "UPDATE ".$table_support_tickets." SET
1193 1193
                 status_id = '$status_id',
1194 1194
                 sys_lastedit_user_id ='$user_id',
1195
-                sys_lastedit_datetime ='" . $now . "'
1195
+                sys_lastedit_datetime ='".$now."'
1196 1196
                 WHERE ticket_id ='$ticket_id'";
1197 1197
         $result = Database::query($sql);
1198 1198
 
@@ -1277,7 +1277,7 @@  discard block
 block discarded – undo
1277 1277
         $sql = "UPDATE $table_support_tickets SET
1278 1278
                     status_id = 'CLS',
1279 1279
                     sys_lastedit_user_id ='$user_id',
1280
-                    sys_lastedit_datetime ='" . $now . "',
1280
+                    sys_lastedit_datetime ='".$now."',
1281 1281
                     end_date ='$now'
1282 1282
                 WHERE ticket_id ='$ticket_id'";
1283 1283
         Database::query($sql);
@@ -1334,8 +1334,8 @@  discard block
 block discarded – undo
1334 1334
             $row['assigned_date'] = api_convert_and_format_date(
1335 1335
                 api_get_local_time($row['assigned_date']), '%d/%m/%y-%H:%M:%S', _api_get_timezone()
1336 1336
             );
1337
-            $row['assignuser'] = ($row['user_id'] != 0) ? ('<a href="' . $webpath . 'main/admin/user_information.php?user_id=' . $row['user_id'] . '"  target="_blank">' . $assignuser['username'] . '</a>') : get_lang('Unassign');
1338
-            $row['insertuser'] = '<a href="' . $webpath . 'main/admin/user_information.php?user_id=' . $row['sys_insert_user_id'] . '"  target="_blank">' . $insertuser['username'] . '</a>';
1337
+            $row['assignuser'] = ($row['user_id'] != 0) ? ('<a href="'.$webpath.'main/admin/user_information.php?user_id='.$row['user_id'].'"  target="_blank">'.$assignuser['username'].'</a>') : get_lang('Unassign');
1338
+            $row['insertuser'] = '<a href="'.$webpath.'main/admin/user_information.php?user_id='.$row['sys_insert_user_id'].'"  target="_blank">'.$insertuser['username'].'</a>';
1339 1339
             $history[] = $row;
1340 1340
         }
1341 1341
         return $history;
@@ -1531,7 +1531,7 @@  discard block
 block discarded – undo
1531 1531
         while ($row = Database::fetch_assoc($result)) {
1532 1532
             if ($row['responsable'] != 0) {
1533 1533
                 $row['responsable'] = api_get_user_info($row['responsable']);
1534
-                $row['responsable'] = $row['responsable']['firstname'] . ' ' . $row['responsable']['lastname'];
1534
+                $row['responsable'] = $row['responsable']['firstname'].' '.$row['responsable']['lastname'];
1535 1535
             }
1536 1536
             $row['sys_insert_datetime'] = api_format_date(
1537 1537
                     $row['sys_insert_datetime'], '%d/%m/%y - %I:%M:%S %p'
Please login to merge, or discard this patch.
main/exercice/exercise_report.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             Display::addFlash(
249 249
                 Display::return_message(get_lang('MessageSent'))
250 250
             );
251
-            header('Location: ' . api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId);
251
+            header('Location: '.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId);
252 252
             exit;
253 253
         }
254 254
     }
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
         api_is_course_tutor() || api_is_course_coach()
279 279
     ) {
280 280
         $actions .= '<a href="admin.php?exerciseId='.intval($_GET['exerciseId']).'">'.Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>';
281
-        $actions .='<a href="live_stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('activity_monitor.png', get_lang('LiveResults'), '', ICON_SIZE_MEDIUM).'</a>';
282
-        $actions .='<a href="stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('statistics.png', get_lang('ReportByQuestion'), '', ICON_SIZE_MEDIUM).'</a>';
281
+        $actions .= '<a href="live_stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('activity_monitor.png', get_lang('LiveResults'), '', ICON_SIZE_MEDIUM).'</a>';
282
+        $actions .= '<a href="stats.php?'.api_get_cidreq().'&exerciseId='.$exercise_id.'">'.Display :: return_icon('statistics.png', get_lang('ReportByQuestion'), '', ICON_SIZE_MEDIUM).'</a>';
283 283
 
284 284
         $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&exerciseId='.intval($_GET['exerciseId']).'" >'.
285 285
         Display::return_icon('save.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>';
Please login to merge, or discard this patch.
main/session/session_add.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 api_protect_limit_for_session_admin();
21 21
 
22
-$formSent=0;
23
-$errorMsg='';
22
+$formSent = 0;
23
+$errorMsg = '';
24 24
 
25 25
 $interbreadcrumb[] = array(
26 26
     'url' => 'session_list.php',
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 				' LIMIT 10';
49 49
 
50 50
 		if (api_is_multiple_url_enabled()) {
51
-			$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
51
+			$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
52 52
 			$access_url_id = api_get_current_access_url_id();
53 53
 			if ($access_url_id != -1) {
54 54
 				$sql = 'SELECT username, lastname, firstname
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 			$return .= '<a href="javascript: void(0);" onclick="javascript: fill_coach_field(\''.$user['username'].'\')">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')</a><br />';
74 74
 		}
75 75
 	}
76
-	$xajax_response -> addAssign('ajax_list_coachs','innerHTML', api_utf8_encode($return));
76
+	$xajax_response -> addAssign('ajax_list_coachs', 'innerHTML', api_utf8_encode($return));
77 77
 	return $xajax_response;
78 78
 }
79 79
 $xajax -> processRequests();
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 $form->addElement('header', $tool_name);
135 135
 $result = SessionManager::setForm($form);
136 136
 
137
-$htmlHeadXtra[] ='
137
+$htmlHeadXtra[] = '
138 138
 <script>
139 139
 $(function() {
140 140
     '.$result['js'].'
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 $form->addButtonNext(get_lang('NextStep'));
145 145
 
146 146
 if (!$formSent) {
147
-    $formDefaults['access_start_date'] =  $formDefaults['display_start_date'] = api_get_local_time();
147
+    $formDefaults['access_start_date'] = $formDefaults['display_start_date'] = api_get_local_time();
148 148
     $formDefaults['coach_username'] = api_get_user_id();
149 149
 } else {
150 150
     $formDefaults['name'] = api_htmlentities($name, ENT_QUOTES, $charset);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     $id_visibility = $params['session_visibility'];
170 170
     $duration = isset($params['duration']) ? $params['duration'] : null;
171 171
     $description = $params['description'];
172
-    $showDescription = isset($params['show_description']) ? 1: 0;
172
+    $showDescription = isset($params['show_description']) ? 1 : 0;
173 173
     $sendSubscriptionNotification = isset($params['send_subscription_notification']);
174 174
 
175 175
     $extraFields = array();
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
     if ($return == strval(intval($return))) {
203 203
         // integer => no error on session creation
204
-        header('Location: add_courses_to_session.php?id_session=' . $return . '&add=true&msg=');
204
+        header('Location: add_courses_to_session.php?id_session='.$return.'&add=true&msg=');
205 205
         exit();
206 206
     }
207 207
 }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
 echo '<div class="actions">';
216 216
 echo '<a href="../session/session_list.php">'.
217
-    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>';
217
+    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>';
218 218
 echo '</div>';
219 219
 
220 220
 $form->display();
Please login to merge, or discard this patch.
main/blog/blog_admin.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 require_once '../inc/global.inc.php';
11
-$current_course_tool  = TOOL_BLOGS;
11
+$current_course_tool = TOOL_BLOGS;
12 12
 
13 13
 $this_section = SECTION_COURSES;
14 14
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 //	 ONLY USERS REGISTERED IN THE COURSE
22 22
 if ((!$is_allowed_in_course || !$is_courseMember) && !api_is_allowed_to_edit()) {
23
-    api_not_allowed(true);//print headers/footers
23
+    api_not_allowed(true); //print headers/footers
24 24
 }
25 25
 
26 26
 if (api_is_allowed_to_edit()) {
@@ -30,30 +30,30 @@  discard block
 block discarded – undo
30 30
     // the learning path, we do not include the banner so we have to explicitly
31 31
     // include the stylesheet, which is normally done in the header
32 32
     if (empty($_GET['origin']) || $_GET['origin'] != 'learnpath') {
33
-        $interbreadcrumb[]= array ('url' => 'blog_admin.php?','name' => $nameTools);
34
-        $my_url='';
35
-        if (isset($_GET['action']) && $_GET['action']=='add') {
33
+        $interbreadcrumb[] = array('url' => 'blog_admin.php?', 'name' => $nameTools);
34
+        $my_url = '';
35
+        if (isset($_GET['action']) && $_GET['action'] == 'add') {
36 36
             $current_section = get_lang('AddBlog');
37
-            $my_url='action=add';
38
-        } elseif (isset($_GET['action']) && $_GET['action']=='edit') {
37
+            $my_url = 'action=add';
38
+        } elseif (isset($_GET['action']) && $_GET['action'] == 'edit') {
39 39
             $current_section = get_lang('EditBlog');
40
-            $my_url='action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
40
+            $my_url = 'action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
41 41
         }
42 42
         Display::display_header('');
43 43
     }
44 44
     echo '<div class="actions">';
45 45
     echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>",
46
-        Display::return_icon('new_blog.png', get_lang('AddBlog'),'',ICON_SIZE_MEDIUM)."</a>";
46
+        Display::return_icon('new_blog.png', get_lang('AddBlog'), '', ICON_SIZE_MEDIUM)."</a>";
47 47
     echo '</div>';
48 48
 
49 49
     if (!empty($_POST['new_blog_submit']) && !empty($_POST['blog_name'])) {
50
-        if (isset($_POST['blog_name']))  {
50
+        if (isset($_POST['blog_name'])) {
51 51
             Blog::create_blog($_POST['blog_name'], $_POST['blog_subtitle']);
52 52
             Display::display_confirmation_message(get_lang('BlogStored'));
53 53
         }
54 54
     }
55 55
     if (!empty($_POST['edit_blog_submit']) && !empty($_POST['blog_name'])) {
56
-        if (strlen(trim($_POST['blog_name']))>0) {
56
+        if (strlen(trim($_POST['blog_name'])) > 0) {
57 57
             Blog::edit_blog($_POST['blog_id'], $_POST['blog_name'], $_POST['blog_subtitle']);
58 58
             Display::display_confirmation_message(get_lang('BlogEdited'));
59 59
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         // we show the form if
86 86
         // 1. no post data
87 87
         // 2. there is post data and one of the three form elements is empty
88
-        if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name']) ))) {
88
+        if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name'])))) {
89 89
             // if there is post data there is certainly an error in the form
90 90
             if ($_POST) {
91 91
                 Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'));
Please login to merge, or discard this patch.