fixup! Fixed title not correctly saving!
Fixed loading of timestamp. Effectively fixed parsing of non numeric Config values
This commit is contained in:
parent
e208d65b7c
commit
55499195da
66
Klausur.html
66
Klausur.html
|
@ -112,37 +112,6 @@
|
|||
}
|
||||
</style>
|
||||
</form>
|
||||
<script>
|
||||
var get_params = {};
|
||||
location.search
|
||||
.substr(1)
|
||||
.split("&")
|
||||
.forEach(function (item) {
|
||||
var sp = item.split("=");
|
||||
get_params[sp[0]] = decodeURIComponent(sp[1]);
|
||||
switch(sp[0]) {
|
||||
case "inputExamDuration":
|
||||
case "inputExtraDuration":
|
||||
case "inputEarlyCutoff":
|
||||
case "inputHelpSheet":
|
||||
case "inputSeatingRowsUsed":
|
||||
case "inputSeatingRowsFree":
|
||||
case "inputSeatingSeatsFree":
|
||||
get_params[sp[0]]-=0; // Convert to Number
|
||||
document.getElementById(sp[0]).value=get_params[sp[0]];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
if(!("inputExamStart" in get_params)) {
|
||||
document.getElementById("inputExamStart").value="";
|
||||
}
|
||||
console.log("Parsed Parameters");
|
||||
console.log(get_params);
|
||||
var on_load_time = new Date();
|
||||
console.log(on_load_time.toLocaleString('sv'));
|
||||
</script>
|
||||
</div>
|
||||
<div style="display: none" id="Vorbereitung">
|
||||
<h2>Vorbereitung</h2>
|
||||
|
@ -196,6 +165,38 @@
|
|||
var halfHourWarningTime = null;
|
||||
var halfHourWarningTime2 = null;
|
||||
var halfHourWarningBlinkCount = 2
|
||||
var get_params = {};
|
||||
location.search
|
||||
.substr(1)
|
||||
.split("&")
|
||||
.forEach(function (item) {
|
||||
var sp = item.split("=");
|
||||
get_params[sp[0]] = decodeURIComponent(sp[1]);
|
||||
switch(sp[0]) {
|
||||
case "inputExamDuration":
|
||||
case "inputExtraDuration":
|
||||
case "inputEarlyCutoff":
|
||||
case "inputHelpSheet":
|
||||
case "inputSeatingRowsUsed":
|
||||
case "inputSeatingRowsFree":
|
||||
case "inputSeatingSeatsFree":
|
||||
get_params[sp[0]]-=0; // Convert to Number
|
||||
document.getElementById(sp[0]).value=get_params[sp[0]];
|
||||
console.log("Loaded: " + sp[0] + " => " + get_params[sp[0]]);
|
||||
break;
|
||||
default:
|
||||
document.getElementById(sp[0]).value=get_params[sp[0]];
|
||||
console.log("Loaded: " + sp[0] + " => " + get_params[sp[0]]);
|
||||
break;
|
||||
}
|
||||
});
|
||||
if(!("inputExamStart" in get_params)) {
|
||||
document.getElementById("inputExamStart").value="";
|
||||
}
|
||||
console.log("Parsed Parameters");
|
||||
console.log(get_params);
|
||||
var on_load_time = new Date();
|
||||
console.log(on_load_time.toLocaleString('sv'));
|
||||
|
||||
var inputs=["inputExamDuration","inputExtraDuration","inputEarlyCutoff","inputHelpSheet","inputSeatingRowsUsed","inputSeatingRowsFree","inputSeatingSeatsFree","inputExamTitle"];
|
||||
function start_exam() {
|
||||
|
@ -435,9 +436,6 @@
|
|||
for(let eid in seatingInputs) {
|
||||
document.getElementById(seatingInputs[eid]).onchange=rebuildSeating;
|
||||
}
|
||||
if(("inputExamTitle" in get_params)) {
|
||||
document.getElementById("inputExamTitle").value=get_params["inputExamTitle"];
|
||||
}
|
||||
rebuildSeating();
|
||||
document.getElementById("inputExamTitle").onchange=updateTitle;
|
||||
document.getElementById("inputExamTitle").oninput=updateTitle;
|
||||
|
|
Reference in New Issue