Added a new module called Level for level testing

This commit is contained in:
Tiago Ribeiro
2023-11-17 15:32:45 +00:00
parent 4a51bd7dfa
commit 44a89c6645
22 changed files with 290 additions and 99 deletions

View File

@@ -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;
}
};