Skip to content

Commit

Permalink
add grade components
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaney committed Aug 5, 2024
1 parent 2dd7f05 commit b17f896
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 1 deletion.
16 changes: 16 additions & 0 deletions course_grader_vue/components/graderoster/grade/input.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div>
Not implemented
</div>
</template>

<script>
export default {
props: {
student: {
type: Object,
required: true,
},
},
};
</script>
43 changes: 43 additions & 0 deletions course_grader_vue/components/graderoster/grade/static.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<div v-if="student.is_auditor">
<span>Auditor</span>
</div>
<div v-else-if="student.is_withdrawn">
Withdrawn<span v-if="student.withdrawn_week"> {{ student.withdrawn_week }}</span>
</div>
<div v-else>
<span v-if="student.has_writing_credit"><abbr title="Writing credit">W</abbr></span>
<div v-if="student.has_incomplete">
<span class="sr-only">Submitted grade:</span>
<strong><abbr title="Incomplete">I</abbr></strong>
<div>Default: {{ student.grade }}"</div>
</div>
<div v-else>
<div v-if="student.no_grade_now">
<span class="sr-only">Submitted grade:</span><strong>X</strong>
<div>(No grade now)</div>
</div>
<div v-else>
<span class="sr-only">Submitted grade:</span>
<strong>{{ student.grade }}</strong>
</div>
</div>
<div v-if="student.date_graded">
Submitted {{ student.date_graded }}
</div>
<div v-if="student.grade_status">
Submitted with error: {{ student.grade_status }}
</div>
</div>
</template>

<script>
export default {
props: {
student: {
type: Object,
required: true,
},
},
};
</script>
12 changes: 12 additions & 0 deletions course_grader_vue/components/graderoster/student.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,24 @@
<span class="offcanvas">Duplicate code:</span> {{ student.duplicate_code }}
</span>
</div>
<div v-if="student.grade_url">
<GradeInput :student="student"></GradeInput>
</div>
<div v-else>
<GradeStatic :student="student"></GradeStatic>
</div>
</div>
</template>

<script>
import GradeStatic from "@/components/graderoster/grade/static.vue";
import GradeInput from "@/components/graderoster/grade/input.vue";
export default {
components: {
GradeStatic,
GradeInput,
},
props: {
student: {
type: Object,
Expand Down
2 changes: 1 addition & 1 deletion course_grader_vue/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
value="Clear override"
@click="clearUserOverride()"
>
Clear
Clear override
</button>
</axdd-profile>
<axdd-profile v-else :user-netid="userName">
Expand Down

0 comments on commit b17f896

Please sign in to comment.