early draft of sockets logic for monitoring
[qomet.git] / views / monitor.pug
index e5dadfe..6c9cf6a 100644 (file)
@@ -5,8 +5,27 @@ extends withQuestions
        //   array with results + quiz details (displayed in another tab) + init socket (with hash too)
        //   buttons "start quiz" and "stop quiz" for teacher only: trigger actions (impacting sockets)
 
-       body
-               p TODO
+       // TODO: data = papers (modified after socket messages + retrived at start)
+       // But get examName by server at loading
+
+block content
+       .container#assessment
+               .row
+                       .col.s12.m10.offset-m1.l8.offset-l2.xl6.offset-xl3
+                               h4= examName
+                               #stage0(v-show="stage==0")
+                                       .card
+                                               .input-field.inline.on-left
+                                                       label(for="password") Password
+                                                       input#password(type="password" v-model="password" @keyup.enter="startMonitoring()")
+                                               button.waves-effect.waves-light.btn(@click="startMonitoring()") Send
+                               #stage2(v-show="stage==1")
+                                       .card
+                                               .introduction(v-html="assessment.introduction")
+                                       .card
+                                               statements(:assessment="assessment" :student="student" :stage="stage" :inputs="inputs" @gameover="endAssessment" @warning="warning")
+                                       .card
+                                               .conclusion(v-html="assessment.conclusion")
 
 block append javascripts
-       script. TODO
+       script(src="/javascripts/monitor.js")