Exam Edit on ExamList
This commit is contained in:
@@ -5,7 +5,7 @@ import { ExamPart, ModuleState, SectionState } from "./types"
|
||||
import { levelPart, listeningSection, readingPart, speakingTask, writingTask } from "@/stores/examEditor/sections"
|
||||
|
||||
|
||||
const defaultSettings = (module: Module) => {
|
||||
export const defaultSettings = (module: Module) => {
|
||||
const baseSettings = {
|
||||
category: '',
|
||||
introOption: { label: 'None', value: 'None' },
|
||||
@@ -77,7 +77,7 @@ const defaultSettings = (module: Module) => {
|
||||
}
|
||||
}
|
||||
|
||||
const sectionLabels = (module: Module) => {
|
||||
export const sectionLabels = (module: Module, levelParts?: number) => {
|
||||
switch (module) {
|
||||
case 'reading':
|
||||
return Array.from({ length: 3 }, (_, index) => ({
|
||||
@@ -131,7 +131,6 @@ const defaultSection = (module: Module, sectionId: number) => {
|
||||
export const defaultSectionSettings = (module: Module, sectionId: number, part?: ExamPart) => {
|
||||
return {
|
||||
sectionId: sectionId,
|
||||
sectionLabel: "",
|
||||
settings: defaultSettings(module),
|
||||
state: part !== undefined ? part : defaultSection(module, sectionId),
|
||||
generating: undefined,
|
||||
|
||||
Reference in New Issue
Block a user