Skip to content

Commit

Permalink
[SWM-383] Refactor : Dashboard refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Son-GyeongSik committed Oct 28, 2023
1 parent 50c7ef3 commit 432a25d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/m9d/sroom/material/MaterialService.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public List<SubmittedQuizInfoResponse> 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()));
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/m9d/sroom/quiz/QuizService.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,15 @@ 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)
.videoId(videoId)
.submittedAnswer(getQuiz(quizId).alterSubmittedAnswerFitInDB(submittedInfo.getSubmittedAnswer()))
.correct(submittedInfo.getIsCorrect())
.courseVideoId(courseVideoId)
.memberId(memberId)
.build());
}

Expand Down

0 comments on commit 432a25d

Please sign in to comment.