alle gebiete wurden gestartet meldung

This commit is contained in:
ma0048
2026-05-26 13:32:21 +02:00
parent cb7a0f7669
commit b2bebb7fa3
4 changed files with 49 additions and 0 deletions
+22
View File
@@ -44,6 +44,27 @@ if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
$sprache_user = (isset($_SESSION['sprache_user']) && !empty($_SESSION['sprache_user'])) ? $_SESSION['sprache_user'] : DEFAULT_LANGUAGE;
$p = new phrasen($sprache_user);
$showInfo = false;
if (isset($_SESSION['alleGebiete']))
{
$alleGebiete = array_map('intval', $_SESSION['alleGebiete']);
$pruefling_id = $_SESSION['pruefling_id'];
$qry = "SELECT COUNT(DISTINCT gebiet_id) as anzahl
FROM testtool.tbl_pruefling_frage
JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id IN (". implode(',', $alleGebiete) .")
AND pruefling_id = ". $pruefling_id ."
";
$result = $db->db_query($qry);
$anzahlGebiete = $db->db_fetch_object($result);
if ((int)$anzahlGebiete->anzahl === count($alleGebiete))
$showInfo = true;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -69,6 +90,7 @@ $p = new phrasen($sprache_user);
<body>
<br><br><br><br><br>
<center><h2><?php echo $p->t('testtool/zeitAbgelaufen');?></h2>
<h3><?php echo ($showInfo ? ($p->t('testtool/alleGebietGestartet') . "<br />" . $p->t('testtool/alleGebieteGestartetInfo')) : ''); ?></h3>
</center>
</body>
</html>
+23
View File
@@ -405,6 +405,29 @@ else if (isset($_SESSION['pruefling_id']))
echo '</table>';
}
if (isset($_SESSION['pruefling_id']) && !empty($_SESSION['alleGebiete']))
{
$alleGebiete = array_map('intval', $_SESSION['alleGebiete']);
$pruefling_id = (int)$_SESSION['pruefling_id'];
$qry = "SELECT COUNT(DISTINCT gebiet_id) AS anzahl
FROM testtool.tbl_pruefling_frage
JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id IN (". implode(',', $alleGebiete) .")
AND pruefling_id = ". $pruefling_id;
$result_check = $db->db_query($qry);
$row_check = $db->db_fetch_object($result_check);
if ((int)$row_check->anzahl === count($alleGebiete))
{
echo '<tr><td>
<div class="alert alert-success small" style="margin-left: 20px; width: 170px; margin-top: 3px;" role="alert">
<strong>'.$p->t('testtool/alleGebietGestartet').'</strong>
</div>
</td></tr>';
}
}
// Link zum Logout
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>