diff --git a/src/main/java/com/m9d/sroom/material/MaterialService.java b/src/main/java/com/m9d/sroom/material/MaterialService.java index 725a6866..e6f78d5b 100644 --- a/src/main/java/com/m9d/sroom/material/MaterialService.java +++ b/src/main/java/com/m9d/sroom/material/MaterialService.java @@ -89,7 +89,7 @@ public List submitQuizResults(Long memberId, Long cou CourseQuizEntity courseQuizEntity = quizService.createCourseQuizEntity(courseVideoEntity.getCourseId(), courseVideoEntity.getVideoId(), courseVideoId, submittedQuizRequest.getQuizId(), - submittedQuizRequest.toVo()); + submittedQuizRequest.toVo(), memberId); quizInfoResponseList.add(new SubmittedQuizInfoResponse(submittedQuizRequest.getQuizId(), courseQuizEntity.getId())); } diff --git a/src/main/java/com/m9d/sroom/quiz/QuizService.java b/src/main/java/com/m9d/sroom/quiz/QuizService.java index 6fc5bae1..7789eedf 100644 --- a/src/main/java/com/m9d/sroom/quiz/QuizService.java +++ b/src/main/java/com/m9d/sroom/quiz/QuizService.java @@ -99,7 +99,7 @@ public void validateSubmittedQuizzes(Long videoId, Long courseVideoId, } public CourseQuizEntity createCourseQuizEntity(Long courseId, Long videoId, Long courseVideoId, Long quizId, - QuizSubmittedInfo submittedInfo) { + QuizSubmittedInfo submittedInfo, Long memberId) { return courseQuizRepository.save(CourseQuizEntity.builder() .courseId(courseId) .quizId(quizId) @@ -107,6 +107,7 @@ public CourseQuizEntity createCourseQuizEntity(Long courseId, Long videoId, Long .submittedAnswer(getQuiz(quizId).alterSubmittedAnswerFitInDB(submittedInfo.getSubmittedAnswer())) .correct(submittedInfo.getIsCorrect()) .courseVideoId(courseVideoId) + .memberId(memberId) .build()); }