mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge branch 'master' into epic-56039/LV-Evaluierung
This commit is contained in:
@@ -86,9 +86,12 @@ 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');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -167,8 +170,8 @@ $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", "anderer_raum"),
|
||||
|
||||
@@ -39,7 +39,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
'hallowelt',
|
||||
'Hallo Welt Widget',
|
||||
'{"css": "d-flex justify-content-center align-items-center h-100", "title": "Hallo Welt"}'::jsonb,
|
||||
'{"file": "DashboardWidget/Default.js", "icon": "https://upload.wikimedia.org/wikipedia/commons/8/8a/Farben-Testbild.svg", "name": "Hallo Welt", "width": {"max": 99}, "height": {"max": 99}, "hideFooter": false}'::jsonb
|
||||
'{"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;
|
||||
|
||||
@@ -71,7 +71,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
'news',
|
||||
'News Widget',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/News.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "News", "width": {"max": 4, "min": 1}, "height": {"max": 2, "min": 1}, "cis4link": "/CisVue/Cms/news", "hideFooter": false}'::jsonb
|
||||
'{"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;
|
||||
|
||||
@@ -103,7 +103,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
'url',
|
||||
'Bookmark Widget',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/Url.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Bookmark", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": true}'::jsonb
|
||||
'{"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;
|
||||
|
||||
@@ -135,7 +135,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
'ampel',
|
||||
'Ampel Widget',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/Ampel.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Ampel", "width": 1, "height": {"max": 2, "min": 1}, "hideFooter": false}'::jsonb
|
||||
'{"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;
|
||||
|
||||
@@ -162,7 +162,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
widget_kurzbz = 'lvplan',
|
||||
beschreibung = 'LV-Plan Widget',
|
||||
arguments = '{"bodyClass": "p-0"}'::jsonb,
|
||||
setup = '{"file": "DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
|
||||
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;
|
||||
@@ -195,7 +195,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
'lvplan',
|
||||
'LV-Plan Widget',
|
||||
'{"bodyClass": "p-0"}'::jsonb,
|
||||
'{"file": "DashboardWidget/LvPlan.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "LV-Plan", "width": {"max": 4, "min": 1}, "height": {"max": 3, "min": 1}, "cis4link": "/Cis/LvPlan", "hideFooter": false}'::jsonb
|
||||
'{"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;
|
||||
|
||||
@@ -227,7 +227,7 @@ if($result = @$db->db_query("SELECT 1 FROM dashboard.tbl_widget WHERE widget_kur
|
||||
'studiengang',
|
||||
'Das Studiengang-Widget enthält Informationen über den Studiengang eines Studenten.',
|
||||
'{}'::jsonb,
|
||||
'{"file": "DashboardWidget/Studiengang.js", "icon": "/skin/images/fh_technikum_wien_illustration_klein.png", "name": "Studiengang", "width": {"max": 2, "min": 1}, "height": {"max": 4, "min": 1}, "hideFooter": true}'::jsonb
|
||||
'{"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;
|
||||
|
||||
@@ -349,4 +349,4 @@ EOGP;
|
||||
echo 'dashboard.tbl_dashboard_preset: Added Student Preset for Dashboard "CIS"<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,379 @@
|
||||
<?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 = '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,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.';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>';
|
||||
}
|
||||
}
|
||||
+2567
-23
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user