feature: swl build process

This commit is contained in:
Matthias Jung
2026-08-18 18:23:16 +02:00
parent 1622960043
commit 9502950a61
8 changed files with 53 additions and 10 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
if (!value) return [];
var seen = new Set();
return value.toUpperCase().split(/[\s+,]+/).filter(function (questionId) {
if (!/^[A-Z]{2}\d{3}$/.test(questionId) || seen.has(questionId)) return false;
if (!/^[A-Z]{2,3}\d{3}$/.test(questionId) || seen.has(questionId)) return false;
seen.add(questionId);
return true;
});
+1
View File
@@ -2,6 +2,7 @@
"use strict";
var COURSE_CHOICES = [
{ edition: "SWL", label: "SWL-Kurs", detail: "Kurzwellenhören", color: "#FFFFFF" },
{ edition: "N", label: "N-Kurs", detail: "N", color: "#47ABE8" },
{ edition: "NE", label: "E-Kurs", detail: "N + E", color: "#FE756C" },
{ edition: "NEA", label: "A-Kurs", detail: "N + E + A", color: "#3BB583" },
+3 -3
View File
@@ -12,9 +12,9 @@
function walk(section, sectionIndex, category) {
(section.questions || []).forEach(function (question) {
var part = sectionIndex === 0
? partForClass[String(question.class)]
: partForSection[sectionIndex];
var part = String(question.class) === "SWL"
? "SWL"
: (sectionIndex === 0 ? partForClass[String(question.class)] : partForSection[sectionIndex]);
if (!part) return;
var questionMetadata = metadata[question.number] || {};