@@ -344,7 +344,7 @@ |
||
344 | 344 | if (is_dir($full_name)) { |
345 | 345 | $filelist[] = $file; |
346 | 346 | } |
347 | - } |
|
347 | + } |
|
348 | 348 | } |
349 | 349 | } |
350 | 350 | } |
@@ -907,10 +907,10 @@ |
||
907 | 907 | <?php } else { ?> |
908 | 908 | <input class="form-control" type="text" name="weighting[<?php echo $i; ?>]" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" /> |
909 | 909 | <?php |
910 | - } |
|
911 | - } |
|
912 | - if ($answerType == HOT_SPOT) { |
|
913 | - ?> |
|
910 | + } |
|
911 | + } |
|
912 | + if ($answerType == HOT_SPOT) { |
|
913 | + ?> |
|
914 | 914 | <input class="form-control" type="text" name="weighting[<?php echo $i; ?>]" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" /> |
915 | 915 | <input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); ?>" /> |
916 | 916 | <input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_type[$i]) ? 'square' : $hotspot_type[$i]); ?>" /> |
@@ -14,19 +14,19 @@ discard block |
||
14 | 14 | $hotspot_lang_file = api_get_path(SYS_LANG_PATH); |
15 | 15 | |
16 | 16 | if(isset($_GET['lang'])) { |
17 | - //$search = array('../','\\0','\\'); |
|
18 | - $lang = urldecode($_GET['lang']); |
|
19 | - if (preg_match('/^[a-zA-Z0-9\._-]+$/', $lang)) { |
|
20 | - //$lang = str_replace($search,$replace,urldecode($_GET['lang'])); |
|
21 | - if(file_exists($hotspot_lang_file . $lang . '/hotspot.inc.php')) |
|
22 | - $hotspot_lang_file .= $lang . '/hotspot.inc.php'; |
|
23 | - else |
|
24 | - $hotspot_lang_file .= 'english/hotspot.inc.php'; |
|
25 | - } else { |
|
26 | - $hotspot_lang_file .= 'english/hotspot.inc.php'; |
|
27 | - } |
|
17 | + //$search = array('../','\\0','\\'); |
|
18 | + $lang = urldecode($_GET['lang']); |
|
19 | + if (preg_match('/^[a-zA-Z0-9\._-]+$/', $lang)) { |
|
20 | + //$lang = str_replace($search,$replace,urldecode($_GET['lang'])); |
|
21 | + if(file_exists($hotspot_lang_file . $lang . '/hotspot.inc.php')) |
|
22 | + $hotspot_lang_file .= $lang . '/hotspot.inc.php'; |
|
23 | + else |
|
24 | + $hotspot_lang_file .= 'english/hotspot.inc.php'; |
|
25 | + } else { |
|
26 | + $hotspot_lang_file .= 'english/hotspot.inc.php'; |
|
27 | + } |
|
28 | 28 | } else { |
29 | - $hotspot_lang_file .= 'english/hotspot.inc.php'; |
|
29 | + $hotspot_lang_file .= 'english/hotspot.inc.php'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | $file = file($hotspot_lang_file); |
@@ -35,23 +35,23 @@ discard block |
||
35 | 35 | |
36 | 36 | foreach($file as $value) |
37 | 37 | { |
38 | - $explode = explode('=', $value); |
|
38 | + $explode = explode('=', $value); |
|
39 | 39 | |
40 | - if(count($explode) > 1) |
|
41 | - { |
|
42 | - $explode[0] = trim($explode[0]); |
|
43 | - $explode[0] = '&' . substr($explode[0], 1, strlen($explode[0])); |
|
40 | + if(count($explode) > 1) |
|
41 | + { |
|
42 | + $explode[0] = trim($explode[0]); |
|
43 | + $explode[0] = '&' . substr($explode[0], 1, strlen($explode[0])); |
|
44 | 44 | |
45 | - $explode[1] = trim($explode[1]); |
|
46 | - $explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1); |
|
47 | - $explode[1] = str_replace('"', '', $explode[1]); |
|
45 | + $explode[1] = trim($explode[1]); |
|
46 | + $explode[1] = substr($explode[1], 0, strlen($explode[1]) - 1); |
|
47 | + $explode[1] = str_replace('"', '', $explode[1]); |
|
48 | 48 | |
49 | - $temp[] = $explode[0] . '=' . $explode[1]; |
|
50 | - } |
|
49 | + $temp[] = $explode[0] . '=' . $explode[1]; |
|
50 | + } |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | foreach($temp as $value) |
54 | 54 | { |
55 | - echo $value . ' '; |
|
55 | + echo $value . ' '; |
|
56 | 56 | } |
57 | 57 | ?> |
@@ -51,17 +51,17 @@ |
||
51 | 51 | $result = Database::query($sql); |
52 | 52 | $exercises['-'] = '-'.get_lang('SelectExercise').'-'; |
53 | 53 | while ($row = Database :: fetch_array($result)) { |
54 | - $exercises[$row['id']] = cut($row['title'], EXERCISE_MAX_NAME_SIZE); |
|
54 | + $exercises[$row['id']] = cut($row['title'], EXERCISE_MAX_NAME_SIZE); |
|
55 | 55 | } |
56 | 56 | $form->addElement('select', 'exercise', get_lang('Exercise'), $exercises); |
57 | 57 | |
58 | 58 | // generate default content |
59 | 59 | $form->addElement( |
60 | - 'checkbox', |
|
61 | - 'is_content', |
|
62 | - null, |
|
63 | - get_lang('GenerateDefaultContent'), |
|
64 | - array('checked' => true) |
|
60 | + 'checkbox', |
|
61 | + 'is_content', |
|
62 | + null, |
|
63 | + get_lang('GenerateDefaultContent'), |
|
64 | + array('checked' => true) |
|
65 | 65 | ); |
66 | 66 | |
67 | 67 | // the submit button |
@@ -166,12 +166,12 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | |
169 | - /** |
|
170 | - * abstract function which creates the form to create / edit the answers of the question |
|
171 | - * @param the formvalidator instance |
|
172 | - * @param the answers number to display |
|
173 | - */ |
|
174 | - function processAnswersCreation($form) |
|
169 | + /** |
|
170 | + * abstract function which creates the form to create / edit the answers of the question |
|
171 | + * @param the formvalidator instance |
|
172 | + * @param the answers number to display |
|
173 | + */ |
|
174 | + function processAnswersCreation($form) |
|
175 | 175 | { |
176 | 176 | $questionWeighting = $nbrGoodAnswers = 0; |
177 | 177 | $objAnswer = new Answer($this->id); |
@@ -201,12 +201,12 @@ discard block |
||
201 | 201 | // sets the total weighting of the question |
202 | 202 | $this->updateWeighting($questionWeighting); |
203 | 203 | $this->save(); |
204 | - } |
|
204 | + } |
|
205 | 205 | |
206 | - function return_header($feedback_type = null, $counter = null, $score = null) |
|
206 | + function return_header($feedback_type = null, $counter = null, $score = null) |
|
207 | 207 | { |
208 | - $header = parent::return_header($feedback_type, $counter, $score); |
|
209 | - $header .= '<table class="'.$this->question_table_class .'"> |
|
208 | + $header = parent::return_header($feedback_type, $counter, $score); |
|
209 | + $header .= '<table class="'.$this->question_table_class .'"> |
|
210 | 210 | <tr> |
211 | 211 | <th>'.get_lang("Choice").'</th> |
212 | 212 | <th>'. get_lang("ExpectedChoice").'</th> |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $header .= '<th>'.get_lang("Comment").'</th>'; |
215 | 215 | $header .= '</tr>'; |
216 | 216 | return $header; |
217 | - } |
|
217 | + } |
|
218 | 218 | |
219 | 219 | |
220 | 220 | } |
@@ -28,10 +28,10 @@ |
||
28 | 28 | $content = ReadFileCont($full_file_path.$user_id.'.t.html'); |
29 | 29 | |
30 | 30 | if ($content == '') { |
31 | - $content = ReadFileCont($full_file_path); |
|
31 | + $content = ReadFileCont($full_file_path); |
|
32 | 32 | // Do not move this like: |
33 | - $mit = "function Finish(){"; |
|
34 | - $js_content = " |
|
33 | + $mit = "function Finish(){"; |
|
34 | + $js_content = " |
|
35 | 35 | // Code added - start |
36 | 36 | var SaveScoreVariable = 0; |
37 | 37 | function mySaveScore() { |
@@ -281,7 +281,7 @@ |
||
281 | 281 | $correct_answer_index = array_search($matches[1], $answers_array); |
282 | 282 | $exercise_info['question'][$question_index]['title'] = $matches[1]; |
283 | 283 | } elseif (preg_match('/^TAGS:\s?([A-Z])\s?/', $info, $matches)) { |
284 | - //TAGS for chamilo >= 1.10 |
|
284 | + //TAGS for chamilo >= 1.10 |
|
285 | 285 | $exercise_info['question'][$question_index]['answer_tags'] = explode(',', $matches[1]); |
286 | 286 | } elseif (preg_match('/^ETIQUETAS:\s?([A-Z])\s?/', $info, $matches)) { |
287 | 287 | //TAGS for chamilo >= 1.10 (Spanish e-ducativa format) |
@@ -74,10 +74,10 @@ |
||
74 | 74 | Display::display_introduction_section( |
75 | 75 | TOOL_QUIZ, |
76 | 76 | array( |
77 | - 'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/', |
|
77 | + 'CreateDocumentWebDir' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/document/', |
|
78 | 78 | 'CreateDocumentDir' => '../../..'.api_get_path(REL_COURSE_PATH).api_get_course_path().'/document/', |
79 | - 'BaseHref' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/' |
|
80 | - ) |
|
79 | + 'BaseHref' => api_get_path(WEB_COURSE_PATH).api_get_course_path().'/' |
|
80 | + ) |
|
81 | 81 | ); |
82 | 82 | |
83 | 83 | // Display Forms or dialog box(if needed) |
@@ -47,10 +47,10 @@ |
||
47 | 47 | " . |
48 | 48 | "\n" . |
49 | 49 | '$().ready(function() {'."\n" . |
50 | - 'if ($(\'#previous\')) {'."\n" . |
|
50 | + 'if ($(\'#previous\')) {'."\n" . |
|
51 | 51 | 'if(\'parent is\'+$(\'#idParent\').val()) {'. |
52 | - 'load_cbo($(\'#idParent\').val());'."\n" . |
|
53 | - '}}'."\n" . |
|
52 | + 'load_cbo($(\'#idParent\').val());'."\n" . |
|
53 | + '}}'."\n" . |
|
54 | 54 | '});</script>'."\n" ; |
55 | 55 | |
56 | 56 | /* Constants and variables */ |