BIG refactor
This commit is contained in:
29
index.js
29
index.js
@@ -6,21 +6,32 @@ function nameSubmit() {
|
||||
id: sId,
|
||||
startTime: Date.now(),
|
||||
};
|
||||
const sampleQuestion = {
|
||||
title: "5x5?",
|
||||
answers:
|
||||
}
|
||||
const sampleAnswer {
|
||||
text: "answer 1",
|
||||
correct: true,
|
||||
},
|
||||
localStorage.setItem(studData, JSON.stringify(studData));
|
||||
localStorage.setItem("studData", JSON.stringify(studData));
|
||||
var privacyViolation = document.getElementById("privacyViolation");
|
||||
privacyViolation.style.display = "none";
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
// const sampleQuestion = { //
|
||||
// title: "5x5?", //
|
||||
// //answers: //
|
||||
// }; //
|
||||
// const sampleAnswer = { //
|
||||
// text: "answer 1", //
|
||||
// correct: true, //
|
||||
// }; //
|
||||
//////////////////////////////
|
||||
function initScore() {
|
||||
const user = JSON.parse(localStorage.getItem("studData"));
|
||||
var sInfoName = document.getElementById("sInfoName");
|
||||
var sInfoId = document.getElementById("sInfoId");
|
||||
sInfoName.innerText = "Student name: " + user.name;
|
||||
sInfoId.innerText = "Student ID: " + user.id;
|
||||
var scoreScreen = document.getElementById("scoreScreen");
|
||||
// console.log(user.name);
|
||||
// console.log(sInfoId.innerText);
|
||||
scoreScreen.style.display = "block";
|
||||
|
||||
}
|
||||
|
||||
function nextQ() {
|
||||
|
||||
Reference in New Issue
Block a user