Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#139/develop material user feedback(swm 392) #140

Merged
merged 9 commits into from
Nov 22, 2023

Conversation

D-w-nJ
Copy link
Member

@D-w-nJ D-w-nJ commented Nov 19, 2023

Motivation πŸ€”

  • κ°•μ˜μžλ£Œ (κ°•μ˜λ…ΈνŠΈ, ν€΄μ¦ˆ) ν”Όλ“œλ°± apiλ₯Ό κ°œλ°œν•©λ‹ˆλ‹€.

Key changes βœ…

  • fast apiμ—μ„œ λ°›μ•„μ˜€λŠ” json 객체 리슀트λ₯Ό 각각 λ§€ν•‘μ‹œμΌœ μ €μž₯ν•˜λŠ” 방식을 톡해 κ°•μ˜μžλ£Œ 쀑 ν•˜λ‚˜λΌλ„ μ—λŸ¬κ°€ μžˆμ„ μ‹œ λ„˜μ–΄μ˜¨ 자료 λͺ¨λ‘ μ €μž₯이 λ˜μ§€ μ•ŠλŠ” 문제λ₯Ό ν•΄κ²°ν•˜μ˜€μŠ΅λ‹ˆλ‹€.
  • [POST] /material/{quizId or summaryId}/feedback?type= APIκ°€ κ°œλ°œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • typeμ—λŠ” "quiz" λ˜λŠ” "summary" λ¬Έμžμ—΄μ΄ μ „λ‹¬λ˜λ©°, μΈμ‹ν•˜μ§€ λͺ»ν•˜λŠ” λ‹€λ₯Έ λ¬Έμžκ°€ μž…λ ₯되면 λ‹€μŒκ³Ό 같은 μ—λŸ¬λ©”μ‹œμ§€κ°€ μ „λ‹¬λ©λ‹ˆλ‹€.
     {
        "status_code": 404,
        "message": "κ°•μ˜μžλ£Œ νƒ€μž…μ„ 찾을 수 μ—†μŠ΅λ‹ˆλ‹€. μž…λ ₯받은 νƒ€μž… : quiiiz"
      }
  • db내에 μ €μž₯λ˜μ§€ μ•Šμ€ summaryId, quizId일 경우 λ‹€μŒκ³Ό 같은 μ—λŸ¬λ©”μ‹œμ§€κ°€ μ „λ‹¬λ©λ‹ˆλ‹€.
   {
      "status_code": 404,
      "message": "ν•΄λ‹Ή ν€΄μ¦ˆλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€."
   }
  • μ œλŒ€λ‘œ ν”Όλ“œλ°±μ΄ μ €μž₯λœλ‹€λ©΄ λ‹€μŒκ³Ό 같은 λ©”μ‹œμ§€λ₯Ό μ „λ‹¬ν•©λ‹ˆλ‹€.
    • μ•„λž˜ λ©”μ‹œμ§€λŠ” ν”Όλ“œλ°± 받은 κ°•μ˜μžλ£Œ νƒ€μž…μ΄ ν€΄μ¦ˆμ΄λ©°, 더이상 ν”Όλ“œλ°±μ΄ λΆˆκ°€λŠ₯ν•˜λ©°, ν”Όλ“œλ°±μ΄ μ €μž₯λ˜μ—ˆμœΌλ©°, 긍정적이지 μ•Šμ€(bad) ν”Όλ“œλ°±μ΄μ—ˆμŒμ„ λ§ν•©λ‹ˆλ‹€.
   {
      "type": "quiz",
      "available": false,
      "has_feedback": true,
      "satisfactory": false
    }
  • μ€‘λ³΅ν•˜μ—¬ ν”Όλ“œλ°±μ„ ν•˜κ³ μž ν•  경우 μ—λŸ¬λ©”μ‹œμ§€κ°€ λœ¨μ§€ μ•ŠμœΌλ©°, db 에 μ €μž₯λ˜μ§€ μ•Šκ³  μ €μž₯λ˜μ—ˆμ„ λ•Œμ™€ λ§ˆμ°¬κ°€μ§€μ˜ json ν˜•νƒœλ‘œ λ©”μ‹œμ§€κ°€ μ „λ‹¬λ©λ‹ˆλ‹€.
  • [GET] /material/{courseVideoId} API μ—μ„œλŠ” μœ μ €κ°€ 이미 ν”Όλ“œλ°±μ„ ν–ˆλŠ”μ§€, ν”Όλ“œλ°±μ΄ κ°€λŠ₯ν•œ μƒνƒœμΈμ§€ μƒνƒœλ₯Ό μ „λ‹¬ν•©λ‹ˆλ‹€.
    • μ΄λ•Œ μˆ˜μ •λœ summary의 경우 ν”Όλ“œλ°±μ΄ λΆˆκ°€ν•˜λ―€λ‘œ available이 falseμž…λ‹ˆλ‹€.
    • 이미 ν”Όλ“œλ°±μ„ ν•œ ν€΄μ¦ˆ/μš”μ•½λ³Έμ˜ 경우 available=false 이고, hasFeedback=true μž…λ‹ˆλ‹€. (밑에 μ˜ˆμ‹œ ν€΄μ¦ˆ 114번)
{
  "status": 1,
  "total_quiz_count": 3,
  "quizzes": [
    {
      "id": 113,
      "type": 1,
      "question": "λ§ˆμ§€λ§‰ μž₯면을 μ›ν•˜λŠ” μ‹œκ°„λ§ŒνΌ 정지 ν™”λ©΄μœΌλ‘œ μœ μ§€ν•˜κ³  싢을 λ•Œ μ–΄λ–€ κΈ°λŠ₯을 μ‚¬μš©ν•΄μ•Ό ν• κΉŒμš”?",
      "options": [
        "μ‚¬μ§„μ—μ„œ 격자 λͺ¨μ–‘을 λˆ„λ₯΄κΈ°",
        "사진을 μΊ‘μ²˜ν•˜κΈ°",
        "ν˜„μž¬ ν”„λ ˆμž„ μ €μž₯ κΈ°λŠ₯을 μ‚¬μš©ν•˜κΈ°"
      ],
      "answer": "1",
      "submitted_at": null,
      "submitted_answer": null,
      "feedback_info": {
        "type": "quiz",
        "available": true,
        "has_feedback": false,
        "satisfactory": false
      },
      "is_submitted": false,
      "is_correct": false,
      "is_scrapped": false
    },
    {
      "id": 114,
      "type": 1,
      "question": "μ˜μƒμ΄ μ—†λŠ” κ²½μš°μ—λ„ μΆ©λΆ„ν•œ μ›€μ§μž„μ„ 가진 사진을 λ§Œλ“€κΈ° μœ„ν•΄μ„œλŠ” μ–΄λ–€ κΈ°λŠ₯을 μ‚¬μš©ν•΄μ•Ό ν• κΉŒμš”?",
      "options": [
        "사진을 μΊ‘μ²˜ν•˜κΈ°",
        "μ‚¬μ§„μ—μ„œ 격자 λͺ¨μ–‘을 λˆ„λ₯΄κΈ°",
        "ν˜„μž¬ ν”„λ ˆμž„ μ €μž₯ κΈ°λŠ₯을 μ‚¬μš©ν•˜κΈ°"
      ],
      "answer": "2",
      "submitted_at": null,
      "submitted_answer": null,
      "feedback_info": {
        "type": "quiz",
        "available": false,
        "has_feedback": true,
        "satisfactory": false
      },
      "is_submitted": false,
      "is_correct": false,
      "is_scrapped": false
    },
    {
      "id": 115,
      "type": 1,
      "question": "ν˜„μž¬ ν”„λ ˆμž„ μ €μž₯ κΈ°λŠ₯을 μ‚¬μš©ν•˜λ©΄ μ–΄λ–€ 것을 μ €μž₯ν•  수 μžˆμ„κΉŒμš”?",
      "options": [
        "μ›ν•˜λŠ” μ‹œκ°„λ§ŒνΌ 정지 ν™”λ©΄",
        "λ§ˆμ§€λ§‰ μž₯λ©΄",
        "μ˜μƒμ˜ 전체 ν”„λ ˆμž„"
      ],
      "answer": "1",
      "submitted_at": null,
      "submitted_answer": null,
      "feedback_info": {
        "type": "quiz",
        "available": true,
        "has_feedback": false,
        "satisfactory": false
      },
      "is_submitted": false,
      "is_correct": false,
      "is_scrapped": false
    }
  ],
  "summary_brief": {
    "id": 35,
    "content": "<button id=\"00000\" class=\"timestamp\" style=\"color:#FA5B3E;font-size: 1.125rem;line-height: 1.75rem;text-decoration-line:none;display:inline-block;background-color:rgba(250, 91, 62, 0.2);border-radius:0.25rem;padding:0.125rem 0.25rem;\">0:00:00</button>\n### 슀크립트 μš”μ•½\n\nμ•ˆλ…•ν•˜μ„Έμš”. νŒŒμ΄λ„μ»·λ¬΄λΉ„μž…λ‹ˆλ‹€. μ˜€λŠ˜μ€ κ΅¬λ…μžλ‹˜μ˜ μ§ˆλ¬Έμ— λŒ€ν•΄ λ‹΅λ³€λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€. μ˜μƒμ΄ μ—†λŠ” κ²½μš°μ—λŠ” μ‚¬μ§„μ˜ μ›€μ§μž„λ§ŒμœΌλ‘œλ„ μΆ©λΆ„ν•©λ‹ˆλ‹€. λ§ˆμ§€λ§‰ μž₯면을 μ›ν•˜λŠ” μ‹œκ°„λ§ŒνΌ 정지 ν™”λ©΄μœΌλ‘œ μœ μ§€ν•˜κ³  μ‹Άλ‹€λ©΄, μ‚¬μ§„μ—μ„œ 격자 λͺ¨μ–‘을 λˆ„λ₯΄κ³  제일 뒀에 μžˆλŠ” κΈ°λŠ₯을 μ‚¬μš©ν•˜λ©΄ λ©λ‹ˆλ‹€. λ§ˆμ§€λ§‰ 화면을 μΊ‘μ²˜ν•΄μ„œ 뢙이면 λ©λ‹ˆλ‹€. ν˜„μž¬ ν”„λ ˆμž„ μ €μž₯ κΈ°λŠ₯을 μ‚¬μš©ν•˜λ©΄ μ›ν•˜λŠ” ν”„λ ˆμž„λ§Œ μ €μž₯ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 방식을 μ‘μš©ν•˜λ©΄ λ©λ‹ˆλ‹€. μ΄μƒμœΌλ‘œ μ˜€λŠ˜μ€ μ—¬κΈ°κΉŒμ§€μž…λ‹ˆλ‹€. νŒŒμ΄λ„μ»· λ¬΄λΉ„μ˜€μŠ΅λ‹ˆλ‹€.\n \n ",
    "modified_at": "2023-11-19 17:21:20",
    "feedback_info": {
      "type": "summary",
      "available": true,
      "has_feedback": false,
      "satisfactory": false
    },
    "is_modified": false
  }
}

  • λ˜ν•œ λ‹€μŒκ³Ό 같이 이미 ν”Όλ“œλ°±λœ κ°•μ˜μžλ£Œλ₯Ό ν•œλ²ˆλ” ν”Όλ“œλ°±ν•˜κ²Œλ˜λ©΄ λ‹€μŒ λ©”μ‹œμ§€μ™€ ν•¨κ»˜ μ—λŸ¬κ°€ λœ¨κ²Œλ©λ‹ˆλ‹€.

      {
        "status_code": 400,
        "message": "이미 ν”Όλ“œλ°±λœ κ°•μ˜μžλ£Œμž…λ‹ˆλ‹€."
      }
  • μˆ˜μ •λœ μš”μ•½λ³Έμ˜ κ²½μš°μ—λŠ” ν”Όλ“œλ°±μ΄ λΆˆκ°€ν•©λ‹ˆλ‹€.

{
  "status_code": 400,
  "message": "μˆ˜μ •λœ μš”μ•½λ³Έμ€ μ‚¬μš©μž ν”Όλ“œλ°±μ΄ λΆˆκ°€ν•©λ‹ˆλ‹€."
}

To reviewers πŸ™

  • μž‘λ™μ΄ 잘 λ˜λŠ”μ§€ ν™•μΈν•΄μ£Όμ„Έμš” (api μ‹€ν–‰ν•˜μ‹€λ•ŒλŠ” authorization 헀더λ₯Ό ν¬ν•¨ν•˜μ…”μ•Ό ν•©λ‹ˆλ‹€.)
  • 전달 λ©”μ‹œμ§€ ν˜•νƒœ, ν•„λ“œλͺ… λ“± ν”Όλ“œλ°±ν•΄μ£Όμ‹œκ³  μˆ˜μ •μ‚¬ν•­ λ§ν•΄μ£Όμ„Έμš”

@D-w-nJ D-w-nJ linked an issue Nov 19, 2023 that may be closed by this pull request
@D-w-nJ D-w-nJ added the enhancement New feature or request label Nov 21, 2023
@oikkoikk
Copy link
Member

ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€~

@D-w-nJ D-w-nJ merged commit db578f3 into main Nov 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SWM-392] Develop material user feedback
2 participants