KlausurSlide/Klausur.html

689 lines
28 KiB
HTML
Raw Permalink Normal View History

2022-08-03 21:01:05 +02:00
<!DOCTYPE html>
<!--
MIT License
Copyright (c) 2024 (Pingger Shikkoken)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<html style="background-color: #fff;">
<!-- DON'T LOOK AT THIS CODE! -->
<!-- IT WORKS! DON'T TOUCH IT -->
2022-08-03 21:01:05 +02:00
<head>
<meta charset="utf-8" />
</head>
<body style="background-color: #fff;">
<div id="header">
<h1 align="center" id="titleh1">Klausurhelfer</h1>
</div>
<div id="clock_div">
2024-02-08 19:36:57 +01:00
<progress style="width: 100vw;height: 3vh; background-color: #fff; top:0; left:0;" value="0" max="100" id="timebar">&nbsp;</progress>
<!-- 25%, 50% and 75% markers -->
<ul style="list-style: none; top:0; left:0; position: absolute; margin:0; padding:0">
<li style="left: calc(25vw - 2.5px); top: 0; list-style: none; position: absolute; height: 3vh; width:5px; background-color: #0ff8;" />
<li style="left: calc(50vw - 2.5px); top: 0; list-style: none; position: absolute; height: 3vh; width:5px; background-color: #0ff8;" />
<li style="left: calc(75vw - 2.5px); top: 0; list-style: none; position: absolute; height: 3vh; width:5px; background-color: #0ff8;" />
</ul>
<h1 id="clock" class="time" style="text-align: center">...</h1>
<div style="display:block" id="inExamTimes">
<div style="position: absolute; left: 1vw; top: 4vh; font-size: 5vh;" class="inExam">Start:&nbsp;&nbsp;<span class="time" id="inExamExamStart">--:--</span></div>
<div style="position: absolute; right: 1vw; top: 4vh; font-size: 5vh;" class="inExam">Ende:&nbsp;&nbsp;<span class="time" id="inExamEnd">--:--</span></div>
<div style="position: absolute; right: 1vw; top: 11vh; font-size: 3vh;" id="displayEarlyCutoff" class="inExam">vz. Abgabe bis:&nbsp;&nbsp;<span class="time" id="inExamEarlyCutoff">--:--</span></div>
</div>
</div>
<div id="left">
<div id="seating">
<h2>Sitzordnung</h2>
<table id="sitzordnung"></table>
<ul>
<li>Beginnend von der Tafel aus</li>
<li id="infoSeatingRows">1 Reihe belegt, 1 Reihe frei</li>
<li id="infoSeatingSeats">2 freie Plätze zwischen den belegten Plätzen innerhalb einer Reihe</li>
<li>Die blauen Plätze in der Abbildung nutzen</li>
</ul>
</div>
<textarea id="notes" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" style="display:none; font-size: 4vh; border: 0px; margin-top: 5vh;width:100%; height: 100%; background-color: #0000;"></textarea>
</div>
<div id="right">
2022-08-10 18:35:35 +02:00
<div id="inputs" style="display: block; overflow-y: scroll">
<form id="settingsForm" formmethod="GET">
<table>
<tr>
<!--- ------------------------------------ -->
<td colspan="100%"><h2>Einstellungen</h2></td>
<!--- ------------------------------------ -->
</tr>
<tr>
<td><label for="inputExamTitle">Titel</label></td>
<td><input id="inputExamTitle" name="inputExamTitle" type="text" required="required" placeholder="Betriebssysteme Klausur" size="64" value="Klausur" /><label for="inputExamTitle"></label></td>
</tr>
<tr>
<td><label for="inputExamDuration">Bearbeitungszeit</label></td>
<td><input id="inputExamDuration" name="inputExamDuration" type="number" pattern="[0-9]+" value="60" max="180" min="30" required="required" /><label for="inputExamDuration"> Minuten</label></td>
</tr>
<tr>
<td><label for="inputExtraDuration">Extra Zeit</label></td>
<td><input id="inputExtraDuration" name="inputExtraDuration" type="number" pattern="[0-9]+" value="5" max="30" min="0" required="required" /><label for="inputExtraDuration"> Minuten</label></td>
</tr>
<tr>
<td colspan="100%" style="font-size: 70%"><label for="inputExtraDuration">Diese Zeit wird beim Klicken des Start Buttons automatisch hinzugerechnet. (Start um 9:05 mit 5 min extra zeit, sorgt für "Start: 9:10")</label></td>
</tr>
<tr>
<td><label for="inputEarlyCutoff">Vorzeitige Abgabefrist</label></td>
<td><input id="inputEarlyCutoff" name="inputEarlyCutoff" type="number" pattern="[0-9]+" value="15" max="180" min="0" required="required" /><label for="inputEarlyCutoff"> Minuten vor Ende der Bearbeitungszeit</label></td>
</tr>
<tr>
<td colspan="100%" style="font-size: 70%"><label for="inputEarlyCutoff">Ein Wert von 0 Minuten blendet die Vorzeitige Abgabe vollständig aus</label></td>
</tr>
<tr>
<td><label for="inputHelpSheet">Hilfszettel</label></td>
<td><input id="inputHelpSheet" name="inputHelpSheet" type="number" pattern="[0-9]+" value="2" max="180" min="0" required="required" /><label for="inputHelpSheet"> Seiten (2 = 1 Blatt)</label></td>
</tr>
<tr>
<td colspan="100%" style="font-size: 70%"><label for="inputHelpSheet">Ein Wert von 0 Seiten blendet die Info zum Hilfszettel vollständig aus</label></td>
</tr>
<tr>
<td><label for="inputDarkMode">Dark-Mode</label></td>
<td><input id="inputDarkMode" name="inputDarkMode" type="checkbox" required="required" /><label for="inputDarkMode"></label></td>
</tr>
<tr>
<!--- -------------------------------- -->
<td colspan="100%"><h5>Sitzordnung</h2></td>
<!--- -------------------------------- -->
</tr>
<tr>
<td><label for="inputSeatingRowsUsed">Reihen benutzt</label></td>
<td><input id="inputSeatingRowsUsed" name="inputSeatingRowsUsed" type="number" pattern="[0-9]+" value="1" max="180" min="1" required="required" /><label for="inputSeatingRowsUsed"></label></td>
</tr>
<tr>
<td><label for="inputSeatingRowsFree">Reihen frei</label></td>
<td><input id="inputSeatingRowsFree" name="inputSeatingRowsFree" type="number" pattern="[0-9]+" value="1" max="180" min="0" required="required" /><label for="inputSeatingRowsFree"></label></td>
</tr>
<tr>
<td><label for="inputSeatingSeatsFree">Sitze frei</label></td>
<td><input id="inputSeatingSeatsFree" name="inputSeatingSeatsFree" type="number" pattern="[0-9]+" value="2" max="180" min="0" required="required" /><label for="inputSeatingSeatsFree"></label></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Nächster Schritt" id="settingsFormSubmit" /></td>
</tr>
<tr>
<!--- -------------------------------- -->
<td colspan="100%"><h5>Erweitert</h2></td>
<!--- -------------------------------- -->
</tr>
<tr>
<td><label for="inputExamStart">Startzeitpunkt</label></td>
<td><input id="inputExamStart" name="inputExamStart" type="text" pattern="[0-9]{4}-(0?[1-9]|1[0-2])-(0?[1-9]|[12][0-9]|30|31) ((0?|1)[0-9]|2[0-3]):([0-5][0-9])" placeholder="YYYY-MM-DD HH:mm" /><label for="inputExamStart"></label></td>
</tr>
<tr>
<td colspan="100%" style="font-size: 70%"><label for="inputExamStart">Wird normalerweise beim Klicken vom <i>Start</i>-Button gesetzt. Wenn in das Feld ein Zeitstempel eingetragen ist, so wird beim Betätigen des <i>Nächster Schritt</i>-Buttons auch automatisch der <i>Start</i>-Button betätigt.</label></td>
</tr>
</table>
<style>
#settingsForm input:invalid {
background-color: #faa;
}
</style>
</form>
</div>
<div style="display: none" id="Vorbereitung">
<h2>Vorbereitung</h2>
<ul>
<li>Elektronische Geräte ausschalten und in der Tasche verstauen. (auch Smart-Watches)</li>
<li>Ein Etui gehört in die Tasche</li>
<li>Lichtbildausweis bereit legen</li>
<li id="vorTauja">Taschen und Jacken in die Sitzreihe vor Ihnen legen.</li>
<li>Am Platz sollten sich befinden:
<ul>
<li>dokumentenechtes Schreibwerkzeug (<strong>KEIN Tipp-Ex</strong>)</li>
<li>Lichtbildausweis</li>
<li id="vorHelpsheet">1 DIN-A4 <i>Spickzettel</i></li>
<li>Getränk und Verpflegung</li>
<li>Wörterbuch</li>
</ul>
</li>
</ul>
</div>
<div id="inExam" style="display: none;">
</div>
<textarea id="notes2" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" style="display:none; font-size: 4vh; border: 0px; margin-top: 5vh;width:100%; height: 100%; background-color: #0000;"></textarea>
</div>
<div id="start_btn"><input type="submit" value="Start" autofocus="autofocus" /></div>
<div id="reset_btn"><input type="submit" value="Reset" /></div>
<div id="fullscreen_btn"><input type="submit" value="Vollbild" /></div>
<div id="stopfullscreen_btn"><input type="submit" value="KEIN Vollbild" /></div>
<div id="copyright" style="position: absolute; right:0; bottom: 0;"><!-- Dieser Copyright-Hinweis darf nicht entfernt werden --><a href="https://git.cs.tu-dortmund.de/felix.homa/KlausurSlide" target="_blank">git.cs.tu-dortmund.de/felix.homa/KlausurSlide</a></div>
<script>
var startTime = null;
var endTime = null;
var examStartTime = null; // Start der Bearbeitungszeit
var examCutoffTime = null; // Zeitpunkt der letzten vorzeitigen Abgabe
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 "inputDarkMode":
switch(get_params[sp[0]]) {
case "true":
document.getElementById(sp[0]).checked=true;
break;
case "false":
document.getElementById(sp[0]).checked=false;
break;
}
console.log("Loaded IDM: " + sp[0] + " => " + document.getElementById(sp[0]).checked);
break;
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:
try {
document.getElementById(sp[0]).value=get_params[sp[0]];
console.log("Loaded: " + sp[0] + " => " + get_params[sp[0]]);
}
catch (e) {
console.log(e);
}
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","inputDarkMode","notes", "notes2"];
function start_exam() {
document.getElementById("start_btn").onclick=""; // Aktion für den Start-Button deaktivieren
document.getElementById("start_btn").innerHTML=""; // Start-Button entfernen
document.getElementById("inputs").style.display="none";
document.getElementById("Vorbereitung").style.display="none";
document.getElementById("seating").style.display="none";
document.getElementById("inExam").style.display="block";
document.getElementById("inExamTimes").style.display="block";
document.getElementById("fullscreen_btn").style.display="block";
document.getElementById("stopfullscreen_btn").style.display="block";
fullscreenFunc();
var now = new Date();
var exam_duration = document.getElementById("inputExamDuration").valueAsNumber; // Normale Bearbeitungszeit in Minuten
var extra_duration = document.getElementById("inputExtraDuration").valueAsNumber; // "Namen eintragen"-Zeit in Minuten
var early_cutoff = document.getElementById("inputEarlyCutoff").valueAsNumber; // Frühzeitige Abgabefrist in Minuten vom Ende
if(document.getElementById("inputExamStart").value.length!=0) {
startTime = new Date(document.getElementById("inputExamStart").value);
}
else {
startTime = new Date(now);
startTime.setSeconds(0);
startTime.setMinutes(now.getMinutes()+1);
document.getElementById("inputExamStart").value=
( startTime.getYear() +1900) +"-"
+((startTime.getMonth()+1)<10?"0":"")+(startTime.getMonth()+1)+"-"
+( startTime.getDate() <10?"0":"")+ startTime.getDate() +" "
+( startTime.getHours() <10?"0":"")+ startTime.getHours() +":"
+( startTime.getMinutes() <10?"0":"")+ startTime.getMinutes()
}
endTime = new Date(startTime);
endTime.setMinutes(startTime.getMinutes()+exam_duration+extra_duration);
examStartTime = new Date(startTime);
examStartTime.setMinutes(startTime.getMinutes()+extra_duration);
examCutoffTime = new Date(endTime);
examCutoffTime.setMinutes(endTime.getMinutes()-early_cutoff);
document.getElementById("displayEarlyCutoff").style.display=(early_cutoff>=exam_duration)?"none":"block";
halfHourWarningTime = new Date(endTime);
halfHourWarningTime.setMinutes(endTime.getMinutes()-30);
halfHourWarningTime2 = new Date(halfHourWarningTime);
halfHourWarningTime2.setSeconds(halfHourWarningTime.getSeconds()+halfHourWarningBlinkCount);
console.log("Now: " + now);
console.log("Start: " + startTime);
console.log("Exam Start: " + examStartTime);
console.log("Early Cutoff: " + examCutoffTime);
console.log("End: " + endTime);
/*
* Query-String mit Start-Zeitpunkt bauen.
*/
var queryString="";
for(var i in inputs) {
queryString+="&"+inputs[i]+"="+encodeURIComponent(document.getElementById(inputs[i]).value);
}
queryString+="&inputExamStart="+encodeURIComponent(document.getElementById("inputExamStart").value);
queryString="?"+queryString.substr(1);
window.history.pushState({},"", queryString);
/*
* "InExam"-Setzen. Also die Zeiten Anzeigen
*/
document.getElementById("inExamExamStart").innerHTML=examStartTime.getHours()+":"+(examStartTime.getMinutes()<10?"0":"")+examStartTime.getMinutes();
document.getElementById("inExamEarlyCutoff").innerHTML=examCutoffTime.getHours()+":"+(examCutoffTime.getMinutes()<10?"0":"")+examCutoffTime.getMinutes();
document.getElementById("inExamEnd").innerHTML=endTime.getHours()+":"+(endTime.getMinutes()<10?"0":"")+endTime.getMinutes();
document.getElementById("notes").style.display="block";
document.getElementById("notes2").style.display="block";
if(early_cutoff==0) {
document.getElementById("inExamEarlyCutoffRow").style.display="none";
}
// Reset-Button Animation
document.getElementById("reset_btn").style.display="block";
setTimeout(function() {
document.getElementById("reset_btn").style.transform="scale(1)";
document.getElementById("reset_btn").style.left="0";
document.getElementById("reset_btn").style.bottom="0";
}, 1);
}
var clockUpdate = function() {
var now = new Date();
//document.getElementById("clock").innerHTML = new Date().toISOString().replace("T"," ").replace("Z","");
/*
* "Große"-Uhr aktualisieren
*/
2022-08-10 18:55:59 +02:00
document.getElementById("clock").innerHTML = (now.getHours()<10?"&nbsp;":"")+now.getHours() + ":" + (now.getMinutes()<10?"0":"")+now.getMinutes();
if(endTime!=null) {
var dur = endTime-examStartTime;
2022-08-10 18:55:59 +02:00
var rem = endTime-now;
var per = 100-(rem/dur*100);
document.getElementById("timebar").value=per;
document.getElementById("timebar").max=100;
}
/*
* Hintergrund signalisierung:
* Normal: weiß
* 30 minuten warnung: 2 mal 500ms gelb, 500ms weiß
* Bearbeitungszeit zu ende: rot
*/
if(endTime!=null && now>endTime) {
if(document.getElementById("inputDarkMode").checked) {
document.body.style.backgroundColor="#8ff"; // color-inversion!
} else {
2024-02-08 21:29:41 +01:00
document.body.style.backgroundColor="#f55";
}
}
else if(endTime!=null && now>halfHourWarningTime && now<=halfHourWarningTime2 && now.getMilliseconds()<500) {
document.body.style.backgroundColor="#ffa";
}
else {
document.body.style.backgroundColor="#fff";
}
};
function rebuildSeating()
{
var rowsFree = document.getElementById("inputSeatingRowsFree").valueAsNumber;
var rowsUsed = document.getElementById("inputSeatingRowsUsed").valueAsNumber;
var rowInterval = rowsFree+rowsUsed;
var seatsFree = document.getElementById("inputSeatingSeatsFree").valueAsNumber;
// Tabelleninhalt
var so = "<tr><td colspan=\"100%\" style=\"text-align: center;color:#888\">Tafel (vorne)</td></tr>";
for(var row=0;row<10;row++) {
var r = row % rowInterval;
so+="<tr>";
for(var seat=0;seat<31;seat++) {
var use = r<rowsUsed && ((seat%(seatsFree+1))==0); // true = diese Reihe benutzen UND diesen Sitz benutzen
// console.log("Row: " + row + " - Seat: " + seat + " => " + use);
if(use) {
so+="<td class=\"ok\"></td>";
}
else {
so+="<td class=\"nok\"></td>";
}
}
so+="</tr>";
}
document.getElementById("sitzordnung").innerHTML=so;
if(rowsFree==0) {
document.getElementById("infoSeatingRows").innerText="Alle Reihen benutzen!";
}
else {
document.getElementById("infoSeatingRows").innerText=rowsUsed+" Reihe"+(rowsUsed>1?"n":"")+" belegt, " + rowsFree+" Reihe"+(rowsFree>1?"n":"") + " frei";
}
if(rowsFree>=1) {
if(rowsUsed==1) {
document.getElementById("vorTauja").style.display="list-item";
document.getElementById("vorTauja").innerText="Taschen und Jacken in die Sitzreihe vor Ihnen legen";
} else if(rowsUsed==2) {
document.getElementById("vorTauja").style.display="list-item";
document.getElementById("vorTauja").innerText="Taschen und Jacken in die leere Sitzreihe vor/hinter Ihnen legen";
}
}
else {
document.getElementById("vorTauja").style.display="none";
}
if(seatsFree==0 && rowsFree==0) {
document.getElementById("infoSeatingSeats").innerText="Alle Plätze in allen Reihen nutzen"
}
else if(seatsFree==0) {
document.getElementById("infoSeatingSeats").innerText="Alle Plätze in den entsprechenden Reihen nutzen"
}
else {
document.getElementById("infoSeatingSeats").innerText=seatsFree+ (seatsFree==1?" freien Platz":" freie Plätze")+" zwischen den belegten Plätzen innerhalb einer Reihe";
}
}
function settingsFormSubmitFunc() {
document.body.requestFullscreen().catch(function(rej){});
/*
* Query-String für die URL zusammenbauen
*/
var queryString="";
for(var i in inputs) {
2023-08-01 14:45:59 +02:00
queryString+="&"+inputs[i]+"="+encodeURIComponent(document.getElementById(inputs[i]).value);
}
queryString="?"+queryString.substr(1);
window.history.pushState({},"", queryString);
// Wenn der "Startzeitpunkt" gesetzt ist, dann URL entsprechend updaten und starten
if(document.getElementById("inputExamStart").value.length != 0) {
window.history.pushState({},"", queryString);
queryString+="&inputExamStart="+encodeURIComponent(document.getElementById("inputExamStart").value);
start_exam();
return false;
}
// Andere Divs anzeigen
document.getElementById("inputs").style.display="none";
document.getElementById("Vorbereitung").style.display="block";
// Spickzettel
var sp = document.getElementById("inputHelpSheet").valueAsNumber;
if(sp==0) {
document.getElementById("vorHelpsheet").style.display="none";
}
else {
document.getElementById("vorHelpsheet").innerHTML=(sp%2==0?sp/2:sp)+" "+(sp%2==0?sp>2?"Bl&amul;tter":"Blatt":sp>1?"Seiten":"Seite") + " DIN-A4 <i>Spickzettel</i> (<b>handbeschrieben</b>)"
}
var exam_duration = document.getElementById("inputExamDuration").valueAsNumber; // Normale Bearbeitungszeit in Minuten
var early_cutoff = document.getElementById("inputEarlyCutoff").valueAsNumber; // Frühzeitige Abgabefrist in Minuten vom Ende
document.getElementById("displayEarlyCutoff").style.display=(early_cutoff>=exam_duration)?"none":"block";
// Start-Button Animation
document.getElementById("start_btn").style.display="block";
setTimeout(function() {
document.getElementById("start_btn").style.transform="scale(1)";
document.getElementById("start_btn").style.left="0";
document.getElementById("start_btn").style.bottom="0";
}, 1);
document.getElementById("start_btn").focus();
return false;
}
function fullscreenFunc() {
document.body.requestFullscreen().then(function() {
/*var b = document.getElementById("fullscreen_btn").style;
b.transform="scale(1)";
b.right="25vw";
b.bottom=0;
b.display="block";*/
}).catch(function(rej){});
}
function stopFullscreenFunc() {
document.exitFullscreen().then(function() {
/*var b = document.getElementById("fullscreen_btn").style;
b.transform="scale(1)";
b.right="25vw";
b.bottom=0;
b.display="block";*/
}).catch(function(rej){});
}
function resetPage() {
var queryString="";
for(var i in inputs) {
queryString+="&"+inputs[i]+"="+encodeURIComponent(document.getElementById(inputs[i]).value);
}
queryString="?"+queryString.substr(1);
window.history.pushState({},"", queryString);
location.reload();
}
function updateTitle() {
document.getElementById("titleh1").innerText=document.getElementById("inputExamTitle").value;
}
var seatingInputs=["inputSeatingRowsUsed","inputSeatingRowsFree","inputSeatingSeatsFree"]
for(let eid in seatingInputs) {
document.getElementById(seatingInputs[eid]).onchange=rebuildSeating;
}
rebuildSeating();
document.getElementById("inputExamTitle").onchange=updateTitle;
document.getElementById("inputExamTitle").oninput=updateTitle;
updateTitle();
console.log("Clock: " + setInterval(clockUpdate, 50));
document.getElementById("start_btn").onclick=start_exam;
document.getElementById("start_btn").firstChild.onsubmit=start_exam;
document.getElementById("settingsFormSubmit").onclick=settingsFormSubmitFunc;
document.getElementById("reset_btn").onclick=resetPage;
document.getElementById("reset_btn").firstChild.onsubmit=resetPage;
document.getElementById("fullscreen_btn").onclick=fullscreenFunc;
document.getElementById("fullscreen_btn").firstChild.onsubmit=fullscreenFunc;
document.getElementById("stopfullscreen_btn").onclick=stopFullscreenFunc;
document.getElementById("stopfullscreen_btn").firstChild.onsubmit=stopFullscreenFunc;
document.getElementById("inputDarkMode").onchange=function() {
if(document.getElementById("inputDarkMode").checked) {
document.body.style.filter="invert()";
document.getElementById("sitzordnung").style.filter="invert()";
}
else {
document.body.style.filter="";
document.getElementById("sitzordnung").style.filter="";
}
document.getElementById("inputDarkMode").value=document.getElementById("inputDarkMode").checked;
}
document.getElementById("inputDarkMode").onchange();
2023-09-14 23:58:34 +02:00
document.getElementById("notes").onchange=function() {
var queryString="";
for(var i in inputs) {
queryString+="&"+inputs[i]+"="+encodeURIComponent(document.getElementById(inputs[i]).value);
}
if(document.getElementById("inputExamStart").value!="") {
queryString+="&inputExamStart="+encodeURIComponent(document.getElementById("inputExamStart").value);
}
queryString="?"+queryString.substr(1);
window.history.pushState({},"", queryString);
}
2023-09-15 00:05:02 +02:00
document.getElementById("notes").onkeypress=document.getElementById("notes").onchange;
document.getElementById("notes").onkeyup=document.getElementById("notes").onchange;
document.getElementById("notes").onkeydown=document.getElementById("notes").onchange;
document.getElementById("notes2").onchange=document.getElementById("notes").onchange;
document.getElementById("notes2").onkeypress=document.getElementById("notes").onchange;
document.getElementById("notes2").onkeyup=document.getElementById("notes").onchange;
document.getElementById("notes2").onkeydown=document.getElementById("notes").onchange;
if(("inputExamStart" in get_params)) {
console.log(document.getElementById("fullscreen_btn").style.display="block");
document.getElementById("stopfullscreen_btn").style.display="block";
settingsFormSubmitFunc();
console.log("Yay");
}
</script>
2022-08-03 21:01:05 +02:00
<style>
body {
display: grid;
height: 100vh;
width: 100vw;
overflow: hidden;
grid-template-rows: 15vh 15vh 70vh;
grid-template-columns: 50vw 50vw;
padding: 0px;
margin: 0px;
font-family: sans-serif;
}
h1 {
text-align: center;
font-size: 8vh;
margin: 4px;
padding: 4px;
}
h2 {
font-size: 4vh;
text-align: center;
margin: 4px;
padding: 4px;
}
h3,h4,h5,h6 {
text-align: center;
margin: 0px;
padding: 0px;
}
2022-08-03 21:01:05 +02:00
li{
padding-top: 1vh;
list-style-type: '- ';
}
.time {
font-family: monospace, monospace;
2022-08-03 21:01:05 +02:00
text-align: right;
}
#header {
/*background-color: #ff8;*/
grid-area: 1 / 1 / span 1 / span 2;
text-align: center;
font-weight: 600;
}
#clock_div {
/*background-color: #ff8;*/
grid-area: 2 / 1 / span 1 / span 2;
text-align: center;
font-weight: 600;
2024-02-08 19:36:57 +01:00
position: relative;
2022-08-03 21:01:05 +02:00
}
#clock {
font-size: 12vh;
}
#left {
/*background-color: #f88;*/
grid-area: 3 / 1;
font-size: 3vh;
}
#right {
/*background-color: #8f8;*/
grid-area: 3 / 2;
font-size: 3vh;
}
#inputs {
font-size: 2vh;
}
#inExam table {
2022-08-03 21:01:05 +02:00
padding-top: 15vh;
font-size: 4vh;
}
#inExam td {
2022-08-03 21:01:05 +02:00
padding-top: 1vh;
padding-left: 1vw;
}
#inExam td.time {
2022-08-03 21:01:05 +02:00
margin: 0.5vh;
padding-left: 1vw;
font-weight: 600;
}
#settingsForm td:nth-child(1) {
width: 15vw;
}
2022-08-03 21:01:05 +02:00
#sitzordnung {
width: 100%;
}
#sitzordnung td {
height: 2vh;
width: 2vh;
}
#sitzordnung .ok {
background-color: #00f8;
2022-08-03 21:01:05 +02:00
}
#sitzordnung .nok {
background-color: #f008;
2022-08-03 21:01:05 +02:00
}
#start_btn {
position: absolute;
bottom: 40vh;
left: 30vw;
display: none;
transform: scale(20);
transition-duration: 3s;
transition-property: all;
}
#reset_btn {
2022-08-03 21:01:05 +02:00
position: absolute;
bottom: 0;
left: 100vw;
display: none;
transition-duration: 3s;
transition-property: all;
2022-08-03 21:01:05 +02:00
}
#fullscreen_btn {
/*transform: scale(10);*/
width: 5vw;
height: 2vh;
bottom: 0vh;
right: 45vw;
position: absolute;
display: none;
transition-duration: 1s;
transition-property: all;
}
#stopfullscreen_btn{
/*transform: scale(10);*/
width: 5vw;
height: 2vh;
bottom: 0vh;
right: 40vw;
position: absolute;
display: none;
transition-duration: 1s;
transition-property: all;
2022-08-03 21:01:05 +02:00
}
</style>
2022-08-03 21:01:05 +02:00
</body>
2023-08-01 14:45:59 +02:00
</html>