-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
78 lines (69 loc) · 1.58 KB
/
Copy pathtypes.ts
File metadata and controls
78 lines (69 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
export enum QuestionType {
MCQ = '多項選擇題',
TRUE_FALSE = '是非題',
FILL_IN_BLANK = '填充題',
SHORT_ANSWER = '短答題'
}
export enum GradeLevel {
P1 = '小學一年級',
P2 = '小學二年級',
P3 = '小學三年級',
P4 = '小學四年級',
P5 = '小學五年級',
P6 = '小學六年級'
}
export enum Difficulty {
EASY = '淺易',
MEDIUM = '適中',
HARD = '進階'
}
export interface SectionConfig {
id: string;
type: QuestionType;
questionCount: number;
marksPerQuestion: number;
title: string;
instructions: string;
}
export interface GeneratedQuestion {
id: number;
text: string;
type: string;
options?: string[]; // For MCQ
correctAnswer?: string;
marks: number;
topic?: string; // New: Source Topic
pageRef?: string; // New: Source Page Reference
}
export interface GeneratedSection {
title: string;
instructions: string;
totalSectionMarks: number;
wordBank?: string[]; // New: For P1-P4 Fill in the blanks
questions: GeneratedQuestion[];
}
export interface GeneratedExam {
title: string;
totalMarks: number;
gradeLevel: string;
difficulty: string;
sections: GeneratedSection[];
}
export interface PastPaper {
id: string;
fileName: string;
content: string;
uploadDate: number;
}
export interface AppState {
step: number;
textbookContent: string;
pastPapers: PastPaper[]; // New: List of past papers for comparison
examTitle: string;
gradeLevel: GradeLevel;
difficulty: Difficulty;
sections: SectionConfig[];
generatedExam: GeneratedExam | null;
isLoading: boolean;
error: string | null;
}