Added an exercise to write in blank spaces

This commit is contained in:
Tiago Ribeiro
2023-03-28 16:10:43 +01:00
parent 2b38f9df9b
commit 780d208675
8 changed files with 156 additions and 27 deletions

View File

@@ -16,7 +16,7 @@ export interface ListeningExam {
exercises: Exercise[];
}
export type Exercise = FillBlanksExercise | MatchSentencesExercise | MultipleChoiceExercise;
export type Exercise = FillBlanksExercise | MatchSentencesExercise | MultipleChoiceExercise | WriteBlanksExercise;
export interface FillBlanksExercise {
prompt: string; // *EXAMPLE: "Complete the summary below. Click a blank to select the corresponding word for it."
@@ -30,6 +30,17 @@ export interface FillBlanksExercise {
}[];
}
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
type: "writeBlanks";
text: string; // *EXAMPLE: "The Government plans to give ${{14}}"
solutions: {
id: string; // *EXAMPLE: "14"
solution: string[]; // *EXAMPLE: ["Prescott"] - All possible solutions (case sensitive)
}[];
}
export interface MatchSentencesExercise {
type: "matchSentences";
prompt: string;