-
-
+
-
diff --git a/client/src/pages/learningPath/learningContentPage/LearningContentNavigation.vue b/client/src/pages/learningPath/learningContentPage/LearningContentNavigation.vue
deleted file mode 100644
index 01717dbc..00000000
--- a/client/src/pages/learningPath/learningContentPage/LearningContentNavigation.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/client/src/pages/learningPath/learningContentPage/blocks/AssignmentBlock.vue b/client/src/pages/learningPath/learningContentPage/blocks/AssignmentBlock.vue
index 0afb1a47..37548374 100644
--- a/client/src/pages/learningPath/learningContentPage/blocks/AssignmentBlock.vue
+++ b/client/src/pages/learningPath/learningContentPage/blocks/AssignmentBlock.vue
@@ -1,5 +1,6 @@
diff --git a/client/src/pages/learningPath/learningContentPage/blocks/FeedbackBlock.vue b/client/src/pages/learningPath/learningContentPage/blocks/FeedbackBlock.vue
index 9716f7e1..e2ebbd7c 100644
--- a/client/src/pages/learningPath/learningContentPage/blocks/FeedbackBlock.vue
+++ b/client/src/pages/learningPath/learningContentPage/blocks/FeedbackBlock.vue
@@ -1,9 +1,5 @@
-
+
diff --git a/client/src/pages/learningPath/learningContentPage/layouts/LearningContentFooter.vue b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentFooter.vue
new file mode 100644
index 00000000..c9292f36
--- /dev/null
+++ b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentFooter.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
diff --git a/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue
new file mode 100644
index 00000000..9e6bacd5
--- /dev/null
+++ b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+ {{ props.subtitle }}
+
+
+
+
+ {{ props.title }}
+
+
+
+
+
+
diff --git a/client/src/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue
new file mode 100644
index 00000000..7068e799
--- /dev/null
+++ b/client/src/pages/learningPath/learningContentPage/layouts/LearningContentSimpleLayout.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+ {{ props.subtitle }}
+
+
+
+
{{ props.title }}
+
+
+
+
diff --git a/client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue b/client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue
index d9854c08..7ac8868b 100644
--- a/client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue
+++ b/client/src/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue
@@ -5,9 +5,10 @@ import * as log from "loglevel";
import { COMPLETION_FAILURE, COMPLETION_SUCCESS } from "@/constants";
import LearningContentContainer from "@/pages/learningPath/learningContentPage/LearningContentContainer.vue";
+import LearningContentMultiLayout from "@/pages/learningPath/learningContentPage/layouts/LearningContentMultiLayout.vue";
import { useCourseSessionsStore } from "@/stores/courseSessions";
+import eventBus from "@/utils/eventBus";
import { computed, reactive } from "vue";
-import LearningContentNavigation from "../learningContentPage/LearningContentNavigation.vue";
log.debug("LearningContent.vue setup");
@@ -24,7 +25,14 @@ const props = defineProps<{
const questions = computed(() => props.learningUnit?.children);
const currentQuestion = computed(() => questions.value[state.questionIndex]);
-const showBackButton = computed(() => state.questionIndex != 0);
+const showPreviousButton = computed(() => state.questionIndex != 0);
+const showNextButton = computed(
+ () => state.questionIndex + 1 < questions.value?.length && questions.value?.length > 1
+);
+const showExitButton = computed(
+ () =>
+ questions.value?.length === 1 || questions.value?.length === state.questionIndex + 1
+);
function handleContinue() {
log.debug("handleContinue");
@@ -43,74 +51,82 @@ function handleBack() {
state.questionIndex -= 1;
}
}
+
+eventBus.on("finishedLearningContent", () => {
+ circleStore.closeSelfEvaluation(props.learningUnit);
+});
-
-
-
- {{ currentQuestion.competence_id }} {{ currentQuestion.title }}
-
+
+
+
+
+ {{ currentQuestion.competence_id }} {{ currentQuestion.title }}
+
-
-
-
-
+
+
+
-
- {{ $t("selfEvaluation.progressText") }}
-
- {{ $t("selfEvaluation.progressLink") }}
-
+
+ {{ $t("selfEvaluation.progressText") }}
+
+ {{ $t("selfEvaluation.progressLink") }}
+
+
-
-
+
diff --git a/client/src/utils/eventBus.ts b/client/src/utils/eventBus.ts
index 788b978d..dfed18a8 100644
--- a/client/src/utils/eventBus.ts
+++ b/client/src/utils/eventBus.ts
@@ -3,6 +3,7 @@ import mitt from "mitt";
export type MittEvents = {
// FIXME: clean up with VBV-305
switchedCourseSession: number;
+ finishedLearningContent: boolean;
};
const eventBus = mitt();
diff --git a/cypress/e2e/circle.cy.js b/cypress/e2e/circle.cy.js
index 33639b1d..7030a693 100644
--- a/cypress/e2e/circle.cy.js
+++ b/cypress/e2e/circle.cy.js
@@ -38,15 +38,15 @@ describe("circle page", () => {
"contain",
"Verschaffe dir einen Überblick"
);
- cy.get('[data-cy="complete-and-continue"]').click();
+ cy.get('[data-cy="complete-and-continue"]').click({ force: true });
cy.get('[data-cy="ls-continue-button"]').click();
cy.get('[data-cy="ln-title"]').should("contain", "Mediathek Fahrzeug");
- cy.get('[data-cy="complete-and-continue"]').click();
+ cy.get('[data-cy="complete-and-continue"]').click({ force: true });
cy.get('[data-cy="ls-continue-button"]').click();
cy.get('[data-cy="ln-title"]').should("contain", "Vorbereitungsauftrag");
- cy.get('[data-cy="complete-and-continue"]').click();
+ cy.get('[data-cy="complete-and-continue"]').click({ force: true });
cy.get(
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick-checkbox"] > .cy-checkbox-checked'
@@ -68,7 +68,7 @@ describe("circle page", () => {
"contain",
"Verschaffe dir einen Überblick"
);
- cy.get('[data-cy="complete-and-continue"]').click();
+ cy.get('[data-cy="complete-and-continue"]').click({ force: true });
cy.get('[data-cy="ls-continue-button"]').should("contain", "Weiter geht's");
cy.get('[data-cy="ls-continue-button"]').click();
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 31417e1e..49b22544 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -105,9 +105,9 @@ Cypress.Commands.add('makeSelfEvaluation', (answers) => {
cy.get('[data-cy="fail"]').click();
}
if (i < answers.length - 1) {
- cy.get('[data-cy="next-step"]').click();
+ cy.get('[data-cy="next-step"]').click({ force: true });
} else {
- cy.get('[data-cy="complete-and-continue"]').click();
+ cy.get('[data-cy="complete-and-continue"]').click({ force: true });
}
}
});