( superBlock: SuperBlocks, block: string, helpCategory: string, questionCount: number, title?: string )
| 24 | ] as const; |
| 25 | |
| 26 | async function createQuiz( |
| 27 | superBlock: SuperBlocks, |
| 28 | block: string, |
| 29 | helpCategory: string, |
| 30 | questionCount: number, |
| 31 | title?: string |
| 32 | ) { |
| 33 | if (!title) { |
| 34 | title = block; |
| 35 | } |
| 36 | await updateIntroJson(superBlock, block, title); |
| 37 | |
| 38 | const challengeId = new ObjectId(); |
| 39 | await createMetaJson(block, title, helpCategory, challengeId); |
| 40 | await createQuizChallenge({ challengeId, block, title, questionCount }); |
| 41 | const superblockFilename = ( |
| 42 | superBlockToFilename as Record<SuperBlocks, string> |
| 43 | )[superBlock]; |
| 44 | void updateSimpleSuperblockStructure(block, { order: 0 }, superblockFilename); |
| 45 | } |
| 46 | |
| 47 | async function updateIntroJson( |
| 48 | superBlock: SuperBlocks, |
no test coverage detected