Commit | Line | Data |
---|---|---|
43828378 BA |
1 | extends withQuestions |
2 | ||
3 | block append stylesheets | |
4 | link(rel="stylesheet" href="/stylesheets/statements.css") | |
5 | link(rel="stylesheet" href="/stylesheets/grade.css") | |
6 | ||
7 | block rightMenu | |
8 | a#rightButton.btn-floating.btn-large.grey(href="grade") | |
9 | i.material-icons mode_edit | |
10 | ||
43828378 BA |
11 | #gradeSettings.modal |
12 | .modal-content | |
13 | form(@submit.prevent="computeGrades") | |
14 | .input-field | |
15 | input#points(type="number" v-model.number="settings.totalPoints" required) | |
16 | label(for="points") Total points | |
17 | p | |
18 | input#partial(type="checkbox" v-model="settings.halfPoint") | |
19 | label(for="partial") Half point for partial answers? (≥ 50%) | |
20 | p | |
21 | input#malus(type="checkbox" v-model="settings.zeroSum") | |
22 | label(for="malus") Lose points on wrong answers? ("Zero-sum" game) | |
23 | .modal-footer | |
24 | .center-align | |
25 | a.modal-action.modal-close.waves-effect.waves-light.btn(href="#!" @click="computeGrades()") | |
26 | span Compute | |
27 | i.material-icons.right send | |
28 | #detailedGrades.modal | |
29 | .modal-content | |
30 | table | |
31 | thead | |
32 | tr | |
33 | th Number | |
a3080c33 | 34 | th(v-for="evaluation in evaluationArray") {{ evaluation.name }} |
43828378 BA |
35 | tbody |
36 | tr.grade(v-for="student in studentList(group)") | |
37 | td {{ student.number }} | |
a3080c33 | 38 | td(v-for="(evaluation,i) in evaluationArray" @click="togglePresence(student.number,i)") |
43828378 BA |
39 | | {{ grade(i,student.number) }} |
40 | .modal-footer | |
41 | .center-align | |
42 | a.modal-action.modal-close.waves-effect.waves-light.btn-flat(href="#!") Close | |
43 | ||
43828378 BA |
44 | block content |
45 | .container#grading | |
46 | .row | |
47 | .col.s12.m10.offset-m1 | |
48 | h4 #{courseCode} grading | |
49 | // TODO: Allow grading per student, per question or sub-question | |
50 | .card | |
51 | ul.tabs.tabs-fixed-width | |
52 | li.tab | |
53 | a(href="#group0") All | |
54 | li.tab(v-for="group in groupList()") | |
55 | a(:href="groupId(group,'#')") G.{{ group }} | |
56 | table(:id="groupId(group)" v-for="group in [0].concat(groupList())") | |
57 | thead | |
58 | tr | |
59 | th Name | |
a3080c33 | 60 | th(v-for="(q,i) in evaluation.questions") Q.{{ (i+1) }} |
43828378 | 61 | tbody |
a3080c33 | 62 | tr.evaluation(v-for="s in studentList(group)") |
43828378 | 63 | td {{ s.name }} |
a3080c33 BA |
64 | td(v-for="(q,i) in evaluation.questions" :style="{background-color: getColor(number,i)}" @click="seeDetails(number,i)") |
65 | h4.title(@click="toggleDisplay('evaluation')") evaluation | |
66 | div(v-show="display=='evaluation'") | |
43828378 | 67 | .card |
a3080c33 | 68 | .introduction(v-html="evaluation.introduction") |
43828378 | 69 | .card |
a3080c33 | 70 | statements(:questions="evaluation.questions" :answers:"answers") |
43828378 | 71 | |
43828378 BA |
72 | if teacher |
73 | h4.title(@click="toggleDisplay('grades')") Grades | |
74 | .card(v-show="display=='grades'") | |
75 | .center-align | |
76 | button.on-left.waves-effect.waves-light.btn(@click="gradeSettings()") Settings | |
77 | a#download.hide(href="#" ref="download") | |
78 | button.waves-effect.waves-light.btn(@click="download") Download | |
79 | ul.tabs.tabs-fixed-width | |
80 | li.tab | |
81 | a(href="#group0") All | |
82 | li.tab(v-for="group in groupList()") | |
83 | a(:href="groupId(group,'#')") G.{{ group }} | |
84 | table.result(:id="groupId(group)" v-for="group in [0].concat(groupList())" @click="showDetails(group)") | |
85 | thead | |
86 | tr | |
87 | th Number | |
88 | th Name | |
89 | th Final | |
90 | tbody | |
91 | tr.grade(v-for="student in studentList(group)") | |
92 | td {{ student.number }} | |
93 | td {{ student.name }} | |
94 | td grade... | |
95 | //td {{ grades[student.number].final }} | |
96 | tr.stats | |
97 | td(colspan="4") Stats: range= stdev= mean= | |
98 | ||
43828378 BA |
99 | block append javascripts |
100 | script. | |
101 | const initials = "#{initials}"; | |
102 | const courseCode = "#{courseName}"; | |
103 | script(src="/javascripts/utils/sha1.js") | |
104 | script(src="/javascripts/grade.js") |