Skip to content
Snippets Groups Projects
Commit 5ba3ed77 authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Cleaned up StudentViews / Added test output

closes #91
parent 81ea7844
No related branches found
No related tags found
1 merge request!87Resolve "Student Feedback Serializer/View"
Pipeline #
......@@ -2,7 +2,7 @@
<table class="table table-info rounded">
<tbody>
<tr>
<th>Modul</th>
<th>Module</th>
<td>{{ exam.module_reference }}</td>
</tr>
<tr>
......
<template>
<v-alert type="warning" :value="value" class="non-final-alert ">
This feedback is not final! Changes will likely occur!
</v-alert>
</template>
<script>
export default {
name: 'non-final-feedback-alert',
props: {
value: {
type: Boolean,
default: true
}
}
}
</script>
<style scoped>
.non-final-alert {
font-weight: bolder;
}
</style>
......@@ -10,7 +10,11 @@
<td>{{ props.item.type.name }}</td>
<td class="text-xs-right">{{ props.item.feedback.score }}</td>
<td class="text-xs-right">{{ props.item.type.full_score }}</td>
<td class="text-xs-right"><v-btn :to="`/student/submission/${props.item.type.pk}`" color="orange lighten-2"><v-icon>chevron_right</v-icon></v-btn></td>
<td class="text-xs-right">
<v-btn :to="`/submission/${props.item.type.pk}`" color="orange lighten-2">
<v-icon>chevron_right</v-icon>
</v-btn>
</td>
</template>
</v-data-table>
<v-alert color="info" value="true">
......@@ -34,11 +38,18 @@
},
{
text: 'Score',
align: 'right',
value: 'feedback.score'
},
{
text: 'Maximum Score',
align: 'right',
value: 'type.full_score'
},
{
text: 'View',
align: 'center',
sortable: false
}
]
}
......
......@@ -25,7 +25,7 @@
v-if="!mini"
class="elevation-1 exam-info ma-1"
/>
<v-list-tile exact v-for="(item, i) in submissionNavItems" :key="i" :to="item.route">
<v-list-tile exact v-for="item in submissionNavItems" :key="item.route" :to="item.route">
<v-list-tile-action>
<v-icon v-if="!visited[item.id]">assignment</v-icon>
<v-icon v-else>check</v-icon>
......@@ -54,11 +54,6 @@
name: 'Overview',
icon: 'home',
route: '/home'
},
{
name: 'Statistics',
icon: 'show_chart',
route: '/home'
}
]
}
......
<template>
<v-container flex>
<non-final-feedback-alert :value="!feedbackIsFinal"/>
<v-layout row wrap>
<v-flex lg6 md12 mt-5>
<base-annotated-submission>
......@@ -19,18 +20,25 @@
</v-toolbar>
<template slot="table-content">
<tr v-for="(code, lineNo) in submission" :key="lineNo">
<submission-line :code="code" :lineNo="lineNo"/>
<feedback-comment
v-if="feedback[lineNo] && showFeedback"
v-for="(comment, index) in feedback[lineNo]"
v-bind="comment"
:key="index"
/>
<submission-line :code="code" :lineNo="lineNo">
<feedback-comment
v-if="feedback[lineNo] && showFeedback"
v-for="(comment, index) in feedback[lineNo]"
v-bind="comment"
:line-no="lineNo"
:key="index"
/>
</submission-line>
</tr>
</template>
</base-annotated-submission>
<submission-tests
:tests="submission.tests"
:expand="true"
class="mt-3"
></submission-tests>
</v-flex>
<v-flex lg6 md12>
<v-flex lg6 md12 mt-5 pl-3>
<submission-type
v-bind="submissionType">
</submission-type>
......@@ -49,10 +57,14 @@
import FeedbackComment from '@/components/submission_notes/base/FeedbackComment'
import {studentPageMut} from '@/store/modules/student-page'
import {subNotesMut} from '@/store/modules/submission-notes'
import SubmissionTests from '@/components/SubmissionTests'
import NonFinalFeedbackAlert from '@/components/student/NonFinalFeedbackAlert'
export default {
name: 'student-submission-page',
components: {
NonFinalFeedbackAlert,
SubmissionTests,
FeedbackComment,
SubmissionLine,
BaseAnnotatedSubmission,
......@@ -71,10 +83,13 @@
'submission'
]),
...mapState({
score: function (state) { return state.studentPage.submissionData[this.id].feedback.score },
submissionType: function (state) { return state.studentPage.submissionData[this.id].type },
feedback: function (state) {
score (state) { return state.studentPage.submissionData[this.id].feedback.score },
submissionType (state) { return state.studentPage.submissionData[this.id].type },
feedback (state) {
return state.studentPage.submissionData[this.$route.params.id].feedback.feedback_lines
},
feedbackIsFinal (state) {
return state.studentPage.submissionData[this.$route.params.id].feedback.is_final
}
})
},
......@@ -87,9 +102,6 @@
},
mounted () {
this.onRouteMountOrUpdate(this.id)
this.$nextTick(() => {
window.PR.prettyPrint()
})
},
beforeRouteUpdate (to, from, next) {
this.onRouteMountOrUpdate(to.params.id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment