X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=views%2Fmonitor.pug;h=5875a98b98ad3aac5f228295d7052efa31c1c07a;hb=d4dba3350be408419e2a7823f1b0211121dae75d;hp=6c9cf6af926afec99526be528c79dd15a1a085c7;hpb=e5ec7dead171feebb299430f298e3930864e096d;p=qomet.git diff --git a/views/monitor.pug b/views/monitor.pug index 6c9cf6a..5875a98 100644 --- a/views/monitor.pug +++ b/views/monitor.pug @@ -1,17 +1,13 @@ extends withQuestions - //TODO: step 1: ask password (client side, store hash) - // step 2: when got hash, send request (with hash) to get monitoring page: - // 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) - - // TODO: data = papers (modified after socket messages + retrived at start) - // But get examName by server at loading +block append stylesheets + link(rel="stylesheet" href="/stylesheets/statements.css") + link(rel="stylesheet" href="/stylesheets/monitor.css") block content - .container#assessment + .container#monitor .row - .col.s12.m10.offset-m1.l8.offset-l2.xl6.offset-xl3 + .col.s12.m10.offset-m1 h4= examName #stage0(v-show="stage==0") .card @@ -19,13 +15,40 @@ block content 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") + #stage1(v-show="stage==1") + button.waves-effect.waves-light.btn(@click="endMonitoring()") Send feedback + h4.title(@click="toggleDisplay('answers')") Anwers + // TODO: aussi afficher stats, permettre tri par colonnes + .card(v-show="display=='answers'") + ul.tabs.tabs-fixed-width + li.tab + a(href="#group0") All + li.tab(v-for="group in groupList()") + a(:href="groupId(group,'#')") G.{{ group }} + table(:id="groupId(group)" v-for="group in [0].concat(groupList())") + thead + tr + th Name + th(v-for="(q,i) in evaluation.questions") Q.{{ (i+1) }} + tbody + tr.evaluation(v-for="s in studentList(group)") + td(:class="{blur:!!s.blur,resize:!!s.resize,disconnect:!!s.disco}") {{ s.name }} + td(v-for="(q,i) in evaluation.questions" :style="{backgroundColor: getColor(s.number,i)}" @click="seeDetails(s.number,i)")   + h4.title(@click="toggleDisplay('evaluation')") evaluation + div(v-show="display=='evaluation'") + .card + .introduction(v-html="evaluation.introduction") + .card + statements(:questions="evaluation.questions" :answers="answers") block append javascripts + script. + const examName = "#{examName}"; + const courseCode = "#{courseCode}"; + const initials = "#{initials}"; + const monitoring = true; + script(src="/javascripts/utils/libsRefresh.js") + script(src="/javascripts/components/statements.js") + script(src="//cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js") + script(src="/javascripts/utils/sha1.js") script(src="/javascripts/monitor.js")