feat(ui): add topic, subject screen

fix(api): fix api endpoint logic for pretest screen
This commit is contained in:
shafin-r
2025-08-21 14:19:55 +06:00
parent be5c723bff
commit 6f4f2a8668
8 changed files with 369 additions and 105 deletions

30
types/exam.d.ts vendored
View File

@ -1,20 +1,34 @@
export type Metadata = {
test_id: string;
export interface Metadata {
attempt_id: string;
total_possible_score: number;
deduction: number;
deduction: string;
num_questions: number;
name: string;
start_time: Date;
time_limit_minutes: number;
}
export type Question = {
question_id: string;
question: string;
options: string[];
type: string;
export interface MockMeta extends Metadata {
test_id: string;
}
export interface SubjectMeta extends Metadata {
subject_id: string;
subject_name: string;
}
export interface TopicMeta extends Metadata {
topic_id: string;
topic_name: string;
}
export type Question = {
question_id: string;
question: string;
options: string[];
type: string;
};
export interface Test {
metadata: Metadata;
questions: Question[];