feature: add separate exam parts

This commit is contained in:
Matthias Jung
2026-08-05 16:34:48 +02:00
parent 8a5c53289c
commit d3d5f3a554
3 changed files with 25 additions and 2 deletions
+10 -1
View File
@@ -20,7 +20,12 @@
{ id: "A", group: "primary", label: "Klasse A", detail: "B + V + N + E + A", parts: ["B", "V", "N", "E", "A"], color: "#3BB583" },
{ id: "N-E", group: "upgrade", label: "N → E", detail: "Technik E", parts: ["E"], color: "#FE756C" },
{ id: "N-A", group: "upgrade", label: "N → A", detail: "Technik E + A", parts: ["E", "A"], color: "#3BB583" },
{ id: "E-A", group: "upgrade", label: "E → A", detail: "Technik A", parts: ["A"], color: "#3BB583" }
{ id: "E-A", group: "upgrade", label: "E → A", detail: "Technik A", parts: ["A"], color: "#3BB583" },
{ id: "part-B", group: "single", label: "B", detail: "Betriebliche Kenntnisse", parts: ["B"], color: "#47ABE8" },
{ id: "part-V", group: "single", label: "V", detail: "Kenntnisse von Vorschriften", parts: ["V"], color: "#47ABE8" },
{ id: "part-N", group: "single", label: "N", detail: "Technik Klasse N", parts: ["N"], color: "#47ABE8" },
{ id: "part-E", group: "single", label: "E", detail: "Technik Klasse E", parts: ["E"], color: "#FE756C" },
{ id: "part-A", group: "single", label: "A", detail: "Technik Klasse A", parts: ["A"], color: "#3BB583" }
];
function normalizeCatalog(rawCatalog, metadata, questionIndex) {
@@ -181,6 +186,9 @@
var upgradeChoices = computed(function () {
return EXAM_CHOICES.filter(function (choice) { return choice.group === "upgrade"; });
});
var singlePartChoices = computed(function () {
return EXAM_CHOICES.filter(function (choice) { return choice.group === "single"; });
});
var currentChoice = computed(function () {
if (!session.value) return null;
return EXAM_CHOICES.find(function (choice) { return choice.id === session.value.choiceId; });
@@ -621,6 +629,7 @@
view: view,
primaryChoices: primaryChoices,
upgradeChoices: upgradeChoices,
singlePartChoices: singlePartChoices,
currentChoice: currentChoice,
currentPart: currentPart,
currentPartDefinition: currentPartDefinition,
+1 -1
View File
@@ -160,7 +160,7 @@ class Build:
page = self.__build_page(
content,
page_stylesheets=["assets/exam-simulator.css?ts=202608051415"],
page_scripts=["assets/vue.global.prod.js", "assets/exam-simulator.js?ts=20260805"],
page_scripts=["assets/vue.global.prod.js", "assets/exam-simulator.js?ts=202608051500"],
)
with (self.config.p_build / "simulation.html").open("w", encoding="utf-8") as file:
file.write(page)
+14
View File
@@ -14,6 +14,7 @@
<p class="lead">Welche Prüfung möchtest du simulieren?</p>
<h2 class="h4 mt-5">Erstprüfung</h2>
<p class="mb-2">Du hast noch keine Amateurfunkprüfung abgelegt? Dann ist das die richtige Simulation für Dich.</p>
<div class="row row-cols-1 row-cols-md-3 g-2">
<div v-for="choice in primaryChoices" :key="choice.id" class="col">
<button type="button" class="btn w-100 h-100 py-3 text-white"
@@ -25,6 +26,7 @@
</div>
<h2 class="h4 mt-4">Aufstockungsprüfung</h2>
<p class="mb-2">Du hast bereits eine Zulassung zum Amateurfunkdienst und möchtest in eine höhere Klasse aufstocken? Dann wähle hier die passende Prüfung.</p>
<div class="row row-cols-1 row-cols-md-3 g-2">
<div v-for="choice in upgradeChoices" :key="choice.id" class="col">
<button type="button" class="btn w-100 h-100 py-3 text-white"
@@ -35,6 +37,18 @@
</div>
</div>
<h2 class="h4 mt-4">Einzelne Prüfungsteile</h2>
<p class="mb-2">Übe gezielt einen Prüfungsteil unter Prüfungsbedingungen.</p>
<div class="row row-cols-1 row-cols-sm-2 row-cols-lg-5 g-2">
<div v-for="choice in singlePartChoices" :key="choice.id" class="col">
<button type="button" class="btn w-100 h-100 py-3 text-white"
:style="{ backgroundColor: choice.color, borderColor: choice.color }" @click="startExam(choice)">
<span class="d-block" v-text="choice.label"></span>
<small class="d-block" v-text="choice.detail"></small>
</button>
</div>
</div>
<div class="alert alert-primary mt-4 mb-0">
Jeder Prüfungsteil enthält 25 Fragen. Für B, V, N und E stehen jeweils 45 Minuten zur Verfügung,
für Technik A 60 Minuten. Ein Teil ist ab 19 Punkten bestanden.