mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
Merge branch 'master' into feature-55978/infocenter_electronic_onboarding_filter
This commit is contained in:
@@ -9755,7 +9755,7 @@ COMMENT ON TABLE public.tbl_tag IS 'Orders and Company Tags';
|
||||
CREATE TABLE public.tbl_variable (
|
||||
name character varying(64) NOT NULL,
|
||||
uid character varying(32) NOT NULL,
|
||||
wert character varying(64)
|
||||
wert text
|
||||
);
|
||||
|
||||
|
||||
|
||||
+12
-2
@@ -27,6 +27,7 @@ require_once('dbupdate_3.4/example.php');
|
||||
require_once('dbupdate_3.4/example2.php');
|
||||
...
|
||||
*/
|
||||
//require_once('dbupdate_3.4/25003_notenimport_nachpruefung.php');
|
||||
require_once('dbupdate_3.4/dbupdate_dashboard.php');
|
||||
require_once('dbupdate_3.4/26173_index_webservicelog.php');
|
||||
require_once('dbupdate_3.4/24682_reihungstest_zugangscode_fuer_login.php');
|
||||
@@ -74,6 +75,15 @@ require_once('dbupdate_3.4/55968_index_anrechnung.php');
|
||||
require_once('dbupdate_3.4/25999_locale_update.php');
|
||||
require_once('dbupdate_3.4/55289_pep_fine_tuning.php');
|
||||
require_once('dbupdate_3.4/55614_perm_verwaltetoe.php');
|
||||
require_once('dbupdate_3.4/25999_C4_dashboard.php');
|
||||
require_once('dbupdate_3.4/61730_Dashboard_Anpassungen.php');
|
||||
require_once('dbupdate_3.4/40128_search.php');
|
||||
require_once('dbupdate_3.4/63394_Variablenbeschraenkung.php');
|
||||
require_once('dbupdate_3.4/63436_cis4_iframe_component.php');
|
||||
require_once('dbupdate_3.4/60882_lehrfaecherverteilung_favorites.php');
|
||||
require_once('dbupdate_3.4/66982_berufsschule.php');
|
||||
require_once('dbupdate_3.4/40314_electronic_onboarding_anbindung_ida.php');
|
||||
require_once('dbupdate_3.4/47972_pruefungsverwaltung_ects_angabe.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -156,8 +166,8 @@ $tabellen=array(
|
||||
"campus.tbl_paabgabe" => array("paabgabe_id","projektarbeit_id","paabgabetyp_kurzbz","fixtermin","datum","kurzbz","abgabedatum", "insertvon","insertamum","updatevon","updateamum"),
|
||||
"campus.tbl_pruefungsfenster" => array("pruefungsfenster_id","studiensemester_kurzbz","oe_kurzbz","start","ende"),
|
||||
"campus.tbl_pruefung" => array("pruefung_id","mitarbeiter_uid","studiensemester_kurzbz","pruefungsfenster_id","pruefungstyp_kurzbz","titel","beschreibung","methode","einzeln","storniert","insertvon","insertamum","updatevon","updateamum","pruefungsintervall"),
|
||||
"campus.tbl_pruefungstermin" => array("pruefungstermin_id","pruefung_id","von","bis","teilnehmer_max","teilnehmer_min","anmeldung_von","anmeldung_bis","ort_kurzbz","sammelklausur"),
|
||||
"campus.tbl_pruefungsanmeldung" => array("pruefungsanmeldung_id","uid","pruefungstermin_id","lehrveranstaltung_id","status_kurzbz","wuensche","reihung","kommentar","statusupdatevon","statusupdateamum","anrechnung_id","pruefungstyp_kurzbz","insertamum"),
|
||||
"campus.tbl_pruefungstermin" => array("pruefungstermin_id","pruefung_id","von","bis","teilnehmer_max","teilnehmer_min","anmeldung_von","anmeldung_bis","ort_kurzbz","sammelklausur", "anderer_raum"),
|
||||
"campus.tbl_pruefungsanmeldung" => array("pruefungsanmeldung_id","uid","pruefungstermin_id","lehrveranstaltung_id","status_kurzbz","wuensche","reihung","kommentar","statusupdatevon","statusupdateamum","anrechnung_id","pruefungstyp_kurzbz","insertamum", "ects"),
|
||||
"campus.tbl_pruefungsstatus" => array("status_kurzbz","bezeichnung"),
|
||||
"campus.tbl_reservierung" => array("reservierung_id","ort_kurzbz","studiengang_kz","uid","stunde","datum","titel","beschreibung","semester","verband","gruppe","gruppe_kurzbz","veranstaltung_id","insertamum","insertvon"),
|
||||
"campus.tbl_studierendenantrag" => array("studierendenantrag_id","prestudent_id","studiensemester_kurzbz","datum","typ","insertamum","insertvon","datum_wiedereinstieg","grund","dms_id"),
|
||||
|
||||
@@ -0,0 +1,352 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Harald Bamberger <[email protected]>,
|
||||
*
|
||||
* Beschreibung:
|
||||
* CIS 4.0 Dashboard
|
||||
*/
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add widget: Hallo Welt
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'hallowelt';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
INSERT INTO
|
||||
dashboard.tbl_widget (
|
||||
widget_kurzbz,
|
||||
beschreibung,
|
||||
arguments,
|
||||
setup
|
||||
)
|
||||
VALUES (
|
||||
'hallowelt',
|
||||
'Hallo Welt Widget',
|
||||
'{"css": "d-flex justify-content-center align-items-center h-100", "title": "Hallo Welt"}'::jsonb,
|
||||
'{"file": "DashboardWidget/Default.js", "icon": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Farben-Testbild.svg", "name": "Hallo Welt", "width": {"max": 99}, "height": {"max": 99}, "hideFooter": false}'::jsonb
|
||||
);
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Added Widget "Hallo Welt"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add widget: News
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'news';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
INSERT INTO
|
||||
dashboard.tbl_widget (
|
||||
widget_kurzbz,
|
||||
beschreibung,
|
||||
arguments,
|
||||
setup
|
||||
)
|
||||
VALUES (
|
||||
'news',
|
||||
'News Widget',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/News.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "News", "width": {"max": 4, "min": 1}, "height": {"max": 2, "min": 1}, "cis4link": "/CisVue/Cms/news", "hideFooter": false}'::jsonb
|
||||
);
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Added Widget "News"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add widget: Bookmark
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'url';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
INSERT INTO
|
||||
dashboard.tbl_widget (
|
||||
widget_kurzbz,
|
||||
beschreibung,
|
||||
arguments,
|
||||
setup
|
||||
)
|
||||
VALUES (
|
||||
'url',
|
||||
'Bookmark Widget',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/Url.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Bookmark", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": true}'::jsonb
|
||||
);
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Added Widget "Bookmark"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add widget: Ampel
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'ampel';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
INSERT INTO
|
||||
dashboard.tbl_widget (
|
||||
widget_kurzbz,
|
||||
beschreibung,
|
||||
arguments,
|
||||
setup
|
||||
)
|
||||
VALUES (
|
||||
'ampel',
|
||||
'Ampel Widget',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/Ampel.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Ampel", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": false}'::jsonb
|
||||
);
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Added Widget "Ampel"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update stundenplan widget
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'stundenplan';"))
|
||||
{
|
||||
if($db->db_num_rows($result) > 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
UPDATE
|
||||
dashboard.tbl_widget
|
||||
SET
|
||||
widget_kurzbz = 'lvplan',
|
||||
beschreibung = 'LV-Plan Widget',
|
||||
arguments = '{"bodyClass": "p-0"}'::jsonb,
|
||||
setup = '{"file": "DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
|
||||
WHERE
|
||||
widget_kurzbz = 'stundenplan';
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Renamed Widget "Stundenplan" to "LV-Plan"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add widget: LV-Plan
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'lvplan';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
INSERT INTO
|
||||
dashboard.tbl_widget (
|
||||
widget_kurzbz,
|
||||
beschreibung,
|
||||
arguments,
|
||||
setup
|
||||
)
|
||||
VALUES (
|
||||
'lvplan',
|
||||
'LV-Plan Widget',
|
||||
'{"bodyClass": "p-0"}'::jsonb,
|
||||
'{"file": "DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
|
||||
);
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Added Widget "LV-Plan"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add widget: Studiengang
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kurzbz = 'studiengang';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOWHW
|
||||
INSERT INTO
|
||||
dashboard.tbl_widget (
|
||||
widget_kurzbz,
|
||||
beschreibung,
|
||||
arguments,
|
||||
setup
|
||||
)
|
||||
VALUES (
|
||||
'studiengang',
|
||||
'Das Studiengang-Widget enthält Informationen über den Studiengang eines Studenten.',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/Studiengang.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Studiengang", "width": {"max": 2, "min": 1}, "height": {"max": 4, "min": 1}, "hideFooter": true}'::jsonb
|
||||
);
|
||||
EOWHW;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Added Widget "Studiengang"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add dashboard: CIS
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_dashboard WHERE dashboard_kurzbz = 'CIS';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO dashboard.tbl_dashboard(dashboard_kurzbz, beschreibung) VALUES('CIS', 'CIS 4.0 Dashboard');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_dashboard '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_dashboard: Added Dashboard "CIS"<br>';
|
||||
}
|
||||
|
||||
$widgetmappingqry = <<<EOWMQ
|
||||
insert into
|
||||
dashboard.tbl_dashboard_widget (
|
||||
dashboard_id,
|
||||
widget_id
|
||||
)
|
||||
(
|
||||
select
|
||||
td.dashboard_id, tw.widget_id
|
||||
from
|
||||
dashboard.tbl_dashboard td
|
||||
cross join
|
||||
dashboard.tbl_widget tw
|
||||
where
|
||||
td.dashboard_kurzbz = 'CIS'
|
||||
and
|
||||
tw.widget_kurzbz in ('hallowelt', 'news', 'url', 'ampel', 'studiengang')
|
||||
order by td.dashboard_id, tw.widget_id
|
||||
)
|
||||
ON CONFLICT (dashboard_id, widget_id) DO NOTHING
|
||||
EOWMQ;
|
||||
|
||||
if(!$db->db_query($widgetmappingqry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_dashboard_widget '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_dashboard_widget: Added WidgetMapping for Dashboard "CIS"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add general preset for dashboard: CIS
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_dashboard_preset WHERE funktion_kurzbz IS NULL AND dashboard_id = (select dashboard_id from dashboard.tbl_dashboard where dashboard_kurzbz = 'CIS');"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOGP
|
||||
insert into
|
||||
dashboard.tbl_dashboard_preset (
|
||||
dashboard_id,
|
||||
funktion_kurzbz,
|
||||
preset
|
||||
)
|
||||
values (
|
||||
(select dashboard_id from dashboard.tbl_dashboard where dashboard_kurzbz = 'CIS'),
|
||||
NULL,
|
||||
(SELECT '{"general": {"widgets": {"2ad7f459a8218ae39f0b68201a9545a4": {"place": {"4": {"h": 2, "w": 3, "x": 0, "y": 0}}, "config": [], "preset": 1, "widget": ' || (select widget_id from dashboard.tbl_widget where widget_kurzbz = 'news') || ', "widgetid": "2ad7f459a8218ae39f0b68201a9545a4"}, "4590326a80c27e61d861b18b46858084": {"place": {"4": {"h": 1, "w": 1, "x": 3, "y": 2}}, "config": [], "preset": 1, "widget": ' || (select widget_id from dashboard.tbl_widget where widget_kurzbz = 'lvplan') || ', "widgetid": "4590326a80c27e61d861b18b46858084"}, "8ec3f441d4adc9dd2bc5cc14a663eae9": {"place": {"4": {"h": 1, "w": 1, "x": 0, "y": 2}}, "config": [], "preset": 1, "widget": ' || (select widget_id from dashboard.tbl_widget where widget_kurzbz = 'url') || ', "widgetid": "8ec3f441d4adc9dd2bc5cc14a663eae9"}, "e4214d3f2bed8740d4c9cede165ccd07": {"place": {"4": {"h": 2, "w": 1, "x": 3, "y": 0}}, "config": [], "preset": 1, "widget": ' || (select widget_id from dashboard.tbl_widget where widget_kurzbz = 'ampel') || ', "widgetid": "e4214d3f2bed8740d4c9cede165ccd07"}}}}')::jsonb
|
||||
)
|
||||
EOGP;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_dashboard_preset '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_dashboard_preset: Added General Preset for Dashboard "CIS"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add general preset for dashboard: CIS
|
||||
if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_dashboard_preset WHERE funktion_kurzbz = 'Student' AND dashboard_id = (select dashboard_id from dashboard.tbl_dashboard where dashboard_kurzbz = 'CIS');"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = <<<EOGP
|
||||
insert into
|
||||
dashboard.tbl_dashboard_preset (
|
||||
dashboard_id,
|
||||
funktion_kurzbz,
|
||||
preset
|
||||
)
|
||||
values (
|
||||
(select dashboard_id from dashboard.tbl_dashboard where dashboard_kurzbz = 'CIS'),
|
||||
'Student',
|
||||
(SELECT '{"Student": {"widgets": {"3c448b2a774ff361bf59516ef0b841ef": {"place": {"4": {"h": 1, "w": 1, "x": 3, "y": 0}}, "config": [], "preset": 1, "widget": 6, "widgetid": "3c448b2a774ff361bf59516ef0b841ef"}, "83808e47ccf95db1afb4fe014d221ca9": {"place": {"4": {"h": 1, "w": 1, "x": 0, "y": 0}}, "config": {}, "preset": 1, "widget": ' || (select widget_id from dashboard.tbl_widget where widget_kurzbz = 'studiengang') || ', "widgetid": "83808e47ccf95db1afb4fe014d221ca9"}}}}')::jsonb
|
||||
)
|
||||
EOGP;
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_dashboard_preset '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_dashboard_preset: Added Student Preset for Dashboard "CIS"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
$raum_contentmittitel_xslt_xhtml= <<<EOD
|
||||
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
@@ -8,27 +9,56 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<head>
|
||||
<title><xsl:value-of select="titel" /></title>
|
||||
<link rel="stylesheet" href="../skin/style.css.php" type="text/css" />
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/tabulator/5.0.7/css/tabulator.min.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="https://c3p0.ma0594.technikum-wien.at/fh-core/vendor/olifolkerd/tabulator5/dist/js/tabulator.min.js?2019102903"></script>
|
||||
<link rel="stylesheet" href="../skin/jquery.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="../skin/jquery-ui-1.9.2.custom.min.css" />
|
||||
<script type="text/javascript" src="../vendor/jquery/jquery1/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/christianbach/tablesorter/jquery.tablesorter.min.js"></script>
|
||||
<script type="text/javascript" src="../vendor/components/jqueryui/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker.translation.js"></script>
|
||||
<script type="text/javascript" src="../vendor/jquery/sizzle/sizzle.js"></script>
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css"/>
|
||||
<script type="text/javascript">
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function()
|
||||
{
|
||||
let tables = document.getElementsByClassName("tablesorter");
|
||||
for(table of tables){
|
||||
new Tabulator(table, {
|
||||
layout:"fitDataFill",
|
||||
autoResize:true,
|
||||
resizableRows:true,
|
||||
columnDefaults:{
|
||||
formatter:"html",
|
||||
resizable:true,
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(".tablesorter").each(function()
|
||||
{
|
||||
var col=0;
|
||||
var sort=0;
|
||||
var no_sort=1;
|
||||
var classes = $(this).attr("class");
|
||||
var class_arr = classes.split(" ");
|
||||
var headersobj={};
|
||||
|
||||
for(i in class_arr)
|
||||
{
|
||||
if(class_arr[i].indexOf("tablesorter_col_")!=-1)
|
||||
{
|
||||
col = class_arr[i].substr(16);
|
||||
}
|
||||
|
||||
if(class_arr[i].indexOf("tablesorter_sort_")!=-1)
|
||||
{
|
||||
sort = class_arr[i].substr(17);
|
||||
}
|
||||
|
||||
if(class_arr[i].indexOf("tablesorter_no_sort_")!=-1)
|
||||
{
|
||||
no_sort = class_arr[i].substr(20);
|
||||
headersobj[no_sort]={sorter:false};
|
||||
}
|
||||
}
|
||||
|
||||
$(this).tablesorter(
|
||||
{
|
||||
sortList: [[col,sort]],
|
||||
widgets: ["zebra"],
|
||||
headers: headersobj
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1><xsl:value-of select="titel" /></h1>
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
if (!defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Activate module pg_trgm
|
||||
if (!$db->db_num_rows(@$db->db_query("SELECT 1
|
||||
FROM pg_extension WHERE extname = 'pg_trgm' LIMIT 1;")))
|
||||
{
|
||||
$qry = "CREATE extension pg_trgm;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>Module pg_trgm ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Module pg_trgm: activated<br>';
|
||||
}
|
||||
|
||||
|
||||
// Add additional computed columns
|
||||
// Add column fts_bezeichnung to public.tbl_organisationseinheit
|
||||
if (!@$db->db_query("SELECT fts_bezeichnung FROM public.tbl_organisationseinheit LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_organisationseinheit ADD COLUMN fts_bezeichnung tsvector;";
|
||||
$qry .= "COMMENT ON COLUMN public.tbl_organisationseinheit.fts_bezeichnung IS 'used for search - auto generated w triggers';";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong> public.tbl_organisationseinheit ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_organisationseinheit: new column "fts_bezeichnung" added<br>';
|
||||
}
|
||||
|
||||
// Add function tr_update_tbl_organisationseinheit_fts_bezeichnung to public
|
||||
if (!$db->db_num_rows(@$db->db_query("SELECT 1 FROM pg_proc WHERE proname = 'tr_update_tbl_organisationseinheit_fts_bezeichnung' LIMIT 1;")))
|
||||
{
|
||||
$qry = "CREATE FUNCTION tr_update_tbl_organisationseinheit_fts_bezeichnung()
|
||||
RETURNS TRIGGER
|
||||
LANGUAGE PLPGSQL
|
||||
AS
|
||||
$$
|
||||
BEGIN
|
||||
IF TG_TABLE_NAME = 'tbl_organisationseinheit' THEN
|
||||
NEW.fts_bezeichnung := to_tsvector('simple', COALESCE((
|
||||
SELECT bezeichnung
|
||||
FROM public.tbl_organisationseinheittyp
|
||||
WHERE organisationseinheittyp_kurzbz = NEW.organisationseinheittyp_kurzbz
|
||||
), '') || ' ' || COALESCE(NEW.bezeichnung, ''));
|
||||
ELSIF TG_TABLE_NAME = 'tbl_organisationseinheittyp' THEN
|
||||
UPDATE public.tbl_organisationseinheit
|
||||
SET fts_bezeichnung = to_tsvector('simple', COALESCE(NEW.bezeichnung, '') || ' ' || COALESCE(bezeichnung, ''))
|
||||
WHERE organisationseinheittyp_kurzbz = NEW.organisationseinheittyp_kurzbz;
|
||||
END IF;
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong> public.tr_update_tbl_organisationseinheit_fts_bezeichnung ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tr_update_tbl_organisationseinheit_fts_bezeichnung: function created<br>';
|
||||
}
|
||||
|
||||
$update_column = false;
|
||||
// Add trigger tr_organisationseinheit_update_organisationseinheittyp_kurzbz to public.tbl_organisationseinheit
|
||||
if (!$db->db_num_rows(@$db->db_query("
|
||||
SELECT 1
|
||||
FROM information_schema.triggers
|
||||
WHERE event_object_table ='tbl_organisationseinheit'
|
||||
AND trigger_name = 'tr_organisationseinheit_update_organisationseinheittyp_kurzbz'
|
||||
LIMIT 1;
|
||||
")))
|
||||
{
|
||||
$qry = "CREATE TRIGGER tr_organisationseinheit_update_organisationseinheittyp_kurzbz
|
||||
BEFORE UPDATE OF organisationseinheittyp_kurzbz OR INSERT
|
||||
ON public.tbl_organisationseinheit
|
||||
FOR EACH ROW
|
||||
EXECUTE FUNCTION tr_update_tbl_organisationseinheit_fts_bezeichnung();";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong> public.tbl_organisationseinheit ' . $db->db_last_error() . '</strong><br>';
|
||||
else {
|
||||
echo 'public.tbl_organisationseinheit: trigger "tr_organisationseinheit_update_organisationseinheittyp_kurzbz" created<br>';
|
||||
$update_column = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Add trigger tr_organisationseinheittyp_update_bezeichnung to public.tbl_organisationseinheittyp
|
||||
if (!$db->db_num_rows(@$db->db_query("
|
||||
SELECT 1
|
||||
FROM information_schema.triggers
|
||||
WHERE event_object_table ='tbl_organisationseinheittyp'
|
||||
AND trigger_name = 'tr_organisationseinheittyp_update_bezeichnung'
|
||||
LIMIT 1;
|
||||
")))
|
||||
{
|
||||
$qry = "CREATE TRIGGER tr_organisationseinheittyp_update_bezeichnung
|
||||
BEFORE UPDATE OF bezeichnung
|
||||
ON public.tbl_organisationseinheittyp
|
||||
FOR EACH ROW
|
||||
EXECUTE FUNCTION tr_update_tbl_organisationseinheit_fts_bezeichnung();";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong> public.tbl_organisationseinheittyp ' . $db->db_last_error() . '</strong><br>';
|
||||
else {
|
||||
echo 'public.tbl_organisationseinheittyp: trigger "tr_organisationseinheittyp_update_bezeichnung" created<br>';
|
||||
$update_column = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Update fts_bezeichnung on tbl_organisationseinheit with new triggers
|
||||
if ($update_column)
|
||||
{
|
||||
$qry = "UPDATE public.tbl_organisationseinheittyp SET bezeichnung = bezeichnung;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong> public.tbl_organisationseinheit ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_organisationseinheit: column "fts_bezeichnung" updated<br>';
|
||||
}
|
||||
|
||||
|
||||
// Add Trigram Indexes
|
||||
// Add index for kontakt to public.tbl_kontakt
|
||||
if ($result = @$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_kontakt_kontakt_trgm';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_kontakt_kontakt_trgm ON public.tbl_kontakt USING GIN (COALESCE(kontakt, '') gin_trgm_ops);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_kontakt ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_kontakt: added index "idx_tbl_kontakt_kontakt_trgm"<br>';
|
||||
}
|
||||
}
|
||||
// Add index for vorname to public.tbl_person
|
||||
if ($result = @$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_person_vorname_trgm';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_person_vorname_trgm ON public.tbl_person USING GIN (COALESCE(vorname, '') gin_trgm_ops);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_person ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_person: added index "idx_tbl_person_vorname_trgm"<br>';
|
||||
}
|
||||
}
|
||||
// Add index for nachname to public.tbl_person
|
||||
if ($result = @$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_person_nachname_trgm';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_person_nachname_trgm ON public.tbl_person USING GIN (COALESCE(nachname, '') gin_trgm_ops);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_person ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_person: added index "idx_tbl_person_nachname_trgm"<br>';
|
||||
}
|
||||
}
|
||||
// Add index for vorname || ' ' || nachname to public.tbl_person
|
||||
if ($result = @$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_person_name_trgm';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_person_name_trgm ON public.tbl_person USING GIN (COALESCE((vorname || ' ' || nachname), '') gin_trgm_ops);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_person ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_person: added index "idx_tbl_person_name_trgm"<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add Vector Indexes
|
||||
// Add index for fts_bezeichnung to public.tbl_organisationseinheit
|
||||
if (!$db->db_num_rows(@$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_organisationseinheit_fts_bezeichnung_vector' LIMIT 1;")))
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_organisationseinheit_fts_bezeichnung_vector ON public.tbl_organisationseinheit USING GIN (fts_bezeichnung);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_organisationseinheit ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_organisationseinheit: added index "idx_tbl_organisationseinheit_fts_bezeichnung_vector"<br>';
|
||||
}
|
||||
// Add index for titel || ' ' || content to campus.tbl_contentsprache
|
||||
if (!$db->db_num_rows(@$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_contentsprache_fts_titel_content_vector' LIMIT 1;")))
|
||||
{
|
||||
$qry = "
|
||||
CREATE INDEX idx_tbl_contentsprache_fts_titel_content_vector
|
||||
ON campus.tbl_contentsprache
|
||||
USING GIN ((
|
||||
setweight(to_tsvector('simple', COALESCE(titel, '')), 'A')
|
||||
|| setweight(to_tsvector('simple', COALESCE(content, '')::text), 'B')
|
||||
));
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_contentsprache ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'campus.tbl_contentsprache: added index "idx_tbl_contentsprache_fts_titel_content_vector"<br>';
|
||||
}
|
||||
// Add index for schlagworte to campus.tbl_dms_version
|
||||
if (!$db->db_num_rows(@$db->db_query("SELECT 1
|
||||
FROM pg_indexes WHERE indexname = 'idx_tbl_dms_version_fts_schlagworte_vector' LIMIT 1;")))
|
||||
{
|
||||
$qry = "
|
||||
CREATE INDEX idx_tbl_dms_version_fts_schlagworte_vector
|
||||
ON campus.tbl_dms_version
|
||||
USING GIN ((to_tsvector('simple', COALESCE(schlagworte, ''))));
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_dms_version ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'campus.tbl_contentsprache: added index "idx_tbl_dms_version_fts_schlagworte_vector"<br>';
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// public.tbl_kontakttyp: add type email unverified
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_kontakttyp WHERE kontakttyp='email_unverifiziert'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_kontakttyp(kontakttyp, beschreibung, bezeichnung_mehrsprachig) VALUES('email_unverifiziert', 'Unverifizierte E-Mail', '{\"Unverifizierte E-Mail\", \"Unverified email\"}');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Kontakttyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Neuen Kontakttyp E-Mail unverifiziert in public.tbl_kontakttyp hinzugefügt';
|
||||
}
|
||||
}
|
||||
|
||||
// public.tbl_adressentyp: add type Meldeadresse
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_adressentyp WHERE adressentyp_kurzbz='m'"))
|
||||
{
|
||||
if($db->db_num_rows($result)==0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_adressentyp(adressentyp_kurzbz, bezeichnung, bezeichnung_mehrsprachig, sort) VALUES('m', 'Meldeadresse', '{\"Meldeadresse\", \"Registered adress\"}', 6);";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Adressentyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Neue Adressentyp Meldeadresse in public.tbl_adressentyp hinzugefügt';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$result = @$db->db_query('SELECT 1 FROM public.tbl_kontakt_verifikation LIMIT 1'))
|
||||
{
|
||||
$qry = "CREATE SEQUENCE public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
START WITH 1
|
||||
CACHE 1
|
||||
NO CYCLE;
|
||||
|
||||
CREATE TABLE public.tbl_kontakt_verifikation
|
||||
(
|
||||
kontakt_verifikation_id integer DEFAULT nextval('public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq'::regclass),
|
||||
kontakt_id integer UNIQUE NOT NULL,
|
||||
verifikation_code varchar(32) UNIQUE NOT NULL,
|
||||
erstelldatum timestamp without time zone,
|
||||
verifikation_datum timestamp without time zone,
|
||||
app varchar(32),
|
||||
CONSTRAINT pk_tbl_kontakt_verifikation_id PRIMARY KEY (kontakt_verifikation_id)
|
||||
);
|
||||
|
||||
ALTER TABLE public.tbl_kontakt_verifikation ADD CONSTRAINT fk_tbl_kontakt_verifikation_kontakt_id FOREIGN KEY (kontakt_id)
|
||||
REFERENCES public.tbl_kontakt (kontakt_id)
|
||||
ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE public.tbl_kontakt_verifikation ADD CONSTRAINT fk_tbl_kontakt_verifikation_app FOREIGN KEY (app)
|
||||
REFERENCES system.tbl_app (app)
|
||||
ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
COMMENT ON TABLE public.tbl_kontakt_verifikation IS 'Contact verification';
|
||||
COMMENT ON COLUMN public.tbl_kontakt_verifikation.kontakt_id IS 'Contact to verify';
|
||||
COMMENT ON COLUMN public.tbl_kontakt_verifikation.verifikation_code IS 'Code generated for verification';
|
||||
COMMENT ON COLUMN public.tbl_kontakt_verifikation.erstelldatum IS 'Time when verification code was generated';
|
||||
COMMENT ON COLUMN public.tbl_kontakt_verifikation.verifikation_datum IS 'Time when contact was verified';
|
||||
COMMENT ON COLUMN public.tbl_kontakt_verifikation.app IS 'App where contact was verified';
|
||||
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON public.tbl_kontakt_verifikation TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON public.tbl_kontakt_verifikation TO vilesci;
|
||||
GRANT SELECT, UPDATE ON public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq TO vilesci;
|
||||
GRANT SELECT, UPDATE ON public.tbl_kontakt_verifikation_kontakt_verifikation_id_seq TO web;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_kontakt_verifikation: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo ' public.tbl_kontakt_verifikation: Tabelle hinzugefuegt<br>';
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
if(!@$db->db_query("SELECT ects FROM campus.tbl_pruefungsanmeldung LIMIT 1"))
|
||||
{
|
||||
$qry = 'ALTER TABLE campus.tbl_pruefungsanmeldung ADD COLUMN ects numeric(5,2);';
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong> campus.tbl_pruefungsanmeldung '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>campus.tbl_pruefungsanmeldung: Neue Spalte ects hinzugefügt';
|
||||
}
|
||||
|
||||
if(!@$db->db_query("SELECT anderer_raum FROM campus.tbl_pruefungstermin LIMIT 1"))
|
||||
{
|
||||
$qry = 'ALTER TABLE campus.tbl_pruefungstermin ADD COLUMN anderer_raum text NULL;';
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong> campus.tbl_pruefungstermin '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>campus.tbl_pruefungstermin: Neue Spalte anderer_raum hinzugefügt';
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if (!defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add new name type in public.tbl_variablenname
|
||||
if ($result = @$db->db_query("SELECT 1 FROM public.tbl_variablenname WHERE name = 'lv_favorites';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_variablenname(name, defaultwert) VALUES('lv_favorites', null);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_variablenname '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_variablenname: Added name "lv_favorites"<br>';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
$rowcount = 0;
|
||||
$result = @$db->db_query("SELECT preset_id FROM dashboard.tbl_dashboard_preset WHERE preset ? 'widgets'");
|
||||
$result_num_rows = $db->db_num_rows($result);
|
||||
$rowcount += $result_num_rows;
|
||||
$errorList = array();
|
||||
for($i = 0; $i < $result_num_rows; $i++)
|
||||
{
|
||||
$row = $db->db_fetch_object($result, $i);
|
||||
|
||||
$qry = "
|
||||
UPDATE dashboard.tbl_dashboard_preset
|
||||
SET preset =
|
||||
COALESCE(
|
||||
(SELECT jsonb_object_agg(keys,values) FROM (
|
||||
SELECT key AS keys,jsonb_build_object('widgets',to_jsonb(value)) AS values
|
||||
FROM jsonb_each(preset->'widgets')
|
||||
) AS subquery
|
||||
),preset)
|
||||
WHERE preset_id = ".$row->preset_id;
|
||||
|
||||
$db->db_query($qry);
|
||||
if (!$db->db_query($qry))
|
||||
array_push($errorList,'<br><strong>dashboard.tbl_dashboard_preset: ' . $db->db_last_error() . '</strong><br>') ;
|
||||
|
||||
}
|
||||
|
||||
$result = @$db->db_query("SELECT override_id FROM dashboard.tbl_dashboard_benutzer_override WHERE override ? 'widgets'");
|
||||
$result_num_rows = $db->db_num_rows($result);
|
||||
$rowcount += $result_num_rows;
|
||||
for($i = 0; $i < $result_num_rows; $i++)
|
||||
{
|
||||
$row = $db->db_fetch_object($result, $i);
|
||||
|
||||
$qry = "
|
||||
UPDATE dashboard.tbl_dashboard_benutzer_override
|
||||
SET override =
|
||||
COALESCE(
|
||||
(SELECT jsonb_object_agg(keys,values) FROM (
|
||||
SELECT key AS keys,jsonb_build_object('widgets',to_jsonb(value)) AS values
|
||||
FROM jsonb_each(override->'widgets')
|
||||
) AS subquery
|
||||
),override)
|
||||
WHERE override_id = ".$row->override_id;
|
||||
|
||||
$db->db_query($qry);
|
||||
if (!$db->db_query($qry))
|
||||
array_push($errorList,'<br><strong>dashboard.tbl_dashboard_benutzer_override: ' . $db->db_last_error() . '</strong><br>') ;
|
||||
|
||||
}
|
||||
|
||||
if(empty($errorList)){
|
||||
if($rowcount > 0) {
|
||||
echo '<br>successfully updated dashboard.tbl_dashboard_preset and dashboard.tbl_dashboard_benutzer_override';
|
||||
}
|
||||
}
|
||||
else{
|
||||
foreach($errorList as $error){
|
||||
echo $error;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if (!defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Change type of wert in public.tbl_variable
|
||||
if ($result = @$db->db_query("
|
||||
SELECT data_type
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = 'public'
|
||||
AND table_name = 'tbl_variable'
|
||||
AND column_name = 'wert';
|
||||
")) {
|
||||
if ($db->db_num_rows($result) == 1)
|
||||
{
|
||||
$data_type = $db->db_fetch_row($result)[0];
|
||||
|
||||
if (strtolower($data_type) != 'text')
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_variable
|
||||
ALTER COLUMN wert
|
||||
TYPE TEXT;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_variable '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_variable: Change type of "wert" to TEXT<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
$xsd= <<<EOD
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
|
||||
<xs:element name="content">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="url" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
EOD;
|
||||
|
||||
$xslt_xhtml= <<<EOD
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" encoding="UTF-8"/>
|
||||
<xsl:template match="content">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string(url)">
|
||||
<iframe
|
||||
src="{url}"
|
||||
frameborder="0"
|
||||
style="width:100%; height:90vh; border:0; display:block;"
|
||||
>
|
||||
</iframe>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="alert alert-warning">Keine URL im Inhalt gefunden.</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
EOD;
|
||||
|
||||
$xslt_xhtml_c4= <<<EOD
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="html" encoding="UTF-8"/>
|
||||
<xsl:template match="content">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string(url)">
|
||||
<iframe
|
||||
src="{url}"
|
||||
frameborder="0"
|
||||
style="width:100%; height:90vh; border:0; display:block;"
|
||||
>
|
||||
</iframe>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="alert alert-warning">Keine URL im Inhalt gefunden.</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
EOD;
|
||||
|
||||
|
||||
if ($result = @$db->db_query("SELECT * FROM campus.tbl_template WHERE template_kurzbz='iframe'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$sql= <<<EOD
|
||||
INSERT INTO campus.tbl_template
|
||||
(template_kurzbz, bezeichnung, xsd, xslt_xhtml, xslfo_pdf, xslt_xhtml_c4)
|
||||
VALUES
|
||||
('iframe','iFrame Content ', '{$xsd}', '{$xslt_xhtml}' , NULL, '{$xslt_xhtml_c4}');
|
||||
EOD;
|
||||
|
||||
if (!$db->db_query($sql))
|
||||
{
|
||||
echo '<strong>campus.tbl_template: ' . $db->db_last_error() . '</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ' campus.tbl_template: Template "iframe" hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/* Copyright (C) 2025 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Österreicher <[email protected]>,
|
||||
*
|
||||
* Beschreibung:
|
||||
* Aktivität Berufsschule für Zeitaufzeichnung
|
||||
*/
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add permission: basis/gehaelter
|
||||
if($result = @$db->db_query("SELECT 1 FROM fue.tbl_aktivitaet WHERE aktivitaet_kurzbz = 'Berufsschule';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO fue.tbl_aktivitaet(aktivitaet_kurzbz, beschreibung, sort) VALUES('Berufsschule', 'Berufsschule','5');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>fue.tbl_aktivitaet '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'fue.tbl_aktivitaet: Added Aktivitaet "berufsschule"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1479,6 +1479,109 @@ $filters = array(
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'personalverwaltung',
|
||||
'dataset_name' => 'schluesselverwaltung',
|
||||
'filter_kurzbz' => 'ma4schluesselverwaltung',
|
||||
'description' => '{MA Schluesselverwaltung}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "MA Schlüsselverwaltung",
|
||||
"columns": [
|
||||
{"name": "UID"},
|
||||
{"name": "PersonId"},
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "EMail"},
|
||||
{"name": "Unternehmen"},
|
||||
{"name": "Vertragsart"},
|
||||
{"name": "DV_von"},
|
||||
{"name": "DV_bis"},
|
||||
{"name": "Wochenstunden"},
|
||||
{"name": "WS_von"},
|
||||
{"name": "WS_bis"},
|
||||
{"name": "Standardkostenstelle"},
|
||||
{"name": "DV_status"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "DV_status",
|
||||
"option": "",
|
||||
"operation": "nequal",
|
||||
"condition": "beendet"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'personalverwaltung',
|
||||
'dataset_name' => 'schluesselverwaltung',
|
||||
'filter_kurzbz' => 'ma4schluesselverwaltung_beendet',
|
||||
'description' => '{MA Schluesselverwaltung (DV beendet)}',
|
||||
'sort' => 2,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "MA Schlüsselverwaltung (DV beendet)",
|
||||
"columns": [
|
||||
{"name": "UID"},
|
||||
{"name": "PersonId"},
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "EMail"},
|
||||
{"name": "Unternehmen"},
|
||||
{"name": "Vertragsart"},
|
||||
{"name": "DV_von"},
|
||||
{"name": "DV_bis"},
|
||||
{"name": "Wochenstunden"},
|
||||
{"name": "WS_von"},
|
||||
{"name": "WS_bis"},
|
||||
{"name": "Standardkostenstelle"},
|
||||
{"name": "DV_status"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "DV_status",
|
||||
"option": "",
|
||||
"operation": "equal",
|
||||
"condition": "beendet"
|
||||
}
|
||||
]
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'personalverwaltung',
|
||||
'dataset_name' => 'kontaktdatenverwaltung',
|
||||
'filter_kurzbz' => 'ma4kontaktdaten',
|
||||
'description' => '{MA Kontaktdatenverwaltung}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "MA Kontaktdatenverwaltung",
|
||||
"columns": [
|
||||
{"name": "UID"},
|
||||
{"name": "PersonId"},
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "Unternehmen"},
|
||||
{"name": "Vertragsart"},
|
||||
{"name": "DV_von"},
|
||||
{"name": "DV_bis"},
|
||||
{"name": "Disziplinaere_Zuordnung"},
|
||||
{"name": "DV_status"}
|
||||
],
|
||||
"filters": []
|
||||
}',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
// Loop through the filters array
|
||||
|
||||
+8161
-53
File diff suppressed because it is too large
Load Diff
@@ -309,7 +309,8 @@ xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
|
||||
<text:p text:style-name="P4">(nz) ... nicht zugelassen</text:p>
|
||||
<text:p text:style-name="P4">(ma) ... MitarbeiterIn</text:p>
|
||||
<text:p text:style-name="P4">(a.o.) ... Außerordentliche/r HörerIn</text:p>
|
||||
<text:p text:style-name="P4">(d.d.) ... Double Degree Program</text:p>
|
||||
<text:p text:style-name="P4">(d.d.i) ... Double Degree Incoming Program</text:p>
|
||||
<text:p text:style-name="P4">(d.d.o) ... Double Degree Outgoing Program</text:p>
|
||||
<text:p text:style-name="P4"/>
|
||||
<text:p text:style-name="P5">
|
||||
<xsl:choose>
|
||||
|
||||
Reference in New Issue
Block a user