diff --git a/frontend/src/components/base/BaseLayout.vue b/frontend/src/components/base/BaseLayout.vue index 439074e13598698443f030014eac58e9855731b5..26d45fe79899e68ffbed62e44b68447a2a0205ff 100644 --- a/frontend/src/components/base/BaseLayout.vue +++ b/frontend/src/components/base/BaseLayout.vue @@ -30,8 +30,7 @@ class="grady-toolbar" > <v-toolbar-title> - <!--<v-toolbar-side-icon v-icon="fa-bars"></v-toolbar-side-icon>--> - <span @click.stop="drawer = !drawer">Icon</span> + <v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon> <v-avatar> <img src="../../assets/brand.png"> </v-avatar> diff --git a/frontend/src/components/student/StudentPage.vue b/frontend/src/components/student/StudentPage.vue index 5a9e9a83bb648088213a7664db82d4103c639b07..686550e29f57f3f254c265fc81631b434c394ff5 100644 --- a/frontend/src/components/student/StudentPage.vue +++ b/frontend/src/components/student/StudentPage.vue @@ -1,22 +1,24 @@ <template> + <student-layout> <v-container fluid> <v-layout justify center> - <v-flex md5> + <v-flex md3> <h2>Exam Overview</h2> <exam-information v-if="doneLoading" :exam="exam"></exam-information> </v-flex> - <div md6 offset-md1 v-if="doneLoading"> + <v-flex md7 offset-md1 v-if="doneLoading"> <h2>Submissions of {{ this.studentData.name }}</h2> <submission-list :submissions="submissions"></submission-list> - </div> + </v-flex> </v-layout> </v-container> + </student-layout> </template> <script> import ax from '@/store/api' - import GradyNav from './StudentLayout.vue' + import StudentLayout from './StudentLayout.vue' import SubmissionList from './SubmissionList.vue' import ExamInformation from './ExamInformation.vue' @@ -24,7 +26,7 @@ components: { ExamInformation, SubmissionList, - GradyNav}, + StudentLayout}, name: 'student-page', data () { return { diff --git a/frontend/src/components/student/SubmissionList.vue b/frontend/src/components/student/SubmissionList.vue index c39e745fc152cca06a50428cc0f9fe595b858230..6d0238b118813d39a12f97f97266b7485323839d 100644 --- a/frontend/src/components/student/SubmissionList.vue +++ b/frontend/src/components/student/SubmissionList.vue @@ -1,9 +1,19 @@ <template> <div class="row my-2 justify-content-center"> - <b-table hover :items="submissions" :fields="fields"></b-table> - <div class="alert alert-info"> - You reached <b>{{ sumScore }}</b> of <b>{{ sumFullScore }}</b> possible points( {{ pointRatio }}% ). - </div> + <v-data-table + hide-actions + :headers="headers" + :items="submissions" + > + <template slot="items" slot-scope="props"> + <td>{{ props.item.type }}</td> + <td class="text-xs-right">{{ props.item.score }}</td> + <td class="text-xs-right">{{ props.item.full_score }}</td> + </template> + </v-data-table> + <v-alert color="info" value="true"> + You reached <b>{{ sumScore }}</b> of <b>{{ sumFullScore }}</b> possible points ( {{ pointRatio }}% ). + </v-alert> </div> </template> @@ -13,6 +23,22 @@ name: 'submission-list', data () { return { + headers: [ + { + text: 'Task', + align: 'left', + value: 'type' + }, + { + text: 'Score', + value: 'score' + }, + { + text: 'Maximum Score', + value: 'full_score' + } + ], + fields: [ { key: 'type', sortable: true }, { key: 'score', label: 'Score', sortable: true }, diff --git a/frontend/src/store/grady_speak.js b/frontend/src/store/grady_speak.js index 9c8e1952ddc1910770a617a7060a20d5668e3bda..6ae7abba064d4c3f07922ad004073bea8baacbfc 100644 --- a/frontend/src/store/grady_speak.js +++ b/frontend/src/store/grady_speak.js @@ -13,7 +13,7 @@ const gradySays = [ 'I\'m sorry to differ with you, sir, but you are the caretaker.', 'You have always been the caretaker, I should know, sir.', 'I\'ve always been here.', - 'Indeed, he is, Mr. Torrance. Avery willful boy. ', + 'Indeed, he is, Mr. Torrance. A very willful boy. ', 'A rather naughty boy, if I may be so bold, sir.', 'Perhaps they need a good talking to, if you don\'t mind my saying so. Perhaps a bit more.', 'My girls, sir, they didn\'t care for the Overlook at first.', diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index fe3e31c4d2218d08221ff07c1bac87e9a6feec2e..9766bf89d1f78a8004278f201912618921eba887 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -10,7 +10,8 @@ const store = new Vuex.Store({ state: { token: '', loggedIn: false, - username: '', + username: 'username', + userRole: 'Student', error: '', examInstance: 'B.Inf 1301 Kohorte 2' },