All checks were successful
Deploy to production / deploy (push) Successful in 2m8s
feat: füge Skript hinzu, um doppelte Muster in Lektionen zu identifizieren feat: implementiere Skript zur Suche nach Übungen anhand von Text feat: erstelle Skript zur Reparatur von Multiple-Choice-Antworten feat: implementiere Skript zum Drucken von Lehrmusterinformationen
43 lines
1.9 KiB
JavaScript
43 lines
1.9 KiB
JavaScript
import { BISAYA_LESSONS_24_43_BY_NUMBER, BISAYA_DIDACTICS_24_43 } from './bisaya-course-plan-24-43.js';
|
|
import { BISAYA_PHASE3_LESSONS, BISAYA_PHASE3_DIDACTICS } from './bisaya-course-phase3-extension.js';
|
|
|
|
// Build lesson->patterns for 24..63 using available didactics
|
|
const lessonPatterns = {};
|
|
for (let n = 24; n <= 63; n++) {
|
|
const lesson = BISAYA_LESSONS_24_43_BY_NUMBER[n] || (BISAYA_PHASE3_LESSONS && BISAYA_PHASE3_LESSONS.find(l=>l.num===n));
|
|
if (!lesson) continue;
|
|
const title = lesson.title;
|
|
let didactic = BISAYA_DIDACTICS_24_43[title] || (BISAYA_PHASE3_DIDACTICS && BISAYA_PHASE3_DIDACTICS[title]);
|
|
if (!didactic) continue;
|
|
const pats = (didactic.corePatterns || []).map(p => typeof p === 'string' ? p : p.target).filter(Boolean).map(s=>s.trim());
|
|
lessonPatterns[n] = pats;
|
|
}
|
|
|
|
// Build reverse map from pattern -> list of lessons
|
|
const patternMap = {};
|
|
for (const [n, pats] of Object.entries(lessonPatterns)) {
|
|
for (const p of pats) {
|
|
patternMap[p] = patternMap[p] || [];
|
|
patternMap[p].push(Number(n));
|
|
}
|
|
}
|
|
|
|
// For lesson 26, list patterns that also appear in lessons <26
|
|
const dupes = [];
|
|
const pats26 = lessonPatterns[26] || [];
|
|
for (const p of pats26) {
|
|
const appears = patternMap[p] || [];
|
|
const earlier = appears.filter(x=>x < 26);
|
|
if (earlier.length) dupes.push({pattern: p, earlier});
|
|
}
|
|
|
|
console.log('Patterns in lesson 26 that also appear in earlier lessons:');
|
|
if (dupes.length === 0) console.log(' (none)');
|
|
for (const d of dupes) console.log(` - ${d.pattern} (also in lessons: ${d.earlier.join(', ')})`);
|
|
|
|
// Also list patterns in lesson 24-26 that are duplicates across 24-26
|
|
console.log('\nPatterns repeated within 24..26:');
|
|
const localMap = {};
|
|
for (let n=24;n<=26;n++){ (lessonPatterns[n]||[]).forEach(p=>{ localMap[p]=localMap[p]||[]; localMap[p].push(n); }); }
|
|
for (const [p, arr] of Object.entries(localMap)) if (arr.length>1) console.log(` - ${p}: in lessons ${arr.join(', ')}`);
|