fix: assignment and quiz rendering issue in courses

This commit is contained in:
Jannat Patel
2025-03-24 13:42:24 +05:30
parent c0f4a09e22
commit 89a348b154
11 changed files with 91 additions and 102 deletions

View File

@@ -1,19 +1,25 @@
<template>
<header
v-if="!fromLesson"
class="flex justify-between sticky top-0 z-10 border-b bg-surface-white px-3 py-2.5 sm:px-5"
>
<Breadcrumbs :items="breadcrumbs" />
</header>
<div class="overflow-hidden h-[calc(100vh-3.2rem)]">
<Assignment :assignmentID="assignmentID" :submissionName="submissionName" />
<Assignment
:assignmentID="assignmentID"
:submissionName="submissionName"
:showTitle="!fromLesson"
/>
</div>
</template>
<script setup>
import { Breadcrumbs, createResource } from 'frappe-ui'
import { computed, inject, onMounted } from 'vue'
import { computed, inject, onMounted, onBeforeUnmount, ref } from 'vue'
import Assignment from '@/components/Assignment.vue'
const user = inject('$user')
const fromLesson = ref(false)
const props = defineProps({
assignmentID: {
@@ -42,6 +48,10 @@ onMounted(() => {
if (!user.data) {
window.location.href = '/login'
}
if (new URLSearchParams(window.location.search).get('fromLesson')) {
fromLesson.value = true
}
})
const breadcrumbs = computed(() => {