Fix `npm run test`
This commit is contained in:
parent
e8386a71a8
commit
924bf6f140
|
|
@ -18,6 +18,7 @@ const emit = defineEmits(["back", "next"]);
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn-text inline-flex items-center px-3 py-2"
|
class="btn-text inline-flex items-center px-3 py-2"
|
||||||
|
data-cy="close-learning-content"
|
||||||
@click="$emit('back')"
|
@click="$emit('back')"
|
||||||
>
|
>
|
||||||
<it-icon-arrow-left class="-ml-1 mr-1 h-5 w-5"></it-icon-arrow-left>
|
<it-icon-arrow-left class="-ml-1 mr-1 h-5 w-5"></it-icon-arrow-left>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import type { WagtailCircle } from "@/types";
|
||||||
import { describe, it } from "vitest";
|
import { describe, it } from "vitest";
|
||||||
import { Circle } from "../circle";
|
import { Circle } from "../circle";
|
||||||
import data from "./learning_path_json.json";
|
import data from "./learning_path_json.json";
|
||||||
|
|
@ -6,7 +7,7 @@ describe("Circle.parseJson", () => {
|
||||||
it("can parse circle from api response", () => {
|
it("can parse circle from api response", () => {
|
||||||
const cirleData = data.children.find(
|
const cirleData = data.children.find(
|
||||||
(c) => c.slug === "test-lehrgang-lp-circle-analyse"
|
(c) => c.slug === "test-lehrgang-lp-circle-analyse"
|
||||||
);
|
) as unknown as WagtailCircle;
|
||||||
const circle = Circle.fromJson(cirleData, undefined);
|
const circle = Circle.fromJson(cirleData, undefined);
|
||||||
expect(circle.learningSequences.length).toBe(3);
|
expect(circle.learningSequences.length).toBe(3);
|
||||||
expect(circle.flatLearningContents.length).toBe(7);
|
expect(circle.flatLearningContents.length).toBe(7);
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,59 @@
|
||||||
{
|
{
|
||||||
"id": 372,
|
"id": 362,
|
||||||
"title": "Test Lernpfad",
|
"title": "Test Lernpfad",
|
||||||
"slug": "test-lehrgang-lp",
|
"slug": "test-lehrgang-lp",
|
||||||
"type": "learnpath.LearningPath",
|
"type": "learnpath.LearningPath",
|
||||||
"translation_key": "42e559ca-970f-4a08-9e5e-63860585ee1e",
|
"translation_key": "8a230aa1-075e-4ac1-a8d6-87642c4f33ba",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": 373,
|
"id": 363,
|
||||||
"title": "Basis",
|
"title": "Basis",
|
||||||
"slug": "test-lehrgang-lp-topic-basis",
|
"slug": "test-lehrgang-lp-topic-basis",
|
||||||
"type": "learnpath.Topic",
|
"type": "learnpath.Topic",
|
||||||
"translation_key": "d68c1544-cf22-4a59-a81c-8cb977440cd0",
|
"translation_key": "d6e14156-2fb9-4f1b-83ce-6879e364f9a2",
|
||||||
|
"frontend_url": "",
|
||||||
"is_visible": false
|
"is_visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 374,
|
"id": 364,
|
||||||
"title": "Basis",
|
"title": "Basis",
|
||||||
"slug": "test-lehrgang-lp-circle-basis",
|
"slug": "test-lehrgang-lp-circle-basis",
|
||||||
"type": "learnpath.Circle",
|
"type": "learnpath.Circle",
|
||||||
"translation_key": "ec62a2af-6f74-4031-b971-c3287bbbc573",
|
"translation_key": "8034e867-4b05-4509-a9bc-99f9f3619e88",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": 375,
|
"id": 365,
|
||||||
"title": "Starten",
|
"title": "Starten",
|
||||||
"slug": "test-lehrgang-lp-circle-basis-ls-starten",
|
"slug": "test-lehrgang-lp-circle-basis-ls-starten",
|
||||||
"type": "learnpath.LearningSequence",
|
"type": "learnpath.LearningSequence",
|
||||||
"translation_key": "c5fdada9-036d-4516-a50f-6656a1c6b009",
|
"translation_key": "868bc4cb-c5b5-423e-a890-433184cd06e0",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis#ls-starten",
|
||||||
"icon": "it-icon-ls-start"
|
"icon": "it-icon-ls-start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 376,
|
"id": 366,
|
||||||
|
"title": "Einf\u00fchrung",
|
||||||
|
"slug": "test-lehrgang-lp-circle-basis-lu-einf\u00fchrung",
|
||||||
|
"type": "learnpath.LearningUnit",
|
||||||
|
"translation_key": "6b0a4794-9861-4ea4-b422-99261a4347a6",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis#lu-einf\u00fchrung",
|
||||||
|
"evaluate_url": "/learn/test-lehrgang-lp/basis/evaluate/einf\u00fchrung",
|
||||||
|
"course_category": {
|
||||||
|
"id": 14,
|
||||||
|
"title": "Allgemein",
|
||||||
|
"general": true
|
||||||
|
},
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 367,
|
||||||
"title": "Einf\u00fchrung",
|
"title": "Einf\u00fchrung",
|
||||||
"slug": "test-lehrgang-lp-circle-basis-lc-einf\u00fchrung",
|
"slug": "test-lehrgang-lp-circle-basis-lc-einf\u00fchrung",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "01de5131-28ce-4b1f-805f-8643384bfd6b",
|
"translation_key": "d1d1b923-f597-4de7-ac44-d02c2f0a1a59",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis/einf\u00fchrung",
|
||||||
"minutes": 15,
|
"minutes": 15,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -42,24 +62,41 @@
|
||||||
"description": "Beispiel Dokument",
|
"description": "Beispiel Dokument",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "bd05f721-3e9d-4a11-8fe2-7c04e2365f52"
|
"id": "9f22d0b7-643a-4e97-816a-a41141befc95"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 377,
|
"id": 368,
|
||||||
"title": "Beenden",
|
"title": "Beenden",
|
||||||
"slug": "test-lehrgang-lp-circle-basis-ls-beenden",
|
"slug": "test-lehrgang-lp-circle-basis-ls-beenden",
|
||||||
"type": "learnpath.LearningSequence",
|
"type": "learnpath.LearningSequence",
|
||||||
"translation_key": "128c0162-025f-41be-9842-60016a77cdbc",
|
"translation_key": "338208db-7c85-470e-872f-850e34747873",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis#ls-beenden",
|
||||||
"icon": "it-icon-ls-end"
|
"icon": "it-icon-ls-end"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 378,
|
"id": 369,
|
||||||
|
"title": "Beenden",
|
||||||
|
"slug": "test-lehrgang-lp-circle-basis-lu-beenden",
|
||||||
|
"type": "learnpath.LearningUnit",
|
||||||
|
"translation_key": "c14b63d6-3144-41fa-8a3c-2eada6ddd5ea",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis#lu-beenden",
|
||||||
|
"evaluate_url": "/learn/test-lehrgang-lp/basis/evaluate/beenden",
|
||||||
|
"course_category": {
|
||||||
|
"id": 14,
|
||||||
|
"title": "Allgemein",
|
||||||
|
"general": true
|
||||||
|
},
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 370,
|
||||||
"title": "Jetzt kann es losgehen!",
|
"title": "Jetzt kann es losgehen!",
|
||||||
"slug": "test-lehrgang-lp-circle-basis-lc-jetzt-kann-es-losgehen",
|
"slug": "test-lehrgang-lp-circle-basis-lc-jetzt-kann-es-losgehen",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "271896b9-6082-4fd4-9d70-6093ec9cc6ea",
|
"translation_key": "6920bcac-597b-462a-9458-32aa5dc8d3f7",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/basis/jetzt-kann-es-losgehen",
|
||||||
"minutes": 30,
|
"minutes": 30,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -68,45 +105,130 @@
|
||||||
"description": "Beispiel Dokument",
|
"description": "Beispiel Dokument",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "204fc13b-a9ae-40de-8e09-f1e922c4fdd9"
|
"id": "1422a7c3-0a9a-4321-88a0-d82d0ed26ba2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Basis",
|
"description": "Basis",
|
||||||
"job_situations": [],
|
"goal_description": "('In diesem Circle baust du deine Handlungskompetenzen f\u00fcr diese Themen aus:',)",
|
||||||
"goals": [],
|
"goals": [
|
||||||
"experts": []
|
{
|
||||||
|
"type": "goal",
|
||||||
|
"value": "... hier ein Beispieltext f\u00fcr ein Ziel 1",
|
||||||
|
"id": "38afbda4-7b7e-4f5c-88e8-c595c43e1659"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "goal",
|
||||||
|
"value": "... hier ein Beispieltext f\u00fcr ein Ziel 2",
|
||||||
|
"id": "4d00ac58-0499-4316-9af2-356c37dedc35"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "goal",
|
||||||
|
"value": "... hier ein Beispieltext f\u00fcr ein Ziel 3",
|
||||||
|
"id": "945eb104-8cc1-45cd-a07a-a4d3ec4f39a3"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"job_situation_description": "Du triffst in diesem Circle auf die folgenden berufstypischen Handlungsfelder:",
|
||||||
|
"job_situations": [
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 1",
|
||||||
|
"id": "02fb807a-0d07-4353-81ec-8b8b383954d7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 2",
|
||||||
|
"id": "371952f6-5871-4bf1-b423-d3dab7371001"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 3",
|
||||||
|
"id": "116bfa7b-65e8-44a1-8c82-e8b05fd86a01"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 4",
|
||||||
|
"id": "08baf7dd-8801-4af9-8af8-714989775ddb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 5",
|
||||||
|
"id": "93ade4b8-c4fb-4941-98c5-e58336fca4bb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 6",
|
||||||
|
"id": "1fac4ee4-6d86-4e9e-9fa4-a99c6659bc8b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Job Situation 7",
|
||||||
|
"id": "06d1e273-dec8-4a0b-ae2c-2baeb7a19ec7"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"experts": [
|
||||||
|
{
|
||||||
|
"type": "person",
|
||||||
|
"value": {
|
||||||
|
"first_name": "Patrizia",
|
||||||
|
"last_name": "Mustermann",
|
||||||
|
"email": "patrizia.mustermann@example.com",
|
||||||
|
"photo": null,
|
||||||
|
"biography": ""
|
||||||
|
},
|
||||||
|
"id": "83490f33-da54-4548-baac-af75ea36651e"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 379,
|
"id": 371,
|
||||||
"title": "Beraten der Kunden",
|
"title": "Beraten der Kunden",
|
||||||
"slug": "test-lehrgang-lp-topic-beraten-der-kunden",
|
"slug": "test-lehrgang-lp-topic-beraten-der-kunden",
|
||||||
"type": "learnpath.Topic",
|
"type": "learnpath.Topic",
|
||||||
"translation_key": "91918780-75f8-4db3-8fb8-91b63f08b9b9",
|
"translation_key": "728a2578-a22c-41df-9079-43a5318c5030",
|
||||||
|
"frontend_url": "",
|
||||||
"is_visible": true
|
"is_visible": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 380,
|
"id": 372,
|
||||||
"title": "Analyse",
|
"title": "Analyse",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse",
|
"slug": "test-lehrgang-lp-circle-analyse",
|
||||||
"type": "learnpath.Circle",
|
"type": "learnpath.Circle",
|
||||||
"translation_key": "50f11be3-a56d-412d-be25-3d272fb5df40",
|
"translation_key": "e429adf5-dd5d-4699-b471-40c782fb507e",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": 381,
|
"id": 373,
|
||||||
"title": "Starten",
|
"title": "Starten",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-ls-starten",
|
"slug": "test-lehrgang-lp-circle-analyse-ls-starten",
|
||||||
"type": "learnpath.LearningSequence",
|
"type": "learnpath.LearningSequence",
|
||||||
"translation_key": "07ac0eb9-3671-4b62-8053-1d0c43a1f0fb",
|
"translation_key": "40e977e0-3668-418d-b838-d3774a5cbe7d",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#ls-starten",
|
||||||
"icon": "it-icon-ls-start"
|
"icon": "it-icon-ls-start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 382,
|
"id": 374,
|
||||||
|
"title": "Einf\u00fchrung",
|
||||||
|
"slug": "test-lehrgang-lp-circle-analyse-lu-einf\u00fchrung",
|
||||||
|
"type": "learnpath.LearningUnit",
|
||||||
|
"translation_key": "badfd186-26c1-433e-90ad-8cac52eb599f",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#lu-einf\u00fchrung",
|
||||||
|
"evaluate_url": "/learn/test-lehrgang-lp/analyse/evaluate/einf\u00fchrung",
|
||||||
|
"course_category": {
|
||||||
|
"id": 14,
|
||||||
|
"title": "Allgemein",
|
||||||
|
"general": true
|
||||||
|
},
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 375,
|
||||||
"title": "Einleitung Circle \"Analyse\"",
|
"title": "Einleitung Circle \"Analyse\"",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-einleitung-circle-analyse",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-einleitung-circle-analyse",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "00ed0ab2-fdb0-4ee6-a7d2-42a219b849a8",
|
"translation_key": "5e8d6478-6287-4658-94c5-ecbd5d624962",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/einleitung-circle-analyse",
|
||||||
"minutes": 15,
|
"minutes": 15,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -115,24 +237,27 @@
|
||||||
"description": "Beispiel Dokument",
|
"description": "Beispiel Dokument",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "892a9a4a-8e1e-4f7e-8c35-9bf3bbe5371b"
|
"id": "8b7f183e-1879-4391-953f-52d9a621f435"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 383,
|
"id": 376,
|
||||||
"title": "Beobachten",
|
"title": "Beobachten",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-ls-beobachten",
|
"slug": "test-lehrgang-lp-circle-analyse-ls-beobachten",
|
||||||
"type": "learnpath.LearningSequence",
|
"type": "learnpath.LearningSequence",
|
||||||
"translation_key": "4cb08bc2-d101-43cc-b006-8f2bbb1a0579",
|
"translation_key": "35df96df-2e8d-4f16-aee1-8d72990f63a0",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#ls-beobachten",
|
||||||
"icon": "it-icon-ls-watch"
|
"icon": "it-icon-ls-watch"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 384,
|
"id": 377,
|
||||||
"title": "Fahrzeug",
|
"title": "Fahrzeug",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lu-fahrzeug",
|
"slug": "test-lehrgang-lp-circle-analyse-lu-fahrzeug",
|
||||||
"type": "learnpath.LearningUnit",
|
"type": "learnpath.LearningUnit",
|
||||||
"translation_key": "8f4afa40-c27e-48f7-a2d7-0e713479a55e",
|
"translation_key": "405d42e4-ee10-4453-8e5f-82e49bb4d597",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#lu-fahrzeug",
|
||||||
|
"evaluate_url": "/learn/test-lehrgang-lp/analyse/evaluate/fahrzeug",
|
||||||
"course_category": {
|
"course_category": {
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"title": "Fahrzeug",
|
"title": "Fahrzeug",
|
||||||
|
|
@ -140,29 +265,32 @@
|
||||||
},
|
},
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": 397,
|
"id": 391,
|
||||||
"title": "Innerhalb des Handlungsfelds \u00abFahrzeug\u00bb bin ich f\u00e4hig, die Ziele und Pl\u00e4ne des Kunden zu ergr\u00fcnden (SOLL).",
|
"title": "Innerhalb des Handlungsfelds \u00abFahrzeug\u00bb bin ich f\u00e4hig, die Ziele und Pl\u00e4ne des Kunden zu ergr\u00fcnden (SOLL).",
|
||||||
"slug": "test-lehrgang-competence-crit-y13-fahrzeug",
|
"slug": "test-lehrgang-competence-crit-y13-fahrzeug",
|
||||||
"type": "competence.PerformanceCriteria",
|
"type": "competence.PerformanceCriteria",
|
||||||
"translation_key": "e9d49552-7d18-418a-94b6-ebb4ee6bf187",
|
"translation_key": "3b714984-afdb-4456-9c01-a59064724929",
|
||||||
|
"frontend_url": "",
|
||||||
"competence_id": "Y1.3"
|
"competence_id": "Y1.3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 398,
|
"id": 392,
|
||||||
"title": "Innerhalb des Handlungsfelds \u00abFahrzeug\u00bb bin ich f\u00e4hig, die IST-Situation des Kunden mit der geeigneten Gespr\u00e4chs-/Fragetechnik zu erfassen.",
|
"title": "Innerhalb des Handlungsfelds \u00abFahrzeug\u00bb bin ich f\u00e4hig, die IST-Situation des Kunden mit der geeigneten Gespr\u00e4chs-/Fragetechnik zu erfassen.",
|
||||||
"slug": "test-lehrgang-competence-crit-y21-fahrzeug",
|
"slug": "test-lehrgang-competence-crit-y21-fahrzeug",
|
||||||
"type": "competence.PerformanceCriteria",
|
"type": "competence.PerformanceCriteria",
|
||||||
"translation_key": "5f257b35-c6ca-49e4-9401-a5d02d53926d",
|
"translation_key": "c2850a27-60c5-471b-9fec-ba0baf152e91",
|
||||||
|
"frontend_url": "",
|
||||||
"competence_id": "Y2.1"
|
"competence_id": "Y2.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 385,
|
"id": 378,
|
||||||
"title": "Rafael Fasel wechselt sein Auto",
|
"title": "Rafael Fasel wechselt sein Auto",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-rafael-fasel-wechselt-sein-auto",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-rafael-fasel-wechselt-sein-auto",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "fda4f870-9307-414d-b07f-eea607a9afb7",
|
"translation_key": "b7779d45-adf4-41fc-a4a5-e95c732b2224",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/rafael-fasel-wechselt-sein-auto",
|
||||||
"minutes": 30,
|
"minutes": 30,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -171,16 +299,17 @@
|
||||||
"description": "In diesem Online-Training lernst du, wie du den Kundenbedarf ermittelst.",
|
"description": "In diesem Online-Training lernst du, wie du den Kundenbedarf ermittelst.",
|
||||||
"url": ""
|
"url": ""
|
||||||
},
|
},
|
||||||
"id": "700a0f64-0892-4fa5-9e08-3bd34e99edeb"
|
"id": "c79d34cb-0e7e-403d-a672-03d94cf6bdc7"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 386,
|
"id": 379,
|
||||||
"title": "Fachcheck Fahrzeug",
|
"title": "Fachcheck Fahrzeug",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-fachcheck-fahrzeug",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-fachcheck-fahrzeug",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "dce0847f-4593-4bba-bd0c-a09c71eb0344",
|
"translation_key": "e395e05c-81bf-4bc6-98e8-3833bebb551c",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/fachcheck-fahrzeug",
|
||||||
"minutes": 30,
|
"minutes": 30,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -189,16 +318,18 @@
|
||||||
"description": "Beispiel Test",
|
"description": "Beispiel Test",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "9f674aaa-ebf0-4a01-adcc-c0c46394fb10"
|
"id": "ac4c67bc-7de9-4e5c-a35e-e13f5766d6cc"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 387,
|
"id": 380,
|
||||||
"title": "Reisen",
|
"title": "Reisen",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lu-reisen",
|
"slug": "test-lehrgang-lp-circle-analyse-lu-reisen",
|
||||||
"type": "learnpath.LearningUnit",
|
"type": "learnpath.LearningUnit",
|
||||||
"translation_key": "c3f6d33f-8dbc-4d88-9a81-3c602c4f9cc8",
|
"translation_key": "d0c956cc-3c86-4e08-9990-ed4e85d03219",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#lu-reisen",
|
||||||
|
"evaluate_url": "/learn/test-lehrgang-lp/analyse/evaluate/reisen",
|
||||||
"course_category": {
|
"course_category": {
|
||||||
"id": 16,
|
"id": 16,
|
||||||
"title": "Reisen",
|
"title": "Reisen",
|
||||||
|
|
@ -206,21 +337,23 @@
|
||||||
},
|
},
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": 399,
|
"id": 393,
|
||||||
"title": "Innerhalb des Handlungsfelds \u00abReisen\u00bb bin ich f\u00e4hig, die Ziele und Pl\u00e4ne des Kunden zu ergr\u00fcnden (SOLL).",
|
"title": "Innerhalb des Handlungsfelds \u00abReisen\u00bb bin ich f\u00e4hig, die Ziele und Pl\u00e4ne des Kunden zu ergr\u00fcnden (SOLL).",
|
||||||
"slug": "test-lehrgang-competence-crit-y13-reisen",
|
"slug": "test-lehrgang-competence-crit-y13-reisen",
|
||||||
"type": "competence.PerformanceCriteria",
|
"type": "competence.PerformanceCriteria",
|
||||||
"translation_key": "1e488b69-8a3e-4acc-9547-48c103e0d038",
|
"translation_key": "1df45a12-41f2-4ff5-8580-d5a7caf5dd56",
|
||||||
|
"frontend_url": "",
|
||||||
"competence_id": "Y1.3"
|
"competence_id": "Y1.3"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 388,
|
"id": 381,
|
||||||
"title": "Reiseversicherung",
|
"title": "Reiseversicherung",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-reiseversicherung",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-reiseversicherung",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "ff513aae-efe1-4974-b67f-7a292b8aef86",
|
"translation_key": "bad7439a-8b0c-4877-8d6c-78f292be83d4",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/reiseversicherung",
|
||||||
"minutes": 240,
|
"minutes": 240,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -229,16 +362,17 @@
|
||||||
"description": "Beispiel \u00dcbung",
|
"description": "Beispiel \u00dcbung",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "f35f213e-1a33-49fe-97c5-26e15161719f"
|
"id": "7e1ee533-7f75-495b-a2bc-8bbd2b1311c9"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 389,
|
"id": 382,
|
||||||
"title": "Emma und Ayla campen durch Amerika",
|
"title": "Emma und Ayla campen durch Amerika",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-emma-und-ayla-campen-durch-amerika",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-emma-und-ayla-campen-durch-amerika",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "a77b0f9d-9a70-47bd-8e62-7580d70a4306",
|
"translation_key": "27f9d8f3-209c-4d55-94d9-2e70fbfe163b",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/emma-und-ayla-campen-durch-amerika",
|
||||||
"minutes": 120,
|
"minutes": 120,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -247,24 +381,41 @@
|
||||||
"description": "Beispiel \u00dcbung",
|
"description": "Beispiel \u00dcbung",
|
||||||
"url": "/static/media/web_based_trainings/story-06-a-01-emma-und-ayla-campen-durch-amerika-einstieg/scormcontent/index.html"
|
"url": "/static/media/web_based_trainings/story-06-a-01-emma-und-ayla-campen-durch-amerika-einstieg/scormcontent/index.html"
|
||||||
},
|
},
|
||||||
"id": "60f087ff-fa3a-4da2-820f-4fcdf449f70d"
|
"id": "b08e1851-8583-4428-b1bc-402c7095130b"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 390,
|
"id": 383,
|
||||||
"title": "Beenden",
|
"title": "Beenden",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-ls-beenden",
|
"slug": "test-lehrgang-lp-circle-analyse-ls-beenden",
|
||||||
"type": "learnpath.LearningSequence",
|
"type": "learnpath.LearningSequence",
|
||||||
"translation_key": "06f1e998-b827-41cc-8129-d72d731719c1",
|
"translation_key": "68be244d-0e00-4700-834c-57b4db366fc1",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#ls-beenden",
|
||||||
"icon": "it-icon-ls-end"
|
"icon": "it-icon-ls-end"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 391,
|
"id": 384,
|
||||||
|
"title": "Beenden",
|
||||||
|
"slug": "test-lehrgang-lp-circle-analyse-lu-beenden",
|
||||||
|
"type": "learnpath.LearningUnit",
|
||||||
|
"translation_key": "d594db87-ad78-491b-bf1b-410adfa3a0ba",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse#lu-beenden",
|
||||||
|
"evaluate_url": "/learn/test-lehrgang-lp/analyse/evaluate/beenden",
|
||||||
|
"course_category": {
|
||||||
|
"id": 14,
|
||||||
|
"title": "Allgemein",
|
||||||
|
"general": true
|
||||||
|
},
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 385,
|
||||||
"title": "KompetenzNavi anschauen",
|
"title": "KompetenzNavi anschauen",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-kompetenzprofil-anschauen",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-kompetenznavi-anschauen",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "6cc47dc1-a74f-4cbf-afa6-23885891c82f",
|
"translation_key": "8ee57ba5-e09e-4058-937a-b733ea72b969",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/kompetenznavi-anschauen",
|
||||||
"minutes": 30,
|
"minutes": 30,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -273,16 +424,17 @@
|
||||||
"description": "Beispiel Dokument",
|
"description": "Beispiel Dokument",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "3f685055-4e3e-4ca9-93af-bac19236931d"
|
"id": "3ef87e69-5e5c-415a-934c-ed47ad9fdd93"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 392,
|
"id": 386,
|
||||||
"title": "Circle \"Analyse\" abschliessen",
|
"title": "Circle \"Analyse\" abschliessen",
|
||||||
"slug": "test-lehrgang-lp-circle-analyse-lc-circle-analyse-abschliessen",
|
"slug": "test-lehrgang-lp-circle-analyse-lc-circle-analyse-abschliessen",
|
||||||
"type": "learnpath.LearningContent",
|
"type": "learnpath.LearningContent",
|
||||||
"translation_key": "9b32e2cd-1368-4885-a79b-906b45ba04bc",
|
"translation_key": "90d9ab63-cc0f-492f-aad1-f7d448ee5b2c",
|
||||||
|
"frontend_url": "/learn/test-lehrgang-lp/analyse/circle-analyse-abschliessen",
|
||||||
"minutes": 30,
|
"minutes": 30,
|
||||||
"contents": [
|
"contents": [
|
||||||
{
|
{
|
||||||
|
|
@ -291,34 +443,36 @@
|
||||||
"description": "Beispiel Dokument",
|
"description": "Beispiel Dokument",
|
||||||
"url": null
|
"url": null
|
||||||
},
|
},
|
||||||
"id": "650b7b15-b522-4df7-ac5b-6a654f12334f"
|
"id": "21415232-862b-488c-9987-4f4ee369a854"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Unit-Test Circle",
|
"description": "Unit-Test Circle",
|
||||||
"job_situations": [
|
"goal_description": "('In diesem Circle baust du deine Handlungskompetenzen f\u00fcr diese Themen aus:',)",
|
||||||
{
|
|
||||||
"type": "job_situation",
|
|
||||||
"value": "Autoversicherung",
|
|
||||||
"id": "c5a6b365-0a18-47d5-b6e1-6cb8b8ec7d35"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "job_situation",
|
|
||||||
"value": "Autokauf",
|
|
||||||
"id": "e969d2a2-b383-482c-a721-88552af086a6"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"goals": [
|
"goals": [
|
||||||
{
|
{
|
||||||
"type": "goal",
|
"type": "goal",
|
||||||
"value": "... die heutige Versicherungssituation von Privat- oder Gesch\u00e4ftskunden einzusch\u00e4tzen.",
|
"value": "... die heutige Versicherungssituation von Privat- oder Gesch\u00e4ftskunden einzusch\u00e4tzen.",
|
||||||
"id": "d9ad8aed-d7d6-42c7-b6d4-65102c8ddf10"
|
"id": "d1f001fa-f7b8-41a3-90c7-632260ff7054"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "goal",
|
"type": "goal",
|
||||||
"value": "... deinem Kunden seine optimale L\u00f6sung aufzuzeigen",
|
"value": "... deinem Kunden seine optimale L\u00f6sung aufzuzeigen",
|
||||||
"id": "2506950c-45cb-474f-acb9-45e83e9ebe1b"
|
"id": "8f73bb0f-e898-4961-ab28-dd34caca2c0b"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"job_situation_description": "Du triffst in diesem Circle auf die folgenden berufstypischen Handlungsfelder:",
|
||||||
|
"job_situations": [
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Autoversicherung",
|
||||||
|
"id": "df46930b-2911-4161-a677-75b4b156dff3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "job_situation",
|
||||||
|
"value": "Autokauf",
|
||||||
|
"id": "17a6d252-e942-44cc-920f-015e38e727be"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"experts": [
|
"experts": [
|
||||||
|
|
@ -331,14 +485,14 @@
|
||||||
"photo": null,
|
"photo": null,
|
||||||
"biography": ""
|
"biography": ""
|
||||||
},
|
},
|
||||||
"id": "b7b0ff2e-f840-4d74-99c1-c7a5ee6dc14e"
|
"id": "b0633305-5e74-43eb-93b8-ebbcfb1b17d1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"course": {
|
"course": {
|
||||||
"id": -1,
|
"id": -1,
|
||||||
"title": "Test Lerngang",
|
"title": "Test Lehrgang",
|
||||||
"category_name": "Handlungsfeld"
|
"category_name": "Handlungsfeld"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,25 +5,25 @@ import requests
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
client = requests.session()
|
client = requests.session()
|
||||||
client.get('http://localhost:8000/')
|
client.get("http://localhost:8001/")
|
||||||
|
|
||||||
client.post(
|
client.post(
|
||||||
'http://localhost:8000/api/core/login/',
|
"http://localhost:8001/api/core/login/",
|
||||||
json={
|
json={
|
||||||
'username': 'admin',
|
"username": "admin",
|
||||||
'password': 'test',
|
"password": "test",
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
response = client.get(
|
response = client.get(
|
||||||
'http://localhost:8000/api/course/page/test-lehrgang-lp/',
|
"http://localhost:8001/api/course/page/test-lehrgang-lp/",
|
||||||
)
|
)
|
||||||
print(response.status_code)
|
print(response.status_code)
|
||||||
print(response.json())
|
print(response.json())
|
||||||
|
|
||||||
with open('learning_path_json.json', 'w') as f:
|
with open("learning_path_json.json", "w") as f:
|
||||||
f.write(json.dumps(response.json(), indent=4))
|
f.write(json.dumps(response.json(), indent=4))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
|
|
@ -26,20 +26,15 @@ export function parseLearningSequences(
|
||||||
if (learningSequence) {
|
if (learningSequence) {
|
||||||
if (learningUnit) {
|
if (learningUnit) {
|
||||||
learningUnit.last = true;
|
learningUnit.last = true;
|
||||||
learningSequence.learningUnits.push(learningUnit);
|
|
||||||
}
|
}
|
||||||
result.push(learningSequence);
|
|
||||||
}
|
}
|
||||||
learningSequence = Object.assign(child, { learningUnits: [] });
|
learningSequence = Object.assign(child, { learningUnits: [] });
|
||||||
|
result.push(learningSequence);
|
||||||
} else if (child.type === "learnpath.LearningUnit") {
|
} else if (child.type === "learnpath.LearningUnit") {
|
||||||
if (!learningSequence) {
|
if (!learningSequence) {
|
||||||
throw new Error("LearningUnit found before LearningSequence");
|
throw new Error("LearningUnit found before LearningSequence");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (learningUnit && learningUnit.learningContents.length) {
|
|
||||||
learningSequence.learningUnits.push(learningUnit);
|
|
||||||
}
|
|
||||||
|
|
||||||
learningUnit = Object.assign(child, {
|
learningUnit = Object.assign(child, {
|
||||||
learningContents: [],
|
learningContents: [],
|
||||||
parentLearningSequence: learningSequence,
|
parentLearningSequence: learningSequence,
|
||||||
|
|
@ -50,9 +45,10 @@ export function parseLearningSequences(
|
||||||
return c;
|
return c;
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
learningSequence.learningUnits.push(learningUnit);
|
||||||
} else if (child.type === "learnpath.LearningContent") {
|
} else if (child.type === "learnpath.LearningContent") {
|
||||||
if (!learningUnit) {
|
if (!learningUnit) {
|
||||||
throw new Error("LearningContent found before LearningUnit");
|
throw new Error(`LearningContent found before LearningUnit ${child.slug}`);
|
||||||
}
|
}
|
||||||
previousLearningContent = learningContent;
|
previousLearningContent = learningContent;
|
||||||
|
|
||||||
|
|
@ -73,11 +69,8 @@ export function parseLearningSequences(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (learningUnit && learningSequence) {
|
if (learningUnit) {
|
||||||
// TypeScript does not get it here...
|
|
||||||
learningUnit.last = true;
|
learningUnit.last = true;
|
||||||
learningSequence.learningUnits.push(learningUnit);
|
|
||||||
result.push(learningSequence);
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Finished with LearningContent but there is no LearningSequence and LearningUnit"
|
"Finished with LearningContent but there is no LearningSequence and LearningUnit"
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ def create_test_learning_path(user=None, skip_locales=True):
|
||||||
LearningSequenceFactory(
|
LearningSequenceFactory(
|
||||||
title="Starten", parent=circle_basis, icon="it-icon-ls-start"
|
title="Starten", parent=circle_basis, icon="it-icon-ls-start"
|
||||||
)
|
)
|
||||||
|
LearningUnitFactory(title="Einführung", parent=circle_basis)
|
||||||
LearningContentFactory(
|
LearningContentFactory(
|
||||||
title="Einführung",
|
title="Einführung",
|
||||||
parent=circle_basis,
|
parent=circle_basis,
|
||||||
|
|
@ -103,6 +104,7 @@ def create_test_learning_path(user=None, skip_locales=True):
|
||||||
contents=[("document", DocumentBlockFactory())],
|
contents=[("document", DocumentBlockFactory())],
|
||||||
)
|
)
|
||||||
LearningSequenceFactory(title="Beenden", parent=circle_basis, icon="it-icon-ls-end")
|
LearningSequenceFactory(title="Beenden", parent=circle_basis, icon="it-icon-ls-end")
|
||||||
|
LearningUnitFactory(title="Beenden", parent=circle_basis)
|
||||||
LearningContentFactory(
|
LearningContentFactory(
|
||||||
title="Jetzt kann es losgehen!",
|
title="Jetzt kann es losgehen!",
|
||||||
parent=circle_basis,
|
parent=circle_basis,
|
||||||
|
|
@ -140,6 +142,7 @@ def create_test_learning_path(user=None, skip_locales=True):
|
||||||
)
|
)
|
||||||
|
|
||||||
LearningSequenceFactory(title="Starten", parent=circle, icon="it-icon-ls-start")
|
LearningSequenceFactory(title="Starten", parent=circle, icon="it-icon-ls-start")
|
||||||
|
LearningUnitFactory(title="Einführung", parent=circle)
|
||||||
LearningContentFactory(
|
LearningContentFactory(
|
||||||
title=f'Einleitung Circle "Analyse"',
|
title=f'Einleitung Circle "Analyse"',
|
||||||
parent=circle,
|
parent=circle,
|
||||||
|
|
@ -204,6 +207,7 @@ def create_test_learning_path(user=None, skip_locales=True):
|
||||||
)
|
)
|
||||||
|
|
||||||
LearningSequenceFactory(title="Beenden", parent=circle, icon="it-icon-ls-end")
|
LearningSequenceFactory(title="Beenden", parent=circle, icon="it-icon-ls-end")
|
||||||
|
LearningUnitFactory(title="Beenden", parent=circle)
|
||||||
LearningContentFactory(
|
LearningContentFactory(
|
||||||
title="KompetenzNavi anschauen",
|
title="KompetenzNavi anschauen",
|
||||||
parent=circle,
|
parent=circle,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue