Prepare monitoring using Statements component (early draft stage)
[qomet.git] / views / monitor.pug
1 extends withQuestions
2
3 //TODO: step 1: ask password (client side, store hash)
4 // step 2: when got hash, send request (with hash) to get monitoring page:
5 // array with results + quiz details (displayed in another tab) + init socket (with hash too)
6 // buttons "start quiz" and "stop quiz" for teacher only: trigger actions (impacting sockets)
7
8 // TODO: data = papers (modified after socket messages + retrived at start)
9 // But get examName by server at loading
10
11 block content
12 .container#assessment
13 .row
14 .col.s12.m10.offset-m1.l8.offset-l2.xl6.offset-xl3
15 h4= examName
16 #stage0(v-show="stage==0")
17 .card
18 .input-field.inline.on-left
19 label(for="password") Password
20 input#password(type="password" v-model="password" @keyup.enter="startMonitoring()")
21 button.waves-effect.waves-light.btn(@click="startMonitoring()") Send
22 #stage2(v-show="stage==1")
23 .card
24 .introduction(v-html="assessment.introduction")
25 .card
26 statements(:assessment="assessment" :student="student" :stage="stage" :inputs="inputs" @gameover="endAssessment" @warning="warning")
27 .card
28 .conclusion(v-html="assessment.conclusion")
29
30 block append javascripts
31 script.
32 const monitoring = true;
33 script(src="/javascripts/components/statements.js")
34 script(src="/javascripts/monitor.js")