forked from wangziqi/gongxue-base
feat: improve student practice experience
This commit is contained in:
@@ -14,11 +14,13 @@ export interface QuestionItem {
|
||||
content?: string;
|
||||
type?: string;
|
||||
typeLabel?: string;
|
||||
mediaUrl?: string | null;
|
||||
options?: QuestionOption[] | string[] | null;
|
||||
answerText?: string | null;
|
||||
correctOptionIndex?: number | null;
|
||||
correctOptionIndices?: number[] | null;
|
||||
explanation?: string | null;
|
||||
subQuestions?: Record<string, unknown>[] | null;
|
||||
hasVideoExplanation?: boolean;
|
||||
wrongCount?: number;
|
||||
lastWrongAt?: string | null;
|
||||
@@ -41,6 +43,10 @@ export interface AnswerResult {
|
||||
id: string;
|
||||
questionId: string;
|
||||
isCorrect: boolean | null;
|
||||
selectedOptions?: string[];
|
||||
answerText?: string | null;
|
||||
answeredAt?: string;
|
||||
selfJudged?: boolean;
|
||||
}
|
||||
|
||||
export interface PracticeReport {
|
||||
@@ -128,6 +134,7 @@ export async function submitAnswer(body: {
|
||||
questionId: string;
|
||||
selectedOptions?: string[];
|
||||
answerText?: string;
|
||||
selfJudgedCorrect?: boolean;
|
||||
}) {
|
||||
return apiRequest<{ item: AnswerResult }>('/api/learning/answers', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user