mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 01:12:17 +00:00
Merge branch 'master' into feature-53904/Vertragshistorie_valorisierte_Gehaelter_anzeigen_NoPermissionException
This commit is contained in:
+5999
-108
File diff suppressed because it is too large
Load Diff
+31
-6
@@ -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,25 @@ 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');
|
||||
require_once('dbupdate_3.4/62063_lv_evaluierung.php');
|
||||
require_once('dbupdate_3.4/67490_studstatus_suche_abort_controller_haengt.php');
|
||||
require_once('dbupdate_3.4/61164_abgabetool_quality_gates.php');
|
||||
require_once('dbupdate_3.4/69065_Projektarbeiten_Firmen_verwalten.php');
|
||||
require_once('dbupdate_3.4/68744_StV_settings.php');
|
||||
require_once('dbupdate_3.4/62889_reihungstest_ueberwachung_mit_constructor.php');
|
||||
require_once('dbupdate_3.4/71399_dashboard_update_widget_paths.php');
|
||||
require_once('dbupdate_3.4/71645_studvw_messagetab_ladezeit.php');
|
||||
require_once('dbupdate_3.4/71566_studienordnungsdokument_neuer_organisationseinheitstyp_programm.php');
|
||||
require_once('dbupdate_3.4/70376_lohnguide.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -152,12 +172,12 @@ $tabellen=array(
|
||||
"campus.tbl_news" => array("news_id","uid","studiengang_kz","fachbereich_kurzbz","semester","betreff","text","datum","verfasser","updateamum","updatevon","insertamum","insertvon","datum_bis","content_id"),
|
||||
"campus.tbl_notenschluessel" => array("lehreinheit_id","note","punkte"),
|
||||
"campus.tbl_notenschluesseluebung" => array("uebung_id","note","punkte"),
|
||||
"campus.tbl_paabgabetyp" => array("paabgabetyp_kurzbz","bezeichnung"),
|
||||
"campus.tbl_paabgabe" => array("paabgabe_id","projektarbeit_id","paabgabetyp_kurzbz","fixtermin","datum","kurzbz","abgabedatum", "insertvon","insertamum","updatevon","updateamum"),
|
||||
"campus.tbl_paabgabetyp" => array("paabgabetyp_kurzbz","bezeichnung","aktiv","upload_allowed_default","benotbar"),
|
||||
"campus.tbl_paabgabe" => array("paabgabe_id","projektarbeit_id","paabgabetyp_kurzbz","fixtermin","datum","kurzbz","abgabedatum", "insertvon","insertamum","updatevon","updateamum","note","upload_allowed","beurteilungsnotiz"),
|
||||
"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"),
|
||||
@@ -221,6 +241,11 @@ $tabellen=array(
|
||||
"hr.tbl_valorisierung_instanz" => array("updateamum", "oe_kurzbz", "valorisierungsdatum", "valorisierung_kurzbz", "beschreibung", "ausgewaehlt", "updatevon", "valorisierung_instanz_id"),
|
||||
"hr.tbl_valorisierung_instanz_methode" => array("valorisierung_instanz_id", "valorisierung_methode_kurzbz", "beschreibung", "valorisierung_methode_parameter"),
|
||||
"hr.tbl_valorisierung_methode" => array("beschreibung", "valorisierung_methode_kurzbz"),
|
||||
"hr.tbl_lohnguide_jobfamilie" => array("jobfamilie_kurzbz", "bezeichnung", "aktiv", "sort", "insertvon", "insertamum", "updatevon", "updateamum"),
|
||||
"hr.tbl_lohnguide_modellfunktion" => array("modellfunktion_kurzbz", "bezeichnung", "jobfamilie_kurzbz", "aktiv", "sort", "insertvon", "insertamum", "updatevon", "updateamum"),
|
||||
"hr.tbl_lohnguide_modellstelle" => array("modellstelle_kurzbz", "bezeichnung", "grade", "modellfunktion_kurzbz", "aktiv", "sort", "insertvon", "insertamum", "updatevon", "updateamum"),
|
||||
"hr.tbl_lohnguide_fachrichtung" => array("fachrichtung_kurzbz", "bezeichnung", "aktiv", "insertvon", "insertamum", "updatevon", "updateamum"),
|
||||
"hr.tbl_vertragsbestandteil_lohnguide" => array("vertragsbestandteil_id", "stellenbezeichnung", "vordienstzeit", "fachrichtung_kurzbz", "modellstelle_kurzbz", "kommentar_person", "kommentar_modellstelle"),
|
||||
"lehre.tbl_abschlussbeurteilung" => array("abschlussbeurteilung_kurzbz","bezeichnung","bezeichnung_english","sort"),
|
||||
"lehre.tbl_abschlusspruefung" => array("abschlusspruefung_id","student_uid","vorsitz","pruefer1","pruefer2","pruefer3","abschlussbeurteilung_kurzbz","akadgrad_id","pruefungstyp_kurzbz","datum","uhrzeit","sponsion","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","note","protokoll","endezeit","pruefungsantritt_kurzbz","freigabedatum"),
|
||||
"lehre.tbl_abschlusspruefung_antritt" => array("pruefungsantritt_kurzbz","bezeichnung","bezeichnung_english","sort"),
|
||||
@@ -241,7 +266,7 @@ $tabellen=array(
|
||||
"lehre.tbl_lehrmittel" => array("lehrmittel_kurzbz","beschreibung","ort_kurzbz"),
|
||||
"lehre.tbl_lehrmodus" => array("lehrmodus_kurzbz","bezeichnung_mehrsprachig","aktiv"),
|
||||
"lehre.tbl_lehrtyp" => array("lehrtyp_kurzbz","bezeichnung"),
|
||||
"lehre.tbl_lehrveranstaltung" => array("lehrveranstaltung_id","kurzbz","bezeichnung","lehrform_kurzbz","studiengang_kz","semester","sprache","ects","semesterstunden","anmerkung","lehre","lehreverzeichnis","aktiv","planfaktor","planlektoren","planpersonalkosten","plankostenprolektor","koordinator","sort","zeugnis","projektarbeit","updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung_english","orgform_kurzbz","incoming","lehrtyp_kurzbz","oe_kurzbz","raumtyp_kurzbz","anzahlsemester","semesterwochen","lvnr","farbe","semester_alternativ","old_lehrfach_id","sws","lvs","alvs","lvps","las","benotung","lvinfo","lehrauftrag","lehrmodus_kurzbz","lehrveranstaltung_template_id"),
|
||||
"lehre.tbl_lehrveranstaltung" => array("lehrveranstaltung_id","kurzbz","bezeichnung","lehrform_kurzbz","studiengang_kz","semester","sprache","ects","semesterstunden","anmerkung","lehre","lehreverzeichnis","aktiv","planfaktor","planlektoren","planpersonalkosten","plankostenprolektor","koordinator","sort","zeugnis","projektarbeit","updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung_english","orgform_kurzbz","incoming","lehrtyp_kurzbz","oe_kurzbz","raumtyp_kurzbz","anzahlsemester","semesterwochen","lvnr","farbe","semester_alternativ","old_lehrfach_id","sws","lvs","alvs","lvps","las","benotung","lvinfo","lehrauftrag","lehrmodus_kurzbz","lehrveranstaltung_template_id", "evaluierung"),
|
||||
"lehre.tbl_lehrveranstaltung_kompatibel" => array("lehrveranstaltung_id","lehrveranstaltung_id_kompatibel"),
|
||||
"lehre.tbl_lvangebot" => array("lvangebot_id","lehrveranstaltung_id","studiensemester_kurzbz","gruppe_kurzbz","incomingplaetze","gesamtplaetze","anmeldefenster_start","anmeldefenster_ende","insertamum","insertvon","updateamum","updatevon"),
|
||||
"lehre.tbl_lvregel" => array("lvregel_id","lvregeltyp_kurzbz","operator","parameter","lvregel_id_parent","lehrveranstaltung_id","studienplan_lehrveranstaltung_id","insertamum","insertvon","updateamum","updatevon"),
|
||||
@@ -346,7 +371,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,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 <harald.bamberger@technikum-wien.at>,
|
||||
*
|
||||
* 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": "public/js/components/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": "public/js/components/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": "public/js/components/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": "public/js/components/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": "public/js/components/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": "public/js/components/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": "public/js/components/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,394 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabetyp' AND column_name = 'aktiv'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabetyp
|
||||
ADD COLUMN IF NOT EXISTS aktiv BOOLEAN DEFAULT true;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp column aktiv default true hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabetyp' AND column_name = 'upload_allowed_default'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabetyp
|
||||
ADD COLUMN IF NOT EXISTS upload_allowed_default BOOLEAN DEFAULT true;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp column upload_allowed_default default true hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabetyp' AND column_name = 'benotbar'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabetyp
|
||||
ADD COLUMN IF NOT EXISTS benotbar BOOLEAN DEFAULT true;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp column benotbar default true hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
// TODO DEFINE ACTUAL VALUES BENOTBAR / UPLOAD_ALLOWED_DEFAULT / AKTIV FOR EACH PAABGABETYPE - DEVLOPER DEFAULTS BELOW
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate1'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO campus.tbl_paabgabetyp (paabgabetyp_kurzbz, bezeichnung, benotbar, upload_allowed_default, aktiv)
|
||||
VALUES('qualgate1', 'Quality Gate 1', true, true, true);";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp quality gate 1 hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
// set new cols for zwischenabgabe
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "UPDATE campus.tbl_paabgabetyp
|
||||
SET benotbar = false,
|
||||
upload_allowed_default = true,
|
||||
aktiv = true
|
||||
WHERE paabgabetyp_kurzbz='zwischen';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp zwischen updated benotbar = false, upload_allowed_default = true, aktiv = true';
|
||||
}
|
||||
}
|
||||
|
||||
// set new cols for note
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "UPDATE campus.tbl_paabgabetyp
|
||||
SET benotbar = false,
|
||||
upload_allowed_default = false,
|
||||
aktiv = false
|
||||
WHERE paabgabetyp_kurzbz='note';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp note updated benotbar = false, upload_allowed_default = false, aktiv = false';
|
||||
}
|
||||
}
|
||||
|
||||
// set new cols for abstract / entwurf
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "UPDATE campus.tbl_paabgabetyp
|
||||
SET benotbar = false,
|
||||
upload_allowed_default = true,
|
||||
aktiv = true
|
||||
WHERE paabgabetyp_kurzbz='abstract';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp abstract updated benotbar = false, upload_allowed_default = true, aktiv = true';
|
||||
}
|
||||
}
|
||||
|
||||
// set new cols for endabgabe / end
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "UPDATE campus.tbl_paabgabetyp
|
||||
SET benotbar = false,
|
||||
upload_allowed_default = true,
|
||||
aktiv = true
|
||||
WHERE paabgabetyp_kurzbz='end';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp end updated benotbar = false, upload_allowed_default = true, aktiv = true';
|
||||
}
|
||||
}
|
||||
|
||||
// set new cols for endabgabe im sekretariat / enda
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "UPDATE campus.tbl_paabgabetyp
|
||||
SET benotbar = false,
|
||||
upload_allowed_default = false,
|
||||
aktiv = false
|
||||
WHERE paabgabetyp_kurzbz='enda';";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp enda updated benotbar = false, upload_allowed_default = false, aktiv = false';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM campus.tbl_paabgabetyp WHERE paabgabetyp_kurzbz='qualgate2'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO campus.tbl_paabgabetyp (paabgabetyp_kurzbz, bezeichnung, benotbar, upload_allowed_default, aktiv)
|
||||
VALUES('qualgate2', 'Quality Gate 2', true, true, true);";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabetyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabetyp quality gate 2 hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabe' AND column_name = 'note'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabe
|
||||
ADD COLUMN IF NOT EXISTS note SMALLINT DEFAULT NULL,
|
||||
ADD CONSTRAINT tbl_paabgabe_note_fkey
|
||||
FOREIGN KEY (note)
|
||||
REFERENCES lehre.tbl_note(note)
|
||||
ON UPDATE CASCADE ON DELETE RESTRICT;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabe: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabe column note default 9 (noch nicht eingetragen) hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabe' AND column_name = 'upload_allowed'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabe
|
||||
ADD COLUMN IF NOT EXISTS upload_allowed boolean DEFAULT true;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabe: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>paabgabe column upload_allowed default false hinzugefuegt';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.columns WHERE table_schema = 'campus' AND table_name = 'tbl_paabgabe' AND column_name = 'beurteilungsnotiz'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "ALTER TABLE campus.tbl_paabgabe
|
||||
ADD COLUMN IF NOT EXISTS beurteilungsnotiz text DEFAULT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.tbl_paabgabe: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>paabgabe column beurteilungsnotiz default '' hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_student'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_student', 'Recht um Abgabetool für Studenten zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_student hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_lektor'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_lektor', 'Recht um Abgabetool für Lektoren zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_lektor hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_assistenz'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_assistenz', 'Recht um Abgabetool für Assistenzen zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_assistenz hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM information_schema.routines WHERE routine_schema = 'campus' AND routine_name = 'get_betreuer_details'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "CREATE OR REPLACE FUNCTION campus.get_betreuer_details(b_person_id INT)
|
||||
RETURNS TABLE (
|
||||
full_name TEXT
|
||||
)
|
||||
LANGUAGE sql
|
||||
AS $$
|
||||
SELECT DISTINCT
|
||||
trim(
|
||||
COALESCE(titelpre,'') || ' ' ||
|
||||
COALESCE(vorname,'') || ' ' ||
|
||||
COALESCE(nachname,'') || ' ' ||
|
||||
COALESCE(titelpost,'')
|
||||
) AS full_name
|
||||
FROM public.tbl_person
|
||||
JOIN lehre.tbl_projektbetreuer
|
||||
ON lehre.tbl_projektbetreuer.person_id = public.tbl_person.person_id
|
||||
LEFT JOIN public.tbl_benutzer
|
||||
ON public.tbl_benutzer.person_id = public.tbl_person.person_id
|
||||
LEFT JOIN public.tbl_mitarbeiter
|
||||
ON public.tbl_benutzer.uid = public.tbl_mitarbeiter.mitarbeiter_uid
|
||||
WHERE public.tbl_person.person_id = b_person_id;
|
||||
$$;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>campus.get_betreuer_details: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>campus.get_betreuer_details function hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'basis/abgabe_assistenz'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung)
|
||||
SELECT 'basis/abgabe_assistenz', 'Recht um Abgabetool für Assistenzen zu bedienen'";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_berechtigung: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_berechtigung insert basis/abgabe_assistenz hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'PaabgabeUpdatesBetSM'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage (vorlage_kurzbz, bezeichnung, anmerkung, mimetype)
|
||||
VALUES ('PaabgabeUpdatesBetSM', 'PaabgabeUpdatesBetSM', null, 'text/html')
|
||||
ON CONFLICT (vorlage_kurzbz) DO NOTHING;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_vorlage: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_vorlage PaabgabeUpdatesBetSM hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'PaabgabeUpdatesSammelmail'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage (vorlage_kurzbz, bezeichnung, anmerkung, mimetype)
|
||||
VALUES ('PaabgabeUpdatesSammelmail', 'PaabgabeUpdatesSammelmail', null, 'text/html')
|
||||
ON CONFLICT (vorlage_kurzbz) DO NOTHING;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_vorlage: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_vorlage PaabgabeUpdatesSammelmail hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'PAAChangesBetSM'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage (vorlage_kurzbz, bezeichnung, anmerkung, mimetype)
|
||||
VALUES ('PAAChangesBetSM', 'PAAChangesBetSM', null, 'text/html')
|
||||
ON CONFLICT (vorlage_kurzbz) DO NOTHING;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_vorlage: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_vorlage PAAChangesBetSM hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'PAAChangesAssSM'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage (vorlage_kurzbz, bezeichnung, anmerkung, mimetype)
|
||||
VALUES ('PAAChangesAssSM', 'PAAChangesAssSM', null, 'text/html')
|
||||
ON CONFLICT (vorlage_kurzbz) DO NOTHING;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_vorlage: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_vorlage PAAChangesAssSM hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'PAANoSigAssSM'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage (vorlage_kurzbz, bezeichnung, anmerkung, mimetype)
|
||||
VALUES ('PAANoSigAssSM', 'PAANoSigAssSM', null, 'text/html')
|
||||
ON CONFLICT (vorlage_kurzbz) DO NOTHING;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_vorlage: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_vorlage PAANoSigAssSM hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM public.tbl_vorlage WHERE vorlage_kurzbz = 'QualGateNegativ'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_vorlage (vorlage_kurzbz, bezeichnung, anmerkung, mimetype)
|
||||
VALUES ('QualGateNegativ', 'QualGateNegativ', null, 'text/html')
|
||||
ON CONFLICT (vorlage_kurzbz) DO NOTHING;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_vorlage: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>system.tbl_vorlage QualGateNegativ hinzugefuegt";
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
|
||||
if ($result = @$db->db_query("SELECT 1 FROM system.tbl_app WHERE app='lvevaluierung' LIMIT 1"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_app (app) VALUES ('lvevaluierung');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>system.tbl_app: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo ' system.tbl_app: lvevaluierung hinzugefügt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
//Add column evaluierung to lehre.tbl_lehrveranstaltung
|
||||
if(!@$db->db_query("SELECT evaluierung FROM lehre.tbl_lehrveranstaltung LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_lehrveranstaltung ADD COLUMN evaluierung boolean NOT NULL DEFAULT true;
|
||||
COMMENT ON COLUMN lehre.tbl_lehrveranstaltung.evaluierung IS 'TRUE wenn für diese LV eine LV-Evaluierung durchgeführt wird';
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte evaluierung zu Tabelle lehre.tbl_lehrveranstaltung hinzugefügt';
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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(),
|
||||
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';
|
||||
}
|
||||
@@ -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 <oesi@technikum-wien.at>,
|
||||
*
|
||||
* 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>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add index to campus.tbl_studierendenantrag_status.studierendenantrag_id
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_studierendenantrag_status_studierendenantrag_id'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_studierendenantrag_status_studierendenantrag_id ON campus.tbl_studierendenantrag_status USING btree (studierendenantrag_id)";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>Indizes: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Index fuer campus.tbl_studierendenantrag_status.studierendenantrag_id hinzugefuegt';
|
||||
}
|
||||
}
|
||||
@@ -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 = 'stv_font_size';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_variablenname(name, defaultwert) VALUES('stv_font_size', null);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_variablenname '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_variablenname: Added name "stv_font_size"<br>';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add permission: paarbeit/beurteilung_loeschen
|
||||
if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'paarbeit/beurteilung_loeschen';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('paarbeit/beurteilung_loeschen', 'Berechtigung zum Löschen von Projektarbeitsbeurteilung');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>system.tbl_berechtigung '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'system.tbl_berechtigung: Added permission for paarbeit/beurteilung_loeschen<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,357 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_lohnguide_jobfamilie' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_lohnguide_jobfamilie (
|
||||
jobfamilie_kurzbz character varying(32) NOT NULL,
|
||||
bezeichnung varchar(64) NOT NULL,
|
||||
aktiv boolean DEFAULT FALSE,
|
||||
sort smallint,
|
||||
insertvon character varying(32) NOT NULL,
|
||||
insertamum timestamp without time zone DEFAULT now() NOT NULL,
|
||||
updatevon character varying(32),
|
||||
updateamum timestamp without time zone,
|
||||
CONSTRAINT tbl_lohnguide_jobfamilie_pkey PRIMARY KEY (jobfamilie_kurzbz)
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_lohnguide_jobfamilie TO vilesci;
|
||||
|
||||
INSERT INTO hr.tbl_lohnguide_jobfamilie(jobfamilie_kurzbz, bezeichnung,aktiv, sort, insertvon, insertamum) VALUES
|
||||
('FÜHRUNG','Führung',true,1,'system',NOW()),
|
||||
('AKADEMIA','Akademia',true,2,'system',NOW()),
|
||||
('VERWALTUNG','Verwaltung',true,3,'system',NOW()),
|
||||
('TECHNIK','Technik',true,4,'system',NOW()),
|
||||
('IT_SOFTWARE','IT & Software',true,5,'system',NOW()),
|
||||
('TECHN_DIENSTE','Technische Dienste',true,6,'system',NOW())
|
||||
ON CONFLICT (jobfamilie_kurzbz) DO NOTHING;
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Lohnguide Jobfamilie: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_lohnguide_jobfamilie wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_lohnguide_modellfunktion' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_lohnguide_modellfunktion (
|
||||
modellfunktion_kurzbz character varying(32) NOT NULL,
|
||||
bezeichnung varchar(64) NOT NULL,
|
||||
jobfamilie_kurzbz character varying(32) NOT NULL,
|
||||
aktiv boolean DEFAULT FALSE,
|
||||
sort smallint,
|
||||
insertvon character varying(32) NOT NULL,
|
||||
insertamum timestamp without time zone DEFAULT now() NOT NULL,
|
||||
updatevon character varying(32),
|
||||
updateamum timestamp without time zone,
|
||||
CONSTRAINT tbl_lohnguide_modellfunktion_pkey PRIMARY KEY (modellfunktion_kurzbz),
|
||||
CONSTRAINT tbl_lohnguide_modellfunktion_jobfamilie_fk FOREIGN KEY (jobfamilie_kurzbz) REFERENCES hr.tbl_lohnguide_jobfamilie (jobfamilie_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_lohnguide_modellfunktion TO vilesci;
|
||||
|
||||
INSERT INTO hr.tbl_lohnguide_modellfunktion(modellfunktion_kurzbz, bezeichnung, jobfamilie_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('ABTEILUNGSLEITUNG','Abteilungsleitung','FÜHRUNG',true,1,'system',NOW()),
|
||||
('GF','Geschäftsführung','FÜHRUNG',true,2,'system',NOW()),
|
||||
('KOMPETENZFELDLEITER','Kompetenzfeldleiter*in','FÜHRUNG',true,3,'system',NOW()),
|
||||
('DEPARTMENTSLEITER','Departmentsleiter*in','FÜHRUNG',true,4,'system',NOW()),
|
||||
('FAKULTÄTSLEITER','Fakultätsleiter*in','FÜHRUNG',true,5,'system',NOW()),
|
||||
/* Akademia */
|
||||
('STUDENTISCHE_MA','Studentische MA','AKADEMIA',true,6,'system',NOW()),
|
||||
('JUNIOR_LEC_RES','Junior Lecturer/Researcher','AKADEMIA',true,7,'system',NOW()),
|
||||
('LEC_RES','Lecturer/Researcher','AKADEMIA',true,8,'system',NOW()),
|
||||
('SEN_LEC_RES','Senior Lecturer/Researcher','AKADEMIA',true,9,'system',NOW()),
|
||||
('STUDIENGANGSLEITUNG','Studiengangsleitung','AKADEMIA',true,10,'system',NOW()),
|
||||
/* Verwaltung */
|
||||
('FK_VERWALTUNG','Fachkraft Verwaltung','VERWALTUNG',true,11,'system',NOW()),
|
||||
('SFK_VERWALTUNG','Spezial-Fachkraft Verwaltung','VERWALTUNG',true,12,'system',NOW()),
|
||||
('SP_VERWALTUNG','Spezialist:in Verwaltung','VERWALTUNG',true,13,'system',NOW()),
|
||||
('EXP_VERWALTUNG','Expert:in Verwaltung','VERWALTUNG',true,14,'system',NOW()),
|
||||
/* Technik */
|
||||
('FK_TECHNIK','Fachkraft Technik','TECHNIK',true,15,'system',NOW()),
|
||||
/* IT & Software */
|
||||
('FK_IT','Fachkraft IT & Software','IT_SOFTWARE',true,16,'system',NOW()),
|
||||
('SFK_IT','Spezial-Fachkraft IT & Software','IT_SOFTWARE',true,17,'system',NOW()),
|
||||
('SP_IT','Spezialist:in IT & Software','IT_SOFTWARE',true,18,'system',NOW()),
|
||||
('EXP_IT','Expert:in IT & Software','IT_SOFTWARE',true,19,'system',NOW()),
|
||||
/* Technische Dienste */
|
||||
('HK_TECHN_DIENSTE','Hilfskraft Technische Dienste','TECHN_DIENSTE',true,20,'system',NOW()),
|
||||
('FK_TECHN_DIENSTE','Fachkraft Technische Dienste','TECHN_DIENSTE',true,21,'system',NOW()),
|
||||
('SFK_TECHN_DIENSTE','Spezial-Fachkraft Technische Dienste','TECHN_DIENSTE',true,22,'system',NOW())
|
||||
ON CONFLICT (modellfunktion_kurzbz) DO NOTHING;
|
||||
|
||||
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Lohnguide Modellfunktion: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_lohnguide_modellfunktion wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_lohnguide_modellstelle' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_lohnguide_modellstelle (
|
||||
modellstelle_kurzbz character varying(32) NOT NULL,
|
||||
bezeichnung varchar(128) NOT NULL,
|
||||
code character varying(32) NOT NULL,
|
||||
grade int NOT NULL,
|
||||
modellfunktion_kurzbz character varying(32) NOT NULL,
|
||||
aktiv boolean DEFAULT FALSE,
|
||||
sort smallint,
|
||||
insertvon character varying(32) NOT NULL,
|
||||
insertamum timestamp without time zone DEFAULT now() NOT NULL,
|
||||
updatevon character varying(32),
|
||||
updateamum timestamp without time zone,
|
||||
CONSTRAINT tbl_lohnguide_modellstelle_pkey PRIMARY KEY (modellstelle_kurzbz),
|
||||
CONSTRAINT tbl_lohnguide_modellstelle_modellfunktion_fk FOREIGN KEY (modellfunktion_kurzbz) REFERENCES hr.tbl_lohnguide_modellfunktion (modellfunktion_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_lohnguide_modellstelle TO vilesci;
|
||||
|
||||
|
||||
-- FÜHRUNG
|
||||
INSERT INTO hr.tbl_lohnguide_modellstelle(modellstelle_kurzbz,bezeichnung, code, grade, modellfunktion_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('ABTL_1_4', 'Abteilungsleitung 1/4', '111', 16, 'ABTEILUNGSLEITUNG', true, 1, 'system', NOW()),
|
||||
('ABTL_2A_4', 'Abteilungsleitung 2a/4', '112a', 17, 'ABTEILUNGSLEITUNG', true, 2, 'system', NOW()),
|
||||
('ABTL_2B_4', 'Abteilungsleitung 2b/4', '112b', 17, 'ABTEILUNGSLEITUNG', true, 3, 'system', NOW()),
|
||||
('ABTL_3A_4', 'Abteilungsleitung 3a/4', '113a', 18, 'ABTEILUNGSLEITUNG', true, 4, 'system', NOW()),
|
||||
('ABTL_3B_4', 'Abteilungsleitung 3b/4', '113b', 18, 'ABTEILUNGSLEITUNG', true, 5, 'system', NOW()),
|
||||
('ABTL_4_4', 'Abteilungsleitung 4/4', '114', 19, 'ABTEILUNGSLEITUNG', true, 6, 'system', NOW()),
|
||||
('GF_1_2', 'Geschäftsführung 1/2', '121', 22, 'GF', true, 7, 'system', NOW()),
|
||||
('GF_2_2', 'Geschäftsführung 2/2', '122', 23, 'GF', true, 8, 'system', NOW()),
|
||||
('KOMFL_1_1', 'Kompetenzfeldleiter*in 1/1', '131', 15, 'KOMPETENZFELDLEITER', true, 9, 'system', NOW()),
|
||||
('DEPL_1_1', 'Departmentleiter*in 1/1', '141', 18, 'DEPARTMENTSLEITER', true, 10, 'system', NOW()),
|
||||
('FAKL_1_1', 'Fakultätsleiter*in 1/1', '151', 20, 'FAKULTÄTSLEITER', true, 11, 'system', NOW())
|
||||
ON CONFLICT (modellstelle_kurzbz) DO NOTHING;
|
||||
|
||||
-- AKADEMIA
|
||||
INSERT INTO hr.tbl_lohnguide_modellstelle(modellstelle_kurzbz, bezeichnung, code, grade, modellfunktion_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('STUDENTISCHE_MA_1_1', 'Studentische MA 1/1', '211', 5, 'STUDENTISCHE_MA', true, 12, 'system', NOW()),
|
||||
('JUNIOR_LEC_RES_1_2', 'Junior Lecturer/Researcher 1/2', '221', 8, 'JUNIOR_LEC_RES', true, 13, 'system', NOW()),
|
||||
('JUNIOR_LEC_RES_2_2', 'Junior Lecturer/Researcher 2/2', '222', 9, 'JUNIOR_LEC_RES', true, 14, 'system', NOW()),
|
||||
('LEC_RES_1_2', 'Lecturer/Researcher 1/2', '231', 11, 'LEC_RES', true, 15, 'system', NOW()),
|
||||
('LEC_RES_2_2', 'Lecturer/Researcher 2/2', '232', 12, 'LEC_RES', true, 16, 'system', NOW()),
|
||||
('SEN_LEC_RES_1_2', 'Senior Lecturer/Researcher 1/2', '241', 13, 'SEN_LEC_RES', true, 17, 'system', NOW()),
|
||||
('SEN_LEC_RES_2_2', 'Senior Lecturer/Researcher 2/2', '242', 14, 'SEN_LEC_RES', true, 18, 'system', NOW()),
|
||||
('STGL_1_2', 'Studiengangsleitung 1/2', '251', 15, 'STUDIENGANGSLEITUNG', true, 19, 'system', NOW()),
|
||||
('STGL_2_2', 'Studiengangsleitung 2/2', '252', 16, 'STUDIENGANGSLEITUNG', true, 20, 'system', NOW())
|
||||
ON CONFLICT (modellstelle_kurzbz) DO NOTHING;
|
||||
|
||||
-- VERWALTUNG
|
||||
INSERT INTO hr.tbl_lohnguide_modellstelle(modellstelle_kurzbz, bezeichnung, code, grade, modellfunktion_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('FK_VERWALTUNG_1_3', 'Fachkraft Verwaltung 1/3', '311', 4, 'FK_VERWALTUNG', true, 21, 'system', NOW()),
|
||||
('FK_VERWALTUNG_2A_3', 'Fachkraft Verwaltung 2a/3', '312a', 5, 'FK_VERWALTUNG', true, 22, 'system', NOW()),
|
||||
('FK_VERWALTUNG_2B_3', 'Fachkraft Verwaltung 2b/3', '312b', 5, 'FK_VERWALTUNG', true, 23, 'system', NOW()),
|
||||
('FK_VERWALTUNG_3_3', 'Fachkraft Verwaltung 3/3', '313', 6, 'FK_VERWALTUNG', true, 24, 'system', NOW()),
|
||||
('SFK_VERWALTUNG_1_4', 'Spezial-Fachkraft Verwaltung 1/4', '321', 7, 'SFK_VERWALTUNG', true, 25, 'system', NOW()),
|
||||
('SFK_VERWALTUNG_2A_4', 'Spezial-Fachkraft Verwaltung 2a/4', '322a', 8, 'SFK_VERWALTUNG', true, 26, 'system', NOW()),
|
||||
('SFK_VERWALTUNG_2B_4', 'Spezial-Fachkraft Verwaltung 2b/4', '322b', 8, 'SFK_VERWALTUNG', true, 27, 'system', NOW()),
|
||||
('SFK_VERWALTUNG_3A_4', 'Spezial-Fachkraft Verwaltung 3a/4', '323a', 9, 'SFK_VERWALTUNG', true, 28, 'system', NOW()),
|
||||
('SFK_VERWALTUNG_3B_4', 'Spezial-Fachkraft Verwaltung 3b/4', '323b', 9, 'SFK_VERWALTUNG', true, 29, 'system', NOW()),
|
||||
('SFK_VERWALTUNG_4_4', 'Spezial-Fachkraft Verwaltung 4/4', '324', 10, 'SFK_VERWALTUNG', true, 30, 'system', NOW()),
|
||||
('SP_VERWATLTUNG_1_4', 'Spezialist:in Verwaltung 1/4', '331', 11, 'SP_VERWALTUNG', true, 31, 'system', NOW()),
|
||||
('SP_VERWATLTUNG_2A_4', 'Spezialist:in Verwaltung 2a/4', '332a', 12, 'SP_VERWALTUNG', true, 32, 'system', NOW()),
|
||||
('SP_VERWATLTUNG_2B_4', 'Spezialist:in Verwaltung 2b/4', '332b', 12, 'SP_VERWALTUNG', true, 33, 'system', NOW()),
|
||||
('SP_VERWATLTUNG_3A_4', 'Spezialist:in Verwaltung 3a/4', '333a', 13, 'SP_VERWALTUNG', true, 34, 'system', NOW()),
|
||||
('SP_VERWATLTUNG_3B_4', 'Spezialist:in Verwaltung 3b/4', '333b', 13, 'SP_VERWALTUNG', true, 35, 'system', NOW()),
|
||||
('SP_VERWATLTUNG_4_4', 'Spezialist:in Verwaltung 4/4', '334', 14, 'SP_VERWALTUNG', true, 36, 'system', NOW()),
|
||||
('EXP_VERWALTUNG_1_1', 'Expert:in Verwaltung 1/1', '341', 15, 'EXP_VERWALTUNG', true, 37, 'system', NOW())
|
||||
ON CONFLICT (modellstelle_kurzbz) DO NOTHING;
|
||||
|
||||
-- TECHNIK
|
||||
INSERT INTO hr.tbl_lohnguide_modellstelle(modellstelle_kurzbz, bezeichnung, code, grade, modellfunktion_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('FK_TECHNIK_1_3', 'Fachkraft Technik 1/3', '311', 4, 'FK_TECHNIK', true, 38, 'system', NOW()),
|
||||
('FK_TECHNIK_2a_3', 'Fachkraft Technik 2a/3', '312a', 5, 'FK_TECHNIK', true, 39, 'system', NOW()),
|
||||
('FK_TECHNIK_2b_3','Fachkraft Technik 2b/3', '312b', 5, 'FK_TECHNIK', true, 40, 'system', NOW()),
|
||||
('FK_TECHNIK_3_3', 'Fachkraft Technik 3/3', '313', 6, 'FK_TECHNIK', true, 41, 'system', NOW())
|
||||
ON CONFLICT (modellstelle_kurzbz) DO NOTHING;
|
||||
|
||||
-- IT & Software
|
||||
INSERT INTO hr.tbl_lohnguide_modellstelle(modellstelle_kurzbz, bezeichnung, code, grade, modellfunktion_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('FK_IT_1_2', 'Fachkraft IT & Software 1/2', '411', 5, 'FK_IT', true, 42, 'system', NOW()),
|
||||
('FK_IT_2_2', 'Fachkraft IT & Software 2/2', '412', 6, 'FK_IT', true, 43, 'system', NOW()),
|
||||
('SFK_IT_1_4', 'Spezial-Fachkraft IT & Software 1/4', '421', 7, 'SFK_IT', true, 44, 'system', NOW()),
|
||||
('SFK_IT_2_4', 'Spezial-Fachkraft IT & Software 2/4', '422', 8, 'SFK_IT', true, 45, 'system', NOW()),
|
||||
('SFK_IT_3_4', 'Spezial-Fachkraft IT & Software 3/4', '423', 9, 'SFK_IT', true, 46, 'system', NOW()),
|
||||
('SFK_IT_4_4', 'Spezial-Fachkraft IT & Software 4/4', '424', 10, 'SFK_IT', true, 47, 'system', NOW()),
|
||||
('SP_IT_1_4', 'Spezialist:in IT & Software 1/4', '431', 11, 'SP_IT', true, 48, 'system', NOW()),
|
||||
('SP_IT_2A_4', 'Spezialist:in IT & Software 2a/4', '432a', 12, 'SP_IT', true, 49, 'system', NOW()),
|
||||
('SP_IT_2B_4', 'Spezialist:in IT & Software 2b/4', '432b', 12, 'SP_IT', true, 50, 'system', NOW()),
|
||||
('SP_IT_3A_4', 'Spezialist:in IT & Software 3a/4', '433a', 13, 'SP_IT', true, 51, 'system', NOW()),
|
||||
('SP_IT_3B_4', 'Spezialist:in IT & Software 3b/4', '433b', 13, 'SP_IT', true, 52, 'system', NOW()),
|
||||
('SP_IT_4_4', 'Spezialist:in IT & Software 4/4', '434', 14, 'SP_IT', true, 53, 'system', NOW()),
|
||||
('EXP_IT_1_1', 'Expert:in IT & Software 1/1', '441', 15, 'EXP_IT', true, 54, 'system', NOW())
|
||||
ON CONFLICT (modellstelle_kurzbz) DO NOTHING;
|
||||
|
||||
-- TECHNISCHE DIENSTE
|
||||
INSERT INTO hr.tbl_lohnguide_modellstelle(modellstelle_kurzbz, bezeichnung, code, grade, modellfunktion_kurzbz, aktiv, sort, insertvon, insertamum) VALUES
|
||||
('HK_TECHN_DIENSTE_1_4', 'Hilfskraft Technische Dienste 1/4', '511', 1, 'HK_TECHN_DIENSTE', true, 55, 'system', NOW()),
|
||||
('HK_TECHN_DIENSTE_2_4', 'Hilfskraft Technische Dienste 2/4', '512', 2, 'HK_TECHN_DIENSTE', true, 56, 'system', NOW()),
|
||||
('HK_TECHN_DIENSTE_3_4', 'Hilfskraft Technische Dienste 3/4', '513', 3, 'HK_TECHN_DIENSTE', true, 57, 'system', NOW()),
|
||||
('HK_TECHN_DIENSTE_4_4', 'Hilfskraft Technische Dienste 4/4', '514', 4, 'HK_TECHN_DIENSTE', true, 58, 'system', NOW()),
|
||||
('FK_TECHN_DIENSTE_1_2', 'Fachkraft Technische Dienste 1/2', '521', 5, 'FK_TECHN_DIENSTE', true, 59, 'system', NOW()),
|
||||
('FK_TECHN_DIENSTE_2_2', 'Fachkraft Technische Dienste 2/2', '522', 6, 'FK_TECHN_DIENSTE', true, 60, 'system', NOW()),
|
||||
('SFK_TECHN_DIENSTE_1_4', 'Spezial-Fachkraft Technische Dienste 1/4', '531', 7, 'SFK_TECHN_DIENSTE', true, 61, 'system', NOW()),
|
||||
('SFK_TECHN_DIENSTE_2_4', 'Spezial-Fachkraft Technische Dienste 2/4', '532', 8, 'SFK_TECHN_DIENSTE', true, 62, 'system', NOW()),
|
||||
('SFK_TECHN_DIENSTE_3_4', 'Spezial-Fachkraft Technische Dienste 3/4', '533', 9, 'SFK_TECHN_DIENSTE', true, 63, 'system', NOW()),
|
||||
('SFK_TECHN_DIENSTE_4_4', 'Spezial-Fachkraft Technische Dienste 4/4', '534', 10, 'SFK_TECHN_DIENSTE', true, 64, 'system', NOW())
|
||||
ON CONFLICT (modellstelle_kurzbz) DO NOTHING;
|
||||
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Lohnguide Modellstelle: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_lohnguide_modellstelle wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_lohnguide_fachrichtung' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_lohnguide_fachrichtung (
|
||||
fachrichtung_kurzbz character varying(32) NOT NULL,
|
||||
bezeichnung varchar(32) NOT NULL,
|
||||
aktiv boolean DEFAULT FALSE,
|
||||
insertvon character varying(32) NOT NULL,
|
||||
insertamum timestamp without time zone DEFAULT now() NOT NULL,
|
||||
updatevon character varying(32),
|
||||
updateamum timestamp without time zone,
|
||||
CONSTRAINT tbl_lohnguide_fachrichtung_pkey PRIMARY KEY (fachrichtung_kurzbz)
|
||||
);
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_lohnguide_fachrichtung TO vilesci;
|
||||
|
||||
INSERT INTO hr.tbl_lohnguide_fachrichtung(fachrichtung_kurzbz,bezeichnung,aktiv,insertvon,insertamum) VALUES
|
||||
('FA00','Keine Berücksichtigung',true,'system',NOW())
|
||||
ON CONFLICT (fachrichtung_kurzbz) DO NOTHING;
|
||||
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Lohnguide Fachrichtung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_lohnguide_fachrichtung wurde neu erstellt<br>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.tables WHERE table_name='tbl_vertragsbestandteil_lohnguide' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
CREATE TABLE IF NOT EXISTS hr.tbl_vertragsbestandteil_lohnguide (
|
||||
vertragsbestandteil_id integer NOT NULL,
|
||||
vordienstzeit int,
|
||||
stellenbezeichnung varchar(255),
|
||||
fachrichtung_kurzbz character varying(32) NOT NULL,
|
||||
modellstelle_kurzbz character varying(32) NOT NULL,
|
||||
kommentar_person text,
|
||||
kommentar_modellstelle text,
|
||||
CONSTRAINT tbl_vertragsbestandteil_lohnguide_pk PRIMARY KEY (vertragsbestandteil_id),
|
||||
CONSTRAINT tbl_vertragsbestandteil_fk FOREIGN KEY (vertragsbestandteil_id) REFERENCES hr.tbl_vertragsbestandteil (vertragsbestandteil_id) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT tbl_vertragsbestandteil_lohnguide_fachrichtung_fk FOREIGN KEY (fachrichtung_kurzbz) REFERENCES hr.tbl_lohnguide_fachrichtung (fachrichtung_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
CONSTRAINT tbl_vertragsbestandteil_modellstelle_fachrichtung_fk FOREIGN KEY (modellstelle_kurzbz) REFERENCES hr.tbl_lohnguide_modellstelle (modellstelle_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
COMMENT ON TABLE hr.tbl_vertragsbestandteil_lohnguide IS E'Zuordnung für EU-Entgelttransparenzrichtlinie';
|
||||
|
||||
GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hr.tbl_vertragsbestandteil_lohnguide TO vilesci;
|
||||
|
||||
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Vertragsbestandteil Lohnguide: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'hr.tbl_vertragsbestandteil_lohnguide wurde neu erstellt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if($result = $db->db_query("SELECT 1 FROM hr.tbl_vertragsbestandteiltyp WHERE vertragsbestandteiltyp_kurzbz = 'lohnguide'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "insert into hr.tbl_vertragsbestandteiltyp (vertragsbestandteiltyp_kurzbz,bezeichnung,ueberlappend) values('lohnguide','Lohnguide',false)";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Public Tabelle person: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo "<br>Vertragsbestandteiltyp 'lohnguide' hinzugefuegt";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE column_name='vordienstzeit' AND table_name='tbl_vertragsbestandteil_lohnguide' AND table_schema='hr'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
ALTER TABLE
|
||||
hr.tbl_vertragsbestandteil_lohnguide
|
||||
ADD COLUMN
|
||||
vordienstzeit int;
|
||||
";
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Lohnguide: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Spalte vordienstzeit wurde in hr.tbl_vertragsbestandteil_lohnguide neu erstellt<br>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM hr.tbl_gehaltstyp WHERE gehaltstyp_kurzbz='ueberstundenpauschale'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
INSERT INTO hr.tbl_gehaltstyp
|
||||
(gehaltstyp_kurzbz, bezeichnung, valorisierung, sort, aktiv, lvexport)
|
||||
VALUES
|
||||
('ueberstundenpauschale','Überstundenpauschale', true, 8, true, true);
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Gehaltstyp: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Gehaltstyp "Überstundenpauschale" erstellt.<br />';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM hr.tbl_gehaltstyp WHERE gehaltstyp_kurzbz='sachbezug_pkw'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
INSERT INTO hr.tbl_gehaltstyp
|
||||
(gehaltstyp_kurzbz, bezeichnung, valorisierung, sort, aktiv, lvexport)
|
||||
VALUES
|
||||
('sachbezug_pkw','Sachbezug PKW', true, 9, true, true);
|
||||
";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>Gehaltstyp: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Gehaltstyp "Sachbezug PKW" erstellt.<br />';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?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 <harald.bamberger@technikum-wien.at>,
|
||||
*
|
||||
* Beschreibung:
|
||||
* Dashboard DB Aenderungen
|
||||
*/
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
$corewidgetssql = 'select tw.* from dashboard.tbl_widget tw where regexp_match((setup->\'file\')::text, \'^"DashboardWidget\') is not NULL';
|
||||
if (($rescore = $db->db_query($corewidgetssql)))
|
||||
{
|
||||
if ($db->db_num_rows($rescore) > 0)
|
||||
{
|
||||
$coreqry = <<<EOCOREQRY
|
||||
|
||||
update
|
||||
dashboard.tbl_widget
|
||||
set
|
||||
setup = jsonb_set(setup, '{file}', regexp_replace((setup->'file')::text, '^"DashboardWidget', '"public/js/components/DashboardWidget')::jsonb)
|
||||
where
|
||||
regexp_match((setup->'file')::text, '^"DashboardWidget') is not NULL;
|
||||
|
||||
EOCOREQRY;
|
||||
|
||||
if (!$db->db_query($coreqry))
|
||||
{
|
||||
echo '<strong>Dashboard Core Widgets Paths Update: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<br>Dashboard Core Widgets Paths updated.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$extwidgetssql = 'select tw.* from dashboard.tbl_widget tw where regexp_match((setup->\'file\')::text, \'^"../../\') is not NULL';
|
||||
if (($resext = $db->db_query($extwidgetssql)))
|
||||
{
|
||||
if ($db->db_num_rows($resext) > 0)
|
||||
{
|
||||
$extqry = <<<EOEXTQRY
|
||||
|
||||
update
|
||||
dashboard.tbl_widget
|
||||
set
|
||||
setup = jsonb_set(setup, '{file}', regexp_replace((setup->'file')::text, '^"../../', '"public/')::jsonb)
|
||||
where
|
||||
regexp_match((setup->'file')::text, '^"../../') is not NULL;
|
||||
|
||||
EOEXTQRY;
|
||||
|
||||
if (!$db->db_query($extqry))
|
||||
{
|
||||
echo '<strong>Dashboard Extensions Widgets Paths Update: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<br>Dashboard Extensions Widgets Paths updated.';
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
// neuen Organisationseinheittyp (Programm) als Zeile hinzufügen
|
||||
if($result = @$db->db_query("SELECT 1 FROM public.tbl_organisationseinheittyp WHERE organisationseinheittyp_kurzbz= 'Programm';"))
|
||||
{
|
||||
if($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_organisationseinheittyp(organisationseinheittyp_kurzbz, beschreibung, bezeichnung) VALUES ('Programm', 'Programm', 'Programm');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_organisationseinheittyp: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_organisationseinheittyp: Zeile Programm hinzugefuegt!<br>';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_msg_message_person_id'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_msg_message_person_id ON public.tbl_msg_message USING btree (person_id)";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>idx_tbl_msg_message_person_id: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Index idx_tbl_msg_message_person_id angelegt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_msg_recipient_person_id'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "CREATE INDEX idx_tbl_msg_recipient_person_id ON public.tbl_msg_recipient USING btree (person_id)";
|
||||
|
||||
if (! $db->db_query($qry))
|
||||
echo '<strong>idx_tbl_msg_recipient_person_id: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Index idx_tbl_msg_recipient_person_id angelegt<br>';
|
||||
}
|
||||
}
|
||||
+198
-16
@@ -529,6 +529,29 @@ $filters = array(
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'onboarding',
|
||||
'filter_kurzbz' => 'InfoCenterOnboarding',
|
||||
'description' => '{Alle}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Electronic Onboarding - Alle",
|
||||
"columns": [
|
||||
{"name": "PersonId"},
|
||||
{"name": "Vorname"},
|
||||
{"name": "Nachname"},
|
||||
{"name": "LockUser"},
|
||||
{"name": "HoldDate"},
|
||||
{"name": "Rueckstellgrund"}
|
||||
],
|
||||
"filters": []
|
||||
}
|
||||
',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'infocenter',
|
||||
'dataset_name' => 'aufgenommen',
|
||||
@@ -1395,14 +1418,14 @@ $filters = array(
|
||||
{"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": "EMail"},
|
||||
{"name": "Unternehmen"},
|
||||
{"name": "Vertragsart"},
|
||||
{"name": "DV_von"},
|
||||
{"name": "DV_bis"},
|
||||
{"name": "Wochenstunden"},
|
||||
{"name": "WS_von"},
|
||||
{"name": "WS_bis"},
|
||||
{"name": "Standardkostenstelle"},
|
||||
{"name": "DV_status"}
|
||||
],
|
||||
@@ -1433,14 +1456,14 @@ $filters = array(
|
||||
{"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": "EMail"},
|
||||
{"name": "Unternehmen"},
|
||||
{"name": "Vertragsart"},
|
||||
{"name": "DV_von"},
|
||||
{"name": "DV_bis"},
|
||||
{"name": "Wochenstunden"},
|
||||
{"name": "WS_von"},
|
||||
{"name": "WS_bis"},
|
||||
{"name": "Standardkostenstelle"},
|
||||
{"name": "DV_status"}
|
||||
],
|
||||
@@ -1456,6 +1479,165 @@ $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,
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'dataset_name' => 'vertragsverwaltung',
|
||||
'filter_kurzbz' => 'VertragsverwaltungAktiv',
|
||||
'description' => '{Aktive Mitarbeiter}',
|
||||
'sort' => 1,
|
||||
'default_filter' => true,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Aktive Mitarbeiter",
|
||||
"columns": [
|
||||
{"name": "uid"},
|
||||
{"name": "person_id"},
|
||||
{"name": "nachname"},
|
||||
{"name": "vorname"},
|
||||
{"name": "aktiv"},
|
||||
{"name": "gebdatum"},
|
||||
{"name": "unternehmen"},
|
||||
{"name": "vertragsarten"},
|
||||
{"name": "ids"}
|
||||
],
|
||||
"filters": [
|
||||
{
|
||||
"name": "aktiv",
|
||||
"option": "",
|
||||
"operation": "equal",
|
||||
"condition": "true"
|
||||
}
|
||||
]
|
||||
}',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'dataset_name' => 'vertragsverwaltung',
|
||||
'filter_kurzbz' => 'VertragsverwaltungAlle',
|
||||
'description' => '{Alle Mitarbeiter}',
|
||||
'sort' => 1,
|
||||
'default_filter' => false,
|
||||
'filter' => '
|
||||
{
|
||||
"name": "Alle Mitarbeiter",
|
||||
"columns": [
|
||||
{"name": "uid"},
|
||||
{"name": "person_id"},
|
||||
{"name": "nachname"},
|
||||
{"name": "vorname"},
|
||||
{"name": "aktiv"},
|
||||
{"name": "gebdatum"},
|
||||
{"name": "unternehmen"},
|
||||
{"name": "vertragsarten"},
|
||||
{"name": "ids"}
|
||||
],
|
||||
"filters": []
|
||||
}',
|
||||
'oe_kurzbz' => null,
|
||||
),
|
||||
);
|
||||
|
||||
// Loop through the filters array
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
+16422
-120
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