blob: f0eb1f671fd81e27b47ff1caab1e728166d6bac2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<template>
<div class="cw-block cw-block-error">
<courseware-default-block
:block="block"
:canEdit="canEdit"
:deleteOnly="true"
:isTeacher="isTeacher"
:preview="false"
:defaultGrade="false"
>
<template #content>
<div class="cw-block-error-content">
<courseware-companion-box
mood="sad"
:msgCompanion="errorMessage"
>
</courseware-companion-box>
</div>
</template>
</courseware-default-block>
</div>
</template>
<script>
import CoursewareDefaultBlock from './CoursewareDefaultBlock.vue';
import { blockMixin } from './block-mixin.js';
import CoursewareCompanionBox from './CoursewareCompanionBox.vue';
export default {
name: 'courseware-error-block',
mixins: [blockMixin],
components: {
CoursewareDefaultBlock,
CoursewareCompanionBox,
},
props: {
block: Object,
canEdit: Boolean,
isTeacher: Boolean,
},
computed: {
originalBlockType() {
return this.block?.attributes?.payload?.original_block_type;
},
errorMessage() {
let message = '<b>'
message += this.$gettext('Es ist ein Fehler aufgetretten! Der Block-Typ dieses Blocks ist nicht verfügbar.');
message += '</b><br>'
message += 'block_type: ' + this.originalBlockType + ' not found';
return message;
}
},
};
</script>
|