83 lines
3.1 KiB
PHP
83 lines
3.1 KiB
PHP
<?php
|
|
require_once "check_maintenance.php";
|
|
|
|
require_once "globals.php";
|
|
require_once "autologin.php";
|
|
|
|
$user_data = get_autologin_user_data();
|
|
if (!get_autologin_state() || !isset($_REQUEST["testid"])) {
|
|
exit();
|
|
}
|
|
|
|
$testid = trim($_REQUEST["testid"] ?? "");
|
|
$view_only = trim($_REQUEST["view_only"] ?? "false") === "true";
|
|
$gameid = trim($_REQUEST["gameid"] ?? "");
|
|
|
|
if ($testid === "") {
|
|
exit();
|
|
}
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'>
|
|
<title>SpreadQuiz</title>
|
|
<script src="js/req.js"></script>
|
|
<script src="js/spreadquiz.js"></script>
|
|
<script src="js/o.js"></script>
|
|
<script src="js/common.js"></script>
|
|
<script src="js/testground.js"></script>
|
|
<script src="js/tasks.js"></script>
|
|
<link rel="stylesheet" href="style/spreadquiz.css">
|
|
<link rel="stylesheet" href="style/spreadquiz_mobile.css">
|
|
<script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
|
<script type="text/javascript" src="https://nturley.github.io/netlistsvg/elk.bundled.js"></script>
|
|
<script type="text/javascript" src="https://nturley.github.io/netlistsvg/built/netlistsvg.bundle.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.min.js" integrity="sha512-BHJlu9vUXVrcxhRwbBdNv3uTsbscp8pp3LJ5z/sw9nBJUegkNlkcZnvODRgynJWhXMCsVUGZlFuzTrr5I2X3sQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/base16/google-light.min.css"/>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/verilog.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<section id="test_display">
|
|
|
|
</section>
|
|
<section id="infobox">
|
|
<span id="game_name"></span>
|
|
<section>
|
|
<?php if ($view_only) { ?>
|
|
<section style="margin-bottom: 1em">
|
|
CSAK OLVASHATÓ,<br>
|
|
NEM FRISSÜL AUTOMATIKUSAN!
|
|
</section>
|
|
<?php } ?>
|
|
<section id="ongoing-info">
|
|
<section id="time-info" shown="false">
|
|
<span class="infobox-description">Hátralevő idő:</span>
|
|
<section id="timer">00:00:00</section>
|
|
</section>
|
|
<section id="further-info">
|
|
|
|
</section>
|
|
<input type="button" value="Beküld" onclick="submit_test()" id="submit_btn">
|
|
</section>
|
|
<section id="concluded-info">
|
|
<section id="duration"></section>
|
|
<span class="infobox-description">Eredmény:</span>
|
|
<section id="percentage">100% (20/20)</section>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
<script>
|
|
populate_all("<?=$testid ?>", "<?=$gameid ?>", <?=$view_only ? "true" : "false" ?>);
|
|
window.onbeforeunload = () => {
|
|
if (TEST_DATA["state"] !== "concluded") {
|
|
save_all_answers();
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|