1
0
Fork 0

Notes interactives

This commit is contained in:
p1905074 2020-12-14 22:02:36 +01:00
parent eadfd0064d
commit 9d72113503
3 changed files with 44 additions and 24 deletions

View file

@ -1,4 +1,22 @@
let socket = io.connect();
socket.on("marksDetails", data=>{
if(data.error){
alert(data.error.message);
}else{
document.getElementById("dsName").value = data.dsName;
document.getElementById("dsMarks").value = data.dsMarks;
document.getElementById("dsRang").value = data.dsRang;
document.getElementById("dsCoeff").value = data.dsCoeff;
document.getElementById("dsMoy").value = data.dsMoy;
}
})
function setVisible(targetId) { function setVisible(targetId) {
socket.emit("marksDetails", {
"dsId": targetId
});
document.getElementById("notvisible").id = "visible"; document.getElementById("notvisible").id = "visible";
} }

View file

@ -7,13 +7,15 @@ block content
tr tr
th(colspan="2") Details th(colspan="2") Details
tr tr
td DS 1 td(id="dsName") DS 1
tr tr
td Rang : 10/29 td(id="dsMarks") Note : 16
tr tr
td Coeff : 1.5 td(id="dsRang") Rang : 10/29
tr tr
td Moyenne de classe : 12 td(id="dsCoeff") Coeff : 1.5
tr
td(id="dsMoy") Moyenne de classe : 12
div(class="row" id="marks") div(class="row" id="marks")
div(class="col s12 m6 l4") div(class="col s12 m6 l4")
table table
@ -22,24 +24,24 @@ block content
th(colspan="2") Maths th(colspan="2") Maths
tbody tbody
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -50,17 +52,17 @@ block content
th(colspan="2") TP SE th(colspan="2") TP SE
tbody tbody
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -71,17 +73,17 @@ block content
th(colspan="2") PHP th(colspan="2") PHP
tbody tbody
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
@ -92,17 +94,17 @@ block content
th(colspan="2") Anglais th(colspan="2") Anglais
tbody tbody
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20
tr tr
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 1 p DS 1
p 18/20 p 18/20
td(onclick="setVisible(this.getAttribute('id'))") td(class="marksCursorPointer" onclick="setVisible(this.getAttribute('id'))")
p DS 2 p DS 2
p 16/20 p 16/20

View file

@ -7,8 +7,8 @@ html
link(rel="stylesheet", href="/stylesheets/style.css") link(rel="stylesheet", href="/stylesheets/style.css")
script(src="/socket.io/socket.io.js") script(src="/socket.io/socket.io.js")
body body
- var student = false - var student = true
- var teacher = true - var teacher = false
- var admin = false - var admin = false
div(class="row" id="page") div(class="row" id="page")
div(class="col s2" id="panel") div(class="col s2" id="panel")