-
Notifications
You must be signed in to change notification settings - Fork 634
/
ReportsGroupReportQuizHeader.vue
92 lines (77 loc) · 2 KB
/
ReportsGroupReportQuizHeader.vue
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<template>
<div>
<p>
<BackLink
:to="classRoute('ReportsGroupReportPage')"
:text="group.name"
/>
</p>
<h1>
<KLabeledIcon>
<KIcon slot="icon" quiz />
{{ exam.title }}
</KLabeledIcon>
</h1>
<HeaderTable>
<HeaderTableRow>
<template slot="key">
{{ coachStrings.$tr('statusLabel') }}
</template>
<QuizActive slot="value" :active="exam.active" />
</HeaderTableRow>
<HeaderTableRow>
<template slot="key">
{{ coachStrings.$tr('avgScoreLabel') }}
</template>
<Score slot="value" :value="avgScore" />
</HeaderTableRow>
<!-- TODO COACH
<HeaderTableRow>
<template slot="key">{{ coachStrings.$tr('questionOrderLabel') }}</template>
<template slot="value">{{ coachStrings.$tr('orderRandomLabel') }}</template>
</HeaderTableRow>
-->
</HeaderTable>
<HeaderTabs>
<HeaderTab
:text="coachStrings.$tr('reportLabel')"
:to="classRoute('ReportsGroupReportQuizLearnerListPage')"
/>
<HeaderTab
:text="coachStrings.$tr('difficultQuestionsLabel')"
:to="classRoute('ReportsGroupReportQuizQuestionListPage')"
/>
</HeaderTabs>
</div>
</template>
<script>
import commonCoach from '../common';
export default {
name: 'ReportsGroupReportQuizHeader',
components: {},
mixins: [commonCoach],
computed: {
avgScore() {
return this.getExamAvgScore(this.$route.params.quizId, this.recipients);
},
group() {
return this.groupMap[this.$route.params.groupId];
},
exam() {
return this.examMap[this.$route.params.quizId];
},
recipients() {
return this.getLearnersForGroups([this.$route.params.groupId]);
},
},
$trs: {
back: 'All quizzes',
quizPerformanceLabel: "'{quiz}' performance",
},
};
</script>
<style lang="scss" scoped>
.stats {
margin-right: 16px;
}
</style>