Hide solutions on completed survey
This commit is contained in:
parent
2d6724db9e
commit
e26c4b7093
|
|
@ -10,7 +10,6 @@
|
|||
<script>
|
||||
import Cross from '@/components/icons/Cross';
|
||||
import UserWidget from '@/components/UserWidget';
|
||||
import LogoutWidget from '@/components/LogoutWidget';
|
||||
import ContentNavigation from '@/components/ContentNavigation';
|
||||
import ClassSelectionWidget from '@/components/school-class/ClassSelectionWidget';
|
||||
|
||||
|
|
@ -21,7 +20,6 @@
|
|||
ContentNavigation,
|
||||
Cross,
|
||||
UserWidget,
|
||||
LogoutWidget,
|
||||
ClassSelectionWidget
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<h1 class="survey-page__title">{{title}}</h1>
|
||||
<survey :survey='survey'></survey>
|
||||
|
||||
<solution :value="solution" v-if="module.solutionsEnabled || isTeacher"></solution>
|
||||
<solution :value="solution" v-if="showSolution"></solution>
|
||||
<div v-if="surveyComplete">
|
||||
<a class="button button--primary" @click="reopen">Übung bearbeiten</a>
|
||||
</div>
|
||||
|
|
@ -50,6 +50,9 @@
|
|||
surveyComplete() {
|
||||
return this.survey && this.survey.isCompleted
|
||||
},
|
||||
showSolution() {
|
||||
return (module.solutionsEnabled || isTeacher) && !this.survey.isCompleted
|
||||
},
|
||||
solution() {
|
||||
return {
|
||||
text: this.answers.reduce((previous, answer) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue