externe ueberwachung v1

This commit is contained in:
ma0048
2025-12-02 13:49:05 +01:00
parent 89ec51bd0a
commit 5c9710f44d
15 changed files with 461 additions and 17 deletions
+35
View File
@@ -0,0 +1,35 @@
(function () {
/*
const params = new URLSearchParams(location.search);
let expectedOrigin = params.get("examus-client-origin");
if (!expectedOrigin)
{
window.top.location.href = 'resetconnection.php';
return;
}
*/
let proctoringOK = false;
window.addEventListener("message", function (e) {
/*if (e.origin !== expectedOrigin) {
return;
}*/
const data = e.data || {};
if (data.proctoringIsActive)
{
proctoringOK = true;
}
});
setTimeout(function () {
if (!proctoringOK)
{
console.warn("Constructor nicht aktiv!")
//window.location.href='resetconnection.php';
}
}, 1000);
})();
+5 -1
View File
@@ -45,7 +45,7 @@ if (!$db = new basis_db())
$PHP_SELF=$_SERVER["PHP_SELF"];
// Start session
session_start();
require_once './session_init.php';
// If language is changed by language select menu, reset language variables
if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
@@ -182,6 +182,10 @@ echo '
if(!isset($_SESSION['pruefling_id']))
die($p->t('testtool/bitteZuerstAnmelden'));
if (!empty($_SESSION['externe_ueberwachung']) && isset($_SESSION['externe_ueberwachung_verified'])): ?>
<script type="text/javascript" src="externeueberwachung.js"></script>
<?php endif;
$pruefling = new pruefling();
$pruefling->load($_SESSION['pruefling_id']);
+63
View File
@@ -1,16 +1,78 @@
<?php
$contentpage = 'login.php';
require_once './session_init.php';
if(isset($_GET['prestudent']) && is_numeric($_GET['prestudent']))
{
$contentpage = 'login.php?prestudent='.$_GET['prestudent'];
}
if ((isset($_SESSION['externe_ueberwachung']) && $_SESSION['externe_ueberwachung'] === true) &&
isset($_SESSION['externe_ueberwachung_verified']) && $_SESSION['externe_ueberwachung_verified'] === false)
{
header("Location: resetconnection.php");
exit;
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>TestTool - FH Technikum Wien</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css">
<?php
if (!empty($_SESSION['externe_ueberwachung'])) : ?>
<script>
function loadInContent(url)
{
if (url.includes('logout=true'))
{
return doLogout(url);
}
let frame = document.getElementById('content_testtool');
if (frame)
{
frame.src = url;
}
}
function doLogout(url)
{
fetch(url)
let topbarFrame = window.frames['topbar'];
let menuFrame = window.frames['menu'];
let contentFrame = window.frames['content'];
if (contentFrame)
contentFrame.location.href = 'logout.html';
if (menuFrame)
menuFrame.location.href = menuFrame.location.pathname;
if (topbarFrame)
topbarFrame.location.href = topbarFrame.location.pathname;
return false;
}
function changeSprache(content_params, sprache)
{
let topbarFrame = window.frames['topbar'];
let menuFrame = window.frames['menu'];
let contentFrame = window.frames['content'];
if (topbarFrame)
topbarFrame.location.href = topbarFrame.location.pathname + '?sprache_user=' + sprache;
if (menuFrame)
menuFrame.location.href = menuFrame.location.pathname + '?sprache_user=' + sprache;
if (contentFrame)
contentFrame.location.href = contentFrame.location.pathname + '?' + content_params;
}
</script>
<?php endif; ?>
</head>
<frameset rows="13%,*" cols="*" frameborder="NO" border="0" framespacing="0">
@@ -26,3 +88,4 @@ if(isset($_GET['prestudent']) && is_numeric($_GET['prestudent']))
</noframes>
</frameset>
</html>
+16 -3
View File
@@ -40,8 +40,7 @@ if (!$db = new basis_db())
die('Fehler beim Oeffnen der Datenbankverbindung');
// Start session
session_start();
require_once './session_init.php';
// Logout (triggered by logout button in menu.php)
if (isset($_GET['logout']) && $_GET['logout'] == true)
{
@@ -173,6 +172,12 @@ if (isset($_REQUEST['prestudent']))
else
$reload_menu = true;
}
if ($rt->externe_ueberwachung)
{
$_SESSION['externe_ueberwachung'] = true;
$_SESSION['externe_ueberwachung_verified'] = false;
}
}
$pruefling = new pruefling();
@@ -339,6 +344,8 @@ if ((isset($_SESSION['prestudent_id']) && !isset($_SESSION['pruefling_id']) &&
!isset($_SESSION['confirmation_needed']) && !isset($_SESSION['confirmed_code'])) ||
(isset($_SESSION['confirmation_needed']) && $_SESSION['confirmation_needed'] === true &&
isset($_SESSION['confirmed_code']) && $_SESSION['confirmed_code'] === true &&
isset($_SESSION['externe_ueberwachung']) && $_SESSION['externe_ueberwachung'] === true &&
isset($_SESSION['externe_ueberwachung_verified']) && $_SESSION['externe_ueberwachung_verified'] === true &&
isset($_SESSION['prestudent_id']) && !isset($_SESSION['pruefling_id'])))
{
$pruefling = new pruefling();
@@ -468,7 +475,13 @@ if (isset($_POST['save']) && isset($_SESSION['prestudent_id']))
<?php
if (isset($_SESSION['confirmation_needed']) && $_SESSION['confirmation_needed'] === true &&
if ((isset($_SESSION['externe_ueberwachung']) && $_SESSION['externe_ueberwachung'] === true) &&
isset($_SESSION['externe_ueberwachung_verified']) && $_SESSION['externe_ueberwachung_verified'] === false)
{
echo "<script> top.location.href = 'resetconnection.php';</script>";
exit;
}
else if (isset($_SESSION['confirmation_needed']) && $_SESSION['confirmation_needed'] === true &&
isset($_SESSION['confirmed_code']) && $_SESSION['confirmed_code'] === false)
{
echo '
+25 -5
View File
@@ -34,7 +34,7 @@ if (!$db = new basis_db())
die('Fehler beim Oeffnen der Datenbankverbindung');
// Start session
session_start();
require_once './session_init.php';
// If language is changed by language select menu, reset language and session variables
if(isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
@@ -73,7 +73,7 @@ if (isset($_SESSION['pruefling_id']))
// Link zur Startseite
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
<a class="ItemTesttool navButton" href="login.php" target="content">'.$p->t('testtool/startseite').'</a>
<a class="ItemTesttool navButton" href="login.php" onclick="return loadContent(this.href);">'.$p->t('testtool/startseite').'</a>
</td></tr>';
// Link zur Einleitung
@@ -83,7 +83,7 @@ if (isset($_SESSION['pruefling_id']))
{
echo '
<tr id="tr-einleitung"><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
<a class="ItemTesttool navButton" href="../../cms/content.php?content_id='.$content_id->content_id.'&sprache='.$sprache_user.'" target="content">'.$p->t('testtool/einleitung').'</a>
<a class="ItemTesttool navButton" href="../../cms/content.php?content_id='.$content_id->content_id.'&sprache='.$sprache_user.'" onclick="return loadContent(this.href);">'.$p->t('testtool/einleitung').'</a>
</td></tr>
';
}
@@ -379,10 +379,13 @@ if (isset($_SESSION['pruefling_id']))
}
}
echo '<tr>
<!--<td width="10" class="ItemTesttoolLeft" nowrap>&nbsp;</td>-->
<td class="'.$class.'">
<a class="'.$class.'" href="frage.php?gebiet_id='.$row->gebiet_id.'" onclick="document.location.reload()" target="content" style="'.$style.'">'.$gebietbezeichnung.'</a>
<a class="'.$class.'" href="frage.php?gebiet_id='.$row->gebiet_id.'" onclick="return loadContent(this.href);" style="'.$style.'">'.$gebietbezeichnung.'</a>
</td>
<!--<td width="10" class="ItemTesttoolRight" nowrap>&nbsp;</td>-->
</tr>';
@@ -401,7 +404,7 @@ if (isset($_SESSION['pruefling_id']))
// Link zum Logout
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
<a class="ItemTesttool navButton" href="login.php?logout=true" target="content">Logout</a>
<a class="ItemTesttool navButton" href="login.php?logout=true" onclick="return loadContent(this.href);">Logout</a>
</td></tr>';
echo '</td></tr></table>';
@@ -461,5 +464,22 @@ else
'</td></tr>');
}
});
function loadContent(url)
{
if (parent && typeof parent.loadInContent === 'function')
{
parent.loadInContent(url);
return false;
}
let frame = parent?.frames?.["content"];
if (frame)
{
frame.location.href = url;
return false;
}
}
</script>
</html>
+25
View File
@@ -0,0 +1,25 @@
<?php
require_once './session_init.php';
require_once('../../config/cis.config.inc.php');
require_once('../../config/global.config.inc.php');
require_once '../../include/externe_ueberwachung.class.php';
if (!$db = new basis_db())
die('Fehler beim Oeffnen der Datenbankverbindung');
if (isset($_SESSION['externe_ueberwachung']) && $_SESSION['externe_ueberwachung'] === true)
{
$ueberwachung = new externeUeberwachung();
$url = $ueberwachung->start($_SESSION['prestudent_id'], $_SESSION['reihungstestID']);
$urlSafe = htmlspecialchars($url, ENT_QUOTES);
//var_dump($urlSafe);
header("Location: $urlSafe");
//echo "<script>window.open('{$urlSafe}');</script>";
$_SESSION['externe_ueberwachung_verified'] = true;
}
+11
View File
@@ -0,0 +1,11 @@
<?php
if (session_status() === PHP_SESSION_NONE) {
session_set_cookie_params(
0,
'/; samesite=None',
'',
true,
true
);
session_start();
}
+11 -3
View File
@@ -67,9 +67,17 @@ function changeSprache(sprache)
content_params.set('sprache_user', sprache); // add or replace sprache_user
// Pass GET-param sprache_user to topbar.php, menu.php and content (login.php or frage.php) and refresh the frames.
location.href = location.pathname + '?sprache_user=' + sprache; // refreshes topbar.php
parent.menu.location.href = parent.menu.location.pathname + '?sprache_user=' + sprache; // refreshes menu.php
parent.content.location.href = parent.content.location.pathname + '?' + content_params; // refreshes login.php or frage.php
if (parent && typeof parent.changeSprache === 'function')
{
parent.changeSprache(content_params, sprache);
return false;
}
else
{
location.href = location.pathname + '?sprache_user=' + sprache; // refreshes topbar.php
parent.menu.location.href = parent.menu.location.pathname + '?sprache_user=' + sprache; // refreshes menu.php
parent.content.location.href = parent.content.location.pathname + '?' + content_params; // refreshes login.php or frage.php
}
}
$(document).on("keydown", function (e) {
+2 -1
View File
@@ -517,6 +517,7 @@
"phpmd/phpmd": "2.*",
"phpmetrics/phpmetrics": "2.*",
"sebastian/phpcpd": "3.*",
"phpunit/phpunit": "^6"
"phpunit/phpunit": "^6",
"firebase/php-jwt": "^6.0"
}
}
+6
View File
@@ -301,4 +301,10 @@ define ('DEFAULT_ECHTER_DIENSTVERTRAG',[103,111]);
// Weiterleiten zu CIS neu (wenn Rechte vorhanden)
define('CIS_REDIRECT_TO_CIS4', false);
//Externe Ueberwachung
define('EXTERNE_UEBERWACHUNG_PROTOCOL_URL', 'https://example.com');
define('EXTERNE_UEBERWACHUNG_SECRET_KEY', null);
define('EXTERNE_UEBERWACHUNG_INTEGRATION_NAME', 'example');
?>
+203
View File
@@ -0,0 +1,203 @@
<?php
require_once(dirname(__FILE__).'/basis_db.class.php');
require_once(dirname(__FILE__).'/prestudent.class.php');
require_once(dirname(__FILE__).'/person.class.php');
require_once(dirname(__FILE__).'/reihungstest.class.php');
require_once(dirname(__FILE__).'/../vendor/autoload.php');
use Firebase\JWT\JWT;
class externeUeberwachung extends basis_db
{
public function __construct()
{
parent::__construct();
}
public function getStatusByPrestudent($prestudent_id)
{
$session_id = $this->getSessionByPrestudent($prestudent_id);
return $this->getSessionStatus($session_id);
}
public function start($prestudent_id, $reihungstest_id)
{
$session_id = $this->getSessionByPrestudent($prestudent_id);
if (!$session_id)
{
$session_id = $this->createSession($prestudent_id);
}
else
{
$status = $this->getSessionStatus($session_id);
if (in_array($status, array('late_to_start', 'finished')))
{
$session_id = $this->createSession($prestudent_id);
}
}
$payload = $this->getPayload($session_id, $prestudent_id, $reihungstest_id);
return $this->getStartUrl($payload);
}
private function createSession($prestudent_id)
{
if (is_null($prestudent_id))
{
$this->errormsg = 'Falsche Parameterübergabe';
return false;
}
$uuid = $this->genereateUUID();
$qry = "INSERT INTO testtool.tbl_externe_ueberwachung (prestudent_id, session_id, insertvon)
VALUES (".
$this->db_add_param($prestudent_id).",".
$this->db_add_param($uuid).",".
$this->db_add_param(get_uid()).")";
if($this->db_query($qry))
{
return $uuid;
}
else
{
$this->errormsg = 'Fehler beim Speichern der Antwort';
return false;
}
}
public function getSessionByPrestudent($prestudent_id)
{
if (is_null($prestudent_id))
{
$this->errormsg = 'Falsche Parameterübergabe';
return false;
}
$qry = "SELECT session_id
FROM testtool.tbl_externe_ueberwachung
ORDER BY insertamum DESC
LIMIT 1";
if($result = $this->db_query($qry))
{
if ($row = $this->db_fetch_object($result))
{
return $row->session_id;
}
else
{
$this->errormsg = 'Daten konnten nicht geladen werden';
return false;
}
}
else
{
$this->errormsg = 'Fehler bei einer Abfrage';
return false;
}
}
public function getSessionStatus($session_id)
{
$payload = $this->getSessionPayload($session_id);
$jwt = $this->createToken($payload);
$url = $this->getSessionUrl($session_id);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: JWT {$jwt}",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$data = json_decode($response, true);
return isset($data['status']) ? $data['status'] : false;
}
private function getSessionPayload($session_id)
{
return [
"session_id" => $session_id,
"iat" => time(),
"exp" => time() + 120,
];
}
private function getPayload($session_id, $prestudent_id, $reihungstest_id)
{
$prestudent = new prestudent($prestudent_id);
$person = new Person($prestudent->person_id);
$reihungstest = new Reihungstest($reihungstest_id);
$datetime = new DateTime();
$today = $datetime->format('Y-m-d');
$payload = [
"userId"=> $prestudent_id,
"lastName"=> $person->nachname,
"firstName"=> $person->vorname,
"language"=> $person->sprache,
"accountName"=> "technikum_wien",
"accountId"=> "technikum_wien",
"examId" => !is_null(trim($reihungstest->anmerkung)) ? $reihungstest->anmerkung : ($today . " RT Test"),
"examName" => !is_null(trim($reihungstest->anmerkung)) ? $reihungstest->anmerkung : ($today . " RT Test"),
"allowMultipleDisplays" => true,
"allowMakingRoomScanSecondCamera" => false,
"duration"=> 120,
"schedule"=> false,
"trial"=> true,
"proctoring"=> "offline",
"identification"=> "skip",
"startDate"=> "2018-03-27T00:00:00Z", //TODO anpassen
"endDate"=> "2027-03-30T12:55:00Z", // TODO anpassen
"sessionId"=> $session_id,
"sessionUrl"=> "https://demo.dev.technikum-wien.at/cis/testtool/index.php"
];
return $payload;
}
private function getSessionUrl($session_id)
{
return EXTERNE_UEBERWACHUNG_PROTOCOL_URL . "/api/v2/integration/simple/". EXTERNE_UEBERWACHUNG_INTEGRATION_NAME . "/sessions/". urlencode($session_id) ."/status/";
}
private function getStartUrl($payload)
{
$token = $this->createToken($payload);
$query = http_build_query(['token' => $token]);
return EXTERNE_UEBERWACHUNG_PROTOCOL_URL . '/integration/simple/'. EXTERNE_UEBERWACHUNG_INTEGRATION_NAME .'/start?' . $query;
}
private function createToken($payload)
{
return JWT::encode($payload, EXTERNE_UEBERWACHUNG_SECRET_KEY, 'HS256');
}
private function genereateUUID()
{
$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40);
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}
}
?>
+7 -3
View File
@@ -63,6 +63,7 @@ class reihungstest extends basis_db
public $zugangs_ueberpruefung = false; //boolean
public $zugangscode; //smallint
public $externe_ueberwachung = false; //boolean
/**
@@ -119,6 +120,7 @@ class reihungstest extends basis_db
$this->aufnahmegruppe_kurzbz = $row->aufnahmegruppe_kurzbz;
$this->zugangs_ueberpruefung = $this->db_parse_bool($row->zugangs_ueberpruefung);
$this->zugangscode = $row->zugangscode;
$this->externe_ueberwachung = $this->db_parse_bool($row->externe_ueberwachung);
return true;
}
@@ -234,7 +236,7 @@ class reihungstest extends basis_db
$qry = 'BEGIN; INSERT INTO public.tbl_reihungstest (studiengang_kz, ort_kurzbz, anmerkung, datum, uhrzeit,
insertamum, insertvon, updateamum, updatevon, max_teilnehmer, oeffentlich, freigeschaltet,
studiensemester_kurzbz, stufe, anmeldefrist, aufnahmegruppe_kurzbz, zugangs_ueberpruefung, zugangscode) VALUES('.
studiensemester_kurzbz, stufe, anmeldefrist, aufnahmegruppe_kurzbz, zugangs_ueberpruefung, zugangscode, externe_ueberwachung) VALUES('.
$this->db_add_param($this->studiengang_kz, FHC_INTEGER).', '.
$this->db_add_param($this->ort_kurzbz).', '.
$this->db_add_param($this->anmerkung).', '.
@@ -250,7 +252,8 @@ class reihungstest extends basis_db
$this->db_add_param($this->anmeldefrist).','.
$this->db_add_param($this->aufnahmegruppe_kurzbz). ',' .
$this->db_add_param($this->zugangs_ueberpruefung, FHC_BOOLEAN).','.
$this->db_add_param($this->zugangscode) . ');';
$this->db_add_param($this->zugangscode) . ','.
$this->db_add_param($this->externe_ueberwachung, FHC_BOOLEAN) . ');';
}
else
{
@@ -270,7 +273,8 @@ class reihungstest extends basis_db
'anmeldefrist='.$this->db_add_param($this->anmeldefrist).', '.
'aufnahmegruppe_kurzbz='.$this->db_add_param($this->aufnahmegruppe_kurzbz).', '.
'zugangs_ueberpruefung='.$this->db_add_param($this->zugangs_ueberpruefung, FHC_BOOLEAN).', '.
'zugangscode='.$this->db_add_param($this->zugangscode).' '.
'zugangscode='.$this->db_add_param($this->zugangscode).', '.
'externe_ueberwachung='.$this->db_add_param($this->externe_ueberwachung, FHC_BOOLEAN).' '.
'WHERE reihungstest_id='.$this->db_add_param($this->reihungstest_id, FHC_INTEGER, false).';';
}
+2 -1
View File
@@ -86,6 +86,7 @@ require_once('dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php');
require_once('dbupdate_3.4/47972_pruefungsverwaltung_ects_angabe.php');
require_once('dbupdate_3.4/67490_studstatus_suche_abort_controller_haengt.php');
require_once('dbupdate_3.4/68744_StV_settings.php');
require_once('dbupdate_3.4/62889_reihungstest_ueberwachung_mit_constructor.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -358,7 +359,7 @@ $tabellen=array(
"public.tbl_profil_update_status" => array("status_kurzbz","beschreibung","bezeichnung_mehrsprachig"),
"public.tbl_profil_update_topic" => array("topic_kurzbz","beschreibung","bezeichnung_mehrsprachig"),
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung","kosten","aktiv"),
"public.tbl_reihungstest" => array("reihungstest_id","studiengang_kz","ort_kurzbz","anmerkung","datum","uhrzeit","updateamum","updatevon","insertamum","insertvon","ext_id","freigeschaltet","max_teilnehmer","oeffentlich","studiensemester_kurzbz","aufnahmegruppe_kurzbz","stufe","anmeldefrist","zugangs_ueberpruefung","zugangscode"),
"public.tbl_reihungstest" => array("reihungstest_id","studiengang_kz","ort_kurzbz","anmerkung","datum","uhrzeit","updateamum","updatevon","insertamum","insertvon","ext_id","freigeschaltet","max_teilnehmer","oeffentlich","studiensemester_kurzbz","aufnahmegruppe_kurzbz","stufe","anmeldefrist","zugangs_ueberpruefung","zugangscode", "externe_ueberwachung"),
"public.tbl_rueckstellung" => array("rueckstellung_id","person_id","status_kurzbz","datum_bis","insertamum","insertvon"),
"public.tbl_rueckstellung_status" => array("status_kurzbz", "bezeichnung_mehrsprachig", "sort", "aktiv"),
"public.tbl_rt_ort" => array("rt_id","ort_kurzbz","uid"),
@@ -0,0 +1,42 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
if(!$result = @$db->db_query("SELECT externe_ueberwachung FROM public.tbl_reihungstest LIMIT 1"))
{
$qry = "ALTER TABLE public.tbl_reihungstest ADD COLUMN externe_ueberwachung boolean NOT NULL DEFAULT false;";
if(!$db->db_query($qry))
echo '<strong>public.tbl_reihungstest: '.$db->db_last_error().'</strong><br>';
else
echo '<br>public.tbl_reihungstest: Spalte externe_ueberwachung hinzugefuegt';
}
if(!$result = @$db->db_query("SELECT 1 FROM testtool.tbl_externe_ueberwachung LIMIT 1"))
{
$qry = "CREATE TABLE testtool.tbl_externe_ueberwachung (
externe_ueberwachung_id INTEGER NOT NULL,
prestudent_id INTEGER NOT NULL,
session_id UUID NOT NULL,
insertamum TIMESTAMP DEFAULT NOW(),
insertvon VARCHAR(32) NOT NULL,
CONSTRAINT tbl_externe_ueberwachung_pk PRIMARY KEY(externe_ueberwachung_id)
);
CREATE SEQUENCE testtool.tbl_externe_ueberwachungg_id_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE testtool.tbl_externe_ueberwachung ALTER COLUMN externe_ueberwachung_id SET DEFAULT nextval('testtool.tbl_externe_ueberwachungg_id_seq');
ALTER TABLE testtool.tbl_externe_ueberwachung ADD CONSTRAINT fk_prestudent_externe_ueberwachung FOREIGN KEY (prestudent_id) REFERENCES public.tbl_prestudent (prestudent_id) ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE testtool.tbl_externe_ueberwachung ADD CONSTRAINT unique_externe_ueberwachung_session_id UNIQUE (session_id);
GRANT SELECT, INSERT ON testtool.tbl_externe_ueberwachung TO vilesci;
GRANT SELECT, INSERT ON testtool.tbl_externe_ueberwachung TO web;
GRANT SELECT, UPDATE ON testtool.tbl_externe_ueberwachungg_id_seq TO vilesci;
GRANT SELECT, UPDATE ON testtool.tbl_externe_ueberwachungg_id_seq TO web;";
if(!$db->db_query($qry))
echo '<strong>testtool.tbl_externe_ueberwachung: '.$db->db_last_error().'</strong><br>';
else
echo '<br>testtool.tbl_externe_ueberwachung: table created';
}
@@ -1458,6 +1458,7 @@ if(isset($_POST['speichern']) || isset($_POST['kopieren']))
$reihungstest->anmeldefrist = $datum_obj->formatDatum($_POST['anmeldefrist']);
$reihungstest->zugangs_ueberpruefung = false;
$reihungstest->zugangscode = null;
$reihungstest->externe_ueberwachung = false;
}
else
{
@@ -1474,6 +1475,7 @@ if(isset($_POST['speichern']) || isset($_POST['kopieren']))
$reihungstest->updatevon = $user;
$reihungstest->zugangs_ueberpruefung = isset($_POST['zugangs_ueberpruefung']);
$reihungstest->zugangscode = ($_POST['zugangcode'] === '' ? null : $_POST['zugangcode']);
$reihungstest->externe_ueberwachung = isset($_POST['externe_ueberwachung']);
}
$reihungstest->studiengang_kz = $_POST['studiengang_kz'];
//$reihungstest->ort_kurzbz = $_POST['ort_kurzbz'];
@@ -2571,6 +2573,12 @@ $studienplaene_list = implode(',', array_keys($studienplaene_arr));
<input type="number" class="input" id="zugangcode" name="zugangcode" value="<?php echo $db->convert_html_chars($reihungstest->zugangscode) ?>"> (Verpflichtend, wenn die Zugangsüberprüfung aktiviert ist)
</td>
</tr>
<tr>
<td class="feldtitel">Externe Überwachnung</td>
<td>
<input type="checkbox" id="externe_ueberwachung" name="externe_ueberwachung"<?php echo $reihungstest->externe_ueberwachung ? 'checked="checked"' : '' ?>>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>