Passed
Push — 1.10.x ( 638792...b50733 )
by
unknown
52:26
created
main/exercice/hotspot_admin.inc.php 2 patches
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 if ($modifyIn) {
27 27
     if ($debug > 0) {
28
-        echo '$modifyIn was set' . "<br />\n";
28
+        echo '$modifyIn was set'."<br />\n";
29 29
     }
30 30
     // if the user has chosen to modify the question only in the current exercise
31 31
     if ($modifyIn == 'thisExercise') {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     unset($buttonBack);
65 65
 }
66 66
 
67
-$hotspot_admin_url = api_get_path(WEB_CODE_PATH) . 'exercice/admin.php?' . api_get_cidreq() . '&exerciseId=' . $exerciseId;
67
+$hotspot_admin_url = api_get_path(WEB_CODE_PATH).'exercice/admin.php?'.api_get_cidreq().'&exerciseId='.$exerciseId;
68 68
 
69 69
 // the answer form has been submitted
70 70
 $submitAnswers = isset($_POST['submitAnswers']) ? true : false;
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 if ($submitAnswers || $buttonBack) {
75 75
     if ($answerType == HOT_SPOT) {
76 76
         if ($debug > 0) {
77
-            echo '$submitAnswers or $buttonBack was set' . "<br />\n";
77
+            echo '$submitAnswers or $buttonBack was set'."<br />\n";
78 78
         }
79 79
 
80 80
         $questionWeighting = $nbrGoodAnswers = 0;
81 81
         for ($i = 1; $i <= $nbrAnswers; $i++) {
82 82
             if ($debug > 0) {
83
-                echo str_repeat('&nbsp;', 4) . '$answerType is HOT_SPOT' . "<br />\n";
83
+                echo str_repeat('&nbsp;', 4).'$answerType is HOT_SPOT'."<br />\n";
84 84
             }
85 85
 
86 86
             $reponse[$i] = trim($reponse[$i]);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         if (empty($msgErr)) {
115 115
             for ($i = 1; $i <= $nbrAnswers; $i++) {
116 116
                 if ($debug > 0) {
117
-                    echo str_repeat('&nbsp;', 4) . '$answerType is HOT_SPOT' . "<br />\n";
117
+                    echo str_repeat('&nbsp;', 4).'$answerType is HOT_SPOT'."<br />\n";
118 118
                 }
119 119
 
120 120
                 $reponse[$i] = trim($reponse[$i]);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 $weighting[$i] = ($weighting[$i]); //it can be float
123 123
 
124 124
                 if ($weighting[$i]) {
125
-                    $questionWeighting+=$weighting[$i];
125
+                    $questionWeighting += $weighting[$i];
126 126
                 }
127 127
 
128 128
                 // creates answer
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
 
146 146
             $editQuestion = $questionId;
147 147
             unset($modifyAnswers);
148
-            echo '<script type="text/javascript">window.location.href="' . $hotspot_admin_url . '&message=ItemUpdated"</script>';
148
+            echo '<script type="text/javascript">window.location.href="'.$hotspot_admin_url.'&message=ItemUpdated"</script>';
149 149
         }
150 150
 
151 151
         if ($debug > 0) {
152
-            echo '$modifyIn was set - end' . "<br />\n";
152
+            echo '$modifyIn was set - end'."<br />\n";
153 153
         }
154 154
     } else {
155 155
         if ($debug > 0) {
156
-            echo '$submitAnswers or $buttonBack was set' . "<br />\n";
156
+            echo '$submitAnswers or $buttonBack was set'."<br />\n";
157 157
         }
158 158
 
159 159
         $questionWeighting = $nbrGoodAnswers = 0;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
         for ($i = 1; $i <= $nbrAnswers; $i++) {
170 170
             if ($debug > 0) {
171
-                echo str_repeat('&nbsp;', 4) . '$answerType is HOT_SPOT' . "<br />\n";
171
+                echo str_repeat('&nbsp;', 4).'$answerType is HOT_SPOT'."<br />\n";
172 172
             }
173 173
 
174 174
             $reponse[$i] = trim($reponse[$i]);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 $threadhold3_str = intval($threadhold3[$i]);
194 194
             }
195 195
 
196
-            $threadhold_total = $threadhold1_str . ';' . $threadhold2_str . ';' . $threadhold3_str;
196
+            $threadhold_total = $threadhold1_str.';'.$threadhold2_str.';'.$threadhold3_str;
197 197
 
198 198
             if (isset($try[$i]) && $try[$i] == 'on') {
199 199
                 $try_str = 1;
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 $question_str = $select_question[$i];
220 220
             }
221 221
 
222
-            $destination[$i] = $threadhold_total . '@@' . $try_str . '@@' . $lp_str . '@@' . $question_str . '@@' . $url_str;
222
+            $destination[$i] = $threadhold_total.'@@'.$try_str.'@@'.$lp_str.'@@'.$question_str.'@@'.$url_str;
223 223
 
224 224
             // checks if field is empty
225 225
             if (empty($reponse[$i]) && $reponse[$i] != '0') {
@@ -277,12 +277,12 @@  discard block
 block discarded – undo
277 277
             $question_str = $selectQuestionNoError;
278 278
         }
279 279
 
280
-        $destination_noerror = $threadhold_total . '@@' . $try_str . '@@' . $lp_str . '@@' . $question_str . '@@' . $url_str;
280
+        $destination_noerror = $threadhold_total.'@@'.$try_str.'@@'.$lp_str.'@@'.$question_str.'@@'.$url_str;
281 281
 
282 282
         if (empty($msgErr)) {
283 283
             for ($i = 1; $i <= $nbrAnswers; $i++) {
284 284
                 if ($debug > 0) {
285
-                    echo str_repeat('&nbsp;', 4) . '$answerType is HOT_SPOT' . "<br />\n";
285
+                    echo str_repeat('&nbsp;', 4).'$answerType is HOT_SPOT'."<br />\n";
286 286
                 }
287 287
 
288 288
                 $reponse[$i] = trim($reponse[$i]);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
                 $weighting[$i] = ($weighting[$i]); //it can be float
291 291
 
292 292
                 if ($weighting[$i]) {
293
-                    $questionWeighting+=$weighting[$i];
293
+                    $questionWeighting += $weighting[$i];
294 294
                 }
295 295
                 // creates answer
296 296
                 $objAnswer->createAnswer(
@@ -325,14 +325,14 @@  discard block
 block discarded – undo
325 325
             $editQuestion = $questionId;
326 326
             unset($modifyAnswers);
327 327
 
328
-            echo '<script type="text/javascript">window.location.href="' . $hotspot_admin_url . '&message=ItemUpdated"</script>';
328
+            echo '<script type="text/javascript">window.location.href="'.$hotspot_admin_url.'&message=ItemUpdated"</script>';
329 329
         }
330 330
     }
331 331
 }
332 332
 
333 333
 if ($modifyAnswers) {
334 334
     if ($debug > 0) {
335
-        echo str_repeat('&nbsp;', 0) . '$modifyAnswers is set' . "<br />\n";
335
+        echo str_repeat('&nbsp;', 0).'$modifyAnswers is set'."<br />\n";
336 336
     }
337 337
 
338 338
     // construction of the Answer object
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     Session::write('objAnswer', $objAnswer);
341 341
 
342 342
     if ($debug > 0) {
343
-        echo str_repeat('&nbsp;', 2) . '$answerType is HOT_SPOT' . "<br />\n";
343
+        echo str_repeat('&nbsp;', 2).'$answerType is HOT_SPOT'."<br />\n";
344 344
     }
345 345
 
346 346
     if ($answerType == HOT_SPOT_DELINEATION) {
@@ -521,11 +521,11 @@  discard block
 block discarded – undo
521 521
     }
522 522
 
523 523
     if ($debug > 0) {
524
-        echo str_repeat('&nbsp;', 2) . '$usedInSeveralExercises is untrue' . "<br />\n";
524
+        echo str_repeat('&nbsp;', 2).'$usedInSeveralExercises is untrue'."<br />\n";
525 525
     }
526 526
 
527 527
     if ($debug > 0) {
528
-        echo str_repeat('&nbsp;', 4) . '$answerType is HOT_SPOT' . "<br />\n";
528
+        echo str_repeat('&nbsp;', 4).'$answerType is HOT_SPOT'."<br />\n";
529 529
     }
530 530
 
531 531
     if ($answerType == HOT_SPOT_DELINEATION) {
@@ -563,13 +563,13 @@  discard block
 block discarded – undo
563 563
         );
564 564
     }
565 565
 
566
-    Display::tag('h3', get_lang('Question') . ": " . $questionName . ' <img src="../img/info3.gif" title="' . strip_tags(get_lang('HotspotChoose')) . '" alt="' . strip_tags(get_lang('HotspotChoose')) . '" />');
566
+    Display::tag('h3', get_lang('Question').": ".$questionName.' <img src="../img/info3.gif" title="'.strip_tags(get_lang('HotspotChoose')).'" alt="'.strip_tags(get_lang('HotspotChoose')).'" />');
567 567
 
568 568
     if (!empty($msgErr)) {
569 569
         Display::display_normal_message($msgErr); //main API
570 570
     }
571 571
 
572
-    $hotspot_admin_url = api_get_path(WEB_CODE_PATH) . 'exercice/admin.php?' . api_get_cidreq() . '&hotspotadmin=' . $modifyAnswers . '&exerciseId=' . $exerciseId . '&' . api_get_cidreq();
572
+    $hotspot_admin_url = api_get_path(WEB_CODE_PATH).'exercice/admin.php?'.api_get_cidreq().'&hotspotadmin='.$modifyAnswers.'&exerciseId='.$exerciseId.'&'.api_get_cidreq();
573 573
     ?>
574 574
     <form method="post" action="<?php echo $hotspot_admin_url; ?>" class="form-horizontal" id="frm_exercise" name="frm_exercise">
575 575
         <div class="form-group">
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
                                 <th><?php echo get_lang('Comment'); ?></th>
609 609
                                 <?php
610 610
                                 if ($answerType == HOT_SPOT_DELINEATION) {
611
-                                    echo '<th >' . get_lang('Scenario') . '</th>';
611
+                                    echo '<th >'.get_lang('Scenario').'</th>';
612 612
                                 }
613 613
                                 ?>
614 614
                                 <?php
@@ -640,36 +640,36 @@  discard block
 block discarded – undo
640 640
                                         $isSelected = true;
641 641
                                         $selected = 'selected="selected"';
642 642
                                     }
643
-                                    $option_lp.='<option value="' . $id . '" ' . $selected . '>' . $details['lp_name'] . '</option>';
643
+                                    $option_lp .= '<option value="'.$id.'" '.$selected.'>'.$details['lp_name'].'</option>';
644 644
                                 }
645 645
 
646 646
                                 if ($isSelected) {
647
-                                    $option_lp = '<option value="0">' . get_lang('SelectTargetLP') . '</option>' . $option_lp;
647
+                                    $option_lp = '<option value="0">'.get_lang('SelectTargetLP').'</option>'.$option_lp;
648 648
                                 } else {
649
-                                    $option_lp = '<option value="0" selected="selected" >' . get_lang('SelectTargetLP') . '</option>' . $option_lp;
649
+                                    $option_lp = '<option value="0" selected="selected" >'.get_lang('SelectTargetLP').'</option>'.$option_lp;
650 650
                                 }
651 651
 
652 652
                                 // Feedback SELECT
653 653
                                 $question_list = $objExercise->selectQuestionList();
654 654
                                 $option_feed = '';
655
-                                $option_feed.='<option value="0">' . get_lang('SelectTargetQuestion') . '</option>';
655
+                                $option_feed .= '<option value="0">'.get_lang('SelectTargetQuestion').'</option>';
656 656
 
657 657
                                 foreach ($question_list as $key => $questionid) {
658 658
                                     $selected = '';
659 659
                                     $question = Question::read($questionid);
660
-                                    $val = 'Q' . $key . ' :' . substrwords($question->selectTitle(), ICON_SIZE_SMALL);
660
+                                    $val = 'Q'.$key.' :'.substrwords($question->selectTitle(), ICON_SIZE_SMALL);
661 661
 
662 662
                                     if (isset($select_question[$i]) && $questionid == $select_question[$i]) {
663 663
                                         $selected = 'selected="selected"';
664 664
                                     }
665 665
 
666
-                                    $option_feed.='<option value="' . $questionid . '" ' . $selected . ' >' . $val . '</option>';
666
+                                    $option_feed .= '<option value="'.$questionid.'" '.$selected.' >'.$val.'</option>';
667 667
                                 }
668 668
 
669 669
                                 if (isset($select_question[$i]) && $select_question[$i] == -1) {
670
-                                    $option_feed .= '<option value="-1" selected="selected" >' . get_lang('ExitTest') . '</option>';
670
+                                    $option_feed .= '<option value="-1" selected="selected" >'.get_lang('ExitTest').'</option>';
671 671
                                 } else {
672
-                                    $option_feed .= '<option value="-1">' . get_lang('ExitTest') . '</option>';
672
+                                    $option_feed .= '<option value="-1">'.get_lang('ExitTest').'</option>';
673 673
                                 }
674 674
 
675 675
                                 //-------- IF it is a delineation
@@ -685,9 +685,9 @@  discard block
 block discarded – undo
685 685
                                             $selected2 = 'selected="selected"';
686 686
                                         if ($k == $threadhold3[$i])
687 687
                                             $selected3 = 'selected="selected"';
688
-                                        $option1.='<option ' . $selected1 . ' >' . $k . ' % </option>';
689
-                                        $option2.='<option ' . $selected2 . ' >' . $k . ' % </option>';
690
-                                        $option3.='<option ' . $selected3 . '>' . $k . ' %</option>';
688
+                                        $option1 .= '<option '.$selected1.' >'.$k.' % </option>';
689
+                                        $option2 .= '<option '.$selected2.' >'.$k.' % </option>';
690
+                                        $option3 .= '<option '.$selected3.'>'.$k.' %</option>';
691 691
                                     }
692 692
                                     ?>
693 693
                                     <tr>
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
                                                 <div class="checkbox">
732 732
                                                     <p>
733 733
                                                         <label>
734
-                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]"  <?php if ($try[$i] == 1) echo'checked'; ?> />
734
+                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try['.$i; ?>]"  <?php if ($try[$i] == 1) echo'checked'; ?> />
735 735
                                                             <?php echo get_lang('TryAgain'); ?>
736 736
                                                         </label>
737 737
                                                     </p>
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
                                                             <div class="checkbox">
785 785
                                                                 <p>
786 786
                                                                     <label>
787
-                                                                        <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
787
+                                                                        <input type="checkbox" class="checkbox" name="<?php echo 'try['.$i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
788 788
                                                                         <?php echo get_lang('TryAgain'); ?>
789 789
                                                                     </label>
790 790
                                                                 </p>
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
                                                 <div class="checkbox">
850 850
                                                     <p>
851 851
                                                         <label>
852
-                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) echo'checked'; ?> />
852
+                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try['.$i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) echo'checked'; ?> />
853 853
                                                             <?php echo get_lang('TryAgain'); ?>
854 854
                                                         </label>
855 855
                                                     </p>
@@ -889,12 +889,12 @@  discard block
 block discarded – undo
889 889
                                         <input class="form-control" type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo Security::remove_XSS($responseValue); ?>" />
890 890
                                     </td>
891 891
                                     <?php
892
-                                    $form = new FormValidator('form_' . $i);
892
+                                    $form = new FormValidator('form_'.$i);
893 893
                                     $config = array(
894 894
                                         'ToolbarSet' => 'TestProposedAnswer',
895 895
                                         'cols-size' => [0, 12, 0]
896 896
                                     );
897
-                                    $form->addHtmlEditor('comment[' . $i . ']', null, false, false, $config);
897
+                                    $form->addHtmlEditor('comment['.$i.']', null, false, false, $config);
898 898
                                     $renderer = $form->defaultRenderer();
899 899
                                     $form_template = '{content}';
900 900
                                     $renderer->setFormTemplate($form_template);
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
                                         {element}';
904 904
                                     $renderer->setElementTemplate($element_template);
905 905
 
906
-                                    $form->setDefaults(array('comment[' . $i . ']' => $commentValue));
906
+                                    $form->setDefaults(array('comment['.$i.']' => $commentValue));
907 907
                                     $return = $form->return_form();
908 908
                                     ?>
909 909
                                     <td colspan="2" align="left" ><?php echo $return; ?></td>
@@ -942,36 +942,36 @@  discard block
 block discarded – undo
942 942
                                 $selected = 'selected="selected"';
943 943
                                 $isSelected = true;
944 944
                             }
945
-                            $option_lp.='<option value="' . $id . '" ' . $selected . '>' . $details['lp_name'] . '</option>';
945
+                            $option_lp .= '<option value="'.$id.'" '.$selected.'>'.$details['lp_name'].'</option>';
946 946
                         }
947 947
 
948 948
                         if ($isSelected) {
949
-                            $option_lp = '<option value="0">' . get_lang('SelectTargetLP') . '</option>' . $option_lp;
949
+                            $option_lp = '<option value="0">'.get_lang('SelectTargetLP').'</option>'.$option_lp;
950 950
                         } else {
951
-                            $option_lp = '<option value="0" selected="selected" >' . get_lang('SelectTargetLP') . '</option>' . $option_lp;
951
+                            $option_lp = '<option value="0" selected="selected" >'.get_lang('SelectTargetLP').'</option>'.$option_lp;
952 952
                         }
953 953
 
954 954
                         // Feedback SELECT
955 955
                         $question_list = $objExercise->selectQuestionList();
956 956
                         $option_feed = '';
957
-                        $option_feed.='<option value="0">' . get_lang('SelectTargetQuestion') . '</option>';
957
+                        $option_feed .= '<option value="0">'.get_lang('SelectTargetQuestion').'</option>';
958 958
                         $details = isset($details) ? $details : null;
959 959
                         $id = isset($id) ? $id : 0;
960 960
                         $selectQuestionNoError = isset($selectQuestionNoError) ? $selectQuestionNoError : null;
961 961
                         foreach ($question_list as $key => $questionid) {
962 962
                             $selected = '';
963 963
                             $question = Question::read($questionid);
964
-                            $val = 'Q' . $key . ' :' . substrwords($question->selectTitle(), ICON_SIZE_SMALL);
964
+                            $val = 'Q'.$key.' :'.substrwords($question->selectTitle(), ICON_SIZE_SMALL);
965 965
                             $select_lp_id[$id] = $details['lp_name'];
966 966
                             if ($questionid == $selectQuestionNoError) {
967 967
                                 $selected = 'selected="selected"';
968 968
                             }
969
-                            $option_feed.='<option value="' . $questionid . '" ' . $selected . ' >' . $val . '</option>';
969
+                            $option_feed .= '<option value="'.$questionid.'" '.$selected.' >'.$val.'</option>';
970 970
                         }
971 971
                         if ($selectQuestionNoError == -1) {
972
-                            $option_feed.='<option value="-1" selected="selected" >' . get_lang('ExitTest') . '</option>';
972
+                            $option_feed .= '<option value="-1" selected="selected" >'.get_lang('ExitTest').'</option>';
973 973
                         } else {
974
-                            $option_feed.='<option value="-1">' . get_lang('ExitTest') . '</option>';
974
+                            $option_feed .= '<option value="-1">'.get_lang('ExitTest').'</option>';
975 975
                         }
976 976
 
977 977
                         if ($answerType == HOT_SPOT_DELINEATION) {
@@ -1062,6 +1062,6 @@  discard block
 block discarded – undo
1062 1062
     </script>
1063 1063
     <?php
1064 1064
     if ($debug > 0) {
1065
-        echo str_repeat('&nbsp;', 0) . '$modifyAnswers was set - end' . "<br />\n";
1065
+        echo str_repeat('&nbsp;', 0).'$modifyAnswers was set - end'."<br />\n";
1066 1066
     }
1067 1067
 }
Please login to merge, or discard this patch.
Braces   +32 added lines, -13 removed lines patch added patch discarded remove patch
@@ -366,8 +366,9 @@  discard block
 block discarded – undo
366 366
         if ($answerType == HOT_SPOT_DELINEATION) {
367 367
             // the magic happens here ...
368 368
             // we do this to not count the if no error section
369
-            if ($nbrAnswers >= 2)
370
-                $nbrAnswers--;
369
+            if ($nbrAnswers >= 2) {
370
+                            $nbrAnswers--;
371
+            }
371 372
         }
372 373
 
373 374
         $reponse = array();
@@ -679,12 +680,15 @@  discard block
 block discarded – undo
679 680
 
680 681
                                     for ($k = 1; $k <= 100; $k++) {
681 682
                                         $selected1 = $selected2 = $selected3 = '';
682
-                                        if ($k == $threadhold1[$i])
683
-                                            $selected1 = 'selected="selected"';
684
-                                        if ($k == $threadhold2[$i])
685
-                                            $selected2 = 'selected="selected"';
686
-                                        if ($k == $threadhold3[$i])
687
-                                            $selected3 = 'selected="selected"';
683
+                                        if ($k == $threadhold1[$i]) {
684
+                                                                                    $selected1 = 'selected="selected"';
685
+                                        }
686
+                                        if ($k == $threadhold2[$i]) {
687
+                                                                                    $selected2 = 'selected="selected"';
688
+                                        }
689
+                                        if ($k == $threadhold3[$i]) {
690
+                                                                                    $selected3 = 'selected="selected"';
691
+                                        }
688 692
                                         $option1.='<option ' . $selected1 . ' >' . $k . ' % </option>';
689 693
                                         $option2.='<option ' . $selected2 . ' >' . $k . ' % </option>';
690 694
                                         $option3.='<option ' . $selected3 . '>' . $k . ' %</option>';
@@ -731,7 +735,10 @@  discard block
 block discarded – undo
731 735
                                                 <div class="checkbox">
732 736
                                                     <p>
733 737
                                                         <label>
734
-                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]"  <?php if ($try[$i] == 1) echo'checked'; ?> />
738
+                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]"  <?php if ($try[$i] == 1) {
739
+    echo'checked';
740
+}
741
+?> />
735 742
                                                             <?php echo get_lang('TryAgain'); ?>
736 743
                                                         </label>
737 744
                                                     </p>
@@ -784,7 +791,10 @@  discard block
 block discarded – undo
784 791
                                                             <div class="checkbox">
785 792
                                                                 <p>
786 793
                                                                     <label>
787
-                                                                        <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
794
+                                                                        <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) {
795
+    echo'checked';
796
+}
797
+?> />
788 798
                                                                         <?php echo get_lang('TryAgain'); ?>
789 799
                                                                     </label>
790 800
                                                                 </p>
@@ -823,7 +833,10 @@  discard block
 block discarded – undo
823 833
                                             <th ><?php echo get_lang('OAR'); ?>*</th>
824 834
                                             <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
825 835
                                                 <th colspan="2" ><?php echo get_lang('Comment'); ?></th>
826
-                                                <th ><?php if ($answerType == HOT_SPOT_DELINEATION) echo get_lang('Scenario'); ?></th>
836
+                                                <th ><?php if ($answerType == HOT_SPOT_DELINEATION) {
837
+    echo get_lang('Scenario');
838
+}
839
+?></th>
827 840
                                             <?php } else { ?>
828 841
                                                 <th colspan="3" ><?php echo get_lang('Comment'); ?></th>
829 842
                                             <?php } ?>
@@ -849,7 +862,10 @@  discard block
 block discarded – undo
849 862
                                                 <div class="checkbox">
850 863
                                                     <p>
851 864
                                                         <label>
852
-                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) echo'checked'; ?> />
865
+                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) {
866
+    echo'checked';
867
+}
868
+?> />
853 869
                                                             <?php echo get_lang('TryAgain'); ?>
854 870
                                                         </label>
855 871
                                                     </p>
@@ -998,7 +1014,10 @@  discard block
 block discarded – undo
998 1014
                                         <div class="checkbox">
999 1015
                                             <p>
1000 1016
                                                 <label>
1001
-                                                    <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) echo'checked'; ?> />
1017
+                                                    <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) {
1018
+    echo'checked';
1019
+}
1020
+?> />
1002 1021
                                                     <?php echo get_lang('TryAgain'); ?>
1003 1022
                                                 </label>
1004 1023
                                             </p>
Please login to merge, or discard this patch.