diff --git a/public/main/exercise/exercise.class.php b/public/main/exercise/exercise.class.php index cb3584a10b..bc5456f25e 100644 --- a/public/main/exercise/exercise.class.php +++ b/public/main/exercise/exercise.class.php @@ -3594,10 +3594,6 @@ class Exercise isset($exe_info['exe_id']) ? $exe_info['exe_id'] : $exeId ); - // Probably this attempt came in an exercise all question by page - if (0 == $feedback_type) { - $objQuestionTmp->replaceWithRealExe($exeId); - } $generatedFile = $objQuestionTmp->getFileUrl(); } @@ -5997,7 +5993,7 @@ class Exercise } elseif (ORAL_EXPRESSION == $answerType) { $answer = $choice; /** @var OralExpression $objQuestionTmp */ - Event::saveQuestionAttempt( + $questionAttemptId = Event::saveQuestionAttempt( $this, $questionScore, $answer, @@ -6009,6 +6005,10 @@ class Exercise $questionDuration, $objQuestionTmp->getAbsoluteFilePath() ); + + if (false !== $questionAttemptId) { + OralExpression::saveAssetInQuestionAttempt($questionAttemptId); + } } elseif ( in_array( $answerType, diff --git a/public/main/exercise/export/scorm/scorm_classes.php b/public/main/exercise/export/scorm/scorm_classes.php index 6518221722..4087a8df7d 100644 --- a/public/main/exercise/export/scorm/scorm_classes.php +++ b/public/main/exercise/export/scorm/scorm_classes.php @@ -22,14 +22,6 @@ class ScormAnswerFree extends Answer $type = $this->getQuestionType(); if (ORAL_EXPRESSION == $type) { - /* - $template = new Template(''); - $template->assign('directory', '/tmp/'); - $template->assign('user_id', api_get_user_id()); - - $layout = $template->get_template('document/record_audio.tpl'); - $html .= $template->fetch($layout);*/ - $html = '