Skip to content

feat(news): 복합 퀴즈 시스템 구현 (#471)#488

Merged
DDINGJOO merged 1 commit into
developfrom
feature/471/news-quiz-system
Jan 22, 2026
Merged

feat(news): 복합 퀴즈 시스템 구현 (#471)#488
DDINGJOO merged 1 commit into
developfrom
feature/471/news-quiz-system

Conversation

@DDINGJOO

Copy link
Copy Markdown
Contributor

Summary

  • 뉴스 퀴즈 조회/제출/채점 기능 구현

API Endpoints

Method Path Description
GET /news/{articleId}/quiz 퀴즈 문제 조회
POST /news/{articleId}/quiz 퀴즈 제출 및 채점
GET /news/quiz/history 퀴즈 기록 및 통계

Request/Response Examples

퀴즈 조회 (GET /news/{articleId}/quiz)

{
  "articleId": "abc123",
  "articleTitle": "Tech Innovation in 2026",
  "level": "INTERMEDIATE",
  "questions": [
    {
      "questionId": "q1",
      "type": "COMPREHENSION",
      "question": "What is the main topic?",
      "options": ["A", "B", "C", "D"],
      "points": 20
    }
  ],
  "totalPoints": 100,
  "submitted": false
}

퀴즈 제출 (POST /news/{articleId}/quiz)

Request:

{
  "answers": [
    {"questionId": "q1", "answer": "A"},
    {"questionId": "q2", "answer": "B"}
  ],
  "timeTaken": 120
}

Response:

{
  "score": 80,
  "earnedPoints": 80,
  "totalPoints": 100,
  "results": [
    {"questionId": "q1", "correct": true, "points": 20}
  ],
  "feedback": "Great job!"
}

Changes

  • NewsQuizResult: 퀴즈 결과 모델
  • QuizAnswerResult: 개별 답변 결과 모델
  • NewsQuizRepository: 퀴즈 결과 저장소
  • NewsQuizService: 퀴즈 비즈니스 로직
  • NewsHandler: 퀴즈 API 엔드포인트 추가
  • template.yaml: API Gateway 이벤트 추가

Related Issue

Test Plan

  • Gradle 빌드 성공
  • 퀴즈 조회 테스트
  • 퀴즈 제출 및 채점 테스트
  • 중복 제출 방지 테스트
  • 퀴즈 기록/통계 조회 테스트

- 퀴즈 조회 API (GET /news/{articleId}/quiz)
- 퀴즈 제출 API (POST /news/{articleId}/quiz)
- 퀴즈 기록 조회 API (GET /news/quiz/history)
- NewsQuizResult 모델 추가
- QuizAnswerResult 모델 추가
- NewsQuizRepository 추가
- NewsQuizService 추가
@github-actions github-actions Bot added backend Backend code changes layer:entity Entity/Domain layer layer:repository Repository/DAO layer layer:service Service layer labels Jan 22, 2026
@github-actions

github-actions Bot commented Jan 22, 2026

Copy link
Copy Markdown

Jira: MESP-262

@DDINGJOO DDINGJOO merged commit a559501 into develop Jan 22, 2026
2 checks passed
hye-inA pushed a commit that referenced this pull request Jan 23, 2026
…-quiz-system

feat(news): 복합 퀴즈 시스템 구현 (#471)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend code changes layer:entity Entity/Domain layer layer:repository Repository/DAO layer layer:service Service layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant