feature: swl build process
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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" },
|
||||
|
||||
@@ -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] || {};
|
||||
|
||||
Reference in New Issue
Block a user