Explorar el Código

Fix save text with oral expression questios - refs BT#12283

Angel Fernando Quiroz Campos hace 8 años
padre
commit
4360d5e559
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      main/inc/ajax/exercise.ajax.php

+ 7 - 2
main/inc/ajax/exercise.ajax.php

@@ -359,8 +359,13 @@ switch ($action) {
                 $objQuestionTmp = Question::read($my_question_id, $course_id);
 
                 // Getting free choice data.
-                if ($objQuestionTmp->type  == FREE_ANSWER && $type == 'all') {
-                    $my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id]) ? $_REQUEST['free_choice'][$my_question_id]: null;
+                if (
+                    ($objQuestionTmp->type  == FREE_ANSWER || $objQuestionTmp->type  == ORAL_EXPRESSION)
+                    && $type == 'all'
+                ) {
+                    $my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id])
+                        ? $_REQUEST['free_choice'][$my_question_id]
+                        : null;
                 }
 
                 if ($type == 'all') {