mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
Merge branch 'master' into feature-25999/C4_cleanup
This commit is contained in:
@@ -65,6 +65,9 @@ require_once('dbupdate_3.4/40896_kennzeichnung_unruly_person.php');
|
||||
require_once('dbupdate_3.4/39911_tabulator_in_contentmittitel.php');
|
||||
require_once('dbupdate_3.4/25999_C4_permission.php');
|
||||
require_once('dbupdate_3.4/33683_digitale_anwesenheitsliste_und_entschuldigungsmanagement_fuer_studierende_prototyp.php');
|
||||
require_once('dbupdate_3.4/40717_lv_faktor.php');
|
||||
require_once('dbupdate_3.4/48526_pep_tagging.php');
|
||||
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
@@ -260,6 +263,7 @@ $tabellen=array(
|
||||
"lehre.tbl_zeitfenster" => array("wochentag","stunde","ort_kurzbz","studiengang_kz","gewicht"),
|
||||
"lehre.tbl_zeugnis" => array("zeugnis_id","student_uid","zeugnis","erstelltam","gedruckt","titel","bezeichnung","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"lehre.tbl_zeugnisnote" => array("lehrveranstaltung_id","student_uid","studiensemester_kurzbz","note","uebernahmedatum","benotungsdatum","bemerkung","updateamum","updatevon","insertamum","insertvon","ext_id","punkte"),
|
||||
"lehre.tbl_lehrveranstaltung_faktor" => array("lehrveranstaltung_faktor_id", "lehrveranstaltung_id","faktor","studiensemester_kurzbz_von","studiensemester_kurzbz_bis","insertamum","insertvon","updateamum","updatevon"),
|
||||
"public.ci_apikey" => array("apikey_id","key","level","ignore_limits","date_created"),
|
||||
"public.tbl_adresse" => array("adresse_id","person_id","name","strasse","plz","ort","gemeinde","nation","typ","heimatadresse","zustelladresse","firma_id","updateamum","updatevon","insertamum","insertvon","ext_id","rechnungsadresse","anmerkung", "co_name"),
|
||||
"public.tbl_adressentyp" => array("adressentyp_kurzbz", "bezeichnung", "bezeichnung_mehrsprachig", "sort"),
|
||||
@@ -306,9 +310,10 @@ $tabellen=array(
|
||||
"public.tbl_msg_message" => array("message_id","person_id","subject","body","priority","relationmessage_id","oe_kurzbz","insertamum","insertvon"),
|
||||
"public.tbl_msg_recipient" => array("message_id","person_id","token","sent","sentinfo","insertamum","insertvon","oe_kurzbz"),
|
||||
"public.tbl_msg_status" => array("message_id","person_id","status","statusinfo","insertamum","insertvon","updateamum","updatevon"),
|
||||
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id"),
|
||||
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id", "typ"),
|
||||
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id","anrechnung_id"),
|
||||
"public.tbl_notiz_dokument" => array("notiz_id","dms_id"),
|
||||
"public.tbl_notiz_typ" => array("typ_kurzbz","bezeichnung_mehrsprachig", "beschreibung", "automatisiert", "aktiv", "zuordnung", "tag", "style", "vorrueckung", "prioritaet"),
|
||||
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz","arbeitsplaetze"),
|
||||
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
|
||||
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre","standort","warn_semesterstunden_frei","warn_semesterstunden_fix","standort_id"),
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
if (!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_lehrveranstaltung_faktor LIMIT 1"))
|
||||
{
|
||||
$qry = "
|
||||
|
||||
CREATE TABLE lehre.tbl_lehrveranstaltung_faktor
|
||||
(
|
||||
lehrveranstaltung_faktor_id integer NOT NULL,
|
||||
lehrveranstaltung_id integer NOT NULL,
|
||||
faktor numeric NOT NULL,
|
||||
studiensemester_kurzbz_von varchar(16) NOT NULL,
|
||||
studiensemester_kurzbz_bis varchar(16),
|
||||
insertamum timestamp DEFAULT NOW(),
|
||||
insertvon varchar(32),
|
||||
updateamum timestamp,
|
||||
updatevon varchar(32),
|
||||
CONSTRAINT tbl_lehrveranstaltung_faktor_pk PRIMARY KEY (lehrveranstaltung_faktor_id)
|
||||
);
|
||||
|
||||
CREATE SEQUENCE lehre.lehrveranstaltung_faktor_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;
|
||||
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ALTER COLUMN lehrveranstaltung_faktor_id SET DEFAULT nextval('lehre.lehrveranstaltung_faktor_id_seq');
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ADD CONSTRAINT fk_lehrveranstaltung_faktor_lehrveranstaltung_id FOREIGN KEY (lehrveranstaltung_id) REFERENCES lehre.tbl_lehrveranstaltung (lehrveranstaltung_id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ADD CONSTRAINT fk_lehrveranstaltung_faktor_studiensemester_von FOREIGN KEY (studiensemester_kurzbz_von) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;
|
||||
ALTER TABLE lehre.tbl_lehrveranstaltung_faktor ADD CONSTRAINT fk_lehrveranstaltung_faktor_studiensemester_bis FOREIGN KEY (studiensemester_kurzbz_bis) REFERENCES public.tbl_studiensemester(studiensemester_kurzbz) ON UPDATE CASCADE ON DELETE RESTRICT;
|
||||
|
||||
GRANT SELECT ON lehre.tbl_lehrveranstaltung_faktor TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_lehrveranstaltung_faktor TO vilesci;
|
||||
GRANT SELECT ON lehre.lehrveranstaltung_faktor_id_seq TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.lehrveranstaltung_faktor_id_seq TO vilesci;
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung_faktor: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Tabelle: lehre.tbl_lehrveranstaltung_faktor erstellt!';
|
||||
|
||||
//TODO ggf default wert in eine config
|
||||
$qry = "
|
||||
INSERT INTO lehre.tbl_lehrveranstaltung_faktor
|
||||
(lehrveranstaltung_id, faktor, studiensemester_kurzbz_von, insertvon)
|
||||
(
|
||||
SELECT lehrveranstaltung_id,
|
||||
2,
|
||||
(
|
||||
SELECT public.tbl_studiensemester.studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
ORDER BY start LIMIT 1
|
||||
),
|
||||
'checksystem'
|
||||
FROM lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrtyp_kurzbz IN ('lv', 'tpl')
|
||||
);
|
||||
";
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung_faktor: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo 'Tabelle: lehre.tbl_lehrveranstaltung_faktor befüllt!';
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// add app pep
|
||||
if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='pep'"))
|
||||
{
|
||||
if($db->db_num_rows($result) === 0)
|
||||
{
|
||||
$qry = "INSERT INTO system.tbl_app (app) VALUES('pep');";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>System Tabelle app: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>app pep hinzugefuegt<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Creates table public.tbl_notiz_typ if it doesn't exist and grants privileges
|
||||
if (!$result = @$db->db_query('SELECT 0 FROM public.tbl_notiz_typ WHERE 0 = 1'))
|
||||
{
|
||||
//TODO zuordnung typ definieren
|
||||
$qry = 'CREATE TABLE public.tbl_notiz_typ (
|
||||
typ_kurzbz varchar(32) NOT NULL,
|
||||
bezeichnung_mehrsprachig character varying(256)[] NOT NULL,
|
||||
beschreibung text,
|
||||
automatisiert boolean NOT NULL,
|
||||
aktiv boolean NOT NULL,
|
||||
zuordnung text,
|
||||
tag boolean NOT NULL,
|
||||
style text,
|
||||
vorrueckung boolean NOT NULL,
|
||||
prioritaet smallint
|
||||
);
|
||||
|
||||
ALTER TABLE public.tbl_notiz_typ ADD CONSTRAINT pk_tbl_tbl_notiz_typ PRIMARY KEY (typ_kurzbz)';
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_notiz_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_notiz_typ table created';
|
||||
|
||||
$qry = 'GRANT SELECT ON TABLE public.tbl_notiz_typ TO web;';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_notiz_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on public.tbl_notiz_typ';
|
||||
|
||||
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE public.tbl_notiz_typ TO vilesci;';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_notiz_typ: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on public.tbl_notiz_typ';
|
||||
}
|
||||
|
||||
if(!@$db->db_query("SELECT typ FROM public.tbl_notiz LIMIT 1"))
|
||||
{
|
||||
$qry = 'ALTER TABLE public.tbl_notiz ADD COLUMN typ varchar(32);
|
||||
ALTER TABLE public.tbl_notiz ADD CONSTRAINT tbl_notiz_typ_fkey FOREIGN KEY (typ) REFERENCES public.tbl_notiz_typ (typ_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;';
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong> public.tbl_notiz '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>public.tbl_notiz: Neue Spalte typ hinzugefügt';
|
||||
}
|
||||
@@ -15105,6 +15105,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'felderFehlen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Bitte füllen Sie alle Formularfelder aus",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Please fill in all form fields",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
@@ -37419,6 +37439,46 @@ array(
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'pep',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'maprojohneoe',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mitarbeiter und Projekt sind der Organisationseinheit nicht zugeordnet.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Employee and project are not assigned to the organizational unit.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'pep',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'infoandepl/kfl',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Info an DepL/KFL',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Info to DepL/KFL:',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user