From d0fce093ef2f16fc2897baf7ddf93b6f969890bf Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Fri, 30 Jan 2026 17:59:23 +0100 Subject: initial commit The first prototype where you can upload student data from moodle and change the marks. In student view the results for the logged in person can be viewed. --- setup.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 setup.php (limited to 'setup.php') diff --git a/setup.php b/setup.php new file mode 100644 index 0000000..640ee56 --- /dev/null +++ b/setup.php @@ -0,0 +1,93 @@ + 1, + 'cookie_httponly' => 1, + 'cookie_secure' => $secure, // Only if using HTTPS + 'cookie_samesite' => 'Strict', // or 'Lax' + 'use_only_cookies' => 1 + ]); + // Set session timeout + if (isset($_SESSION['LAST_ACTIVITY']) && + (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) { // 30 minutes + session_unset(); + session_destroy(); + } + $_SESSION['LAST_ACTIVITY'] = time(); +} + +$pfp = array ( + "ti" => array ( + "name" => "Technische Informatik", + "pnr" => ["1710080", "3707100"], + "studiengang" => ["EI", "ME"] + ), + "dt" => array ( + "name" => "Digitaltechnik", + "pnr" => ["3976090"], + "studiengang" => ["TI"] + ) +); + +$notenlabor = ["BE", "NB", "AB", "NM", "NA"]; +$notenklausur = ["100","130","170","200","230","270","300","330","370","400","500"]; + +$students = array ( + "12345" => array ( + "vorname" => "Karl", + "nachname" => "Meier", + "studiengang" => "EI", + "noten" => array ( + "ti" => array ( + "klausur" => "500", + "labor" => "BE" + ), + "dt" => [] + ) + ), + "11111" => array ( + "vorname" => "Claudia", + "nachname" => "Darbo", + "studiengang" => "ME", + "noten" => array("ti" => [],"dt" => []) + ), + "22222" => array ( + "vorname" => "Günther", + "nachname" => "Kohl", + "studiengang" => "TI", + "noten" => array("ti" => [],"dt" => []) + ) +); + +$groups = array ( + "WiSe 2025/26" => array ( + "ti" => array ( + "G99-AA" => ["12345", "11111"], + "G99-ZZ" => ["22222", "11111"] + ) + ), + "SoSe 2025" => array ( + "ti" => array ( + "G99-AA" => ["11111"], + "G98-ZZ" => ["22222"] + ), + "dt" => array ( + "G99-KK" => ["11111"], + "G37-ZZ" => ["22222","12345"] + ) + ) +); + +db_read(); + +} //setupdone +?> -- cgit v1.2.3