ENCOA-295

This commit is contained in:
Carlos-Mesquita
2024-12-26 12:26:17 +00:00
parent 958f74bd9c
commit f642e41bfa
13 changed files with 492 additions and 16 deletions

View File

@@ -97,13 +97,13 @@ export const sectionLabels = (module: Module, levelParts?: number) => {
label: `Section ${index + 1}`
}));
case 'level':
return levelParts !== undefined ?
Array.from({ length: levelParts }, (_, index) => ({
id: index + 1,
label: `Part ${index + 1}`
}))
:
[{ id: 1, label: "Part 1" }];
return levelParts !== undefined ?
Array.from({ length: levelParts }, (_, index) => ({
id: index + 1,
label: `Part ${index + 1}`
}))
:
[{ id: 1, label: "Part 1" }];
}
}
@@ -166,6 +166,16 @@ const defaultModuleSettings = (module: Module, minTimer: number): ModuleState =>
importModule: true,
importing: false,
edit: [],
instructionsState: {
isInstructionsOpen: false,
chosenOption: { value: "Automatic", label: "Automatic" },
currentInstructions: "",
presetInstructions: "",
customInstructions: "",
currentInstructionsURL: "",
presetInstructionsURL: "",
customInstructionsURL: "",
},
};
if (["reading", "writing"].includes(module)) {
state["type"] = "general";

View File

@@ -38,7 +38,7 @@ export interface ListeningSectionSettings extends SectionSettings {
isListeningTopicOpen: boolean;
uploadedAudioURL: string | undefined;
audioCutURL: string | undefined;
useEntireAudioFile: boolean;
useEntireAudioFile: boolean;
}
export interface WritingSectionSettings extends SectionSettings {
@@ -108,6 +108,19 @@ export interface SectionState {
scriptLoading: boolean;
}
export interface ListeningInstructionsState {
isInstructionsOpen: boolean;
chosenOption: Option;
currentInstructions: string;
presetInstructions: string;
customInstructions: string;
currentInstructionsURL: string;
presetInstructionsURL: string;
customInstructionsURL: string;
}
export interface ModuleState {
examLabel: string;
sections: SectionState[];
@@ -122,6 +135,7 @@ export interface ModuleState {
edit: number[];
type?: "general" | "academic";
academic_url?: string | undefined;
instructionsState: ListeningInstructionsState;
}
export interface Avatar {