@@ -104,7 +104,11 @@ |
||
| 104 | 104 | { |
| 105 | 105 | $this->answerList = $this->getAnswersList(true); |
| 106 | 106 | $type = $this->getQuestionType(); |
| 107 | - if ($type == MCMA) $cardinality = 'multiple'; else $cardinality = 'single'; |
|
| 107 | + if ($type == MCMA) { |
|
| 108 | + $cardinality = 'multiple'; |
|
| 109 | + } else { |
|
| 110 | + $cardinality = 'single'; |
|
| 111 | + } |
|
| 108 | 112 | |
| 109 | 113 | $out = ' <responseDeclaration identifier="' . $questionIdent . '" cardinality="' . $cardinality . '" baseType="identifier">' . "\n"; |
| 110 | 114 | |
@@ -171,10 +171,11 @@ |
||
| 171 | 171 | } |
| 172 | 172 | echo '</div>'; |
| 173 | 173 | |
| 174 | - if ($objExercise->feedback_type == 1) |
|
| 175 | - Display::display_normal_message( |
|
| 174 | + if ($objExercise->feedback_type == 1) { |
|
| 175 | + Display::display_normal_message( |
|
| 176 | 176 | get_lang('DirectFeedbackCantModifyTypeQuestion') |
| 177 | 177 | ); |
| 178 | + } |
|
| 178 | 179 | |
| 179 | 180 | if (api_get_setting('search_enabled')=='true' && !extension_loaded('xapian')) { |
| 180 | 181 | Display::display_error_message(get_lang('SearchXapianModuleNotInstalled')); |
@@ -45,8 +45,9 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | break; |
| 47 | 47 | case "stackgetall": |
| 48 | - if (storage_can_set($_REQUEST['svuser'])) |
|
| 49 | - print storage_stack_getall($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 48 | + if (storage_can_set($_REQUEST['svuser'])) { |
|
| 49 | + print storage_stack_getall($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 50 | + } |
|
| 50 | 51 | break; |
| 51 | 52 | case "getposition": |
| 52 | 53 | print storage_get_position($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svasc']); |
@@ -87,8 +88,7 @@ discard block |
||
| 87 | 88 | } else { |
| 88 | 89 | return $row['sv_value']; |
| 89 | 90 | } |
| 90 | - } |
|
| 91 | - else { |
|
| 91 | + } else { |
|
| 92 | 92 | return null; |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -144,8 +144,7 @@ discard block |
||
| 144 | 144 | if (Database::num_rows($res) > 0) { |
| 145 | 145 | $row = Database::fetch_assoc($res); |
| 146 | 146 | return $row['position']; |
| 147 | - } |
|
| 148 | - else { |
|
| 147 | + } else { |
|
| 149 | 148 | return null; |
| 150 | 149 | } |
| 151 | 150 | } |
@@ -198,8 +197,7 @@ discard block |
||
| 198 | 197 | if ($resorder && $resinsert) { |
| 199 | 198 | Database::query("commit"); |
| 200 | 199 | return 1; |
| 201 | - } |
|
| 202 | - else { |
|
| 200 | + } else { |
|
| 203 | 201 | Database::query("rollback"); |
| 204 | 202 | return 0; |
| 205 | 203 | } |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | //just showing the src in a iframe ... |
| 82 | 82 | $html .= '<h2>'.$toc['title'].'</h2>'; |
| 83 | 83 | $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="' . $src . '"></iframe>'; |
| 84 | - }else{ |
|
| 84 | + } else{ |
|
| 85 | 85 | $html .= "<div class='impress-title'>"; |
| 86 | 86 | $html .= '<h1>'.$toc['title'].'</h1>'; |
| 87 | 87 | $html .= "</div>"; |
@@ -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])) { |
@@ -207,7 +207,10 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | unset($Courses); |
| 209 | 209 | ?> |
| 210 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
| 210 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) { |
|
| 211 | + echo '&add=true' ; |
|
| 212 | +} |
|
| 213 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
| 211 | 214 | <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend> |
| 212 | 215 | <input type="hidden" name="formSent" value="1" /> |
| 213 | 216 | |
@@ -230,7 +233,10 @@ discard block |
||
| 230 | 233 | <div id="ajax_list_courses_multiple"> |
| 231 | 234 | <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control"> |
| 232 | 235 | <?php foreach ($nosessionCourses as $enreg) { ?> |
| 233 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>> |
|
| 236 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) { |
|
| 237 | + echo 'selected="selected"'; |
|
| 238 | +} |
|
| 239 | +?>> |
|
| 234 | 240 | <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?> |
| 235 | 241 | </option> |
| 236 | 242 | <?php } ?> |
@@ -9,9 +9,10 @@ |
||
| 9 | 9 | |
| 10 | 10 | // actions menu |
| 11 | 11 | $new_thematic_plan_data = array(); |
| 12 | -if (!empty($thematic_plan_data)) |
|
| 13 | -foreach($thematic_plan_data as $thematic_item) { |
|
| 12 | +if (!empty($thematic_plan_data)) { |
|
| 13 | + foreach($thematic_plan_data as $thematic_item) { |
|
| 14 | 14 | $thematic_simple_list[] = $thematic_item['description_type']; |
| 15 | +} |
|
| 15 | 16 | $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item; |
| 16 | 17 | } |
| 17 | 18 | |
@@ -64,9 +64,10 @@ |
||
| 64 | 64 | $new_comment = isset($_POST['comment']) ? Database::escape_string(trim($_POST['comment'])) : ''; |
| 65 | 65 | $new_title = isset($_POST['title']) ? Database::escape_string(trim($_POST['title'])) : ''; |
| 66 | 66 | |
| 67 | - if ($new_path && ($new_comment || $new_title)) |
|
| 68 | - if (($docid = DocumentManager::get_document_id($_course, $new_path))) { |
|
| 67 | + if ($new_path && ($new_comment || $new_title)) { |
|
| 68 | + if (($docid = DocumentManager::get_document_id($_course, $new_path))) { |
|
| 69 | 69 | $table_document = Database::get_course_table(TABLE_DOCUMENT); |
| 70 | + } |
|
| 70 | 71 | $ct = ''; |
| 71 | 72 | if ($new_comment) { |
| 72 | 73 | $ct .= ", comment='$new_comment'"; |
@@ -679,12 +679,15 @@ discard block |
||
| 679 | 679 | $option1 = $option2 = $option3 = ''; |
| 680 | 680 | for ($k = 1; $k <= 100; $k++) { |
| 681 | 681 | $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"'; |
|
| 682 | + if ($k == $threadhold1[$i]) { |
|
| 683 | + $selected1 = 'selected="selected"'; |
|
| 684 | + } |
|
| 685 | + if ($k == $threadhold2[$i]) { |
|
| 686 | + $selected2 = 'selected="selected"'; |
|
| 687 | + } |
|
| 688 | + if ($k == $threadhold3[$i]) { |
|
| 689 | + $selected3 = 'selected="selected"'; |
|
| 690 | + } |
|
| 688 | 691 | $option1.='<option ' . $selected1 . ' >' . $k . ' % </option>'; |
| 689 | 692 | $option2.='<option ' . $selected2 . ' >' . $k . ' % </option>'; |
| 690 | 693 | $option3.='<option ' . $selected3 . '>' . $k . ' %</option>'; |
@@ -731,7 +734,10 @@ discard block |
||
| 731 | 734 | <div class="checkbox"> |
| 732 | 735 | <p> |
| 733 | 736 | <label> |
| 734 | - <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> /> |
|
| 737 | + <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) { |
|
| 738 | + echo'checked'; |
|
| 739 | +} |
|
| 740 | +?> /> |
|
| 735 | 741 | <?php echo get_lang('TryAgain'); ?> |
| 736 | 742 | </label> |
| 737 | 743 | </p> |
@@ -784,7 +790,10 @@ discard block |
||
| 784 | 790 | <div class="checkbox"> |
| 785 | 791 | <p> |
| 786 | 792 | <label> |
| 787 | - <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> /> |
|
| 793 | + <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) { |
|
| 794 | + echo'checked'; |
|
| 795 | +} |
|
| 796 | +?> /> |
|
| 788 | 797 | <?php echo get_lang('TryAgain'); ?> |
| 789 | 798 | </label> |
| 790 | 799 | </p> |
@@ -823,7 +832,10 @@ discard block |
||
| 823 | 832 | <th ><?php echo get_lang('OAR'); ?>*</th> |
| 824 | 833 | <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?> |
| 825 | 834 | <th colspan="2" ><?php echo get_lang('Comment'); ?></th> |
| 826 | - <th ><?php if ($answerType == HOT_SPOT_DELINEATION) echo get_lang('Scenario'); ?></th> |
|
| 835 | + <th ><?php if ($answerType == HOT_SPOT_DELINEATION) { |
|
| 836 | + echo get_lang('Scenario'); |
|
| 837 | +} |
|
| 838 | +?></th> |
|
| 827 | 839 | <?php } else { ?> |
| 828 | 840 | <th colspan="3" ><?php echo get_lang('Comment'); ?></th> |
| 829 | 841 | <?php } ?> |
@@ -849,7 +861,10 @@ discard block |
||
| 849 | 861 | <div class="checkbox"> |
| 850 | 862 | <p> |
| 851 | 863 | <label> |
| 852 | - <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) echo'checked'; ?> /> |
|
| 864 | + <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) { |
|
| 865 | + echo'checked'; |
|
| 866 | +} |
|
| 867 | +?> /> |
|
| 853 | 868 | <?php echo get_lang('TryAgain'); ?> |
| 854 | 869 | </label> |
| 855 | 870 | </p> |
@@ -998,7 +1013,10 @@ discard block |
||
| 998 | 1013 | <div class="checkbox"> |
| 999 | 1014 | <p> |
| 1000 | 1015 | <label> |
| 1001 | - <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) echo'checked'; ?> /> |
|
| 1016 | + <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) { |
|
| 1017 | + echo'checked'; |
|
| 1018 | +} |
|
| 1019 | +?> /> |
|
| 1002 | 1020 | <?php echo get_lang('TryAgain'); ?> |
| 1003 | 1021 | </label> |
| 1004 | 1022 | </p> |