Przeglądaj źródła

Fixing question when using all in one page

Julio Montoya 14 lat temu
rodzic
commit
574d38f93c

+ 1 - 1
main/exercice/exercise.class.php

@@ -2226,7 +2226,7 @@ class Exercise {
                             }
                         } elseif($answerType == MULTIPLE_ANSWER_TRUE_FALSE) {
                             if ($origin!='learnpath') {
-                                ExerciseShowFunctions::display_multiple_answer_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,0,0);
+                                ExerciseShowFunctions::display_multiple_answer_true_false($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,0,$questionId,0);
                             }                            
                         } elseif($answerType == MULTIPLE_ANSWER_COMBINATION_TRUE_FALSE ) {
                             if ($origin!='learnpath') {

+ 2 - 2
main/exercice/exercise_result.php

@@ -198,7 +198,7 @@ foreach ($questionList as $questionId) {
 	unset($objQuestionTmp);
 
 	// decide how many columns we want to use to show the results of each type
-	if($answerType == UNIQUE_ANSWER || $answerType == MULTIPLE_ANSWER || $answerType == MULTIPLE_ANSWER_COMBINATION) {
+	if($answerType == UNIQUE_ANSWER || $answerType == MULTIPLE_ANSWER || $answerType == MULTIPLE_ANSWER_COMBINATION || MULTIPLE_ANSWER_TRUE_FALSE) {
 		$colspan=4;
 	} elseif($answerType == MATCHING || $answerType == FREE_ANSWER) {
 		$colspan=2;
@@ -224,7 +224,7 @@ foreach ($questionList as $questionId) {
 		</td>
 		</tr>
 		<?php
-		if ($answerType == UNIQUE_ANSWER || $answerType == MULTIPLE_ANSWER || $answerType == MULTIPLE_ANSWER_COMBINATION ) {
+		if ($answerType == UNIQUE_ANSWER || $answerType == MULTIPLE_ANSWER || $answerType == MULTIPLE_ANSWER_COMBINATION || $answerType ==  MULTIPLE_ANSWER_TRUE_FALSE) {
 			?>
 				<tr>
 				<td width="5%" valign="top" align="center" nowrap="nowrap">

+ 1 - 1
main/inc/lib/exercise_show_functions.lib.php

@@ -231,7 +231,7 @@ class ExerciseShowFunctions {
         <td width="5%" align="center">
         <?php   
         
-        $question = new MultipleAnswerTrueFalse();
+        $question = new MultipleAnswerTrueFalse();        
         $new_options = Question::readQuestionOption($questionId);
          
         if (isset($new_options[$studentChoice])) {