Skip to content

Commit 4e7a5ea

Browse files
Refactor language translations for comment options and update UI styling
1 parent ab618cb commit 4e7a5ea

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

components/dashboards/student/course/exams/enhanced-exam-review.tsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,6 @@ const QuestionCard = ({ question, answer, examIsReviewed }) => {
3636

3737
const isCorrect = examIsReviewed && answer.is_correct
3838

39-
const getAnswerText = (answerText) => {
40-
if (question.question_type === 'multiple_choice') {
41-
const selectedOptionIds = answerText.split(',')
42-
return selectedOptionIds
43-
.map(
44-
(id) =>
45-
question.question_options.find(
46-
(opt) => opt.option_id.toString() === id
47-
)?.option_text
48-
)
49-
.join(', ')
50-
}
51-
return answerText
52-
}
53-
54-
const getCorrectAnswerText = () => {
55-
if (question.question_type === 'multiple_choice') {
56-
return question.question_options
57-
.filter((opt) => opt.is_correct)
58-
.map((opt) => opt.option_text)
59-
.join(', ')
60-
}
61-
return question.correct_answer
62-
}
63-
6439
const renderAnswerOption = (optionText, isSelected, isCorrect) => {
6540
let bgColor = 'bg-gray-100 dark:bg-gray-800'
6641
let icon = null

0 commit comments

Comments
 (0)