Merge branch 'hotfix/html-code-in-assignment' into develop
This commit is contained in:
commit
cb7c34cd07
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="submission-page">
|
<div class="submission-page">
|
||||||
<div class="submission-page__header submission-header">
|
<div class="submission-page__header submission-header">
|
||||||
<h2>Aufgabe</h2>
|
<h2>Aufgabe</h2>
|
||||||
<p>{{ studentSubmission.assignment.assignment }}</p>
|
<p v-html="assignmentText" />
|
||||||
</div>
|
</div>
|
||||||
<div class="submission-page__content submission-content">
|
<div class="submission-page__content submission-content">
|
||||||
<h2>Ergebnis von {{ fullName }}</h2>
|
<h2>Ergebnis von {{ fullName }}</h2>
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { newLineToParagraph } from '@/helpers/text';
|
import { newLineToParagraph, sanitizeAsHtml } from '@/helpers/text';
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import log from 'loglevel';
|
import log from 'loglevel';
|
||||||
|
|
@ -110,6 +110,13 @@ export default {
|
||||||
readOnly() {
|
readOnly() {
|
||||||
return this.me.readOnly || this.me.selectedClass.readOnly;
|
return this.me.readOnly || this.me.selectedClass.readOnly;
|
||||||
},
|
},
|
||||||
|
assignmentText() {
|
||||||
|
const text = this.studentSubmission.assignment.assignment;
|
||||||
|
if (text) {
|
||||||
|
return sanitizeAsHtml(text);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
apollo: {
|
apollo: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue