From e69b4e3434e4670d4fa33d0351daab5839a5234f Mon Sep 17 00:00:00 2001 From: aschwarz Date: Wed, 5 Apr 2023 14:29:24 +0200 Subject: [PATCH] Anzahl Lizenzen --- dashboard/notenbuch.php | 6 +++ templates/modern/dashboard/notenbuch.html | 41 +++++-------------- .../modern/dashboard/notenbuchzuordnung.html | 3 -- templates/modern/dashboard/notenupload.html | 3 -- .../modern/dashboard/notenuserzuordnung.html | 3 -- templates/modern/dashboard/rollen.html | 3 -- .../modern/dashboard/rollenzuordnung.html | 3 -- .../modern/dashboard/survey_erfassen.html | 3 -- templates/modern/dashboard/userzuordnung.html | 3 -- 9 files changed, 17 insertions(+), 51 deletions(-) diff --git a/dashboard/notenbuch.php b/dashboard/notenbuch.php index 32d1ef9..fc143da 100644 --- a/dashboard/notenbuch.php +++ b/dashboard/notenbuch.php @@ -32,6 +32,12 @@ if ($action == '') { $result = $db->query($query) or die("Cannot execute query"); while ($row = $result->fetch_array()) { + + $result_rl = $db->query("SELECT $row[anzahl_lizenz]-count(*) Rest + FROM jumi_noten_zus_saenger_zuord + WHERE zsid = $row[zsid];"); + $row_rl = $result_rl->fetch_array(); + $row['restlizenz'] = $row_rl['Rest']; $table_data[] = $row; } $smarty->assign('table_data', $table_data); diff --git a/templates/modern/dashboard/notenbuch.html b/templates/modern/dashboard/notenbuch.html index 69fa050..2fc37df 100644 --- a/templates/modern/dashboard/notenbuch.html +++ b/templates/modern/dashboard/notenbuch.html @@ -3,10 +3,7 @@ - Notenbuch erfassen - - @@ -27,13 +24,9 @@ }