@@ -477,7 +477,10 @@ discard block |
||
477 | 477 | <div class="actions"> |
478 | 478 | <?php echo $link_add_type_unique ?> | <?php echo $link_add_type_multiple ?> | <?php echo $link_add_group; ?> |
479 | 479 | </div> |
480 | - <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
480 | + <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) { |
|
481 | + echo '&add=true' ; |
|
482 | +} |
|
483 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
481 | 484 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
482 | 485 | <?php |
483 | 486 | if ($add_type == 'multiple') { |
@@ -545,7 +548,10 @@ discard block |
||
545 | 548 | <?php |
546 | 549 | foreach ($nosessionUsersList as $uid => $enreg) { |
547 | 550 | ?> |
548 | - <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option> |
|
551 | + <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) { |
|
552 | + echo 'selected="selected"'; |
|
553 | +} |
|
554 | +?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option> |
|
549 | 555 | <?php |
550 | 556 | } |
551 | 557 | ?> |
@@ -4,8 +4,9 @@ |
||
4 | 4 | require_once dirname(__FILE__).'/../../inc/global.inc.php'; |
5 | 5 | $url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php'; |
6 | 6 | |
7 | -if (! isset($_SESSION['conditional_login']['uid'])) |
|
7 | +if (! isset($_SESSION['conditional_login']['uid'])) { |
|
8 | 8 | die("Not Authorised"); |
9 | +} |
|
9 | 10 | ?> |
10 | 11 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
11 | 12 | <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml"> |
@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -119,8 +119,9 @@ |
||
119 | 119 | |
120 | 120 | for ($i = 0; $i<count($matches[0]); $i++) { |
121 | 121 | |
122 | - if (empty($matches[1][$i])) |
|
123 | - continue; |
|
122 | + if (empty($matches[1][$i])) { |
|
123 | + continue; |
|
124 | + } |
|
124 | 125 | |
125 | 126 | $content = api_strstr($content, $matches[0][$i]); |
126 | 127 | if ($i + 1 !== count($matches[0])) { |
@@ -454,7 +454,10 @@ |
||
454 | 454 | <blockquote> |
455 | 455 | <pre> |
456 | 456 | <b>UserName</b>;LastName;FirstName;Email;NewUserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;Active;Language;Courses;ClassId; |
457 | - xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br /> |
|
457 | + xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;0/1;xxx;<span style="color:red;"><?php if (count($list_reponse) > 0) { |
|
458 | + echo implode(';', $list_reponse).';'; |
|
459 | +} |
|
460 | +?></span>xxx1|xxx2|xxx3;1;<br /> |
|
458 | 461 | </pre> |
459 | 462 | </blockquote> |
460 | 463 | <p><?php |
@@ -434,8 +434,7 @@ |
||
434 | 434 | } else { |
435 | 435 | echo $question->options[2]; |
436 | 436 | } |
437 | - } |
|
438 | - else { |
|
437 | + } else { |
|
439 | 438 | echo '-'; |
440 | 439 | } |
441 | 440 | ?> |
@@ -734,7 +734,9 @@ discard block |
||
734 | 734 | WHERE user_id='$id'"; |
735 | 735 | $result = Database::query($sql); |
736 | 736 | $res = Database::fetch_array($result); |
737 | - if (!$res) return false; |
|
737 | + if (!$res) { |
|
738 | + return false; |
|
739 | + } |
|
738 | 740 | |
739 | 741 | return stripslashes($res['username']); |
740 | 742 | } |
@@ -810,10 +812,15 @@ discard block |
||
810 | 812 | "; |
811 | 813 | $result = Database::query($sql); |
812 | 814 | |
813 | - if (!($res = Database::fetch_array($result))) |
|
814 | - die(get_lang('GeneralError').' (code 901)'); |
|
815 | - if ($owner == 0) return $res['uploader_id']; |
|
816 | - if ($res['uploader_id'] == $owner) return true; |
|
815 | + if (!($res = Database::fetch_array($result))) { |
|
816 | + die(get_lang('GeneralError').' (code 901)'); |
|
817 | + } |
|
818 | + if ($owner == 0) { |
|
819 | + return $res['uploader_id']; |
|
820 | + } |
|
821 | + if ($res['uploader_id'] == $owner) { |
|
822 | + return true; |
|
823 | + } |
|
817 | 824 | die(get_lang('GeneralError').' (code '.$or_die.')'); |
818 | 825 | } |
819 | 826 |
@@ -366,8 +366,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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> |