fix(ui): refactor results page for exam results logic

This commit is contained in:
shafin-r
2025-08-31 23:27:32 +06:00
parent 7df2708db7
commit 5507602031
9 changed files with 127 additions and 444 deletions

17
types/exam.d.ts vendored
View File

@ -24,3 +24,20 @@ export interface Test {
export type Answer = number | null;
export type AnswersMap = Record<string, Answer>;
export interface ExamResult {
user_id: string;
test_id: string;
subject_id: string;
topic_id: string;
test_type: string;
attempt_id: string;
start_time: string;
end_time: string;
user_questions: Question[];
user_answers: (number | null)[];
correct_answers: number[];
correct_answers_count: number;
wrong_answers_count: number;
skipped_questions_count: number;
}