@@ -1966,7 +1966,7 @@ discard block |
||
1966 | 1966 | $label = get_lang('NextQuestion'); |
1967 | 1967 | $class = 'btn btn-primary'; |
1968 | 1968 | } |
1969 | - $class .= ' question-validate-btn'; // used to select it with jquery |
|
1969 | + $class .= ' question-validate-btn'; // used to select it with jquery |
|
1970 | 1970 | if ($this->type == ONE_PER_PAGE) { |
1971 | 1971 | if ($questionNum != 1) { |
1972 | 1972 | $prev_question = $questionNum - 2; |
@@ -1991,7 +1991,7 @@ discard block |
||
1991 | 1991 | $all_label = get_lang('EndTest'); |
1992 | 1992 | $class = 'btn btn-warning'; |
1993 | 1993 | } |
1994 | - $class .= ' question-validate-btn'; // used to select it with jquery |
|
1994 | + $class .= ' question-validate-btn'; // used to select it with jquery |
|
1995 | 1995 | $all_button = ' <a href="javascript://" class="'.$class.'" onclick="validate_all(); ">'.$all_label.'</a>'; |
1996 | 1996 | $all_button .= ' ' . Display::span(null, ['id' => 'save_all_reponse']); |
1997 | 1997 | $html .= $all_button; |
@@ -3774,7 +3774,7 @@ discard block |
||
3774 | 3774 | |
3775 | 3775 | //Fixes multiple answer question in order to be exact |
3776 | 3776 | //if ($answerType == MULTIPLE_ANSWER || $answerType == GLOBAL_MULTIPLE_ANSWER) { |
3777 | - /* if ($answerType == GLOBAL_MULTIPLE_ANSWER) { |
|
3777 | + /* if ($answerType == GLOBAL_MULTIPLE_ANSWER) { |
|
3778 | 3778 | $diff = @array_diff($answer_correct_array, $real_answers); |
3779 | 3779 | |
3780 | 3780 | // All good answers or nothing works like exact |
@@ -5073,8 +5073,8 @@ discard block |
||
5073 | 5073 | } |
5074 | 5074 | |
5075 | 5075 | /** |
5076 | - * @return string |
|
5077 | - */ |
|
5076 | + * @return string |
|
5077 | + */ |
|
5078 | 5078 | public function get_formated_title() |
5079 | 5079 | { |
5080 | 5080 | return api_html_entity_decode($this->selectTitle()); |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | - * Exercise list: This script shows the list of exercises for administrators and students. |
|
5 | - * @package chamilo.exercise |
|
6 | - * @author hubert.borderiou |
|
7 | - * |
|
8 | - */ |
|
4 | + * Exercise list: This script shows the list of exercises for administrators and students. |
|
5 | + * @package chamilo.exercise |
|
6 | + * @author hubert.borderiou |
|
7 | + * |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | use ChamiloSession as Session; |
11 | 11 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | if (!$is_allowedToEdit) { |
48 | - // api_not_allowed(); |
|
48 | + // api_not_allowed(); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if (!empty($_REQUEST['path'])) { |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | get_lang('Actions') |
191 | 191 | ); |
192 | 192 | |
193 | - // Column config |
|
194 | - // @todo fix search firstname/lastname that doesn't work. rmove search for the moment |
|
195 | - $column_model = array( |
|
193 | + // Column config |
|
194 | + // @todo fix search firstname/lastname that doesn't work. rmove search for the moment |
|
195 | + $column_model = array( |
|
196 | 196 | array('name'=>'firstname', 'index'=>'firstname', 'width'=>'50', 'align'=>'left', 'search' => 'false'), |
197 | 197 | array('name'=>'lastname', 'index'=>'lastname', 'width'=>'50', 'align'=>'left', 'formatter'=>'action_formatter', 'search' => 'false'), |
198 | 198 | array('name'=>'login', 'hidden'=>'true', 'index'=>'username', 'width'=>'40', 'align'=>'left', 'search' => 'false'), |
@@ -18,10 +18,10 @@ |
||
18 | 18 | $file = file(api_get_path(SYS_LANG_PATH).'english/hotspot.inc.php'); |
19 | 19 | |
20 | 20 | foreach ($file as &$value) { |
21 | - $variable = explode('=', $value , 2); |
|
22 | - if (count($variable) > 1) { |
|
23 | - $variable = substr(trim($variable[0]), 1); |
|
24 | - $variable = '&'.$variable.'='.api_utf8_encode(get_lang($variable)).' '; |
|
25 | - echo $variable; |
|
26 | - } |
|
21 | + $variable = explode('=', $value , 2); |
|
22 | + if (count($variable) > 1) { |
|
23 | + $variable = substr(trim($variable[0]), 1); |
|
24 | + $variable = '&'.$variable.'='.api_utf8_encode(get_lang($variable)).' '; |
|
25 | + echo $variable; |
|
26 | + } |
|
27 | 27 | } |
@@ -249,7 +249,7 @@ |
||
249 | 249 | break; |
250 | 250 | case RESULT_DISABLE_SHOW_SCORE_ONLY: |
251 | 251 | if ($objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_END) { |
252 | - $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score')); |
|
252 | + $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score')); |
|
253 | 253 | } |
254 | 254 | else { |
255 | 255 | $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'), get_lang('Details')); |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
181 | - * abstract function which creates the form to create/edit the answers of the question |
|
182 | - * @param FormValidator $form |
|
183 | - */ |
|
181 | + * abstract function which creates the form to create/edit the answers of the question |
|
182 | + * @param FormValidator $form |
|
183 | + */ |
|
184 | 184 | public function processAnswersCreation($form) |
185 | 185 | { |
186 | 186 | $questionWeighting = $nbrGoodAnswers = 0; |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | // sets the total weighting of the question |
222 | 222 | $this->updateWeighting($questionWeighting); |
223 | 223 | $this->save(); |
224 | - } |
|
224 | + } |
|
225 | 225 | |
226 | 226 | function return_header($feedback_type = null, $counter = null, $score = null) |
227 | 227 | { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $result = $objExercise->read($exercise_id); |
18 | 18 | |
19 | 19 | if (!$result) { |
20 | - api_not_allowed(true); |
|
20 | + api_not_allowed(true); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $interbreadcrumb[] = array( |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | $nameTools=get_lang('ExerciseManagement'); |
14 | 14 | |
15 | 15 | if (isset($_SESSION['gradebook'])){ |
16 | - $gradebook= $_SESSION['gradebook']; |
|
16 | + $gradebook= $_SESSION['gradebook']; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | if (!empty($gradebook) && $gradebook=='view') { |
20 | - $interbreadcrumb[]= array ( |
|
21 | - 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
|
22 | - 'name' => get_lang('ToolGradebook') |
|
23 | - ); |
|
20 | + $interbreadcrumb[]= array ( |
|
21 | + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
|
22 | + 'name' => get_lang('ToolGradebook') |
|
23 | + ); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | $interbreadcrumb[]=array("url" => "exercise.php","name" => get_lang('Exercises')); |
@@ -31,24 +31,24 @@ discard block |
||
31 | 31 | <?php echo "Add Feedback"; ?> |
32 | 32 | </h4> |
33 | 33 | <?php |
34 | - $id = $_REQUEST['question']; |
|
35 | - $objQuestionTmp = Question::read($id); |
|
36 | - echo "<tr><td><b>".get_lang('Question')." : </b>"; |
|
37 | - echo $objQuestionTmp->selectTitle(); |
|
38 | - echo "</td></tr>"; |
|
39 | - echo " <br><tr><td><b><br>".get_lang('Answer')." : </b></td></tr>"; |
|
40 | - $objAnswerTmp=new Answer($id); |
|
41 | - $num = $objAnswerTmp->selectNbrAnswers(); |
|
42 | - $objAnswerTmp->read(); |
|
43 | - for($i=1;$i<=$num;$i++) |
|
44 | - { |
|
45 | - echo "<tr><td width='10%'> "; |
|
46 | - $ans = $objAnswerTmp->answer[$i]; |
|
34 | + $id = $_REQUEST['question']; |
|
35 | + $objQuestionTmp = Question::read($id); |
|
36 | + echo "<tr><td><b>".get_lang('Question')." : </b>"; |
|
37 | + echo $objQuestionTmp->selectTitle(); |
|
38 | + echo "</td></tr>"; |
|
39 | + echo " <br><tr><td><b><br>".get_lang('Answer')." : </b></td></tr>"; |
|
40 | + $objAnswerTmp=new Answer($id); |
|
41 | + $num = $objAnswerTmp->selectNbrAnswers(); |
|
42 | + $objAnswerTmp->read(); |
|
43 | + for($i=1;$i<=$num;$i++) |
|
44 | + { |
|
45 | + echo "<tr><td width='10%'> "; |
|
46 | + $ans = $objAnswerTmp->answer[$i]; |
|
47 | 47 | |
48 | - $form = new FormValidator('feedbackform','post',api_get_self()."?".api_get_cidreq()."&modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion); |
|
49 | - $obj_registration_form = new HTML_QuickForm('frmRegistration', 'POST'); |
|
50 | - $renderer =& $obj_registration_form->defaultRenderer(); |
|
51 | - $renderer->setCustomElementTemplate( |
|
48 | + $form = new FormValidator('feedbackform','post',api_get_self()."?".api_get_cidreq()."&modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion); |
|
49 | + $obj_registration_form = new HTML_QuickForm('frmRegistration', 'POST'); |
|
50 | + $renderer =& $obj_registration_form->defaultRenderer(); |
|
51 | + $renderer->setCustomElementTemplate( |
|
52 | 52 | '<tr> |
53 | 53 | <td align="left" style="" valign="top" width=30%>{label} |
54 | 54 | <!-- BEGIN required --><span style="color: #ff0000">*</span><!-- END required --> |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | <!-- BEGIN error --><br /><span style="color: #ff0000;font-size:10px">{error}</span><!-- END error --> |
58 | 58 | </td> |
59 | 59 | </tr>'); |
60 | - $form->addHtmlEditor('Feedback', $i.'.'.$ans, false, false, array('ToolbarSet' => 'TestAnswerFeedback', 'Width' => '600', 'Height' => '200')); |
|
61 | - $form->display(); |
|
62 | - echo "</td>"; |
|
63 | - }?> |
|
60 | + $form->addHtmlEditor('Feedback', $i.'.'.$ans, false, false, array('ToolbarSet' => 'TestAnswerFeedback', 'Width' => '600', 'Height' => '200')); |
|
61 | + $form->display(); |
|
62 | + echo "</td>"; |
|
63 | + }?> |
|
64 | 64 | <form name="frm" action="javascript: void(0);" method="post"> |
65 | 65 | Click Ok to finish <input type="submit" value="Ok" /> |
66 | 66 | </form> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $result = $objExercise->read($exercise_id); |
13 | 13 | |
14 | 14 | if (!$result) { |
15 | - api_not_allowed(true); |
|
15 | + api_not_allowed(true); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $sessionId = api_get_session_id(); |
@@ -29,17 +29,17 @@ discard block |
||
29 | 29 | $data = array(); |
30 | 30 | // Question title # of students who tool it Lowest score Average Highest score Maximum score |
31 | 31 | $headers = array( |
32 | - get_lang('Question'), |
|
32 | + get_lang('Question'), |
|
33 | 33 | get_lang('QuestionType'), |
34 | 34 | get_lang('NumberStudentWhoSelectedIt'), |
35 | - get_lang('LowestScore'), |
|
36 | - get_lang('AverageScore'), |
|
37 | - get_lang('HighestScore'), |
|
38 | - get_lang('Weighting') |
|
35 | + get_lang('LowestScore'), |
|
36 | + get_lang('AverageScore'), |
|
37 | + get_lang('HighestScore'), |
|
38 | + get_lang('Weighting') |
|
39 | 39 | ); |
40 | 40 | |
41 | 41 | if (!empty($question_list)) { |
42 | - foreach ($question_list as $question_id) { |
|
42 | + foreach ($question_list as $question_id) { |
|
43 | 43 | $question_obj = Question::read($question_id); |
44 | 44 | |
45 | 45 | $exercise_stats = ExerciseLib::get_student_stats_by_question( |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $data[$question_id]['average_score'] = round($exercise_stats['average'], 2); |
74 | 74 | $data[$question_id]['highest_score'] = round($exercise_stats['max'], 2); |
75 | 75 | $data[$question_id]['max_score'] = round($question_obj->weighting, 2); |
76 | - } |
|
76 | + } |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | // Format A table |
@@ -81,37 +81,37 @@ discard block |
||
81 | 81 | $row = 0; |
82 | 82 | $column = 0; |
83 | 83 | foreach ($headers as $header) { |
84 | - $table->setHeaderContents($row, $column, $header); |
|
85 | - $column++; |
|
84 | + $table->setHeaderContents($row, $column, $header); |
|
85 | + $column++; |
|
86 | 86 | } |
87 | 87 | $row++; |
88 | 88 | foreach ($data as $row_table) { |
89 | - $column = 0; |
|
90 | - foreach ($row_table as $cell) { |
|
91 | - $table->setCellContents($row, $column, $cell); |
|
92 | - $table->updateCellAttributes($row, $column, 'align="center"'); |
|
93 | - $column++; |
|
94 | - } |
|
95 | - $table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true); |
|
96 | - $row++; |
|
89 | + $column = 0; |
|
90 | + foreach ($row_table as $cell) { |
|
91 | + $table->setCellContents($row, $column, $cell); |
|
92 | + $table->updateCellAttributes($row, $column, 'align="center"'); |
|
93 | + $column++; |
|
94 | + } |
|
95 | + $table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true); |
|
96 | + $row++; |
|
97 | 97 | } |
98 | 98 | $content = $table->toHtml(); |
99 | 99 | |
100 | 100 | // Format B |
101 | 101 | |
102 | 102 | $headers = array( |
103 | - get_lang('Question'), |
|
104 | - get_lang('Answer'), |
|
105 | - get_lang('Correct'), |
|
106 | - get_lang('NumberStudentWhoSelectedIt') |
|
103 | + get_lang('Question'), |
|
104 | + get_lang('Answer'), |
|
105 | + get_lang('Correct'), |
|
106 | + get_lang('NumberStudentWhoSelectedIt') |
|
107 | 107 | ); |
108 | 108 | |
109 | 109 | $data = array(); |
110 | 110 | |
111 | 111 | if (!empty($question_list)) { |
112 | 112 | $id = 0; |
113 | - foreach ($question_list as $question_id) { |
|
114 | - $question_obj = Question::read($question_id); |
|
113 | + foreach ($question_list as $question_id) { |
|
114 | + $question_obj = Question::read($question_id); |
|
115 | 115 | $exercise_stats = ExerciseLib::get_student_stats_by_question( |
116 | 116 | $question_id, |
117 | 117 | $exercise_id, |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ); |
121 | 121 | |
122 | 122 | $answer = new Answer($question_id); |
123 | - $answer_count = $answer->selectNbrAnswers(); |
|
123 | + $answer_count = $answer->selectNbrAnswers(); |
|
124 | 124 | |
125 | 125 | for ($answer_id = 1; $answer_id <= $answer_count; $answer_id++) { |
126 | 126 | $answer_info = $answer->selectAnswer($answer_id); |
@@ -175,11 +175,11 @@ discard block |
||
175 | 175 | $correct = ''; |
176 | 176 | |
177 | 177 | for ($i = 1; $i <= $answer_count; $i++) { |
178 | - $is_correct_i = $answer->isCorrect($i); |
|
179 | - if ($is_correct_i != 0 && $is_correct_i == $answer_id) { |
|
180 | - $correct = $answer->selectAnswer($i); |
|
181 | - break; |
|
182 | - } |
|
178 | + $is_correct_i = $answer->isCorrect($i); |
|
179 | + if ($is_correct_i != 0 && $is_correct_i == $answer_id) { |
|
180 | + $correct = $answer->selectAnswer($i); |
|
181 | + break; |
|
182 | + } |
|
183 | 183 | } |
184 | 184 | $data[$id]['answer'] = $correct; |
185 | 185 | $data[$id]['correct'] = $answer_info; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | } |
246 | 246 | $id++; |
247 | 247 | } |
248 | - } |
|
248 | + } |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | // Format A table |
@@ -253,19 +253,19 @@ discard block |
||
253 | 253 | $row = 0; |
254 | 254 | $column = 0; |
255 | 255 | foreach ($headers as $header) { |
256 | - $table->setHeaderContents($row, $column, $header); |
|
257 | - $column++; |
|
256 | + $table->setHeaderContents($row, $column, $header); |
|
257 | + $column++; |
|
258 | 258 | } |
259 | 259 | $row++; |
260 | 260 | foreach ($data as $row_table) { |
261 | - $column = 0; |
|
262 | - foreach ($row_table as $cell) { |
|
263 | - $table->setCellContents($row, $column, $cell); |
|
264 | - $table->updateCellAttributes($row, $column, 'align="center"'); |
|
265 | - $column++; |
|
266 | - } |
|
267 | - $table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true); |
|
268 | - $row++; |
|
261 | + $column = 0; |
|
262 | + foreach ($row_table as $cell) { |
|
263 | + $table->setCellContents($row, $column, $cell); |
|
264 | + $table->updateCellAttributes($row, $column, 'align="center"'); |
|
265 | + $column++; |
|
266 | + } |
|
267 | + $table->updateRowAttributes($row, $row % 2 ? 'class="row_even"' : 'class="row_odd"', true); |
|
268 | + $row++; |
|
269 | 269 | } |
270 | 270 | $content .= $table->toHtml(); |
271 | 271 |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | /** |
4 | - * Code for Qti2 import integration. |
|
5 | - * @package chamilo.exercise |
|
6 | - * @author Ronny Velasquez |
|
7 | - * @version $Id: qti2.php 2010-03-12 12:14:25Z $ |
|
8 | - */ |
|
4 | + * Code for Qti2 import integration. |
|
5 | + * @package chamilo.exercise |
|
6 | + * @author Ronny Velasquez |
|
7 | + * @version $Id: qti2.php 2010-03-12 12:14:25Z $ |
|
8 | + */ |
|
9 | 9 | /** |
10 | - * Code |
|
11 | - */ |
|
10 | + * Code |
|
11 | + */ |
|
12 | 12 | // including the global Chamilo file |
13 | 13 | require_once '../inc/global.inc.php'; |
14 | 14 |