diff --git a/Klausur.html b/Klausur.html
index 0528189..78fa31c 100644
--- a/Klausur.html
+++ b/Klausur.html
@@ -112,37 +112,6 @@
}
-
Vorbereitung
@@ -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;
@@ -453,7 +451,7 @@
document.getElementById("fullscreen_btn").onclick=fullscreenFunc;
document.getElementById("fullscreen_btn").firstChild.onsubmit=fullscreenFunc;
-
+
if(("inputExamStart" in get_params)) {
console.log(document.getElementById("fullscreen_btn").style.display="block");
settingsFormSubmitFunc();