Add solution to assignment in content block
This commit is contained in:
parent
3b6284e753
commit
2452494b33
|
|
@ -5,6 +5,8 @@
|
|||
{{assignment.assignment}}
|
||||
</p>
|
||||
|
||||
<solution :value="solution" v-if="assignment.solution"></solution>
|
||||
|
||||
<template v-if="isStudent">
|
||||
<final-submission :submission="assignment.submission" v-if="final"></final-submission>
|
||||
|
||||
|
|
@ -76,6 +78,7 @@
|
|||
import SubmissionForm from '@/components/content-blocks/assignment/SubmissionForm';
|
||||
import DocumentForm from '@/components/content-forms/DocumentForm';
|
||||
import DocumentBlock from '@/components/content-blocks/DocumentBlock';
|
||||
import Solution from '@/components/content-blocks/Solution';
|
||||
|
||||
export default {
|
||||
props: ['value'],
|
||||
|
|
@ -85,6 +88,7 @@
|
|||
DocumentForm,
|
||||
SubmissionForm,
|
||||
FinalSubmission,
|
||||
Solution
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
|
@ -96,6 +100,11 @@
|
|||
},
|
||||
isStudent() {
|
||||
return !this.me.permissions.includes('users.can_manage_school_class_content');
|
||||
},
|
||||
solution() {
|
||||
return {
|
||||
text: this.assignment.solution
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ fragment AssignmentParts on AssignmentNode {
|
|||
id
|
||||
title
|
||||
assignment
|
||||
solution
|
||||
submission {
|
||||
id
|
||||
text
|
||||
|
|
|
|||
Loading…
Reference in New Issue