Added a new module called Level for level testing
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
import {Module} from "@/interfaces";
|
||||
import {
|
||||
Exam,
|
||||
ReadingExam,
|
||||
ListeningExam,
|
||||
WritingExam,
|
||||
SpeakingExam,
|
||||
Exercise,
|
||||
UserSolution,
|
||||
FillBlanksExercise,
|
||||
MatchSentencesExercise,
|
||||
} from "@/interfaces/exam";
|
||||
import {Exam, ReadingExam, ListeningExam, WritingExam, SpeakingExam, Exercise, UserSolution, LevelExam} from "@/interfaces/exam";
|
||||
import axios from "axios";
|
||||
|
||||
export const getExam = async (module: Module, avoidRepeated: boolean): Promise<Exam | undefined> => {
|
||||
@@ -29,6 +19,8 @@ export const getExam = async (module: Module, avoidRepeated: boolean): Promise<E
|
||||
return newExam.shift() as WritingExam;
|
||||
case "speaking":
|
||||
return newExam.shift() as SpeakingExam;
|
||||
case "level":
|
||||
return newExam.shift() as LevelExam;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -49,6 +41,8 @@ export const getExamById = async (module: Module, id: string): Promise<Exam | un
|
||||
return newExam as WritingExam;
|
||||
case "speaking":
|
||||
return newExam as SpeakingExam;
|
||||
case "level":
|
||||
return newExam as LevelExam;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user