Fehlerkorrekturen, DataTable angepasst

This commit is contained in:
aschwarz
2023-07-25 09:50:45 +02:00
parent 2e4c5ab8a2
commit 2a4836e07d
12 changed files with 333 additions and 85 deletions

View File

@ -26,7 +26,6 @@ if ($action == '') {
$zsid = $_GET['edit'];
$smarty->assign('rollen_edit', $zsid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_noten_zusammenstellung WHERE zsid=$zsid");
$row_head = $result_head->fetch_array();
$smarty->assign('notenbuchzuordnung_bezeichnung', $row_head['bezeichnung']);
@ -45,7 +44,7 @@ if ($action == '') {
$smarty->assign('table_data', $table_data);
# Zugewiesene Noten
$query1 = "SELECT jndid, titel
$query1 = "SELECT jndid, titel,anz_lizenzen
FROM jumi_noten_daten
WHERE jndid IN (SELECT jndid FROM jumi_noten_zusammenstellung_zuord WHERE zsid=$zsid)
ORDER BY jndid ASC";
@ -53,6 +52,11 @@ if ($action == '') {
$result1 = $db->query($query1) or die("Cannot execute query2");
while ($row1 = $result1->fetch_array()) {
$result_rl = $db->query("SELECT $row1[anz_lizenzen]-count(*) Rest
FROM jumi_noten_zus_saenger_zuord
WHERE zsid IN( SELECT zsid FROM jumi_noten_zusammenstellung_zuord WHERE jndid=$row1[jndid])");
$row_rl = $result_rl->fetch_array();
$row1['restlizenz'] = $row_rl['Rest'];
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);