- Added a new type of exercise

- Updated all solutions to solve a huge bug where after reviewing, it would reset the score
This commit is contained in:
Tiago Ribeiro
2023-08-11 14:23:09 +01:00
parent 5099721b9b
commit db54d58bab
18 changed files with 407 additions and 48 deletions

View File

@@ -63,6 +63,7 @@ export interface SpeakingExam {
export type Exercise =
| FillBlanksExercise
| TrueFalseExercise
| MatchSentencesExercise
| MultipleChoiceExercise
| WriteBlanksExercise
@@ -122,6 +123,20 @@ export interface FillBlanksExercise {
}[];
}
export interface TrueFalseExercise {
type: "trueFalse";
id: string;
prompt: string; // *EXAMPLE: "Select the appropriate option."
questions: TrueFalseQuestion[];
userSolutions: {id: string; solution: "true" | "false" | "not_given"}[];
}
export interface TrueFalseQuestion {
id: string; // *EXAMPLE: "1"
prompt: string; // *EXAMPLE: "What does her briefcase look like?"
solution: "true" | "false" | "not_given"; // *EXAMPLE: "True"
}
export interface WriteBlanksExercise {
prompt: string; // *EXAMPLE: "Complete the notes below by writing NO MORE THAN THREE WORDS in the spaces provided."
maxWords: number; // *EXAMPLE: 3 - The maximum amount of words allowed per blank, 0 for unlimited