Added Speaking to level, fixed a bug where it was causing level to crash if the listening was already created and the section was switched, added true false exercises to listening
This commit is contained in:
@@ -35,7 +35,7 @@ export const listeningSection = (task: number) => {
|
||||
};
|
||||
|
||||
export const speakingTask = (task: number) => {
|
||||
if (task === 3) {
|
||||
if ([1,3].includes(task)) {
|
||||
return {
|
||||
id: v4(),
|
||||
type: "interactiveSpeaking",
|
||||
|
||||
@@ -72,6 +72,8 @@ export interface LevelSectionSettings extends SectionSettings {
|
||||
speakingSecondTopic?: string;
|
||||
isSpeakingTopicOpen: boolean;
|
||||
isGenerateVideoOpen: boolean;
|
||||
isSpeakingExercisesOpen: boolean;
|
||||
isConfigureExercisesOpen: boolean;
|
||||
|
||||
// section picker
|
||||
isReadingPickerOpen: boolean;
|
||||
@@ -80,6 +82,7 @@ export interface LevelSectionSettings extends SectionSettings {
|
||||
|
||||
export type Context = "passage" | "video" | "audio" | "listeningScript" | "speakingScript" | "writing";
|
||||
export type Generating = Context | "exercises" | string | undefined;
|
||||
export type LevelGenResults = {generating: string, result: Record<string, any>[], module: Module};
|
||||
export type Section = LevelPart | ReadingPart | ListeningPart | WritingExercise | SpeakingExercise | InteractiveSpeakingExercise;
|
||||
export type ExamPart = ListeningPart | ReadingPart | LevelPart;
|
||||
|
||||
@@ -91,7 +94,7 @@ export interface SectionState {
|
||||
generating: Generating;
|
||||
genResult: {generating: string, result: Record<string, any>[], module: Module} | undefined;
|
||||
levelGenerating: Generating[];
|
||||
levelGenResults: {generating: string, result: Record<string, any>[], module: Module}[];
|
||||
levelGenResults: LevelGenResults[];
|
||||
focusedExercise?: {questionId: number; id: string} | undefined;
|
||||
writingSection?: number;
|
||||
speakingSection?: number;
|
||||
|
||||
Reference in New Issue
Block a user