Browse Source

Question with "font color" breaks fill in blanks see BT#12037

jmontoyaa 8 years ago
parent
commit
804a02d6db
2 changed files with 6 additions and 3 deletions
  1. 4 1
      main/exercise/exercise.class.php
  2. 2 2
      main/inc/lib/exercise_show_functions.lib.php

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

@@ -3115,6 +3115,7 @@ class Exercise
         $hotspot_delineation_result = array(),
         $showTotalScoreAndUserChoicesInLastAttempt = true
     ) {
+
         global $debug;
         //needed in order to use in the exercise_attempt() for the time
         global $learnpath_id, $learnpath_item_id;
@@ -3479,6 +3480,7 @@ class Exercise
                     break;
                 case FILL_IN_BLANKS:
                     $str = '';
+
                     if ($from_database) {
                         $sql = "SELECT answer
                                     FROM $TBL_TRACK_ATTEMPT
@@ -3489,7 +3491,8 @@ class Exercise
                         $str = Database::result($result, 0, 'answer');
                     }
 
-                    if ($saved_results == false && strpos($str, 'font color') !== false) {
+                    if (false) {
+
                         // the question is encoded like this
                         // [A] B [C] D [E] F::10,10,10@1
                         // number 1 before the "@" means that is a switchable fill in blank question

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

@@ -38,9 +38,9 @@ class ExerciseShowFunctions
 	    $showTotalScoreAndUserChoices
     ) {
         $answerHTML = FillBlanks::getHtmlDisplayForAnswer($answer, $resultsDisabled, $showTotalScoreAndUserChoices);
-        if (strpos($originalStudentAnswer, 'font color') !== false) {
+        /*if (strpos($originalStudentAnswer, 'font color') !== false) {
             $answerHTML = $originalStudentAnswer;
-        }
+        }*/
 
         if (empty($id)) {
             echo '<tr><td>';