mirror of
https://github.com/deunix-educ/PyQuest.git
synced 2026-11-25 08:19:44 +01:00
Add author-mode level editor: forms, live checks, Python execution of solutions, learner preview, YAML export
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -180,12 +180,14 @@ export class LevelLinter {
|
||||
// ---- Règles de contribution et cohérence des tests ----------------------------------------------------
|
||||
|
||||
#contribution(level, add) {
|
||||
// Un seul rappel pour toutes les étapes narrées (sinon une ligne par étape noie le reste).
|
||||
const narrated = level.steps.map((step, index) => (step.type === 'explain' && step.voice ? index : null)).filter((index) => index !== null);
|
||||
if (narrated.length > 0) {
|
||||
add('info', 'voice_to_generate', ['steps', narrated[0]], { steps: narrated.map((index) => index + 1).join(', ') });
|
||||
}
|
||||
level.steps.forEach((step, index) => {
|
||||
const path = ['steps', index];
|
||||
if (step.type === 'explain') {
|
||||
if (step.voice) {
|
||||
add('info', 'voice_to_generate', path);
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.#tests(step.tests, [...path, 'tests'], add);
|
||||
|
||||
Reference in New Issue
Block a user