Show evaluation full screen
This commit is contained in:
parent
9a5feb2ba6
commit
26caf06391
|
|
@ -41,7 +41,7 @@ const courseSessionStore = useCourseSessionsStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
log.debug("AssignmentView mounted", props.assignmentId, props.learningContent);
|
log.debug("AssignmentView mounted", props.assignmentId, props.userId);
|
||||||
|
|
||||||
if (courseSessionStore.currentCourseSession) {
|
if (courseSessionStore.currentCourseSession) {
|
||||||
state.assignmentUser = courseSessionStore.currentCourseSession.users.find(
|
state.assignmentUser = courseSessionStore.currentCourseSession.users.find(
|
||||||
|
|
@ -69,49 +69,60 @@ function exit() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="state.assignment && state.completionData" class="relative">
|
<div class="absolute bottom-0 top-0 z-10 w-full bg-white">
|
||||||
<header
|
<div v-if="state.assignment && state.completionData" class="relative">
|
||||||
class="relative flex h-12 w-full items-center justify-between border-b border-b-gray-400 bg-white px-4 lg:h-16 lg:px-8"
|
<header
|
||||||
>
|
class="relative flex h-12 w-full items-center justify-between border-b border-b-gray-400 bg-white px-4 lg:h-16 lg:px-8"
|
||||||
<div>Geleitete Fallarbeit: {{ state.assignment.title }}</div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="absolute right-2 top-2 h-8 w-8 cursor-pointer lg:right-4 lg:top-4"
|
|
||||||
data-cy="close-learning-content"
|
|
||||||
@click="exit()"
|
|
||||||
>
|
>
|
||||||
<it-icon-close></it-icon-close>
|
<div>Geleitete Fallarbeit: {{ state.assignment.title }}</div>
|
||||||
</button>
|
<button
|
||||||
</header>
|
type="button"
|
||||||
|
class="absolute right-2 top-2 h-8 w-8 cursor-pointer lg:right-4 lg:top-4"
|
||||||
|
data-cy="close-learning-content"
|
||||||
|
@click="exit()"
|
||||||
|
>
|
||||||
|
<it-icon-close></it-icon-close>
|
||||||
|
</button>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="h-content flex">
|
||||||
<div class="overflow-auto-y min-h-full w-1/2 flex-initial bg-white p-10">
|
<div class="h-full w-1/2 overflow-y-auto bg-white">
|
||||||
<h3>Ergebnisse</h3>
|
<!-- Left part content goes here -->
|
||||||
<div class="my-6 flex items-center">
|
<div class="p-10">
|
||||||
<img
|
<h3>Ergebnisse</h3>
|
||||||
:src="state.assignmentUser?.avatar_url"
|
<div class="my-6 flex items-center">
|
||||||
class="mr-4 h-11 w-11 rounded-full"
|
<img
|
||||||
/>
|
:src="state.assignmentUser?.avatar_url"
|
||||||
<div class="font-bold">
|
class="mr-4 h-11 w-11 rounded-full"
|
||||||
{{ state.assignmentUser?.first_name }}
|
/>
|
||||||
{{ state.assignmentUser?.last_name }}
|
<div class="font-bold">
|
||||||
|
{{ state.assignmentUser?.first_name }}
|
||||||
|
{{ state.assignmentUser?.last_name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<AssignmentSubmissionResponses
|
||||||
|
:assignment="state.assignment"
|
||||||
|
:assignment-completion-data="state.completionData?.completion_data"
|
||||||
|
:allow-edit="false"
|
||||||
|
></AssignmentSubmissionResponses>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AssignmentSubmissionResponses
|
<div class="w-1/2 overflow-y-auto bg-gray-200">
|
||||||
:assignment="state.assignment"
|
<EvaluationContainer
|
||||||
:assignment-completion-data="state.completionData?.completion_data"
|
:assignment-completion="state.completionData"
|
||||||
:allow-edit="false"
|
:assignment-user="state.assignmentUser"
|
||||||
></AssignmentSubmissionResponses>
|
:assignment="state.assignment"
|
||||||
</div>
|
></EvaluationContainer>
|
||||||
<div class="overflow-auto-y min-h-full w-1/2 flex-initial bg-gray-200">
|
</div>
|
||||||
<EvaluationContainer
|
|
||||||
:assignment-completion="state.completionData"
|
|
||||||
:assignment-user="state.assignmentUser"
|
|
||||||
:assignment="state.assignment"
|
|
||||||
></EvaluationContainer>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
$nav-height: 64px;
|
||||||
|
|
||||||
|
.h-content {
|
||||||
|
height: calc(100vh - $nav-height);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -81,14 +81,4 @@ function nextTask() {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
$nav-height: 86px;
|
|
||||||
|
|
||||||
.h-content {
|
|
||||||
height: calc(100vh - $nav-height);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
height: $nav-height;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import log from "loglevel";
|
import log from "loglevel";
|
||||||
import { computed, onMounted } from "vue";
|
import { computed, onMounted, ref, watch } from "vue";
|
||||||
import CircleDiagram from "./CircleDiagram.vue";
|
import CircleDiagram from "./CircleDiagram.vue";
|
||||||
import CircleOverview from "./CircleOverview.vue";
|
import CircleOverview from "./CircleOverview.vue";
|
||||||
import DocumentSection from "./DocumentSection.vue";
|
import DocumentSection from "./DocumentSection.vue";
|
||||||
import LearningSequence from "./LearningSequence.vue";
|
import LearningSequence from "./LearningSequence.vue";
|
||||||
|
|
||||||
import { useAppStore } from "@/stores/app";
|
import { uploadCircleDocument } from "@/services/files";
|
||||||
import { useCircleStore } from "@/stores/circle";
|
import { useCircleStore } from "@/stores/circle";
|
||||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||||
import type { CourseSessionUser } from "@/types";
|
import type { CourseSessionUser } from "@/types";
|
||||||
|
|
@ -31,8 +31,9 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
||||||
log.debug("CirclePage created", props.readonly, props.profileUser);
|
log.debug("CirclePage created", props.readonly, props.profileUser);
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const showUploadModal = ref(false);
|
||||||
appStore.showMainNavigationBar = true;
|
const showUploadErrorMessage = ref(false);
|
||||||
|
const isUploading = ref(false);
|
||||||
|
|
||||||
const circleStore = useCircleStore();
|
const circleStore = useCircleStore();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ defineEmits(["exit"]);
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="h-full"></div>
|
|
||||||
<div class="absolute bottom-0 top-0 w-full bg-white">
|
<div class="absolute bottom-0 top-0 w-full bg-white">
|
||||||
<div class="h-content overflow-y-auto">
|
<div class="h-content overflow-y-auto">
|
||||||
<header
|
<header
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import LearningContent from "@/pages/learningPath/learningContentPage/LearningContent.vue";
|
import LearningContent from "@/pages/learningPath/learningContentPage/LearningContent.vue";
|
||||||
import { useAppStore } from "@/stores/app";
|
|
||||||
import { useCircleStore } from "@/stores/circle";
|
import { useCircleStore } from "@/stores/circle";
|
||||||
import type { LearningContent as LearningContentType } from "@/types";
|
import type { LearningContent as LearningContentType } from "@/types";
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
|
|
@ -16,9 +15,6 @@ const props = defineProps<{
|
||||||
|
|
||||||
const state: { learningContent?: LearningContentType } = reactive({});
|
const state: { learningContent?: LearningContentType } = reactive({});
|
||||||
|
|
||||||
const appStore = useAppStore();
|
|
||||||
appStore.showMainNavigationBar = false;
|
|
||||||
|
|
||||||
const circleStore = useCircleStore();
|
const circleStore = useCircleStore();
|
||||||
|
|
||||||
const loadLearningContent = async () => {
|
const loadLearningContent = async () => {
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
import * as log from "loglevel";
|
import * as log from "loglevel";
|
||||||
|
|
||||||
import SelfEvaluation from "@/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue";
|
import SelfEvaluation from "@/pages/learningPath/selfEvaluationPage/SelfEvaluation.vue";
|
||||||
|
|
||||||
import { useAppStore } from "@/stores/app";
|
|
||||||
import { useCircleStore } from "@/stores/circle";
|
import { useCircleStore } from "@/stores/circle";
|
||||||
import type { LearningUnit } from "@/types";
|
import type { LearningUnit } from "@/types";
|
||||||
import { onMounted, reactive } from "vue";
|
import { onMounted, reactive } from "vue";
|
||||||
|
|
@ -16,9 +14,6 @@ const props = defineProps<{
|
||||||
learningUnitSlug: string;
|
learningUnitSlug: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const appStore = useAppStore();
|
|
||||||
appStore.showMainNavigationBar = false;
|
|
||||||
|
|
||||||
const circleStore = useCircleStore();
|
const circleStore = useCircleStore();
|
||||||
|
|
||||||
const state: { learningUnit?: LearningUnit } = reactive({});
|
const state: { learningUnit?: LearningUnit } = reactive({});
|
||||||
|
|
|
||||||
|
|
@ -3,33 +3,12 @@ import { defineStore } from "pinia";
|
||||||
export type AppState = {
|
export type AppState = {
|
||||||
userLoaded: boolean;
|
userLoaded: boolean;
|
||||||
routingFinished: boolean;
|
routingFinished: boolean;
|
||||||
showMainNavigationBar: boolean;
|
|
||||||
currentCourseSlug: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const showMainNavigationBarInitialState = () => {
|
|
||||||
let path = window.location.pathname;
|
|
||||||
|
|
||||||
// remove dangling slash
|
|
||||||
if (path.endsWith("/")) {
|
|
||||||
path = path.slice(0, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
const numberOfSlashes = (path.match(/\//g) || []).length;
|
|
||||||
|
|
||||||
// it should hide main navigation bar when on learning content page
|
|
||||||
if (path.startsWith("/learn/") && numberOfSlashes >= 4) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useAppStore = defineStore({
|
export const useAppStore = defineStore({
|
||||||
id: "app",
|
id: "app",
|
||||||
state: () =>
|
state: () =>
|
||||||
({
|
({
|
||||||
showMainNavigationBar: showMainNavigationBarInitialState(),
|
|
||||||
userLoaded: false,
|
userLoaded: false,
|
||||||
routingFinished: false,
|
routingFinished: false,
|
||||||
} as AppState),
|
} as AppState),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue