feat(exam): add SAT style testing component
This commit is contained in:
66
src/types/session.ts
Normal file
66
src/types/session.ts
Normal file
@ -0,0 +1,66 @@
|
||||
import type { Question } from "./sheet";
|
||||
|
||||
type Answer = {
|
||||
id: string;
|
||||
question_id: string;
|
||||
answer_text: string;
|
||||
is_correct: boolean;
|
||||
marked_for_review: false;
|
||||
};
|
||||
|
||||
/**
|
||||
* SessionRequest interface
|
||||
* `/sessions/`
|
||||
*/
|
||||
|
||||
export interface SessionRequest {
|
||||
sheet_id: string;
|
||||
mode: string;
|
||||
topic_ids: string[];
|
||||
difficulty: string;
|
||||
question_count: number;
|
||||
time_limit_minutes: number;
|
||||
}
|
||||
|
||||
export interface SessionResponse {
|
||||
id: string;
|
||||
practice_sheet_id: string;
|
||||
status: string;
|
||||
current_module_index: number;
|
||||
current_model_id: string;
|
||||
current_module_title: string;
|
||||
answers: Answer[];
|
||||
started_at: Date;
|
||||
score: number;
|
||||
}
|
||||
|
||||
export type SubmitAnswer = {
|
||||
question_id: string;
|
||||
answer_text: string;
|
||||
time_spent_seconds: number;
|
||||
};
|
||||
|
||||
export interface SessionAnswerResponse {
|
||||
status: string;
|
||||
feedback: {
|
||||
is_correct: boolean;
|
||||
correct_answer: string;
|
||||
explanation: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SessionQuestionsResponse {
|
||||
session_id: string;
|
||||
module_id: string;
|
||||
module_title: string;
|
||||
time_limit_minutes: number;
|
||||
questions: Question[];
|
||||
}
|
||||
|
||||
export interface SessionModuleQuestions {
|
||||
session_id?: string;
|
||||
module_id: string;
|
||||
module_title: string;
|
||||
time_limit_minutes: number;
|
||||
questions: Question[];
|
||||
}
|
||||
@ -4,6 +4,8 @@ interface CreatedBy {
|
||||
email: string;
|
||||
}
|
||||
|
||||
export type ExamPhase = "IDLE" | "MODULE" | "BREAK" | "FINISHED";
|
||||
|
||||
export interface Subject {
|
||||
name: string;
|
||||
section: string;
|
||||
@ -13,7 +15,15 @@ export interface Subject {
|
||||
parent_name: string;
|
||||
}
|
||||
|
||||
export interface Option {
|
||||
text: string;
|
||||
image_url: string;
|
||||
sequence_order: number;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface Question {
|
||||
difficulty: string;
|
||||
text: string;
|
||||
context: string;
|
||||
context_image_url: string;
|
||||
@ -22,7 +32,7 @@ export interface Question {
|
||||
image_url: string;
|
||||
index: number;
|
||||
id: string;
|
||||
options: any[];
|
||||
options: Option[];
|
||||
topics: Topic[];
|
||||
correct_answer: string;
|
||||
explanation: string;
|
||||
|
||||
Reference in New Issue
Block a user