Passed
Push — master ( c54534...1da791 )
by Salim
13:03
created
src/rest/check_login.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,18 +41,18 @@
 block discarded – undo
41 41
 	if (!$userObject->isExistingUser) {
42 42
 		header('HTTP/1.1 420 Non existing user');
43 43
         
44
-	}else if (!$userObject->passwordCorrect && $userObject->userStatus == User::ACTIVATED && $userObject->passwordDateValide) {
44
+	} else if (!$userObject->passwordCorrect && $userObject->userStatus == User::ACTIVATED && $userObject->passwordDateValide) {
45 45
 		header('HTTP/1.1 420 Wrong Password '.$userObject->loginAttempt."/3 wrong attempt");
46 46
         
47
-	}else if (!$userObject->passwordDateValide) {
47
+	} else if (!$userObject->passwordDateValide) {
48 48
 		header('HTTP/1.1 420 Outdated Password, go to website to renew it');
49 49
         
50
-	}else if ($userObject->userStatus != User::ACTIVATED) {
50
+	} else if ($userObject->userStatus != User::ACTIVATED) {
51 51
 		header('HTTP/1.1 420 Account '.$userObject->userStatus);
52 52
 	}
53 53
     
54 54
 	exit();
55 55
     
56
-}else {
56
+} else {
57 57
 	header("HTTP/1.1 200 OK");
58 58
 }
Please login to merge, or discard this patch.
src/views/supervisor/visit_infos_view.php 1 patch
Braces   +55 added lines, -29 removed lines patch added patch discarded remove patch
@@ -168,11 +168,17 @@  discard block
 block discarded – undo
168 168
 	<table class='table table-striped'>
169 169
     	<tr>
170 170
     		<th>Filled in by</th>
171
-    		<td><?php if (!empty($localReviewObject)) echo(htmlspecialchars($localReviewObject->username)); ?></td>
171
+    		<td><?php if (!empty($localReviewObject)) {
172
+	echo(htmlspecialchars($localReviewObject->username));
173
+}
174
+?></td>
172 175
     	</tr>
173 176
     	<tr>
174 177
     		<th>Date</th>
175
-    		<td><?php if (!empty($localReviewObject)) echo($localReviewObject->reviewDate); ?></td>
178
+    		<td><?php if (!empty($localReviewObject)) {
179
+	echo($localReviewObject->reviewDate);
180
+}
181
+?></td>
176 182
     	</tr>
177 183
     </table>
178 184
    
@@ -194,16 +200,24 @@  discard block
 block discarded – undo
194 200
 	<table class='table table-striped'>
195 201
     	<tr>
196 202
     		<th>Conclusion Date</th>
197
-    		<td><?php if (!empty($visitObject->reviewConclusionDate)) echo($visitObject->reviewConclusionDate); else echo("N/A") ?></td>
203
+    		<td><?php if (!empty($visitObject->reviewConclusionDate)) {
204
+	echo($visitObject->reviewConclusionDate);
205
+} else {
206
+	echo("N/A") ?></td>
198 207
     	</tr>
199 208
     	<tr>
200 209
     		<th>Conclusion Value</th>
201
-    		<td><?php if (!empty($visitObject->reviewConclusion)) echo(htmlspecialchars($visitObject->reviewConclusion)); else echo("N/A") ?></td>
210
+    		<td><?php if (!empty($visitObject->reviewConclusion)) echo(htmlspecialchars($visitObject->reviewConclusion));
211
+}
212
+else {
213
+	echo("N/A") ?></td>
202 214
     	</tr>
203 215
     </table>
204 216
     
205 217
 	<?php make_interface_tableau_review_supervisor($data_reviews)?>
206
-	<?php makeHistoryTable("Form", $trackerVisitResponses, false); ?>
218
+	<?php makeHistoryTable("Form", $trackerVisitResponses, false);
219
+}
220
+?>
207 221
 </div>
208 222
 
209 223
 <?php
@@ -211,11 +225,11 @@  discard block
 block discarded – undo
211 225
     
212 226
 	if ($actionGroup == "Visit") {
213 227
 		$actionArray=array("Create Visit", "Delete Visit", "Reactivate Visit");
214
-	}else if ($actionGroup == "Form") {
228
+	} else if ($actionGroup == "Form") {
215 229
 		$actionArray=array("Save Form", "Unlock Form", "Delete Form");
216
-	}else if ($actionGroup == "Qc") {
230
+	} else if ($actionGroup == "Qc") {
217 231
 		$actionArray=array("Reset QC", "Quality Control", "Corrective Action");
218
-	}else if ($actionGroup == "Serie") {
232
+	} else if ($actionGroup == "Serie") {
219 233
 		$actionArray=array("Import Series", "Change Serie");
220 234
 	}
221 235
 	?>
@@ -240,8 +254,12 @@  discard block
 block discarded – undo
240 254
 						$details=json_decode($response['action_details'], true);
241 255
             	        
242 256
 						if ($actionGroup == "Form") { 
243
-							if ($formInvestigator && $details['local_review'] == "0") continue(1);
244
-							if (!$formInvestigator && $details['local_review'] == "1") continue(1);  
257
+							if ($formInvestigator && $details['local_review'] == "0") {
258
+								continue(1);
259
+							}
260
+							if (!$formInvestigator && $details['local_review'] == "1") {
261
+								continue(1);
262
+							}
245 263
 						}
246 264
             	        
247 265
 					?>
@@ -269,7 +287,7 @@  discard block
 block discarded – undo
269 287
 	if (empty($dicomStudies)) {
270 288
 		//If no available studies, show all deleted studies in the DB
271 289
 		make_interface_tableau_study_supervisor($visitObject);
272
-	}else {
290
+	} else {
273 291
 		make_interface_tableau_series_supervisor($visitObject);
274 292
 	}
275 293
     
@@ -323,7 +341,7 @@  discard block
 block discarded – undo
323 341
 						if (empty ($data_studies[$i]->studyDescription)) { ?>
324 342
                         	<td>/</td>
325 343
                     	<?php
326
-						}else { ?>
344
+						} else { ?>
327 345
                             <td><?=htmlspecialchars($data_studies[$i]->studyDescription)?></td>
328 346
                 		<?php 
329 347
 						}
@@ -337,7 +355,7 @@  discard block
 block discarded – undo
337 355
 						if (empty ($data_studies[$i]->studyAcquisitionDateTime)) { ?>
338 356
                         	<td>/</td>
339 357
                     	<?php
340
-						}else { ?>
358
+						} else { ?>
341 359
                             <td><?=htmlspecialchars($data_studies[$i]->studyAcquisitionDateTime)?></td>
342 360
                 		<?php 
343 361
 						}
@@ -402,7 +420,7 @@  discard block
 block discarded – undo
402 420
 						if (empty ($data_series[$i]->seriesNumber)) { ?>
403 421
                         	<td>/</td>
404 422
                     	<?php
405
-						}else { ?>
423
+						} else { ?>
406 424
                             <td>Serie <?=htmlspecialchars($data_series [$i]->seriesNumber)?></td>
407 425
                 		<?php 
408 426
 						}
@@ -416,7 +434,7 @@  discard block
 block discarded – undo
416 434
 						if (empty ($data_series[$i]->seriesDescription)) { ?>
417 435
                         	<td>/</td>
418 436
                     	<?php
419
-						}else { ?>
437
+						} else { ?>
420 438
                             <td><?=htmlspecialchars($data_series [$i]->seriesDescription)?></td>
421 439
                 		<?php 
422 440
 						}
@@ -430,7 +448,7 @@  discard block
 block discarded – undo
430 448
 						if (empty ($data_series[$i]->manufacturer)) { ?>
431 449
                         	<td>/</td>
432 450
                     	<?php
433
-						}else { ?>
451
+						} else { ?>
434 452
                             <td><?=htmlspecialchars($data_series [$i]->manufacturer)?></td>
435 453
                 		<?php 
436 454
 						}
@@ -444,7 +462,7 @@  discard block
 block discarded – undo
444 462
 						if (empty ($data_series[$i]->modality)) { ?>
445 463
                         	<td>/</td>
446 464
                     	<?php
447
-						}else { ?>
465
+						} else { ?>
448 466
                             <td><?=htmlspecialchars($data_series [$i]->modality)?></td>
449 467
                 		<?php 
450 468
 						}
@@ -458,7 +476,7 @@  discard block
 block discarded – undo
458 476
 						if (empty ($data_series[$i]->acquisitionDateTime)) { ?>
459 477
                         	<td>/</td>
460 478
                     	<?php
461
-						}else { ?>
479
+						} else { ?>
462 480
                             <td><?=htmlspecialchars($data_series [$i]->acquisitionDateTime)?></td>
463 481
                 		<?php 
464 482
 						}
@@ -472,7 +490,7 @@  discard block
 block discarded – undo
472 490
 						if (empty ($data_series[$i]->injectedDose)) { ?>
473 491
                         	<td>/</td>
474 492
                     	<?php
475
-						}else { ?>
493
+						} else { ?>
476 494
                             <td><?=htmlspecialchars(($data_series [$i]->injectedDose/10**6)) ?></td>
477 495
                 		<?php 
478 496
 						}
@@ -486,7 +504,7 @@  discard block
 block discarded – undo
486 504
 						if (empty ($data_series[$i]->injectedDateTime)) { ?>
487 505
                         	<td>/</td>
488 506
                     	<?php
489
-						}else { ?>
507
+						} else { ?>
490 508
                             <td><?=htmlspecialchars($data_series [$i]->injectedDateTime) ?></td>
491 509
                 		<?php 
492 510
 						}
@@ -500,7 +518,7 @@  discard block
 block discarded – undo
500 518
 						if (empty ($data_series[$i]->injectedActivity)) { ?>
501 519
                         	<td>/</td>
502 520
                     	<?php
503
-						}else { ?>
521
+						} else { ?>
504 522
                             <td><?=htmlspecialchars(($data_series [$i]->injectedActivity/10**6)) ?></td>
505 523
                 		<?php 
506 524
 						}
@@ -514,7 +532,7 @@  discard block
 block discarded – undo
514 532
 						if (empty ($data_series[$i]->patientWeight)) { ?>
515 533
                         	<td>/</td>
516 534
                     	<?php
517
-						}else { ?>
535
+						} else { ?>
518 536
                             <td><?=htmlspecialchars($data_series [$i]->patientWeight)?></td>
519 537
                 		<?php 
520 538
 						}
@@ -528,7 +546,7 @@  discard block
 block discarded – undo
528 546
 						if (empty ($data_series[$i]->numberInstances)) { ?>
529 547
                         	<td>/</td>
530 548
                     	<?php
531
-						}else { ?>
549
+						} else { ?>
532 550
                             <td><?=$data_series [$i]->numberInstances?></td>
533 551
                 		<?php 
534 552
 						}
@@ -542,7 +560,7 @@  discard block
 block discarded – undo
542 560
 						if (empty ($data_series[$i]->uploadDate)) { ?>
543 561
                         	<td>/</td>
544 562
                     	<?php
545
-						}else { ?>
563
+						} else { ?>
546 564
                             <td><?=$data_series [$i]->uploadDate?></td>
547 565
                 		<?php 
548 566
 						}
@@ -642,8 +660,12 @@  discard block
 block discarded – undo
642 660
 					for ($i=0; $i < $res_nb_reviews; $i++) {
643 661
 					?>
644 662
                         <td><?=$data_reviews[$i]->username?>
645
-                        <?php  if ($data_reviews[$i]->isLocal) echo('- Local Investigator');
646
-							   if ($data_reviews[$i]->isAdjudication) echo('- Adjudication Form');
663
+                        <?php  if ($data_reviews[$i]->isLocal) {
664
+	echo('- Local Investigator');
665
+}
666
+							   if ($data_reviews[$i]->isAdjudication) {
667
+							   	echo('- Adjudication Form');
668
+							   }
647 669
 						?>
648 670
         				</td>
649 671
                     <?php 
@@ -681,7 +703,11 @@  discard block
 block discarded – undo
681 703
 				?>
682 704
                     <td>
683 705
                     	<?php 
684
-						   if ($data_reviews[$i]->validated) echo('Validated'); else echo('Draft');
706
+						   if ($data_reviews[$i]->validated) {
707
+						   	echo('Validated');
708
+						   } else {
709
+						   	echo('Draft');
710
+						   }
685 711
 						?>
686 712
                 	</td>
687 713
             	<?php 
@@ -702,7 +728,7 @@  discard block
 block discarded – undo
702 728
             		        </td>
703 729
             		        <?php
704 730
 						//if not validated (not locked) show only delete button
705
-						}else {
731
+						} else {
706 732
 							?>
707 733
                             <td>
708 734
             		        	<a href="scripts/delete_form.php?id_review=<?=$data_reviews[$i]->id_review?>&id_visit=<?=$data_reviews[$i]->id_visit?>" class="ajaxLinkConfirm refreshVisitSupervisor"><input class="btn btn-danger" type="button" value="Delete Form"> </a>
@@ -710,7 +736,7 @@  discard block
 block discarded – undo
710 736
         		        <?php 
711 737
 						}
712 738
                 
713
-					}else {
739
+					} else {
714 740
 					?>
715 741
         				<td></td>
716 742
         			<?php 
Please login to merge, or discard this patch.
src/views/supervisor/tracker/tracker_supervisor.php 1 patch
Braces   +30 added lines, -10 removed lines patch added patch discarded remove patch
@@ -124,52 +124,72 @@
 block discarded – undo
124 124
 				</td>
125 125
 				<td>
126 126
 					<?php 
127
-					if ($supervisorEvent['action_type'] == "Edit Patient") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
127
+					if ($supervisorEvent['action_type'] == "Edit Patient") {
128
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
129
+					}
128 130
 					?>
129 131
 				</td>
130 132
 				<td>
131 133
 					<?php 
132
-					if ($supervisorEvent['action_type'] == "Patient Withdraw") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
134
+					if ($supervisorEvent['action_type'] == "Patient Withdraw") {
135
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
136
+					}
133 137
 					?>
134 138
 				</td>
135 139
 				<td>
136 140
 					<?php 
137
-					if ($supervisorEvent['action_type'] == "Delete Visit") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
141
+					if ($supervisorEvent['action_type'] == "Delete Visit") {
142
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
143
+					}
138 144
 					?>
139 145
 				</td>
140 146
 				<td>
141 147
 					<?php 
142
-					if ($supervisorEvent['action_type'] == "Change Serie") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
148
+					if ($supervisorEvent['action_type'] == "Change Serie") {
149
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
150
+					}
143 151
 					?>
144 152
 				</td>	
145 153
 				<td> 
146 154
 					<?php 
147
-					if ($supervisorEvent['action_type'] == "Reset QC") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
155
+					if ($supervisorEvent['action_type'] == "Reset QC") {
156
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
157
+					}
148 158
 					?>
149 159
 				</td>
150 160
 				<td> 
151 161
 					<?php 
152
-					if ($supervisorEvent['action_type'] == "Unlock Form") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
162
+					if ($supervisorEvent['action_type'] == "Unlock Form") {
163
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
164
+					}
153 165
 					?>
154 166
 				</td>
155 167
 				<td> 
156 168
 					<?php 
157
-					if ($supervisorEvent['action_type'] == "Delete Form") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
169
+					if ($supervisorEvent['action_type'] == "Delete Form") {
170
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
171
+					}
158 172
 					?>
159 173
 				</td>
160 174
 				<td> 
161 175
 					<?php 
162
-					if ($supervisorEvent['action_type'] == "Add Documentation") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
176
+					if ($supervisorEvent['action_type'] == "Add Documentation") {
177
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
178
+					}
163 179
 					?>
164 180
 				</td>
165 181
 				<td> 
166 182
 					<?php 
167
-					if ($supervisorEvent['action_type'] == "Update Documentation") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
183
+					if ($supervisorEvent['action_type'] == "Update Documentation") {
184
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
185
+					}
168 186
 					?>
169 187
 				</td>
170 188
 				<td>
171 189
 					<?php 
172
-					if ($supervisorEvent['action_type'] == "Reactivate Visit") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
190
+					if ($supervisorEvent['action_type'] == "Reactivate Visit") {
191
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
192
+					}
173 193
 					?>
174 194
 				</td>
175 195
 
Please login to merge, or discard this patch.
src/views/investigator/specific_form_view.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 					}
101 101
             		
102 102
             	<?php
103
-				}else if (($_SESSION['role']) == User::REVIEWER) {
103
+				} else if (($_SESSION['role']) == User::REVIEWER) {
104 104
 				?>
105 105
 					$('#contenu').empty();
106 106
 					//Refresh the tree
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             	<input class="btn btn-dark" type="button" id="draft" name="draft" value="draft" /> 
136 136
         		<input class="btn btn-dark" type="button" id="validate" name="validate" value="validate" />
137 137
     		<?php 
138
-		}else {
138
+		} else {
139 139
 			//Add Ask Unlock Button
140 140
 			if (!$local || ($local && $visitObject->qcStatus != Visit::QC_ACCEPTED && $visitObject->qcStatus != Visit::QC_REFUSED)) {
141 141
 			?>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
 	//If not disable by role add action button
130 130
 	if (!$roleDisable) {
131 131
         
132
-		if ( ($local && !$validatedForm) || (!$local && $visitObject->reviewAvailable && !$validatedForm) ) {
132
+		if (($local && !$validatedForm) || (!$local && $visitObject->reviewAvailable && !$validatedForm)) {
133 133
 			// If investigator Role and form not validated, add Draft and Validate button
134 134
 			?>
135 135
             	<input class="btn btn-dark" type="button" id="draft" name="draft" value="draft" /> 
Please login to merge, or discard this patch.
src/views/investigator/controller_form_view.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@
 block discarded – undo
19 19
         <?php
20 20
 		if ($visitObject->formQualityControl == true) {
21 21
 			?> $('input:radio[name="formDecision"]').filter('[value="accepted"]').attr("checked", true); <?php
22
-		}else {
22
+		} else {
23 23
 			?> $('input:radio[name="formDecision"]').filter('[value="refused"]').attr("checked", true); <?php
24 24
 		}
25 25
         
26 26
 		if ($visitObject->imageQualityControl == true) {
27 27
 			?> $('input:radio[name="imageDecision"]').filter('[value="accepted"]').attr("checked", true); <?php
28
-		}else {
28
+		} else {
29 29
 			?> $('input:radio[name="imageDecision"]').filter('[value="refused"]').attr("checked", true); <?php
30 30
 		}
31 31
 		?>
Please login to merge, or discard this patch.
src/views/administrator/tracker_admin_view.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -157,27 +157,37 @@
 block discarded – undo
157 157
 					<td><?php echo($administratorEvent['username']); ?></td>
158 158
 					<td>
159 159
 					<?php 
160
-					if ($administratorEvent['action_type'] == "Create User") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
160
+					if ($administratorEvent['action_type'] == "Create User") {
161
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
162
+					}
161 163
 					?>
162 164
 					</td>
163 165
 					<td>
164 166
 					<?php 
165
-					if ($administratorEvent['action_type'] == "Edit User") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
167
+					if ($administratorEvent['action_type'] == "Edit User") {
168
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
169
+					}
166 170
 					?>
167 171
 					</td>
168 172
 					<td> 
169 173
 					<?php 
170
-					if ($administratorEvent['action_type'] == "Change Center") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
174
+					if ($administratorEvent['action_type'] == "Change Center") {
175
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
176
+					}
171 177
 					?>
172 178
 					</td>
173 179
 					<td> 
174 180
 					<?php 
175
-					if ($administratorEvent['action_type'] == "Create Study") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
181
+					if ($administratorEvent['action_type'] == "Create Study") {
182
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
183
+					}
176 184
 					?>
177 185
 					</td>
178 186
 					<td> 
179 187
 					<?php 
180
-					if ($administratorEvent['action_type'] == "Change Study Activation") echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
188
+					if ($administratorEvent['action_type'] == "Change Study Activation") {
189
+						echo('<pre><code>'.json_encode($eventDetails, JSON_PRETTY_PRINT|JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS).'</code></pre>');
190
+					}
181 191
 					?>
182 192
 					</td>
183 193
 
Please login to merge, or discard this patch.
src/views/administrator/tracker_user_view.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,9 +148,13 @@
 block discarded – undo
148 148
     					<td><?=$userEvent['username']; ?></td>
149 149
     					<td>
150 150
     					<?php 
151
-						   if ($userEvent['action_type'] == "Change Password") echo('Password Changed');
152
-						   else if ($userEvent['action_type'] == "Ask New Password") echo('Asked New Password');
153
-						   else if ($userEvent['action_type'] == "Account Blocked") echo('Account Blocked');
151
+						   if ($userEvent['action_type'] == "Change Password") {
152
+						   	echo('Password Changed');
153
+						   } else if ($userEvent['action_type'] == "Ask New Password") {
154
+						   	echo('Asked New Password');
155
+						   } else if ($userEvent['action_type'] == "Account Blocked") {
156
+						   	echo('Account Blocked');
157
+						   }
154 158
 						?>
155 159
     					</td>
156 160
     				</tr>
Please login to merge, or discard this patch.
src/views/administrator/modify_user_view.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 						User::UNCONFIRMED,
96 96
 						User::DEACTIVATED
97 97
 					);
98
-				}else if ($userObject->userStatus == User::UNCONFIRMED) {
98
+				} else if ($userObject->userStatus == User::UNCONFIRMED) {
99 99
 					$possibleStatus=array(
100 100
 						User::DEACTIVATED
101 101
 					);
102
-				}else if ($userObject->userStatus == User::DEACTIVATED) {
102
+				} else if ($userObject->userStatus == User::DEACTIVATED) {
103 103
 					$possibleStatus=array(
104 104
 						User::UNCONFIRMED
105 105
 					);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 				foreach ($possibleStatus as $status) {
110 110
 					if ($status == "Unconfirmed") {
111 111
 						echo '<option value="'.$status.'">Password Reset</option>';
112
-					}else {
112
+					} else {
113 113
 						echo '<option value="'.$status.'">'.$status.'</option>';
114 114
 					}
115 115
 				}
@@ -206,7 +206,8 @@  discard block
 block discarded – undo
206 206
 			<label class="col-form-label">Administrator :</label> <input
207 207
 				class="form-group col" type="checkbox" name="administrator"
208 208
 				value="1" id="administrator"
209
-				<?php if ($userObject->isAdministrator == 1) echo("checked")?>>
209
+				<?php if ($userObject->isAdministrator == 1) {
210
+	echo("checked")?>>
210 211
 		</div>
211 212
 
212 213
 		<div class="form-group row">
@@ -216,7 +217,8 @@  discard block
 block discarded – undo
216 217
 				<SELECT class="custom-select" name="job">
217 218
                   <?php
218 219
 				// Current job appear first in selector
219
-				echo '<option value="'.$userObject->userJob.'">'.$userObject->userJob.'</option>';
220
+				echo '<option value="'.$userObject->userJob.'">'.$userObject->userJob.'</option>';
221
+}
220 222
 				// add other possible job
221 223
 				foreach ($jobs as $job) {
222 224
 					if ($job != $userObject->userJob) {
Please login to merge, or discard this patch.
src/controllers/change_password_controller.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,23 +43,23 @@  discard block
 block discarded – undo
43 43
 		//Check that reported old password is correct, if unconfirmed we use the temp password value
44 44
 		if ($userObject->userStatus == User::UNCONFIRMED) {
45 45
 			$checkCurrentPassword=password_verify($old_password, $currentTempPassword);
46
-		}else {
46
+		} else {
47 47
 			$checkCurrentPassword=password_verify($old_password, $currentPassword);
48 48
 		}
49 49
 
50 50
 		if ($mdp1 != $mdp2) {
51 51
 			$answer['result']="DifferentPassword";
52 52
 				
53
-		}else if (!$checkCurrentPassword) {
53
+		} else if (!$checkCurrentPassword) {
54 54
 			$answer['result']="WrongOldPassword";
55 55
 			
56
-		}else if (strlen($mdp1) < 8 || preg_match('/[^a-z0-9]/i', $mdp1) || strtolower($mdp1) == $mdp1) {
56
+		} else if (strlen($mdp1) < 8 || preg_match('/[^a-z0-9]/i', $mdp1) || strtolower($mdp1) == $mdp1) {
57 57
 			$answer['result']="IncorrectFormat";
58 58
 			
59
-		}else if (password_verify($mdp1, $currentTempPassword) || password_verify($mdp1, $currentPassword) || password_verify($mdp1, $twoPreviousPassword[0]) || password_verify($mdp1, $twoPreviousPassword[1])) {
59
+		} else if (password_verify($mdp1, $currentTempPassword) || password_verify($mdp1, $currentPassword) || password_verify($mdp1, $twoPreviousPassword[0]) || password_verify($mdp1, $twoPreviousPassword[1])) {
60 60
 			$answer['result']="SamePrevious";
61 61
 			
62
-		}else if ($mdp1 == $mdp2 && strtolower($mdp1) != $mdp1 && $checkCurrentPassword && !password_verify($mdp1, $currentTempPassword) && !password_verify($mdp1, $twoPreviousPassword[0]) && !password_verify($mdp1, $twoPreviousPassword[1]) && !password_verify($mdp1, $currentPassword)) {
62
+		} else if ($mdp1 == $mdp2 && strtolower($mdp1) != $mdp1 && $checkCurrentPassword && !password_verify($mdp1, $currentTempPassword) && !password_verify($mdp1, $twoPreviousPassword[0]) && !password_verify($mdp1, $twoPreviousPassword[1]) && !password_verify($mdp1, $currentPassword)) {
63 63
 				$answer['result']="OK";
64 64
 				//Update the database with new password
65 65
 				$userObject->updateUserPassword($mdp1, User::ACTIVATED);
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
 
71 71
 		echo(json_encode($answer));
72 72
 		
73
-	}else {
73
+	} else {
74 74
 	    
75 75
 		require 'views/change_password_view.php';
76 76
 	    
77 77
 	}
78 78
 	
79
-}else {
79
+} else {
80 80
 	require 'includes/no_access.php';
81 81
 }
Please login to merge, or discard this patch.