commit
9ca85fbcfe
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
@ -392,9 +396,9 @@ const saveInput = (answer: string) => {
|
||||||
corrections.value = '';
|
corrections.value = '';
|
||||||
unsaved.value = true;
|
unsaved.value = true;
|
||||||
/*
|
/*
|
||||||
We update the assignment on this component, so the changes are reflected on it. The server does not return
|
We update the assignment on this component, so the changes are reflected on it. The server does not return
|
||||||
the updated entity, to prevent the UI to update when the user is entering his input
|
the updated entity, to prevent the UI to update when the user is entering his input
|
||||||
*/
|
*/
|
||||||
assignment.value.submission.text = answer;
|
assignment.value.submission.text = answer;
|
||||||
_save(assignment.value.submission);
|
_save(assignment.value.submission);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue