Merged in develop (pull request #146)

Develop
This commit is contained in:
Lorenz Padberg 2024-03-20 20:02:53 +00:00
commit 9ca85fbcfe
3 changed files with 9 additions and 9 deletions

View File

@ -134,7 +134,6 @@ import {
SelectionHandlerType, SelectionHandlerType,
} from '@/helpers/highlight'; } from '@/helpers/highlight';
import { graphql } from '@/__generated__'; import { graphql } from '@/__generated__';
import log from 'loglevel';
import highlightSidebar from '@/helpers/highlight-sidebar'; import highlightSidebar from '@/helpers/highlight-sidebar';
import { doUpdateHighlight } from '@/graphql/mutations'; import { doUpdateHighlight } from '@/graphql/mutations';
import { AddContentHighlightArgument } from '@/__generated__/graphql'; import { AddContentHighlightArgument } from '@/__generated__/graphql';
@ -315,8 +314,6 @@ const createHighlight = createHighlightCurry({
const isNested = computed(() => props.contentBlock.root); // if it's nested, a the parent has the root propert const isNested = computed(() => props.contentBlock.root); // if it's nested, a the parent has the root propert
onMounted(() => { onMounted(() => {
log.debug('onMounted ContentBlock called');
const element = contentBlockDiv.value; const element = contentBlockDiv.value;
if (element !== null) { if (element !== null) {

View File

@ -42,10 +42,11 @@
<p <p
class="assignment__feedback" class="assignment__feedback"
v-if="assignment.submission.submissionFeedback" v-if="assignment.submission?.submissionFeedback"
v-html="feedbackText" v-html="feedbackText"
/> />
</template> </template>
<template v-if="!isStudent && assignment.id"> <template v-if="!isStudent && assignment.id">
<router-link <router-link
:to="{ name: 'submissions', params: { id: assignment.id } }" :to="{ name: 'submissions', params: { id: assignment.id } }"
@ -264,9 +265,12 @@ const unmark = () => {
onResult(async () => { onResult(async () => {
const { assignment: loadedAssignment } = result.value; const { assignment: loadedAssignment } = result.value;
assignment.value = { assignment.value = {
...loadedAssignment, ...loadedAssignment,
}; };
await nextTick();
assignment.value.submission = Object.assign(initialSubmission, assignment.value.submission); assignment.value.submission = Object.assign(initialSubmission, assignment.value.submission);
if (assignmentDiv.value) { if (assignmentDiv.value) {

View File

@ -1,6 +1,5 @@
import { ContentBlockNode, HighlightNode } from '@/__generated__/graphql'; import { ContentBlockNode, HighlightNode } from '@/__generated__/graphql';
import { makeVar, InMemoryCache } from '@apollo/client/core'; import { makeVar, InMemoryCache } from '@apollo/client/core';
import log from 'loglevel';
const showNavigationSidebarVar = makeVar(false); const showNavigationSidebarVar = makeVar(false);
const showProfileSidebarVar = makeVar(false); const showProfileSidebarVar = makeVar(false);
@ -12,7 +11,7 @@ const languageVar = makeVar('de');
const idToRefFactory = const idToRefFactory =
(__typename: string) => (__typename: string) =>
(_, { args, toReference }) => { (_, { args, toReference }) => {
log.debug(`Referencing ${__typename} with ${args.id}`); //log.debug(`Referencing ${__typename} with ${args.id}`);
return toReference({ return toReference({
__typename, __typename,
id: args.id, id: args.id,