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) {
socket.emit("marksDetails", {
"dsId": targetId
});
document.getElementById("notvisible").id = "visible";
}

View file

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

View file

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