From 0239246ab09c6c3ef8f6001f0c956b7451af5128 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 7 Feb 2020 15:11:00 +0100 Subject: [PATCH 01/84] - Renamed APIv1_Controller to API_Controller - Adapted code - Added functionalities to API_Controller to log into the database --- .../controllers/api/v1/CheckUserAuth.php | 2 +- .../api/v1/accounting/Aufteilung.php | 2 +- .../api/v1/accounting/Bestelldetail.php | 2 +- .../api/v1/accounting/Bestelldetailtag.php | 2 +- .../api/v1/accounting/Bestellstatus.php | 2 +- .../api/v1/accounting/Bestellung.php | 2 +- .../api/v1/accounting/Bestellungtag.php | 2 +- .../controllers/api/v1/accounting/Buchung.php | 2 +- .../api/v1/accounting/Buchungstyp.php | 2 +- .../controllers/api/v1/accounting/Budget.php | 2 +- .../controllers/api/v1/accounting/Konto.php | 2 +- .../api/v1/accounting/Kostenstelle.php | 2 +- .../api/v1/accounting/Rechnung.php | 2 +- .../api/v1/accounting/Rechnungsbetrag.php | 2 +- .../api/v1/accounting/Rechnungstyp.php | 2 +- .../controllers/api/v1/accounting/Vertrag.php | 2 +- .../api/v1/accounting/Vertragsstatus.php | 2 +- .../api/v1/accounting/Vertragstyp.php | 2 +- .../api/v1/accounting/Zahlungstyp.php | 2 +- .../controllers/api/v1/codex/Akadgrad.php | 2 +- .../controllers/api/v1/codex/Archiv.php | 2 +- .../api/v1/codex/Aufmerksamdurch.php | 2 +- .../controllers/api/v1/codex/Ausbildung.php | 2 +- .../api/v1/codex/Berufstaetigkeit.php | 2 +- .../api/v1/codex/Beschaeftigungsausmass.php | 2 +- .../controllers/api/v1/codex/Besqual.php | 2 +- .../controllers/api/v1/codex/Bisfunktion.php | 2 +- .../controllers/api/v1/codex/Bisio.php | 2 +- .../controllers/api/v1/codex/Bisorgform.php | 2 +- .../api/v1/codex/Bisverwendung.php | 2 +- .../controllers/api/v1/codex/Bundesland.php | 2 +- .../api/v1/codex/Entwicklungsteam.php | 2 +- .../controllers/api/v1/codex/Gemeinde.php | 2 +- .../controllers/api/v1/codex/Hauptberuf.php | 2 +- .../controllers/api/v1/codex/Lehrform.php | 2 +- .../controllers/api/v1/codex/Lgartcode.php | 2 +- .../api/v1/codex/Mobilitaetsprogramm.php | 2 +- .../controllers/api/v1/codex/Nation.php | 2 +- application/controllers/api/v1/codex/Note.php | 2 +- .../controllers/api/v1/codex/Orgform.php | 2 +- .../controllers/api/v1/codex/Verwendung.php | 2 +- application/controllers/api/v1/codex/Zgv.php | 2 +- .../controllers/api/v1/codex/Zgvdoktor.php | 2 +- .../controllers/api/v1/codex/Zgvgruppe.php | 2 +- .../controllers/api/v1/codex/Zgvmaster.php | 2 +- .../controllers/api/v1/codex/Zweck.php | 2 +- .../controllers/api/v1/content/Ampel.php | 2 +- .../controllers/api/v1/content/Content.php | 2 +- .../api/v1/content/Contentchild.php | 2 +- .../api/v1/content/Contentgruppe.php | 2 +- .../controllers/api/v1/content/Contentlog.php | 2 +- .../api/v1/content/Contentsprache.php | 2 +- .../controllers/api/v1/content/Dms.php | 2 +- .../controllers/api/v1/content/Infoscreen.php | 2 +- .../controllers/api/v1/content/News.php | 2 +- .../controllers/api/v1/content/Template.php | 2 +- .../api/v1/content/Veranstaltung.php | 2 +- .../v1/content/Veranstaltungskategorie.php | 2 +- application/controllers/api/v1/crm/Akte.php | 2 +- .../api/v1/crm/Aufnahmeschluessel.php | 2 +- .../controllers/api/v1/crm/Aufnahmetermin.php | 2 +- .../api/v1/crm/Aufnahmetermintyp.php | 2 +- .../api/v1/crm/Bewerbungstermine.php | 2 +- .../controllers/api/v1/crm/Buchungstyp.php | 2 +- .../controllers/api/v1/crm/Dokument.php | 2 +- .../api/v1/crm/Dokumentprestudent.php | 2 +- .../api/v1/crm/Dokumentstudiengang.php | 2 +- application/controllers/api/v1/crm/Konto.php | 2 +- .../controllers/api/v1/crm/Preincoming.php | 2 +- .../controllers/api/v1/crm/Preinteressent.php | 2 +- .../api/v1/crm/Preinteressentstudiengang.php | 2 +- .../controllers/api/v1/crm/Preoutgoing.php | 2 +- .../controllers/api/v1/crm/Prestudent.php | 2 +- .../api/v1/crm/Prestudentstatus.php | 2 +- .../controllers/api/v1/crm/Reihungstest.php | 2 +- .../controllers/api/v1/crm/RtPerson.php | 2 +- application/controllers/api/v1/crm/Status.php | 2 +- .../controllers/api/v1/crm/Statusgrund.php | 2 +- .../controllers/api/v1/crm/Student.php | 2 +- .../controllers/api/v1/education/Abgabe.php | 2 +- .../api/v1/education/Abschlussbeurteilung.php | 2 +- .../api/v1/education/Abschlusspruefung.php | 2 +- .../api/v1/education/Anrechnung.php | 2 +- .../api/v1/education/Anwesenheit.php | 2 +- .../controllers/api/v1/education/Beispiel.php | 2 +- .../api/v1/education/Betreuerart.php | 2 +- .../controllers/api/v1/education/Feedback.php | 2 +- .../api/v1/education/Legesamtnote.php | 2 +- .../api/v1/education/Lehreinheit.php | 2 +- .../api/v1/education/Lehreinheitgruppe.php | 2 +- .../v1/education/Lehreinheitmitarbeiter.php | 2 +- .../controllers/api/v1/education/Lehrfach.php | 2 +- .../api/v1/education/Lehrfunktion.php | 2 +- .../controllers/api/v1/education/Lehrtyp.php | 2 +- .../api/v1/education/Lehrveranstaltung.php | 2 +- .../api/v1/education/Lenotenschluessel.php | 2 +- .../api/v1/education/Lepruefung.php | 2 +- .../api/v1/education/Lvangebot.php | 2 +- .../api/v1/education/Lvgesamtnote.php | 2 +- .../controllers/api/v1/education/Lvinfo.php | 2 +- .../controllers/api/v1/education/Lvregel.php | 2 +- .../api/v1/education/Lvregeltyp.php | 2 +- .../api/v1/education/Notenschluessel.php | 2 +- .../education/Notenschluesselaufteilung.php | 2 +- .../v1/education/Notenschluesseluebung.php | 2 +- .../v1/education/Notenschluesselzuordnung.php | 2 +- .../controllers/api/v1/education/Paabgabe.php | 2 +- .../api/v1/education/Paabgabetyp.php | 2 +- .../api/v1/education/Projektarbeit.php | 2 +- .../api/v1/education/Projektbetreuer.php | 2 +- .../api/v1/education/Projekttyp.php | 2 +- .../controllers/api/v1/education/Pruefung.php | 2 +- .../api/v1/education/Pruefungsanmeldung.php | 2 +- .../api/v1/education/Pruefungsfenster.php | 2 +- .../api/v1/education/Pruefungsstatus.php | 2 +- .../api/v1/education/Pruefungstermin.php | 2 +- .../api/v1/education/Pruefungstyp.php | 2 +- .../api/v1/education/Studentbeispiel.php | 2 +- .../api/v1/education/Studentlehrverband.php | 2 +- .../api/v1/education/Studentuebung.php | 2 +- .../controllers/api/v1/education/Uebung.php | 2 +- .../controllers/api/v1/education/Zeugnis.php | 2 +- .../api/v1/education/Zeugnisnote.php | 2 +- .../api/v1/organisation/Erhalter.php | 2 +- .../api/v1/organisation/Fachbereich2.php | 2 +- .../api/v1/organisation/Ferien.php | 2 +- .../api/v1/organisation/Geschaeftsjahr2.php | 2 +- .../api/v1/organisation/Gruppe.php | 2 +- .../api/v1/organisation/Lehrverband.php | 2 +- .../v1/organisation/Organisationseinheit2.php | 2 +- .../organisation/Organisationseinheittyp.php | 2 +- .../api/v1/organisation/Semesterwochen.php | 2 +- .../api/v1/organisation/Service.php | 2 +- .../api/v1/organisation/Standort.php | 2 +- .../api/v1/organisation/Statistik.php | 2 +- .../api/v1/organisation/Studiengang2.php | 2 +- .../api/v1/organisation/Studiengangstyp.php | 2 +- .../api/v1/organisation/Studienjahr.php | 2 +- .../api/v1/organisation/Studienordnung.php | 2 +- .../v1/organisation/Studienordnungstatus.php | 2 +- .../api/v1/organisation/Studienplan.php | 2 +- .../api/v1/organisation/Studienplatz.php | 2 +- .../api/v1/organisation/Studiensemester.php | 2 +- .../controllers/api/v1/person/Adresse.php | 2 +- .../api/v1/person/Bankverbindung.php | 2 +- .../controllers/api/v1/person/Benutzer.php | 2 +- .../api/v1/person/Benutzerfunktion.php | 2 +- .../api/v1/person/Benutzergruppe.php | 2 +- .../controllers/api/v1/person/Fotostatus.php | 2 +- .../controllers/api/v1/person/Freebusy.php | 2 +- .../controllers/api/v1/person/Freebusytyp.php | 2 +- .../controllers/api/v1/person/Kontakt.php | 2 +- .../api/v1/person/Kontaktmedium.php | 2 +- .../controllers/api/v1/person/Kontakttyp.php | 2 +- .../controllers/api/v1/person/Notiz.php | 2 +- .../api/v1/person/Notizzuordnung.php | 2 +- .../controllers/api/v1/person/Person.php | 2 +- .../controllers/api/v1/project/Aktivitaet.php | 2 +- .../api/v1/project/Aufwandstyp.php | 2 +- .../controllers/api/v1/project/Projekt.php | 2 +- .../api/v1/project/Projekt_ressource.php | 2 +- .../api/v1/project/Projektphase.php | 2 +- .../api/v1/project/Projekttask.php | 2 +- .../controllers/api/v1/project/Ressource.php | 2 +- .../api/v1/project/Scrumsprint.php | 2 +- .../api/v1/ressource/Betriebsmittel.php | 2 +- .../v1/ressource/Betriebsmittelperson2.php | 2 +- .../api/v1/ressource/Betriebsmittelstatus.php | 2 +- .../api/v1/ressource/Betriebsmitteltyp.php | 2 +- .../controllers/api/v1/ressource/Coodle.php | 2 +- .../api/v1/ressource/Erreichbarkeit.php | 2 +- .../controllers/api/v1/ressource/Firma.php | 2 +- .../controllers/api/v1/ressource/Firmatag.php | 2 +- .../api/v1/ressource/Firmentyp.php | 2 +- .../controllers/api/v1/ressource/Funktion.php | 2 +- .../api/v1/ressource/Lehrmittel.php | 2 +- .../api/v1/ressource/Mitarbeiter.php | 2 +- .../controllers/api/v1/ressource/Ort.php | 2 +- .../api/v1/ressource/Ortraumtyp.php | 2 +- .../v1/ressource/Personfunktionstandort.php | 2 +- .../controllers/api/v1/ressource/Raumtyp.php | 2 +- .../api/v1/ressource/Reservierung.php | 2 +- .../controllers/api/v1/ressource/Stunde.php | 2 +- .../api/v1/ressource/Stundenplan.php | 2 +- .../api/v1/ressource/Stundenplandev.php | 2 +- .../api/v1/ressource/Zeitaufzeichnung.php | 2 +- .../api/v1/ressource/Zeitfenster.php | 2 +- .../api/v1/ressource/Zeitsperre.php | 2 +- .../api/v1/ressource/Zeitsperretyp.php | 2 +- .../api/v1/ressource/Zeitwunsch.php | 2 +- .../controllers/api/v1/system/Appdaten.php | 2 +- .../api/v1/system/Benutzerrolle.php | 2 +- .../api/v1/system/Berechtigung.php | 2 +- .../controllers/api/v1/system/Cronjob.php | 2 +- .../controllers/api/v1/system/Filter.php | 2 +- application/controllers/api/v1/system/Log.php | 2 +- .../controllers/api/v1/system/Message.php | 2 +- .../controllers/api/v1/system/Phrase.php | 2 +- .../controllers/api/v1/system/Rolle.php | 2 +- .../api/v1/system/Rolleberechtigung.php | 2 +- .../controllers/api/v1/system/Server.php | 2 +- .../controllers/api/v1/system/Sprache2.php | 2 +- application/controllers/api/v1/system/Tag.php | 2 +- application/controllers/api/v1/system/UDF.php | 2 +- .../controllers/api/v1/system/Variable.php | 2 +- .../controllers/api/v1/system/Vorlage.php | 2 +- .../api/v1/system/Vorlagestudiengang.php | 2 +- .../api/v1/system/Webservicelog.php | 2 +- .../api/v1/system/Webservicerecht.php | 2 +- .../api/v1/system/Webservicetyp.php | 2 +- .../controllers/api/v1/testtool/Ablauf.php | 2 +- .../controllers/api/v1/testtool/Antwort.php | 2 +- .../controllers/api/v1/testtool/Frage.php | 2 +- .../controllers/api/v1/testtool/Gebiet.php | 2 +- .../controllers/api/v1/testtool/Kategorie.php | 2 +- .../controllers/api/v1/testtool/Kriterien.php | 2 +- .../controllers/api/v1/testtool/Pruefling.php | 2 +- .../controllers/api/v1/testtool/Vorschlag.php | 2 +- application/core/API_Controller.php | 124 ++++++++++++++++++ application/core/APIv1_Controller.php | 51 ------- 220 files changed, 342 insertions(+), 269 deletions(-) create mode 100644 application/core/API_Controller.php delete mode 100644 application/core/APIv1_Controller.php diff --git a/application/controllers/api/v1/CheckUserAuth.php b/application/controllers/api/v1/CheckUserAuth.php index ee751e886..c82df9065 100644 --- a/application/controllers/api/v1/CheckUserAuth.php +++ b/application/controllers/api/v1/CheckUserAuth.php @@ -12,7 +12,7 @@ class CheckUserAuth extends RESTFul_Controller parent::__construct(); // Loads helper message to manage returning messages - // NOTE: loaded here because it does not extend the APIv1_Controller + // NOTE: loaded here because it does not extend the API_Controller $this->load->helper('hlp_return_object'); } diff --git a/application/controllers/api/v1/accounting/Aufteilung.php b/application/controllers/api/v1/accounting/Aufteilung.php index cc9c2826f..9cf4e3474 100644 --- a/application/controllers/api/v1/accounting/Aufteilung.php +++ b/application/controllers/api/v1/accounting/Aufteilung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aufteilung extends APIv1_Controller +class Aufteilung extends API_Controller { /** * Aufteilung API constructor. diff --git a/application/controllers/api/v1/accounting/Bestelldetail.php b/application/controllers/api/v1/accounting/Bestelldetail.php index 191ba95a0..f21b1bee6 100644 --- a/application/controllers/api/v1/accounting/Bestelldetail.php +++ b/application/controllers/api/v1/accounting/Bestelldetail.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bestelldetail extends APIv1_Controller +class Bestelldetail extends API_Controller { /** * Bestelldetail API constructor. diff --git a/application/controllers/api/v1/accounting/Bestelldetailtag.php b/application/controllers/api/v1/accounting/Bestelldetailtag.php index 36229d47c..c7c534cc4 100644 --- a/application/controllers/api/v1/accounting/Bestelldetailtag.php +++ b/application/controllers/api/v1/accounting/Bestelldetailtag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bestelldetailtag extends APIv1_Controller +class Bestelldetailtag extends API_Controller { /** * Bestelldetailtag API constructor. diff --git a/application/controllers/api/v1/accounting/Bestellstatus.php b/application/controllers/api/v1/accounting/Bestellstatus.php index dc3695ff2..e52dedab2 100644 --- a/application/controllers/api/v1/accounting/Bestellstatus.php +++ b/application/controllers/api/v1/accounting/Bestellstatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bestellstatus extends APIv1_Controller +class Bestellstatus extends API_Controller { /** * Bestellstatus API constructor. diff --git a/application/controllers/api/v1/accounting/Bestellung.php b/application/controllers/api/v1/accounting/Bestellung.php index 018b77180..96ae689e8 100644 --- a/application/controllers/api/v1/accounting/Bestellung.php +++ b/application/controllers/api/v1/accounting/Bestellung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bestellung extends APIv1_Controller +class Bestellung extends API_Controller { /** * Bestellung API constructor. diff --git a/application/controllers/api/v1/accounting/Bestellungtag.php b/application/controllers/api/v1/accounting/Bestellungtag.php index 7b404fa05..7609975ab 100644 --- a/application/controllers/api/v1/accounting/Bestellungtag.php +++ b/application/controllers/api/v1/accounting/Bestellungtag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bestellungtag extends APIv1_Controller +class Bestellungtag extends API_Controller { /** * Bestellungtag API constructor. diff --git a/application/controllers/api/v1/accounting/Buchung.php b/application/controllers/api/v1/accounting/Buchung.php index 12fa02c33..44c91f1a4 100644 --- a/application/controllers/api/v1/accounting/Buchung.php +++ b/application/controllers/api/v1/accounting/Buchung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Buchung extends APIv1_Controller +class Buchung extends API_Controller { /** * Buchung API constructor. diff --git a/application/controllers/api/v1/accounting/Buchungstyp.php b/application/controllers/api/v1/accounting/Buchungstyp.php index 3e9718469..20b69bec9 100644 --- a/application/controllers/api/v1/accounting/Buchungstyp.php +++ b/application/controllers/api/v1/accounting/Buchungstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Buchungstyp extends APIv1_Controller +class Buchungstyp extends API_Controller { /** * Buchungstyp API constructor. diff --git a/application/controllers/api/v1/accounting/Budget.php b/application/controllers/api/v1/accounting/Budget.php index 31ee3ef1c..9ffbb3656 100644 --- a/application/controllers/api/v1/accounting/Budget.php +++ b/application/controllers/api/v1/accounting/Budget.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Budget extends APIv1_Controller +class Budget extends API_Controller { /** * Budget API constructor. diff --git a/application/controllers/api/v1/accounting/Konto.php b/application/controllers/api/v1/accounting/Konto.php index 0b78ff98f..ba9b44558 100644 --- a/application/controllers/api/v1/accounting/Konto.php +++ b/application/controllers/api/v1/accounting/Konto.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Konto extends APIv1_Controller +class Konto extends API_Controller { /** * Konto API constructor. diff --git a/application/controllers/api/v1/accounting/Kostenstelle.php b/application/controllers/api/v1/accounting/Kostenstelle.php index 2ebf554c0..a90445b76 100644 --- a/application/controllers/api/v1/accounting/Kostenstelle.php +++ b/application/controllers/api/v1/accounting/Kostenstelle.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Kostenstelle extends APIv1_Controller +class Kostenstelle extends API_Controller { /** * Kostenstelle API constructor. diff --git a/application/controllers/api/v1/accounting/Rechnung.php b/application/controllers/api/v1/accounting/Rechnung.php index 5ac77b36b..18d0e36dd 100644 --- a/application/controllers/api/v1/accounting/Rechnung.php +++ b/application/controllers/api/v1/accounting/Rechnung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Rechnung extends APIv1_Controller +class Rechnung extends API_Controller { /** * Rechnung API constructor. diff --git a/application/controllers/api/v1/accounting/Rechnungsbetrag.php b/application/controllers/api/v1/accounting/Rechnungsbetrag.php index 2f02c794d..57f2803a4 100644 --- a/application/controllers/api/v1/accounting/Rechnungsbetrag.php +++ b/application/controllers/api/v1/accounting/Rechnungsbetrag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Rechnungsbetrag extends APIv1_Controller +class Rechnungsbetrag extends API_Controller { /** * Rechnungsbetrag API constructor. diff --git a/application/controllers/api/v1/accounting/Rechnungstyp.php b/application/controllers/api/v1/accounting/Rechnungstyp.php index f85dae43e..37efdd784 100644 --- a/application/controllers/api/v1/accounting/Rechnungstyp.php +++ b/application/controllers/api/v1/accounting/Rechnungstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Rechnungstyp extends APIv1_Controller +class Rechnungstyp extends API_Controller { /** * Rechnungstyp API constructor. diff --git a/application/controllers/api/v1/accounting/Vertrag.php b/application/controllers/api/v1/accounting/Vertrag.php index 3b3d3fac2..164dd05a0 100644 --- a/application/controllers/api/v1/accounting/Vertrag.php +++ b/application/controllers/api/v1/accounting/Vertrag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Vertrag extends APIv1_Controller +class Vertrag extends API_Controller { /** * Vertrag API constructor. diff --git a/application/controllers/api/v1/accounting/Vertragsstatus.php b/application/controllers/api/v1/accounting/Vertragsstatus.php index c6125e609..876a2912a 100644 --- a/application/controllers/api/v1/accounting/Vertragsstatus.php +++ b/application/controllers/api/v1/accounting/Vertragsstatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Vertragsstatus extends APIv1_Controller +class Vertragsstatus extends API_Controller { /** * Vertragsstatus API constructor. diff --git a/application/controllers/api/v1/accounting/Vertragstyp.php b/application/controllers/api/v1/accounting/Vertragstyp.php index 69b0907dd..40d826af2 100644 --- a/application/controllers/api/v1/accounting/Vertragstyp.php +++ b/application/controllers/api/v1/accounting/Vertragstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Vertragstyp extends APIv1_Controller +class Vertragstyp extends API_Controller { /** * Vertragstyp API constructor. diff --git a/application/controllers/api/v1/accounting/Zahlungstyp.php b/application/controllers/api/v1/accounting/Zahlungstyp.php index e7abf74df..bef1e14e1 100644 --- a/application/controllers/api/v1/accounting/Zahlungstyp.php +++ b/application/controllers/api/v1/accounting/Zahlungstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zahlungstyp extends APIv1_Controller +class Zahlungstyp extends API_Controller { /** * Zahlungstyp API constructor. diff --git a/application/controllers/api/v1/codex/Akadgrad.php b/application/controllers/api/v1/codex/Akadgrad.php index 2aeb01e59..3d99d16be 100644 --- a/application/controllers/api/v1/codex/Akadgrad.php +++ b/application/controllers/api/v1/codex/Akadgrad.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Akadgrad extends APIv1_Controller +class Akadgrad extends API_Controller { /** * Akadgrad API constructor. diff --git a/application/controllers/api/v1/codex/Archiv.php b/application/controllers/api/v1/codex/Archiv.php index b35ec840d..38fbb1710 100644 --- a/application/controllers/api/v1/codex/Archiv.php +++ b/application/controllers/api/v1/codex/Archiv.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Archiv extends APIv1_Controller +class Archiv extends API_Controller { /** * Archiv API constructor. diff --git a/application/controllers/api/v1/codex/Aufmerksamdurch.php b/application/controllers/api/v1/codex/Aufmerksamdurch.php index dc27d4dd8..ce9cf25ba 100644 --- a/application/controllers/api/v1/codex/Aufmerksamdurch.php +++ b/application/controllers/api/v1/codex/Aufmerksamdurch.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aufmerksamdurch extends APIv1_Controller +class Aufmerksamdurch extends API_Controller { /** * Aufmerksamdurch API constructor. diff --git a/application/controllers/api/v1/codex/Ausbildung.php b/application/controllers/api/v1/codex/Ausbildung.php index 4fea8add4..5886ed724 100644 --- a/application/controllers/api/v1/codex/Ausbildung.php +++ b/application/controllers/api/v1/codex/Ausbildung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Ausbildung extends APIv1_Controller +class Ausbildung extends API_Controller { /** * Ausbildung API constructor. diff --git a/application/controllers/api/v1/codex/Berufstaetigkeit.php b/application/controllers/api/v1/codex/Berufstaetigkeit.php index 0941eba9e..02d62ae5d 100644 --- a/application/controllers/api/v1/codex/Berufstaetigkeit.php +++ b/application/controllers/api/v1/codex/Berufstaetigkeit.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Berufstaetigkeit extends APIv1_Controller +class Berufstaetigkeit extends API_Controller { /** * Berufstaetigkeit API constructor. diff --git a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php index 115aa37fd..f10fe9d51 100644 --- a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php +++ b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Beschaeftigungsausmass extends APIv1_Controller +class Beschaeftigungsausmass extends API_Controller { /** * Beschaeftigungsausmass API constructor. diff --git a/application/controllers/api/v1/codex/Besqual.php b/application/controllers/api/v1/codex/Besqual.php index 6bad18ff7..f4b5c8a16 100644 --- a/application/controllers/api/v1/codex/Besqual.php +++ b/application/controllers/api/v1/codex/Besqual.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Besqual extends APIv1_Controller +class Besqual extends API_Controller { /** * Besqual API constructor. diff --git a/application/controllers/api/v1/codex/Bisfunktion.php b/application/controllers/api/v1/codex/Bisfunktion.php index 85a7fca7b..c7318c51c 100644 --- a/application/controllers/api/v1/codex/Bisfunktion.php +++ b/application/controllers/api/v1/codex/Bisfunktion.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bisfunktion extends APIv1_Controller +class Bisfunktion extends API_Controller { /** * Bisfunktion API constructor. diff --git a/application/controllers/api/v1/codex/Bisio.php b/application/controllers/api/v1/codex/Bisio.php index 1b0999bb1..3cbb0ca4f 100644 --- a/application/controllers/api/v1/codex/Bisio.php +++ b/application/controllers/api/v1/codex/Bisio.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bisio extends APIv1_Controller +class Bisio extends API_Controller { /** * Bisio API constructor. diff --git a/application/controllers/api/v1/codex/Bisorgform.php b/application/controllers/api/v1/codex/Bisorgform.php index af72644c8..8ead76ecf 100644 --- a/application/controllers/api/v1/codex/Bisorgform.php +++ b/application/controllers/api/v1/codex/Bisorgform.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bisorgform extends APIv1_Controller +class Bisorgform extends API_Controller { /** * Bisorgform API constructor. diff --git a/application/controllers/api/v1/codex/Bisverwendung.php b/application/controllers/api/v1/codex/Bisverwendung.php index ee2b0d5ca..8e6a1a310 100644 --- a/application/controllers/api/v1/codex/Bisverwendung.php +++ b/application/controllers/api/v1/codex/Bisverwendung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bisverwendung extends APIv1_Controller +class Bisverwendung extends API_Controller { /** * Bisverwendung API constructor. diff --git a/application/controllers/api/v1/codex/Bundesland.php b/application/controllers/api/v1/codex/Bundesland.php index ccff4f047..53fbda2ba 100644 --- a/application/controllers/api/v1/codex/Bundesland.php +++ b/application/controllers/api/v1/codex/Bundesland.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bundesland extends APIv1_Controller +class Bundesland extends API_Controller { /** * Course API constructor. diff --git a/application/controllers/api/v1/codex/Entwicklungsteam.php b/application/controllers/api/v1/codex/Entwicklungsteam.php index bf376a842..5ad2fb453 100644 --- a/application/controllers/api/v1/codex/Entwicklungsteam.php +++ b/application/controllers/api/v1/codex/Entwicklungsteam.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Entwicklungsteam extends APIv1_Controller +class Entwicklungsteam extends API_Controller { /** * Entwicklungsteam API constructor. diff --git a/application/controllers/api/v1/codex/Gemeinde.php b/application/controllers/api/v1/codex/Gemeinde.php index 340d1ed9b..8f8e76854 100644 --- a/application/controllers/api/v1/codex/Gemeinde.php +++ b/application/controllers/api/v1/codex/Gemeinde.php @@ -14,7 +14,7 @@ if (!defined("BASEPATH")) exit("No direct script access allowed"); -class Gemeinde extends APIv1_Controller +class Gemeinde extends API_Controller { /** * Gemeinde API constructor. diff --git a/application/controllers/api/v1/codex/Hauptberuf.php b/application/controllers/api/v1/codex/Hauptberuf.php index 05396c473..4fdf8a687 100644 --- a/application/controllers/api/v1/codex/Hauptberuf.php +++ b/application/controllers/api/v1/codex/Hauptberuf.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Hauptberuf extends APIv1_Controller +class Hauptberuf extends API_Controller { /** * Hauptberuf API constructor. diff --git a/application/controllers/api/v1/codex/Lehrform.php b/application/controllers/api/v1/codex/Lehrform.php index e789e76ec..25b5a4253 100644 --- a/application/controllers/api/v1/codex/Lehrform.php +++ b/application/controllers/api/v1/codex/Lehrform.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrform extends APIv1_Controller +class Lehrform extends API_Controller { /** * Lehrform API constructor. diff --git a/application/controllers/api/v1/codex/Lgartcode.php b/application/controllers/api/v1/codex/Lgartcode.php index 5be7cab59..2ee1bbf6f 100644 --- a/application/controllers/api/v1/codex/Lgartcode.php +++ b/application/controllers/api/v1/codex/Lgartcode.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lgartcode extends APIv1_Controller +class Lgartcode extends API_Controller { /** * Lgartcode API constructor. diff --git a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php index 70f0c3dc6..2215ebf92 100644 --- a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php +++ b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Mobilitaetsprogramm extends APIv1_Controller +class Mobilitaetsprogramm extends API_Controller { /** * Mobilitaetsprogramm API constructor. diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php index ad6c5e10e..16d9bf59a 100644 --- a/application/controllers/api/v1/codex/Nation.php +++ b/application/controllers/api/v1/codex/Nation.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Nation extends APIv1_Controller +class Nation extends API_Controller { /** * Course API constructor. diff --git a/application/controllers/api/v1/codex/Note.php b/application/controllers/api/v1/codex/Note.php index f42032fe5..d6f9c919a 100644 --- a/application/controllers/api/v1/codex/Note.php +++ b/application/controllers/api/v1/codex/Note.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Note extends APIv1_Controller +class Note extends API_Controller { /** * Note API constructor. diff --git a/application/controllers/api/v1/codex/Orgform.php b/application/controllers/api/v1/codex/Orgform.php index ad5d94185..481f01d2e 100644 --- a/application/controllers/api/v1/codex/Orgform.php +++ b/application/controllers/api/v1/codex/Orgform.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Orgform extends APIv1_Controller +class Orgform extends API_Controller { /** * Orgform API constructor. diff --git a/application/controllers/api/v1/codex/Verwendung.php b/application/controllers/api/v1/codex/Verwendung.php index 9823d3915..0eab46414 100644 --- a/application/controllers/api/v1/codex/Verwendung.php +++ b/application/controllers/api/v1/codex/Verwendung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Verwendung extends APIv1_Controller +class Verwendung extends API_Controller { /** * Verwendung API constructor. diff --git a/application/controllers/api/v1/codex/Zgv.php b/application/controllers/api/v1/codex/Zgv.php index b1a0981dc..670ffc190 100644 --- a/application/controllers/api/v1/codex/Zgv.php +++ b/application/controllers/api/v1/codex/Zgv.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zgv extends APIv1_Controller +class Zgv extends API_Controller { /** * Zgv API constructor. diff --git a/application/controllers/api/v1/codex/Zgvdoktor.php b/application/controllers/api/v1/codex/Zgvdoktor.php index aeaf56463..63059356e 100644 --- a/application/controllers/api/v1/codex/Zgvdoktor.php +++ b/application/controllers/api/v1/codex/Zgvdoktor.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zgvdoktor extends APIv1_Controller +class Zgvdoktor extends API_Controller { /** * Zgvdoktor API constructor. diff --git a/application/controllers/api/v1/codex/Zgvgruppe.php b/application/controllers/api/v1/codex/Zgvgruppe.php index 38b1fe520..95ac6c6fc 100644 --- a/application/controllers/api/v1/codex/Zgvgruppe.php +++ b/application/controllers/api/v1/codex/Zgvgruppe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zgvgruppe extends APIv1_Controller +class Zgvgruppe extends API_Controller { /** * Zgvgruppe API constructor. diff --git a/application/controllers/api/v1/codex/Zgvmaster.php b/application/controllers/api/v1/codex/Zgvmaster.php index b8e7ee86d..ff737dd7f 100644 --- a/application/controllers/api/v1/codex/Zgvmaster.php +++ b/application/controllers/api/v1/codex/Zgvmaster.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zgvmaster extends APIv1_Controller +class Zgvmaster extends API_Controller { /** * Zgvmaster API constructor. diff --git a/application/controllers/api/v1/codex/Zweck.php b/application/controllers/api/v1/codex/Zweck.php index c5710c7a5..75333fa6d 100644 --- a/application/controllers/api/v1/codex/Zweck.php +++ b/application/controllers/api/v1/codex/Zweck.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zweck extends APIv1_Controller +class Zweck extends API_Controller { /** * Zweck API constructor. diff --git a/application/controllers/api/v1/content/Ampel.php b/application/controllers/api/v1/content/Ampel.php index f550eafdd..661af47cc 100644 --- a/application/controllers/api/v1/content/Ampel.php +++ b/application/controllers/api/v1/content/Ampel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Ampel extends APIv1_Controller +class Ampel extends API_Controller { /** * Ampel API constructor. diff --git a/application/controllers/api/v1/content/Content.php b/application/controllers/api/v1/content/Content.php index 5d0854c2e..8d2474457 100644 --- a/application/controllers/api/v1/content/Content.php +++ b/application/controllers/api/v1/content/Content.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Content extends APIv1_Controller +class Content extends API_Controller { /** * Content API constructor. diff --git a/application/controllers/api/v1/content/Contentchild.php b/application/controllers/api/v1/content/Contentchild.php index 95dbc4ab0..d4647e3d3 100644 --- a/application/controllers/api/v1/content/Contentchild.php +++ b/application/controllers/api/v1/content/Contentchild.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Contentchild extends APIv1_Controller +class Contentchild extends API_Controller { /** * Contentchild API constructor. diff --git a/application/controllers/api/v1/content/Contentgruppe.php b/application/controllers/api/v1/content/Contentgruppe.php index 794400dc1..18c245288 100644 --- a/application/controllers/api/v1/content/Contentgruppe.php +++ b/application/controllers/api/v1/content/Contentgruppe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Contentgruppe extends APIv1_Controller +class Contentgruppe extends API_Controller { /** * Contentgruppe API constructor. diff --git a/application/controllers/api/v1/content/Contentlog.php b/application/controllers/api/v1/content/Contentlog.php index ef4738828..d6e6ff940 100644 --- a/application/controllers/api/v1/content/Contentlog.php +++ b/application/controllers/api/v1/content/Contentlog.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Contentlog extends APIv1_Controller +class Contentlog extends API_Controller { /** * Contentlog API constructor. diff --git a/application/controllers/api/v1/content/Contentsprache.php b/application/controllers/api/v1/content/Contentsprache.php index f3696d2ad..15430d405 100644 --- a/application/controllers/api/v1/content/Contentsprache.php +++ b/application/controllers/api/v1/content/Contentsprache.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Contentsprache extends APIv1_Controller +class Contentsprache extends API_Controller { /** * Contentsprache API constructor. diff --git a/application/controllers/api/v1/content/Dms.php b/application/controllers/api/v1/content/Dms.php index e73254888..1109bd3ca 100644 --- a/application/controllers/api/v1/content/Dms.php +++ b/application/controllers/api/v1/content/Dms.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Dms extends APIv1_Controller +class Dms extends API_Controller { /** * diff --git a/application/controllers/api/v1/content/Infoscreen.php b/application/controllers/api/v1/content/Infoscreen.php index 3012af304..4b648c753 100644 --- a/application/controllers/api/v1/content/Infoscreen.php +++ b/application/controllers/api/v1/content/Infoscreen.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Infoscreen extends APIv1_Controller +class Infoscreen extends API_Controller { /** * Infoscreen API constructor. diff --git a/application/controllers/api/v1/content/News.php b/application/controllers/api/v1/content/News.php index b085afb7d..e7c0b3797 100644 --- a/application/controllers/api/v1/content/News.php +++ b/application/controllers/api/v1/content/News.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class News extends APIv1_Controller +class News extends API_Controller { /** * News API constructor. diff --git a/application/controllers/api/v1/content/Template.php b/application/controllers/api/v1/content/Template.php index e15156b14..bfd9fcd08 100644 --- a/application/controllers/api/v1/content/Template.php +++ b/application/controllers/api/v1/content/Template.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Template extends APIv1_Controller +class Template extends API_Controller { /** * Template API constructor. diff --git a/application/controllers/api/v1/content/Veranstaltung.php b/application/controllers/api/v1/content/Veranstaltung.php index 5f922e65a..5447e538d 100644 --- a/application/controllers/api/v1/content/Veranstaltung.php +++ b/application/controllers/api/v1/content/Veranstaltung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Veranstaltung extends APIv1_Controller +class Veranstaltung extends API_Controller { /** * Veranstaltung API constructor. diff --git a/application/controllers/api/v1/content/Veranstaltungskategorie.php b/application/controllers/api/v1/content/Veranstaltungskategorie.php index 20af408c5..afc2c4968 100644 --- a/application/controllers/api/v1/content/Veranstaltungskategorie.php +++ b/application/controllers/api/v1/content/Veranstaltungskategorie.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Veranstaltungskategorie extends APIv1_Controller +class Veranstaltungskategorie extends API_Controller { /** * Veranstaltungskategorie API constructor. diff --git a/application/controllers/api/v1/crm/Akte.php b/application/controllers/api/v1/crm/Akte.php index e9c892da5..a24d7abcc 100644 --- a/application/controllers/api/v1/crm/Akte.php +++ b/application/controllers/api/v1/crm/Akte.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Akte extends APIv1_Controller +class Akte extends API_Controller { /** * Akte API constructor. diff --git a/application/controllers/api/v1/crm/Aufnahmeschluessel.php b/application/controllers/api/v1/crm/Aufnahmeschluessel.php index f2724481c..f055f1d20 100644 --- a/application/controllers/api/v1/crm/Aufnahmeschluessel.php +++ b/application/controllers/api/v1/crm/Aufnahmeschluessel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aufnahmeschluessel extends APIv1_Controller +class Aufnahmeschluessel extends API_Controller { /** * Aufnahmeschluessel API constructor. diff --git a/application/controllers/api/v1/crm/Aufnahmetermin.php b/application/controllers/api/v1/crm/Aufnahmetermin.php index e199adbf8..31b1d8ef4 100644 --- a/application/controllers/api/v1/crm/Aufnahmetermin.php +++ b/application/controllers/api/v1/crm/Aufnahmetermin.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aufnahmetermin extends APIv1_Controller +class Aufnahmetermin extends API_Controller { /** * Aufnahmetermin API constructor. diff --git a/application/controllers/api/v1/crm/Aufnahmetermintyp.php b/application/controllers/api/v1/crm/Aufnahmetermintyp.php index 7219598bf..ccc5d5901 100644 --- a/application/controllers/api/v1/crm/Aufnahmetermintyp.php +++ b/application/controllers/api/v1/crm/Aufnahmetermintyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aufnahmetermintyp extends APIv1_Controller +class Aufnahmetermintyp extends API_Controller { /** * Aufnahmetermintyp API constructor. diff --git a/application/controllers/api/v1/crm/Bewerbungstermine.php b/application/controllers/api/v1/crm/Bewerbungstermine.php index 55d49ff58..f39623b6b 100644 --- a/application/controllers/api/v1/crm/Bewerbungstermine.php +++ b/application/controllers/api/v1/crm/Bewerbungstermine.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bewerbungstermine extends APIv1_Controller +class Bewerbungstermine extends API_Controller { /** * Bewerbungstermine API constructor. diff --git a/application/controllers/api/v1/crm/Buchungstyp.php b/application/controllers/api/v1/crm/Buchungstyp.php index 0253050f3..90129f1c3 100644 --- a/application/controllers/api/v1/crm/Buchungstyp.php +++ b/application/controllers/api/v1/crm/Buchungstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Buchungstyp extends APIv1_Controller +class Buchungstyp extends API_Controller { /** * Buchungstyp API constructor. diff --git a/application/controllers/api/v1/crm/Dokument.php b/application/controllers/api/v1/crm/Dokument.php index 11a603496..c94413f55 100644 --- a/application/controllers/api/v1/crm/Dokument.php +++ b/application/controllers/api/v1/crm/Dokument.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Dokument extends APIv1_Controller +class Dokument extends API_Controller { /** * Dokument API constructor. diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php index e05815d33..20ebe37bc 100644 --- a/application/controllers/api/v1/crm/Dokumentprestudent.php +++ b/application/controllers/api/v1/crm/Dokumentprestudent.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Dokumentprestudent extends APIv1_Controller +class Dokumentprestudent extends API_Controller { /** * Dokumentprestudent API constructor. diff --git a/application/controllers/api/v1/crm/Dokumentstudiengang.php b/application/controllers/api/v1/crm/Dokumentstudiengang.php index 3e908d455..81b84c888 100644 --- a/application/controllers/api/v1/crm/Dokumentstudiengang.php +++ b/application/controllers/api/v1/crm/Dokumentstudiengang.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Dokumentstudiengang extends APIv1_Controller +class Dokumentstudiengang extends API_Controller { /** * Dokumentstudiengang API constructor. diff --git a/application/controllers/api/v1/crm/Konto.php b/application/controllers/api/v1/crm/Konto.php index 5a2cdafe2..135d36ab7 100644 --- a/application/controllers/api/v1/crm/Konto.php +++ b/application/controllers/api/v1/crm/Konto.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Konto extends APIv1_Controller +class Konto extends API_Controller { /** * Konto API constructor. diff --git a/application/controllers/api/v1/crm/Preincoming.php b/application/controllers/api/v1/crm/Preincoming.php index 14da2b9c3..f319218ae 100644 --- a/application/controllers/api/v1/crm/Preincoming.php +++ b/application/controllers/api/v1/crm/Preincoming.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Preincoming extends APIv1_Controller +class Preincoming extends API_Controller { /** * Preincoming API constructor. diff --git a/application/controllers/api/v1/crm/Preinteressent.php b/application/controllers/api/v1/crm/Preinteressent.php index 62c29dfda..ab3ee68d6 100644 --- a/application/controllers/api/v1/crm/Preinteressent.php +++ b/application/controllers/api/v1/crm/Preinteressent.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Preinteressent extends APIv1_Controller +class Preinteressent extends API_Controller { /** * Person API constructor. diff --git a/application/controllers/api/v1/crm/Preinteressentstudiengang.php b/application/controllers/api/v1/crm/Preinteressentstudiengang.php index e4e834ef9..4a97077d0 100644 --- a/application/controllers/api/v1/crm/Preinteressentstudiengang.php +++ b/application/controllers/api/v1/crm/Preinteressentstudiengang.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Preinteressentstudiengang extends APIv1_Controller +class Preinteressentstudiengang extends API_Controller { /** * Preinteressentstudiengang API constructor. diff --git a/application/controllers/api/v1/crm/Preoutgoing.php b/application/controllers/api/v1/crm/Preoutgoing.php index 733bd2eb9..0f2829dfd 100644 --- a/application/controllers/api/v1/crm/Preoutgoing.php +++ b/application/controllers/api/v1/crm/Preoutgoing.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Preoutgoing extends APIv1_Controller +class Preoutgoing extends API_Controller { /** * Preoutgoing API constructor. diff --git a/application/controllers/api/v1/crm/Prestudent.php b/application/controllers/api/v1/crm/Prestudent.php index 072ba3eea..6376ef94f 100644 --- a/application/controllers/api/v1/crm/Prestudent.php +++ b/application/controllers/api/v1/crm/Prestudent.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Prestudent extends APIv1_Controller +class Prestudent extends API_Controller { /** * Prestudent API constructor. diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php index b72ac2fe9..5c3c38e1c 100644 --- a/application/controllers/api/v1/crm/Prestudentstatus.php +++ b/application/controllers/api/v1/crm/Prestudentstatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Prestudentstatus extends APIv1_Controller +class Prestudentstatus extends API_Controller { /** * Prestudentstatus API constructor. diff --git a/application/controllers/api/v1/crm/Reihungstest.php b/application/controllers/api/v1/crm/Reihungstest.php index e9012d740..81dc32cec 100644 --- a/application/controllers/api/v1/crm/Reihungstest.php +++ b/application/controllers/api/v1/crm/Reihungstest.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Reihungstest extends APIv1_Controller +class Reihungstest extends API_Controller { /** * Reihungstest API constructor. diff --git a/application/controllers/api/v1/crm/RtPerson.php b/application/controllers/api/v1/crm/RtPerson.php index f9610722a..ed84de90e 100644 --- a/application/controllers/api/v1/crm/RtPerson.php +++ b/application/controllers/api/v1/crm/RtPerson.php @@ -14,7 +14,7 @@ if (!defined("BASEPATH")) exit("No direct script access allowed"); -class RtPerson extends APIv1_Controller +class RtPerson extends API_Controller { /** * Status API constructor. diff --git a/application/controllers/api/v1/crm/Status.php b/application/controllers/api/v1/crm/Status.php index 37a8fbd11..6a9a89ec3 100644 --- a/application/controllers/api/v1/crm/Status.php +++ b/application/controllers/api/v1/crm/Status.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Status extends APIv1_Controller +class Status extends API_Controller { /** * Status API constructor. diff --git a/application/controllers/api/v1/crm/Statusgrund.php b/application/controllers/api/v1/crm/Statusgrund.php index 3f19f2f82..fbf225e42 100644 --- a/application/controllers/api/v1/crm/Statusgrund.php +++ b/application/controllers/api/v1/crm/Statusgrund.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Statusgrund extends APIv1_Controller +class Statusgrund extends API_Controller { /** * Status API constructor. diff --git a/application/controllers/api/v1/crm/Student.php b/application/controllers/api/v1/crm/Student.php index 6227cb6e3..34920021c 100644 --- a/application/controllers/api/v1/crm/Student.php +++ b/application/controllers/api/v1/crm/Student.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Student extends APIv1_Controller +class Student extends API_Controller { /** * Student API constructor. diff --git a/application/controllers/api/v1/education/Abgabe.php b/application/controllers/api/v1/education/Abgabe.php index e3fd64530..676414d70 100644 --- a/application/controllers/api/v1/education/Abgabe.php +++ b/application/controllers/api/v1/education/Abgabe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Abgabe extends APIv1_Controller +class Abgabe extends API_Controller { /** * Abgabe API constructor. diff --git a/application/controllers/api/v1/education/Abschlussbeurteilung.php b/application/controllers/api/v1/education/Abschlussbeurteilung.php index 1987e276f..1c4f3fb90 100644 --- a/application/controllers/api/v1/education/Abschlussbeurteilung.php +++ b/application/controllers/api/v1/education/Abschlussbeurteilung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Abschlussbeurteilung extends APIv1_Controller +class Abschlussbeurteilung extends API_Controller { /** * Abschlussbeurteilung API constructor. diff --git a/application/controllers/api/v1/education/Abschlusspruefung.php b/application/controllers/api/v1/education/Abschlusspruefung.php index cadea53ca..a47adc992 100644 --- a/application/controllers/api/v1/education/Abschlusspruefung.php +++ b/application/controllers/api/v1/education/Abschlusspruefung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Abschlusspruefung extends APIv1_Controller +class Abschlusspruefung extends API_Controller { /** * Abschlusspruefung API constructor. diff --git a/application/controllers/api/v1/education/Anrechnung.php b/application/controllers/api/v1/education/Anrechnung.php index 5a99b08ab..743ff7e5b 100644 --- a/application/controllers/api/v1/education/Anrechnung.php +++ b/application/controllers/api/v1/education/Anrechnung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Anrechnung extends APIv1_Controller +class Anrechnung extends API_Controller { /** * Anrechnung API constructor. diff --git a/application/controllers/api/v1/education/Anwesenheit.php b/application/controllers/api/v1/education/Anwesenheit.php index 2e915f071..2403220e0 100644 --- a/application/controllers/api/v1/education/Anwesenheit.php +++ b/application/controllers/api/v1/education/Anwesenheit.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Anwesenheit extends APIv1_Controller +class Anwesenheit extends API_Controller { /** * Anwesenheit API constructor. diff --git a/application/controllers/api/v1/education/Beispiel.php b/application/controllers/api/v1/education/Beispiel.php index b2c06047b..4bcd6ac55 100644 --- a/application/controllers/api/v1/education/Beispiel.php +++ b/application/controllers/api/v1/education/Beispiel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Beispiel extends APIv1_Controller +class Beispiel extends API_Controller { /** * Beispiel API constructor. diff --git a/application/controllers/api/v1/education/Betreuerart.php b/application/controllers/api/v1/education/Betreuerart.php index 43b4c51f6..b4cf34b7b 100644 --- a/application/controllers/api/v1/education/Betreuerart.php +++ b/application/controllers/api/v1/education/Betreuerart.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Betreuerart extends APIv1_Controller +class Betreuerart extends API_Controller { /** * Betreuerart API constructor. diff --git a/application/controllers/api/v1/education/Feedback.php b/application/controllers/api/v1/education/Feedback.php index abef22d77..8179181bc 100644 --- a/application/controllers/api/v1/education/Feedback.php +++ b/application/controllers/api/v1/education/Feedback.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Feedback extends APIv1_Controller +class Feedback extends API_Controller { /** * Feedback API constructor. diff --git a/application/controllers/api/v1/education/Legesamtnote.php b/application/controllers/api/v1/education/Legesamtnote.php index 96ff25c4f..c4f51b7ff 100644 --- a/application/controllers/api/v1/education/Legesamtnote.php +++ b/application/controllers/api/v1/education/Legesamtnote.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Legesamtnote extends APIv1_Controller +class Legesamtnote extends API_Controller { /** * Legesamtnote API constructor. diff --git a/application/controllers/api/v1/education/Lehreinheit.php b/application/controllers/api/v1/education/Lehreinheit.php index f229de846..05741b6c7 100644 --- a/application/controllers/api/v1/education/Lehreinheit.php +++ b/application/controllers/api/v1/education/Lehreinheit.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehreinheit extends APIv1_Controller +class Lehreinheit extends API_Controller { /** * Lehreinheit API constructor. diff --git a/application/controllers/api/v1/education/Lehreinheitgruppe.php b/application/controllers/api/v1/education/Lehreinheitgruppe.php index 6ef949d3e..a8d996c4e 100644 --- a/application/controllers/api/v1/education/Lehreinheitgruppe.php +++ b/application/controllers/api/v1/education/Lehreinheitgruppe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehreinheitgruppe extends APIv1_Controller +class Lehreinheitgruppe extends API_Controller { /** * Lehreinheitgruppe API constructor. diff --git a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php index 5237ca849..6861c7b77 100644 --- a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php +++ b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehreinheitmitarbeiter extends APIv1_Controller +class Lehreinheitmitarbeiter extends API_Controller { /** * Lehreinheitmitarbeiter API constructor. diff --git a/application/controllers/api/v1/education/Lehrfach.php b/application/controllers/api/v1/education/Lehrfach.php index 81ce519e1..e65776e08 100644 --- a/application/controllers/api/v1/education/Lehrfach.php +++ b/application/controllers/api/v1/education/Lehrfach.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrfach extends APIv1_Controller +class Lehrfach extends API_Controller { /** * Lehrfach API constructor. diff --git a/application/controllers/api/v1/education/Lehrfunktion.php b/application/controllers/api/v1/education/Lehrfunktion.php index e29f1227d..93f504fa7 100644 --- a/application/controllers/api/v1/education/Lehrfunktion.php +++ b/application/controllers/api/v1/education/Lehrfunktion.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrfunktion extends APIv1_Controller +class Lehrfunktion extends API_Controller { /** * Lehrfunktion API constructor. diff --git a/application/controllers/api/v1/education/Lehrtyp.php b/application/controllers/api/v1/education/Lehrtyp.php index dfcfd3033..bd73d14c4 100644 --- a/application/controllers/api/v1/education/Lehrtyp.php +++ b/application/controllers/api/v1/education/Lehrtyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrtyp extends APIv1_Controller +class Lehrtyp extends API_Controller { /** * Lehrtyp API constructor. diff --git a/application/controllers/api/v1/education/Lehrveranstaltung.php b/application/controllers/api/v1/education/Lehrveranstaltung.php index 2e2fffb66..676b6478d 100644 --- a/application/controllers/api/v1/education/Lehrveranstaltung.php +++ b/application/controllers/api/v1/education/Lehrveranstaltung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrveranstaltung extends APIv1_Controller +class Lehrveranstaltung extends API_Controller { /** * Lehrveranstaltung API constructor. diff --git a/application/controllers/api/v1/education/Lenotenschluessel.php b/application/controllers/api/v1/education/Lenotenschluessel.php index 9477172a3..980258859 100644 --- a/application/controllers/api/v1/education/Lenotenschluessel.php +++ b/application/controllers/api/v1/education/Lenotenschluessel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lenotenschluessel extends APIv1_Controller +class Lenotenschluessel extends API_Controller { /** * LeNotenschluessel API constructor. diff --git a/application/controllers/api/v1/education/Lepruefung.php b/application/controllers/api/v1/education/Lepruefung.php index 52e1d81b6..3234a30c0 100644 --- a/application/controllers/api/v1/education/Lepruefung.php +++ b/application/controllers/api/v1/education/Lepruefung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lepruefung extends APIv1_Controller +class Lepruefung extends API_Controller { /** * LePruefung API constructor. diff --git a/application/controllers/api/v1/education/Lvangebot.php b/application/controllers/api/v1/education/Lvangebot.php index ecd917233..1a364bea3 100644 --- a/application/controllers/api/v1/education/Lvangebot.php +++ b/application/controllers/api/v1/education/Lvangebot.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lvangebot extends APIv1_Controller +class Lvangebot extends API_Controller { /** * Lvangebot API constructor. diff --git a/application/controllers/api/v1/education/Lvgesamtnote.php b/application/controllers/api/v1/education/Lvgesamtnote.php index 464ef99a9..10c5c8577 100644 --- a/application/controllers/api/v1/education/Lvgesamtnote.php +++ b/application/controllers/api/v1/education/Lvgesamtnote.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lvgesamtnote extends APIv1_Controller +class Lvgesamtnote extends API_Controller { /** * Lvgesamtnote API constructor. diff --git a/application/controllers/api/v1/education/Lvinfo.php b/application/controllers/api/v1/education/Lvinfo.php index 8631583b9..d0cdb637b 100644 --- a/application/controllers/api/v1/education/Lvinfo.php +++ b/application/controllers/api/v1/education/Lvinfo.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lvinfo extends APIv1_Controller +class Lvinfo extends API_Controller { /** * Lvinfo API constructor. diff --git a/application/controllers/api/v1/education/Lvregel.php b/application/controllers/api/v1/education/Lvregel.php index 33410cb88..0334c8ff2 100644 --- a/application/controllers/api/v1/education/Lvregel.php +++ b/application/controllers/api/v1/education/Lvregel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lvregel extends APIv1_Controller +class Lvregel extends API_Controller { /** * Lvregel API constructor. diff --git a/application/controllers/api/v1/education/Lvregeltyp.php b/application/controllers/api/v1/education/Lvregeltyp.php index 22fe0a9ff..9e7b90f22 100644 --- a/application/controllers/api/v1/education/Lvregeltyp.php +++ b/application/controllers/api/v1/education/Lvregeltyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lvregeltyp extends APIv1_Controller +class Lvregeltyp extends API_Controller { /** * Lvregeltyp API constructor. diff --git a/application/controllers/api/v1/education/Notenschluessel.php b/application/controllers/api/v1/education/Notenschluessel.php index 91c7c513e..415a6c252 100644 --- a/application/controllers/api/v1/education/Notenschluessel.php +++ b/application/controllers/api/v1/education/Notenschluessel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Notenschluessel extends APIv1_Controller +class Notenschluessel extends API_Controller { /** * Notenschluessel API constructor. diff --git a/application/controllers/api/v1/education/Notenschluesselaufteilung.php b/application/controllers/api/v1/education/Notenschluesselaufteilung.php index 1e4b168ef..11d325183 100644 --- a/application/controllers/api/v1/education/Notenschluesselaufteilung.php +++ b/application/controllers/api/v1/education/Notenschluesselaufteilung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Notenschluesselaufteilung extends APIv1_Controller +class Notenschluesselaufteilung extends API_Controller { /** * Notenschluesselaufteilung API constructor. diff --git a/application/controllers/api/v1/education/Notenschluesseluebung.php b/application/controllers/api/v1/education/Notenschluesseluebung.php index bb907f4ff..c1f13633e 100644 --- a/application/controllers/api/v1/education/Notenschluesseluebung.php +++ b/application/controllers/api/v1/education/Notenschluesseluebung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Notenschluesseluebung extends APIv1_Controller +class Notenschluesseluebung extends API_Controller { /** * Notenschluesseluebung API constructor. diff --git a/application/controllers/api/v1/education/Notenschluesselzuordnung.php b/application/controllers/api/v1/education/Notenschluesselzuordnung.php index a4e7d757a..af4295fcd 100644 --- a/application/controllers/api/v1/education/Notenschluesselzuordnung.php +++ b/application/controllers/api/v1/education/Notenschluesselzuordnung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Notenschluesselzuordnung extends APIv1_Controller +class Notenschluesselzuordnung extends API_Controller { /** * Notenschluesselzuordnung API constructor. diff --git a/application/controllers/api/v1/education/Paabgabe.php b/application/controllers/api/v1/education/Paabgabe.php index 87e9c2ec7..716fb7574 100644 --- a/application/controllers/api/v1/education/Paabgabe.php +++ b/application/controllers/api/v1/education/Paabgabe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Paabgabe extends APIv1_Controller +class Paabgabe extends API_Controller { /** * Paabgabe API constructor. diff --git a/application/controllers/api/v1/education/Paabgabetyp.php b/application/controllers/api/v1/education/Paabgabetyp.php index 999cbd57b..117c4ffd1 100644 --- a/application/controllers/api/v1/education/Paabgabetyp.php +++ b/application/controllers/api/v1/education/Paabgabetyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Paabgabetyp extends APIv1_Controller +class Paabgabetyp extends API_Controller { /** * Paabgabetyp API constructor. diff --git a/application/controllers/api/v1/education/Projektarbeit.php b/application/controllers/api/v1/education/Projektarbeit.php index 1b09fa4e7..0a77a9e64 100644 --- a/application/controllers/api/v1/education/Projektarbeit.php +++ b/application/controllers/api/v1/education/Projektarbeit.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projektarbeit extends APIv1_Controller +class Projektarbeit extends API_Controller { /** * Projektarbeit API constructor. diff --git a/application/controllers/api/v1/education/Projektbetreuer.php b/application/controllers/api/v1/education/Projektbetreuer.php index b395b7e5f..e0a078a51 100644 --- a/application/controllers/api/v1/education/Projektbetreuer.php +++ b/application/controllers/api/v1/education/Projektbetreuer.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projektbetreuer extends APIv1_Controller +class Projektbetreuer extends API_Controller { /** * Projektbetreuer API constructor. diff --git a/application/controllers/api/v1/education/Projekttyp.php b/application/controllers/api/v1/education/Projekttyp.php index bf4c5d73a..f75fd6477 100644 --- a/application/controllers/api/v1/education/Projekttyp.php +++ b/application/controllers/api/v1/education/Projekttyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projekttyp extends APIv1_Controller +class Projekttyp extends API_Controller { /** * Projekttyp API constructor. diff --git a/application/controllers/api/v1/education/Pruefung.php b/application/controllers/api/v1/education/Pruefung.php index 23fc97c8d..8218b63b0 100644 --- a/application/controllers/api/v1/education/Pruefung.php +++ b/application/controllers/api/v1/education/Pruefung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefung extends APIv1_Controller +class Pruefung extends API_Controller { /** * Pruefung API constructor. diff --git a/application/controllers/api/v1/education/Pruefungsanmeldung.php b/application/controllers/api/v1/education/Pruefungsanmeldung.php index d65ded0b4..8ffbbc0cf 100644 --- a/application/controllers/api/v1/education/Pruefungsanmeldung.php +++ b/application/controllers/api/v1/education/Pruefungsanmeldung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefungsanmeldung extends APIv1_Controller +class Pruefungsanmeldung extends API_Controller { /** * Pruefungsanmeldung API constructor. diff --git a/application/controllers/api/v1/education/Pruefungsfenster.php b/application/controllers/api/v1/education/Pruefungsfenster.php index 50d13cff5..8e4c3af99 100644 --- a/application/controllers/api/v1/education/Pruefungsfenster.php +++ b/application/controllers/api/v1/education/Pruefungsfenster.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefungsfenster extends APIv1_Controller +class Pruefungsfenster extends API_Controller { /** * Pruefungsfenster API constructor. diff --git a/application/controllers/api/v1/education/Pruefungsstatus.php b/application/controllers/api/v1/education/Pruefungsstatus.php index cbfbfb044..c2bfe6f9b 100644 --- a/application/controllers/api/v1/education/Pruefungsstatus.php +++ b/application/controllers/api/v1/education/Pruefungsstatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefungsstatus extends APIv1_Controller +class Pruefungsstatus extends API_Controller { /** * Pruefungsstatus API constructor. diff --git a/application/controllers/api/v1/education/Pruefungstermin.php b/application/controllers/api/v1/education/Pruefungstermin.php index fd16159dc..d6b61e7f7 100644 --- a/application/controllers/api/v1/education/Pruefungstermin.php +++ b/application/controllers/api/v1/education/Pruefungstermin.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefungstermin extends APIv1_Controller +class Pruefungstermin extends API_Controller { /** * Pruefungstermin API constructor. diff --git a/application/controllers/api/v1/education/Pruefungstyp.php b/application/controllers/api/v1/education/Pruefungstyp.php index 4c460d5cd..7e0707c17 100644 --- a/application/controllers/api/v1/education/Pruefungstyp.php +++ b/application/controllers/api/v1/education/Pruefungstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefungstyp extends APIv1_Controller +class Pruefungstyp extends API_Controller { /** * Pruefungstyp API constructor. diff --git a/application/controllers/api/v1/education/Studentbeispiel.php b/application/controllers/api/v1/education/Studentbeispiel.php index 45012231a..504614334 100644 --- a/application/controllers/api/v1/education/Studentbeispiel.php +++ b/application/controllers/api/v1/education/Studentbeispiel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studentbeispiel extends APIv1_Controller +class Studentbeispiel extends API_Controller { /** * Studentbeispiel API constructor. diff --git a/application/controllers/api/v1/education/Studentlehrverband.php b/application/controllers/api/v1/education/Studentlehrverband.php index 4793b0b1b..7bae1e375 100644 --- a/application/controllers/api/v1/education/Studentlehrverband.php +++ b/application/controllers/api/v1/education/Studentlehrverband.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studentlehrverband extends APIv1_Controller +class Studentlehrverband extends API_Controller { /** * Studentlehrverband API constructor. diff --git a/application/controllers/api/v1/education/Studentuebung.php b/application/controllers/api/v1/education/Studentuebung.php index 2a086610c..e36add29e 100644 --- a/application/controllers/api/v1/education/Studentuebung.php +++ b/application/controllers/api/v1/education/Studentuebung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studentuebung extends APIv1_Controller +class Studentuebung extends API_Controller { /** * Studentuebung API constructor. diff --git a/application/controllers/api/v1/education/Uebung.php b/application/controllers/api/v1/education/Uebung.php index 41d8f8448..e6e27560d 100644 --- a/application/controllers/api/v1/education/Uebung.php +++ b/application/controllers/api/v1/education/Uebung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Uebung extends APIv1_Controller +class Uebung extends API_Controller { /** * Uebung API constructor. diff --git a/application/controllers/api/v1/education/Zeugnis.php b/application/controllers/api/v1/education/Zeugnis.php index 86af07284..a58eadcce 100644 --- a/application/controllers/api/v1/education/Zeugnis.php +++ b/application/controllers/api/v1/education/Zeugnis.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeugnis extends APIv1_Controller +class Zeugnis extends API_Controller { /** * Zeugnis API constructor. diff --git a/application/controllers/api/v1/education/Zeugnisnote.php b/application/controllers/api/v1/education/Zeugnisnote.php index 10083865e..9a00e0c23 100644 --- a/application/controllers/api/v1/education/Zeugnisnote.php +++ b/application/controllers/api/v1/education/Zeugnisnote.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeugnisnote extends APIv1_Controller +class Zeugnisnote extends API_Controller { /** * Zeugnisnote API constructor. diff --git a/application/controllers/api/v1/organisation/Erhalter.php b/application/controllers/api/v1/organisation/Erhalter.php index 0098f7fcc..e4b2532de 100644 --- a/application/controllers/api/v1/organisation/Erhalter.php +++ b/application/controllers/api/v1/organisation/Erhalter.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Erhalter extends APIv1_Controller +class Erhalter extends API_Controller { /** * Erhalter API constructor. diff --git a/application/controllers/api/v1/organisation/Fachbereich2.php b/application/controllers/api/v1/organisation/Fachbereich2.php index a2d3d3838..dc6af4253 100644 --- a/application/controllers/api/v1/organisation/Fachbereich2.php +++ b/application/controllers/api/v1/organisation/Fachbereich2.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Fachbereich2 extends APIv1_Controller +class Fachbereich2 extends API_Controller { /** * Fachbereich API constructor. diff --git a/application/controllers/api/v1/organisation/Ferien.php b/application/controllers/api/v1/organisation/Ferien.php index e943a7e66..f74ab37c1 100644 --- a/application/controllers/api/v1/organisation/Ferien.php +++ b/application/controllers/api/v1/organisation/Ferien.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Ferien extends APIv1_Controller +class Ferien extends API_Controller { /** * Ferien API constructor. diff --git a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php index 2dfa9f400..9284f7d47 100644 --- a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php +++ b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Geschaeftsjahr2 extends APIv1_Controller +class Geschaeftsjahr2 extends API_Controller { /** * Geschaeftsjahr API constructor. diff --git a/application/controllers/api/v1/organisation/Gruppe.php b/application/controllers/api/v1/organisation/Gruppe.php index e3ef92fa4..41727dfcf 100644 --- a/application/controllers/api/v1/organisation/Gruppe.php +++ b/application/controllers/api/v1/organisation/Gruppe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Gruppe extends APIv1_Controller +class Gruppe extends API_Controller { /** * Gruppe API constructor. diff --git a/application/controllers/api/v1/organisation/Lehrverband.php b/application/controllers/api/v1/organisation/Lehrverband.php index 9b12dcf90..b9981a1cd 100644 --- a/application/controllers/api/v1/organisation/Lehrverband.php +++ b/application/controllers/api/v1/organisation/Lehrverband.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrverband extends APIv1_Controller +class Lehrverband extends API_Controller { /** * Lehrverband API constructor. diff --git a/application/controllers/api/v1/organisation/Organisationseinheit2.php b/application/controllers/api/v1/organisation/Organisationseinheit2.php index 3f62bbdf1..a828da0ae 100644 --- a/application/controllers/api/v1/organisation/Organisationseinheit2.php +++ b/application/controllers/api/v1/organisation/Organisationseinheit2.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Organisationseinheit2 extends APIv1_Controller +class Organisationseinheit2 extends API_Controller { /** * Organisationseinheit API constructor. diff --git a/application/controllers/api/v1/organisation/Organisationseinheittyp.php b/application/controllers/api/v1/organisation/Organisationseinheittyp.php index 62a723b1e..3f5925f63 100644 --- a/application/controllers/api/v1/organisation/Organisationseinheittyp.php +++ b/application/controllers/api/v1/organisation/Organisationseinheittyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Organisationseinheittyp extends APIv1_Controller +class Organisationseinheittyp extends API_Controller { /** * Organisationseinheittyp API constructor. diff --git a/application/controllers/api/v1/organisation/Semesterwochen.php b/application/controllers/api/v1/organisation/Semesterwochen.php index 2dbd26ab0..0bab990bd 100644 --- a/application/controllers/api/v1/organisation/Semesterwochen.php +++ b/application/controllers/api/v1/organisation/Semesterwochen.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Semesterwochen extends APIv1_Controller +class Semesterwochen extends API_Controller { /** * Semesterwochen API constructor. diff --git a/application/controllers/api/v1/organisation/Service.php b/application/controllers/api/v1/organisation/Service.php index 4d1988430..80c971ba4 100644 --- a/application/controllers/api/v1/organisation/Service.php +++ b/application/controllers/api/v1/organisation/Service.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Service extends APIv1_Controller +class Service extends API_Controller { /** * Service API constructor. diff --git a/application/controllers/api/v1/organisation/Standort.php b/application/controllers/api/v1/organisation/Standort.php index 16c206401..a9b7a76ec 100644 --- a/application/controllers/api/v1/organisation/Standort.php +++ b/application/controllers/api/v1/organisation/Standort.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Standort extends APIv1_Controller +class Standort extends API_Controller { /** * Standort API constructor. diff --git a/application/controllers/api/v1/organisation/Statistik.php b/application/controllers/api/v1/organisation/Statistik.php index b85c27f42..0c0cbe133 100644 --- a/application/controllers/api/v1/organisation/Statistik.php +++ b/application/controllers/api/v1/organisation/Statistik.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Statistik extends APIv1_Controller +class Statistik extends API_Controller { /** * Statistik API constructor. diff --git a/application/controllers/api/v1/organisation/Studiengang2.php b/application/controllers/api/v1/organisation/Studiengang2.php index 2e1b549ff..5e8ddfe9e 100644 --- a/application/controllers/api/v1/organisation/Studiengang2.php +++ b/application/controllers/api/v1/organisation/Studiengang2.php @@ -13,7 +13,7 @@ // ------------------------------------------------------------------------ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studiengang2 extends APIv1_Controller +class Studiengang2 extends API_Controller { /** * diff --git a/application/controllers/api/v1/organisation/Studiengangstyp.php b/application/controllers/api/v1/organisation/Studiengangstyp.php index b10811636..e637e0c9d 100644 --- a/application/controllers/api/v1/organisation/Studiengangstyp.php +++ b/application/controllers/api/v1/organisation/Studiengangstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studiengangstyp extends APIv1_Controller +class Studiengangstyp extends API_Controller { /** * Studiengangstyp API constructor. diff --git a/application/controllers/api/v1/organisation/Studienjahr.php b/application/controllers/api/v1/organisation/Studienjahr.php index eb7c38847..b681e8864 100644 --- a/application/controllers/api/v1/organisation/Studienjahr.php +++ b/application/controllers/api/v1/organisation/Studienjahr.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studienjahr extends APIv1_Controller +class Studienjahr extends API_Controller { /** * Studienjahr API constructor. diff --git a/application/controllers/api/v1/organisation/Studienordnung.php b/application/controllers/api/v1/organisation/Studienordnung.php index 122c8f099..541eccbf2 100644 --- a/application/controllers/api/v1/organisation/Studienordnung.php +++ b/application/controllers/api/v1/organisation/Studienordnung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studienordnung extends APIv1_Controller +class Studienordnung extends API_Controller { /** * Studienordnung API constructor. diff --git a/application/controllers/api/v1/organisation/Studienordnungstatus.php b/application/controllers/api/v1/organisation/Studienordnungstatus.php index 30d38c4ad..8de5cf126 100644 --- a/application/controllers/api/v1/organisation/Studienordnungstatus.php +++ b/application/controllers/api/v1/organisation/Studienordnungstatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studienordnungstatus extends APIv1_Controller +class Studienordnungstatus extends API_Controller { /** * Studienordnungstatus API constructor. diff --git a/application/controllers/api/v1/organisation/Studienplan.php b/application/controllers/api/v1/organisation/Studienplan.php index 05d8d7837..f461565d3 100644 --- a/application/controllers/api/v1/organisation/Studienplan.php +++ b/application/controllers/api/v1/organisation/Studienplan.php @@ -14,7 +14,7 @@ if (!defined("BASEPATH")) exit("No direct script access allowed"); -class Studienplan extends APIv1_Controller +class Studienplan extends API_Controller { /** * Course API constructor. diff --git a/application/controllers/api/v1/organisation/Studienplatz.php b/application/controllers/api/v1/organisation/Studienplatz.php index 88ce6a12d..217fa40a7 100644 --- a/application/controllers/api/v1/organisation/Studienplatz.php +++ b/application/controllers/api/v1/organisation/Studienplatz.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studienplatz extends APIv1_Controller +class Studienplatz extends API_Controller { /** * Studienplatz API constructor. diff --git a/application/controllers/api/v1/organisation/Studiensemester.php b/application/controllers/api/v1/organisation/Studiensemester.php index f714214d9..619bc2dba 100644 --- a/application/controllers/api/v1/organisation/Studiensemester.php +++ b/application/controllers/api/v1/organisation/Studiensemester.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Studiensemester extends APIv1_Controller +class Studiensemester extends API_Controller { /** * Studiensemester API constructor. diff --git a/application/controllers/api/v1/person/Adresse.php b/application/controllers/api/v1/person/Adresse.php index ddbbfe554..153423ac0 100644 --- a/application/controllers/api/v1/person/Adresse.php +++ b/application/controllers/api/v1/person/Adresse.php @@ -15,7 +15,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -class Adresse extends APIv1_Controller +class Adresse extends API_Controller { /** * Person API constructor. diff --git a/application/controllers/api/v1/person/Bankverbindung.php b/application/controllers/api/v1/person/Bankverbindung.php index 06f6b040d..2c524e0ab 100644 --- a/application/controllers/api/v1/person/Bankverbindung.php +++ b/application/controllers/api/v1/person/Bankverbindung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Bankverbindung extends APIv1_Controller +class Bankverbindung extends API_Controller { /** * Bankverbindung API constructor. diff --git a/application/controllers/api/v1/person/Benutzer.php b/application/controllers/api/v1/person/Benutzer.php index f1ea4f149..d983103c8 100644 --- a/application/controllers/api/v1/person/Benutzer.php +++ b/application/controllers/api/v1/person/Benutzer.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Benutzer extends APIv1_Controller +class Benutzer extends API_Controller { /** * Benutzer API constructor. diff --git a/application/controllers/api/v1/person/Benutzerfunktion.php b/application/controllers/api/v1/person/Benutzerfunktion.php index 98fd8654a..75b338df0 100644 --- a/application/controllers/api/v1/person/Benutzerfunktion.php +++ b/application/controllers/api/v1/person/Benutzerfunktion.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Benutzerfunktion extends APIv1_Controller +class Benutzerfunktion extends API_Controller { /** * Benutzerfunktion API constructor. diff --git a/application/controllers/api/v1/person/Benutzergruppe.php b/application/controllers/api/v1/person/Benutzergruppe.php index 0adc8c73a..cf14d6d5a 100644 --- a/application/controllers/api/v1/person/Benutzergruppe.php +++ b/application/controllers/api/v1/person/Benutzergruppe.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Benutzergruppe extends APIv1_Controller +class Benutzergruppe extends API_Controller { /** * Benutzergruppe API constructor. diff --git a/application/controllers/api/v1/person/Fotostatus.php b/application/controllers/api/v1/person/Fotostatus.php index acd1ef5b6..1b64f43f7 100644 --- a/application/controllers/api/v1/person/Fotostatus.php +++ b/application/controllers/api/v1/person/Fotostatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Fotostatus extends APIv1_Controller +class Fotostatus extends API_Controller { /** * Fotostatus API constructor. diff --git a/application/controllers/api/v1/person/Freebusy.php b/application/controllers/api/v1/person/Freebusy.php index eb1651c00..435073d2f 100644 --- a/application/controllers/api/v1/person/Freebusy.php +++ b/application/controllers/api/v1/person/Freebusy.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Freebusy extends APIv1_Controller +class Freebusy extends API_Controller { /** * Freebusy API constructor. diff --git a/application/controllers/api/v1/person/Freebusytyp.php b/application/controllers/api/v1/person/Freebusytyp.php index 0187035d1..a05c4d142 100644 --- a/application/controllers/api/v1/person/Freebusytyp.php +++ b/application/controllers/api/v1/person/Freebusytyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Freebusytyp extends APIv1_Controller +class Freebusytyp extends API_Controller { /** * Freebusytyp API constructor. diff --git a/application/controllers/api/v1/person/Kontakt.php b/application/controllers/api/v1/person/Kontakt.php index fceeaaeaf..0d925b7ac 100644 --- a/application/controllers/api/v1/person/Kontakt.php +++ b/application/controllers/api/v1/person/Kontakt.php @@ -15,7 +15,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -class Kontakt extends APIv1_Controller +class Kontakt extends API_Controller { /** * Person API constructor. diff --git a/application/controllers/api/v1/person/Kontaktmedium.php b/application/controllers/api/v1/person/Kontaktmedium.php index b732d6eee..bfda0d7fe 100644 --- a/application/controllers/api/v1/person/Kontaktmedium.php +++ b/application/controllers/api/v1/person/Kontaktmedium.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Kontaktmedium extends APIv1_Controller +class Kontaktmedium extends API_Controller { /** * Kontaktmedium API constructor. diff --git a/application/controllers/api/v1/person/Kontakttyp.php b/application/controllers/api/v1/person/Kontakttyp.php index c3d2b6e94..f4951e09a 100644 --- a/application/controllers/api/v1/person/Kontakttyp.php +++ b/application/controllers/api/v1/person/Kontakttyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Kontakttyp extends APIv1_Controller +class Kontakttyp extends API_Controller { /** * Kontakttyp API constructor. diff --git a/application/controllers/api/v1/person/Notiz.php b/application/controllers/api/v1/person/Notiz.php index 29755d7d3..96a527c93 100644 --- a/application/controllers/api/v1/person/Notiz.php +++ b/application/controllers/api/v1/person/Notiz.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Notiz extends APIv1_Controller +class Notiz extends API_Controller { /** * Notiz API constructor. diff --git a/application/controllers/api/v1/person/Notizzuordnung.php b/application/controllers/api/v1/person/Notizzuordnung.php index da185e20f..39b388a3a 100644 --- a/application/controllers/api/v1/person/Notizzuordnung.php +++ b/application/controllers/api/v1/person/Notizzuordnung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Notizzuordnung extends APIv1_Controller +class Notizzuordnung extends API_Controller { /** * Notizzuordnung API constructor. diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php index c8c95ae06..628936fe0 100644 --- a/application/controllers/api/v1/person/Person.php +++ b/application/controllers/api/v1/person/Person.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Person extends APIv1_Controller +class Person extends API_Controller { /** * Person API constructor. diff --git a/application/controllers/api/v1/project/Aktivitaet.php b/application/controllers/api/v1/project/Aktivitaet.php index 7aa647058..f188448a5 100644 --- a/application/controllers/api/v1/project/Aktivitaet.php +++ b/application/controllers/api/v1/project/Aktivitaet.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aktivitaet extends APIv1_Controller +class Aktivitaet extends API_Controller { /** * Aktivitaet API constructor. diff --git a/application/controllers/api/v1/project/Aufwandstyp.php b/application/controllers/api/v1/project/Aufwandstyp.php index 96be6ab55..ee2df5b29 100644 --- a/application/controllers/api/v1/project/Aufwandstyp.php +++ b/application/controllers/api/v1/project/Aufwandstyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Aufwandstyp extends APIv1_Controller +class Aufwandstyp extends API_Controller { /** * Aufwandstyp API constructor. diff --git a/application/controllers/api/v1/project/Projekt.php b/application/controllers/api/v1/project/Projekt.php index 64533f36f..370876ed3 100644 --- a/application/controllers/api/v1/project/Projekt.php +++ b/application/controllers/api/v1/project/Projekt.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projekt extends APIv1_Controller +class Projekt extends API_Controller { /** * Projekt API constructor. diff --git a/application/controllers/api/v1/project/Projekt_ressource.php b/application/controllers/api/v1/project/Projekt_ressource.php index 2869f935a..030a7f73c 100644 --- a/application/controllers/api/v1/project/Projekt_ressource.php +++ b/application/controllers/api/v1/project/Projekt_ressource.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projekt_ressource extends APIv1_Controller +class Projekt_ressource extends API_Controller { /** * Projekt_ressource API constructor. diff --git a/application/controllers/api/v1/project/Projektphase.php b/application/controllers/api/v1/project/Projektphase.php index c48893948..d4754fccb 100644 --- a/application/controllers/api/v1/project/Projektphase.php +++ b/application/controllers/api/v1/project/Projektphase.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projektphase extends APIv1_Controller +class Projektphase extends API_Controller { /** * Projektphase API constructor. diff --git a/application/controllers/api/v1/project/Projekttask.php b/application/controllers/api/v1/project/Projekttask.php index 5793c85a1..048c7f9fd 100644 --- a/application/controllers/api/v1/project/Projekttask.php +++ b/application/controllers/api/v1/project/Projekttask.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Projekttask extends APIv1_Controller +class Projekttask extends API_Controller { /** * Projekttask API constructor. diff --git a/application/controllers/api/v1/project/Ressource.php b/application/controllers/api/v1/project/Ressource.php index fddf77c57..45ebe2089 100644 --- a/application/controllers/api/v1/project/Ressource.php +++ b/application/controllers/api/v1/project/Ressource.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Ressource extends APIv1_Controller +class Ressource extends API_Controller { /** * Ressource API constructor. diff --git a/application/controllers/api/v1/project/Scrumsprint.php b/application/controllers/api/v1/project/Scrumsprint.php index ff0e75b09..6be2ba152 100644 --- a/application/controllers/api/v1/project/Scrumsprint.php +++ b/application/controllers/api/v1/project/Scrumsprint.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Scrumsprint extends APIv1_Controller +class Scrumsprint extends API_Controller { /** * Scrumsprint API constructor. diff --git a/application/controllers/api/v1/ressource/Betriebsmittel.php b/application/controllers/api/v1/ressource/Betriebsmittel.php index 63e003cfd..3f7306167 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittel.php +++ b/application/controllers/api/v1/ressource/Betriebsmittel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Betriebsmittel extends APIv1_Controller +class Betriebsmittel extends API_Controller { /** * Betriebsmittel API constructor. diff --git a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php index 71b5af77a..ba3a304c4 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php +++ b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Betriebsmittelperson2 extends APIv1_Controller +class Betriebsmittelperson2 extends API_Controller { /** * Betriebsmittelperson API constructor. diff --git a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php index 8dcfad8c6..11b485f97 100644 --- a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php +++ b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Betriebsmittelstatus extends APIv1_Controller +class Betriebsmittelstatus extends API_Controller { /** * Betriebsmittelstatus API constructor. diff --git a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php index 9902ec032..bc383fd9c 100644 --- a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php +++ b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Betriebsmitteltyp extends APIv1_Controller +class Betriebsmitteltyp extends API_Controller { /** * Betriebsmitteltyp API constructor. diff --git a/application/controllers/api/v1/ressource/Coodle.php b/application/controllers/api/v1/ressource/Coodle.php index bd7cfcf7f..b9c92e1bb 100644 --- a/application/controllers/api/v1/ressource/Coodle.php +++ b/application/controllers/api/v1/ressource/Coodle.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Coodle extends APIv1_Controller +class Coodle extends API_Controller { /** * Coodle API constructor. diff --git a/application/controllers/api/v1/ressource/Erreichbarkeit.php b/application/controllers/api/v1/ressource/Erreichbarkeit.php index 291451faf..080ac258c 100644 --- a/application/controllers/api/v1/ressource/Erreichbarkeit.php +++ b/application/controllers/api/v1/ressource/Erreichbarkeit.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Erreichbarkeit extends APIv1_Controller +class Erreichbarkeit extends API_Controller { /** * Erreichbarkeit API constructor. diff --git a/application/controllers/api/v1/ressource/Firma.php b/application/controllers/api/v1/ressource/Firma.php index 159d63642..e18799253 100644 --- a/application/controllers/api/v1/ressource/Firma.php +++ b/application/controllers/api/v1/ressource/Firma.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Firma extends APIv1_Controller +class Firma extends API_Controller { /** * Firma API constructor. diff --git a/application/controllers/api/v1/ressource/Firmatag.php b/application/controllers/api/v1/ressource/Firmatag.php index b9df31896..e2e98d7a8 100644 --- a/application/controllers/api/v1/ressource/Firmatag.php +++ b/application/controllers/api/v1/ressource/Firmatag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Firmatag extends APIv1_Controller +class Firmatag extends API_Controller { /** * Firmatag API constructor. diff --git a/application/controllers/api/v1/ressource/Firmentyp.php b/application/controllers/api/v1/ressource/Firmentyp.php index 2d13ae845..268428f40 100644 --- a/application/controllers/api/v1/ressource/Firmentyp.php +++ b/application/controllers/api/v1/ressource/Firmentyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Firmentyp extends APIv1_Controller +class Firmentyp extends API_Controller { /** * Firmentyp API constructor. diff --git a/application/controllers/api/v1/ressource/Funktion.php b/application/controllers/api/v1/ressource/Funktion.php index 0ff059d2a..0f18b7649 100644 --- a/application/controllers/api/v1/ressource/Funktion.php +++ b/application/controllers/api/v1/ressource/Funktion.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Funktion extends APIv1_Controller +class Funktion extends API_Controller { /** * Funktion API constructor. diff --git a/application/controllers/api/v1/ressource/Lehrmittel.php b/application/controllers/api/v1/ressource/Lehrmittel.php index 36d0d7a2f..6cb5ea9bb 100644 --- a/application/controllers/api/v1/ressource/Lehrmittel.php +++ b/application/controllers/api/v1/ressource/Lehrmittel.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Lehrmittel extends APIv1_Controller +class Lehrmittel extends API_Controller { /** * Lehrmittel API constructor. diff --git a/application/controllers/api/v1/ressource/Mitarbeiter.php b/application/controllers/api/v1/ressource/Mitarbeiter.php index 70f4b441c..359088074 100644 --- a/application/controllers/api/v1/ressource/Mitarbeiter.php +++ b/application/controllers/api/v1/ressource/Mitarbeiter.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Mitarbeiter extends APIv1_Controller +class Mitarbeiter extends API_Controller { /** * Mitarbeiter API constructor. diff --git a/application/controllers/api/v1/ressource/Ort.php b/application/controllers/api/v1/ressource/Ort.php index a49bbe2fb..7937c3816 100644 --- a/application/controllers/api/v1/ressource/Ort.php +++ b/application/controllers/api/v1/ressource/Ort.php @@ -14,7 +14,7 @@ if (!defined("BASEPATH")) exit("No direct script access allowed"); -class Ort extends APIv1_Controller +class Ort extends API_Controller { /** * Ort API constructor. diff --git a/application/controllers/api/v1/ressource/Ortraumtyp.php b/application/controllers/api/v1/ressource/Ortraumtyp.php index cbf9c3d9b..fe3c628b6 100644 --- a/application/controllers/api/v1/ressource/Ortraumtyp.php +++ b/application/controllers/api/v1/ressource/Ortraumtyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Ortraumtyp extends APIv1_Controller +class Ortraumtyp extends API_Controller { /** * Ortraumtyp API constructor. diff --git a/application/controllers/api/v1/ressource/Personfunktionstandort.php b/application/controllers/api/v1/ressource/Personfunktionstandort.php index 1c7551984..251d2c7ae 100644 --- a/application/controllers/api/v1/ressource/Personfunktionstandort.php +++ b/application/controllers/api/v1/ressource/Personfunktionstandort.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Personfunktionstandort extends APIv1_Controller +class Personfunktionstandort extends API_Controller { /** * Personfunktionstandort API constructor. diff --git a/application/controllers/api/v1/ressource/Raumtyp.php b/application/controllers/api/v1/ressource/Raumtyp.php index 71b7bf5d8..7ff7b5ccd 100644 --- a/application/controllers/api/v1/ressource/Raumtyp.php +++ b/application/controllers/api/v1/ressource/Raumtyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Raumtyp extends APIv1_Controller +class Raumtyp extends API_Controller { /** * Raumtyp API constructor. diff --git a/application/controllers/api/v1/ressource/Reservierung.php b/application/controllers/api/v1/ressource/Reservierung.php index 633f61036..50a0528c7 100644 --- a/application/controllers/api/v1/ressource/Reservierung.php +++ b/application/controllers/api/v1/ressource/Reservierung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Reservierung extends APIv1_Controller +class Reservierung extends API_Controller { /** * Reservierung API constructor. diff --git a/application/controllers/api/v1/ressource/Stunde.php b/application/controllers/api/v1/ressource/Stunde.php index 5d2f37049..2844860f4 100644 --- a/application/controllers/api/v1/ressource/Stunde.php +++ b/application/controllers/api/v1/ressource/Stunde.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Stunde extends APIv1_Controller +class Stunde extends API_Controller { /** * Stunde API constructor. diff --git a/application/controllers/api/v1/ressource/Stundenplan.php b/application/controllers/api/v1/ressource/Stundenplan.php index 2d4b3c705..9a6614f21 100644 --- a/application/controllers/api/v1/ressource/Stundenplan.php +++ b/application/controllers/api/v1/ressource/Stundenplan.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Stundenplan extends APIv1_Controller +class Stundenplan extends API_Controller { /** * Stundenplan API constructor. diff --git a/application/controllers/api/v1/ressource/Stundenplandev.php b/application/controllers/api/v1/ressource/Stundenplandev.php index 385f2bf9e..fa6e788c3 100644 --- a/application/controllers/api/v1/ressource/Stundenplandev.php +++ b/application/controllers/api/v1/ressource/Stundenplandev.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Stundenplandev extends APIv1_Controller +class Stundenplandev extends API_Controller { /** * Stundenplandev API constructor. diff --git a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php index 8c30390e6..74290898d 100644 --- a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php +++ b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeitaufzeichnung extends APIv1_Controller +class Zeitaufzeichnung extends API_Controller { /** * Zeitaufzeichnung API constructor. diff --git a/application/controllers/api/v1/ressource/Zeitfenster.php b/application/controllers/api/v1/ressource/Zeitfenster.php index e180d0d75..d2dd864cc 100644 --- a/application/controllers/api/v1/ressource/Zeitfenster.php +++ b/application/controllers/api/v1/ressource/Zeitfenster.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeitfenster extends APIv1_Controller +class Zeitfenster extends API_Controller { /** * Zeitfenster API constructor. diff --git a/application/controllers/api/v1/ressource/Zeitsperre.php b/application/controllers/api/v1/ressource/Zeitsperre.php index 626a88d79..a3eafd525 100644 --- a/application/controllers/api/v1/ressource/Zeitsperre.php +++ b/application/controllers/api/v1/ressource/Zeitsperre.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeitsperre extends APIv1_Controller +class Zeitsperre extends API_Controller { /** * Zeitsperre API constructor. diff --git a/application/controllers/api/v1/ressource/Zeitsperretyp.php b/application/controllers/api/v1/ressource/Zeitsperretyp.php index c70a9b2f4..aaa8ad656 100644 --- a/application/controllers/api/v1/ressource/Zeitsperretyp.php +++ b/application/controllers/api/v1/ressource/Zeitsperretyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeitsperretyp extends APIv1_Controller +class Zeitsperretyp extends API_Controller { /** * Zeitsperretyp API constructor. diff --git a/application/controllers/api/v1/ressource/Zeitwunsch.php b/application/controllers/api/v1/ressource/Zeitwunsch.php index 8d9646edc..08f031eef 100644 --- a/application/controllers/api/v1/ressource/Zeitwunsch.php +++ b/application/controllers/api/v1/ressource/Zeitwunsch.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Zeitwunsch extends APIv1_Controller +class Zeitwunsch extends API_Controller { /** * Zeitwunsch API constructor. diff --git a/application/controllers/api/v1/system/Appdaten.php b/application/controllers/api/v1/system/Appdaten.php index 3395ec9b6..34b53524b 100644 --- a/application/controllers/api/v1/system/Appdaten.php +++ b/application/controllers/api/v1/system/Appdaten.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Appdaten extends APIv1_Controller +class Appdaten extends API_Controller { /** * Appdaten API constructor. diff --git a/application/controllers/api/v1/system/Benutzerrolle.php b/application/controllers/api/v1/system/Benutzerrolle.php index 99ec3d79e..4ad4d0c25 100644 --- a/application/controllers/api/v1/system/Benutzerrolle.php +++ b/application/controllers/api/v1/system/Benutzerrolle.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Benutzerrolle extends APIv1_Controller +class Benutzerrolle extends API_Controller { /** * Benutzerrolle API constructor. diff --git a/application/controllers/api/v1/system/Berechtigung.php b/application/controllers/api/v1/system/Berechtigung.php index e94bf30f3..f88c01731 100644 --- a/application/controllers/api/v1/system/Berechtigung.php +++ b/application/controllers/api/v1/system/Berechtigung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Berechtigung extends APIv1_Controller +class Berechtigung extends API_Controller { /** * Berechtigung API constructor. diff --git a/application/controllers/api/v1/system/Cronjob.php b/application/controllers/api/v1/system/Cronjob.php index 4b3bcba82..12ebe62d7 100644 --- a/application/controllers/api/v1/system/Cronjob.php +++ b/application/controllers/api/v1/system/Cronjob.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Cronjob extends APIv1_Controller +class Cronjob extends API_Controller { /** * Cronjob API constructor. diff --git a/application/controllers/api/v1/system/Filter.php b/application/controllers/api/v1/system/Filter.php index bc217d385..eb611da64 100644 --- a/application/controllers/api/v1/system/Filter.php +++ b/application/controllers/api/v1/system/Filter.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Filter extends APIv1_Controller +class Filter extends API_Controller { /** * Filter API constructor. diff --git a/application/controllers/api/v1/system/Log.php b/application/controllers/api/v1/system/Log.php index c270922c5..7dbee8f38 100644 --- a/application/controllers/api/v1/system/Log.php +++ b/application/controllers/api/v1/system/Log.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Log extends APIv1_Controller +class Log extends API_Controller { /** * Log API constructor. diff --git a/application/controllers/api/v1/system/Message.php b/application/controllers/api/v1/system/Message.php index be87526ed..5b8433d5c 100644 --- a/application/controllers/api/v1/system/Message.php +++ b/application/controllers/api/v1/system/Message.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Message extends APIv1_Controller +class Message extends API_Controller { /** * Message API constructor. diff --git a/application/controllers/api/v1/system/Phrase.php b/application/controllers/api/v1/system/Phrase.php index 1a7846cb5..ff64dbce3 100644 --- a/application/controllers/api/v1/system/Phrase.php +++ b/application/controllers/api/v1/system/Phrase.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Phrase extends APIv1_Controller +class Phrase extends API_Controller { /** * Phrase API constructor. diff --git a/application/controllers/api/v1/system/Rolle.php b/application/controllers/api/v1/system/Rolle.php index ba257145f..e5344539e 100644 --- a/application/controllers/api/v1/system/Rolle.php +++ b/application/controllers/api/v1/system/Rolle.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Rolle extends APIv1_Controller +class Rolle extends API_Controller { /** * Rolle API constructor. diff --git a/application/controllers/api/v1/system/Rolleberechtigung.php b/application/controllers/api/v1/system/Rolleberechtigung.php index 3838dc6de..9fca1509f 100644 --- a/application/controllers/api/v1/system/Rolleberechtigung.php +++ b/application/controllers/api/v1/system/Rolleberechtigung.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Rolleberechtigung extends APIv1_Controller +class Rolleberechtigung extends API_Controller { /** * Rolleberechtigung API constructor. diff --git a/application/controllers/api/v1/system/Server.php b/application/controllers/api/v1/system/Server.php index 0f3c76655..fe6a175f1 100644 --- a/application/controllers/api/v1/system/Server.php +++ b/application/controllers/api/v1/system/Server.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Server extends APIv1_Controller +class Server extends API_Controller { /** * Server API constructor. diff --git a/application/controllers/api/v1/system/Sprache2.php b/application/controllers/api/v1/system/Sprache2.php index 3a3b7e6de..f84d9070b 100644 --- a/application/controllers/api/v1/system/Sprache2.php +++ b/application/controllers/api/v1/system/Sprache2.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Sprache2 extends APIv1_Controller +class Sprache2 extends API_Controller { /** * Sprache API constructor. diff --git a/application/controllers/api/v1/system/Tag.php b/application/controllers/api/v1/system/Tag.php index 2bcb2dec2..7ce375217 100644 --- a/application/controllers/api/v1/system/Tag.php +++ b/application/controllers/api/v1/system/Tag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Tag extends APIv1_Controller +class Tag extends API_Controller { /** * Tag API constructor. diff --git a/application/controllers/api/v1/system/UDF.php b/application/controllers/api/v1/system/UDF.php index 57d22600c..566a4c5bc 100644 --- a/application/controllers/api/v1/system/UDF.php +++ b/application/controllers/api/v1/system/UDF.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class UDF extends APIv1_Controller +class UDF extends API_Controller { /** * UDF API constructor. diff --git a/application/controllers/api/v1/system/Variable.php b/application/controllers/api/v1/system/Variable.php index 8a4e196dc..b84888b7e 100644 --- a/application/controllers/api/v1/system/Variable.php +++ b/application/controllers/api/v1/system/Variable.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Variable extends APIv1_Controller +class Variable extends API_Controller { /** * Variable API constructor. diff --git a/application/controllers/api/v1/system/Vorlage.php b/application/controllers/api/v1/system/Vorlage.php index 48a73ac4f..24db38570 100644 --- a/application/controllers/api/v1/system/Vorlage.php +++ b/application/controllers/api/v1/system/Vorlage.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Vorlage extends APIv1_Controller +class Vorlage extends API_Controller { /** * Vorlage API constructor. diff --git a/application/controllers/api/v1/system/Vorlagestudiengang.php b/application/controllers/api/v1/system/Vorlagestudiengang.php index dbbe23e1e..e28533f99 100644 --- a/application/controllers/api/v1/system/Vorlagestudiengang.php +++ b/application/controllers/api/v1/system/Vorlagestudiengang.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Vorlagestudiengang extends APIv1_Controller +class Vorlagestudiengang extends API_Controller { /** * Vorlagestudiengang API constructor. diff --git a/application/controllers/api/v1/system/Webservicelog.php b/application/controllers/api/v1/system/Webservicelog.php index ece2e2ff6..cb7882ad6 100644 --- a/application/controllers/api/v1/system/Webservicelog.php +++ b/application/controllers/api/v1/system/Webservicelog.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Webservicelog extends APIv1_Controller +class Webservicelog extends API_Controller { /** * Webservicelog API constructor. diff --git a/application/controllers/api/v1/system/Webservicerecht.php b/application/controllers/api/v1/system/Webservicerecht.php index 4f281edaa..0031675ce 100644 --- a/application/controllers/api/v1/system/Webservicerecht.php +++ b/application/controllers/api/v1/system/Webservicerecht.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Webservicerecht extends APIv1_Controller +class Webservicerecht extends API_Controller { /** * Webservicerecht API constructor. diff --git a/application/controllers/api/v1/system/Webservicetyp.php b/application/controllers/api/v1/system/Webservicetyp.php index 09303c87c..c77745319 100644 --- a/application/controllers/api/v1/system/Webservicetyp.php +++ b/application/controllers/api/v1/system/Webservicetyp.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Webservicetyp extends APIv1_Controller +class Webservicetyp extends API_Controller { /** * Webservicetyp API constructor. diff --git a/application/controllers/api/v1/testtool/Ablauf.php b/application/controllers/api/v1/testtool/Ablauf.php index f2e7d9d63..9d5ae9a8d 100644 --- a/application/controllers/api/v1/testtool/Ablauf.php +++ b/application/controllers/api/v1/testtool/Ablauf.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Ablauf extends APIv1_Controller +class Ablauf extends API_Controller { /** * Ablauf API constructor. diff --git a/application/controllers/api/v1/testtool/Antwort.php b/application/controllers/api/v1/testtool/Antwort.php index 7730dd3e9..db7d970a5 100644 --- a/application/controllers/api/v1/testtool/Antwort.php +++ b/application/controllers/api/v1/testtool/Antwort.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Antwort extends APIv1_Controller +class Antwort extends API_Controller { /** * Antwort API constructor. diff --git a/application/controllers/api/v1/testtool/Frage.php b/application/controllers/api/v1/testtool/Frage.php index 83989956a..e6f7a7ea7 100644 --- a/application/controllers/api/v1/testtool/Frage.php +++ b/application/controllers/api/v1/testtool/Frage.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Frage extends APIv1_Controller +class Frage extends API_Controller { /** * Frage API constructor. diff --git a/application/controllers/api/v1/testtool/Gebiet.php b/application/controllers/api/v1/testtool/Gebiet.php index 12cba24ab..dda2b98a1 100644 --- a/application/controllers/api/v1/testtool/Gebiet.php +++ b/application/controllers/api/v1/testtool/Gebiet.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Gebiet extends APIv1_Controller +class Gebiet extends API_Controller { /** * Gebiet API constructor. diff --git a/application/controllers/api/v1/testtool/Kategorie.php b/application/controllers/api/v1/testtool/Kategorie.php index 5058ac76d..c0e84a61b 100644 --- a/application/controllers/api/v1/testtool/Kategorie.php +++ b/application/controllers/api/v1/testtool/Kategorie.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Kategorie extends APIv1_Controller +class Kategorie extends API_Controller { /** * Kategorie API constructor. diff --git a/application/controllers/api/v1/testtool/Kriterien.php b/application/controllers/api/v1/testtool/Kriterien.php index 2420dcb62..e00932afe 100644 --- a/application/controllers/api/v1/testtool/Kriterien.php +++ b/application/controllers/api/v1/testtool/Kriterien.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Kriterien extends APIv1_Controller +class Kriterien extends API_Controller { /** * Kriterien API constructor. diff --git a/application/controllers/api/v1/testtool/Pruefling.php b/application/controllers/api/v1/testtool/Pruefling.php index 3a471035e..626bb2760 100644 --- a/application/controllers/api/v1/testtool/Pruefling.php +++ b/application/controllers/api/v1/testtool/Pruefling.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Pruefling extends APIv1_Controller +class Pruefling extends API_Controller { /** * Pruefling API constructor. diff --git a/application/controllers/api/v1/testtool/Vorschlag.php b/application/controllers/api/v1/testtool/Vorschlag.php index 0874b384a..5392c8aa2 100644 --- a/application/controllers/api/v1/testtool/Vorschlag.php +++ b/application/controllers/api/v1/testtool/Vorschlag.php @@ -14,7 +14,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -class Vorschlag extends APIv1_Controller +class Vorschlag extends API_Controller { /** * Vorschlag API constructor. diff --git a/application/core/API_Controller.php b/application/core/API_Controller.php new file mode 100644 index 000000000..db78ac6ad --- /dev/null +++ b/application/core/API_Controller.php @@ -0,0 +1,124 @@ +_requiredPermissions = $requiredPermissions; + + // Loads LogLib with different debug trace levels to get data of the job that extends this class + // It also specify parameters to set database fields + $this->load->library('LogLib', array( + 'classIndex' => 5, + 'functionIndex' => 5, + 'lineIndex' => 4, + 'dbLogType' => 'API', // required + 'dbExecuteUser' => 'RESTful API' + )); + } + + /** + * This method is automatically called by CodeIgniter after the execution of the constructor is completed + * - Cheks if the Authlib was loaded, if not it means that the authentication failed + * - Loads the permsission lib and calls permissionlib->isEntitled + * - Checks if the caller is allowed to access to this content with the given permissions + * if it is not allowed will set the HTTP header with code 401 + * - Calls the parent (REST_Controller) _remap method to performs other checks + * NOTE: this methods override the parent method!!! + */ + public function _remap($object_called, $arguments = []) + { + if (isset($this->authlib)) // if set then the authentication is ok + { + // Loads permission lib + $this->load->library('PermissionLib'); + + // Cheks if the user has the permission to call a method + if (!$this->permissionlib->isEntitled($this->_requiredPermissions, $this->router->method)) + { + // If not... + $this->response(error('You are not allowed to access to this content'), REST_Controller::HTTP_UNAUTHORIZED); + } + } + + // Finally calls the parent _remap to perform other checks + parent::_remap($object_called, $arguments); + } + + //------------------------------------------------------------------------------------------------------------------ + // Protected methods + + /** + * Writes a REST call info log + */ + protected function logInfo($response, $parameters = null) + { + $this->_log(LogLib::INFO, 'RESTful API info', $response, $parameters); + } + + /** + * Writes a REST call debug log + */ + protected function logDebug($response, $parameters = null) + { + $this->_log(LogLib::DEBUG, 'RESTful API debug', $response, $parameters); + } + + /** + * Writes a REST call warning log + */ + protected function logWarning($response, $parameters = null) + { + $this->_log(LogLib::WARNING, 'RESTful API warning', $response, $parameters); + } + + /** + * Writes a REST call error log + */ + protected function logError($response, $parameters = null) + { + $this->_log(LogLib::ERROR, 'RESTful API error', $response, $parameters); + } + + //------------------------------------------------------------------------------------------------------------------ + // Private methods + + /** + * Writes a log to database + */ + private function _log($level, $requestId, $response, $parameters) + { + $data = new stdClass(); + + $data->response = $response; + if ($parameters != null) $data->parameters = $parameters; + + switch($level) + { + case LogLib::INFO: + $this->loglib->logInfoDB($requestId, json_encode(success($data, LogLib::INFO))); + break; + case LogLib::DEBUG: + $this->loglib->logDebugDB($requestId, json_encode(success($data, LogLib::DEBUG))); + break; + case LogLib::WARNING: + $this->loglib->logWarningDB($requestId, json_encode(error($data, LogLib::WARNING))); + break; + case LogLib::ERROR: + $this->loglib->logErrorDB($requestId, json_encode(error($data, LogLib::ERROR))); + break; + } + } +} diff --git a/application/core/APIv1_Controller.php b/application/core/APIv1_Controller.php deleted file mode 100644 index 14b4b626d..000000000 --- a/application/core/APIv1_Controller.php +++ /dev/null @@ -1,51 +0,0 @@ -_requiredPermissions = $requiredPermissions; - - log_message('debug', 'Called API: '.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']); - } - - /** - * This method is automatically called by CodeIgniter after the execution of the constructor is completed - * - Cheks if the Authlib was loaded, if not it means that the authentication failed - * - Loads the permsission lib and calls permissionlib->isEntitled - * - Checks if the caller is allowed to access to this content with the given permissions - * if it is not allowed will set the HTTP header with code 401 - * - Calls the parent (REST_Controller) _remap method to performs other checks - * NOTE: this methods override the parent method!!! - */ - public function _remap($object_called, $arguments = []) - { - if (isset($this->authlib)) // if set then the authentication is ok - { - // Loads permission lib - $this->load->library('PermissionLib'); - - // Cheks if the user has the permission to call a method - if (!$this->permissionlib->isEntitled($this->_requiredPermissions, $this->router->method)) - { - // If not... - $this->response(error('You are not allowed to access to this content'), REST_Controller::HTTP_UNAUTHORIZED); - } - } - - // Finally calls the parent _remap to perform other checks - parent::_remap($object_called, $arguments); - } -} From 8ec6265bd5c45262cc6d881c4763c46e8777bd15 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 4 Mar 2020 11:17:23 +0100 Subject: [PATCH 02/84] Fixed windows new lines --- .../controllers/api/v1/person/Person.php | 534 +++++++++--------- 1 file changed, 267 insertions(+), 267 deletions(-) diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php index 628936fe0..a686f6060 100644 --- a/application/controllers/api/v1/person/Person.php +++ b/application/controllers/api/v1/person/Person.php @@ -1,267 +1,267 @@ - 'basis/person:rw', 'CheckBewerbung' => 'basis/person:r')); - // Load model PersonModel - $this->load->model('person/person_model', 'PersonModel'); - } - - /** - * @return void - */ - public function getPerson() - { - $person_id = $this->get('person_id'); - $code = $this->get('code'); - $email = $this->get('email'); - - if (isset($code) || isset($email) || isset($person_id)) - { - if (isset($code) && isset($email)) - { - $result = $this->PersonModel->getPersonKontaktByZugangscode($code, $email); - } - else - { - $parametersArray = array(); - - if (isset($code)) - { - $parametersArray['zugangscode'] = $code; - } - else - { - $parametersArray['person_id'] = $person_id; - } - - $result = $this->PersonModel->loadWhere($parametersArray); - } - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response(); - } - } - - /** - * @return void - */ - public function getCheckBewerbung() - { - $email = $this->get('email'); - $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); - - if (isset($email)) - { - $result = $this->PersonModel->checkBewerbung($email, $studiensemester_kurzbz); - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response(); - } - } - - /** - * @return void - */ - public function postPerson() - { - $person = $this->post(); - $validation = $this->_validate($person); - - if (isSuccess($validation)) - { - if(isset($person['person_id']) && !(is_null($person['person_id'])) && ($person['person_id'] != '')) - { - $result = $this->PersonModel->updatePerson($person); - } - else - { - $result = $this->PersonModel->insert($person); - } - - $this->response($result, REST_Controller::HTTP_OK); - } - else - { - $this->response($validation, REST_Controller::HTTP_OK); - } - } - - private function _validate($person) - { - // If $person is consistent - if (!isset($person) || (isset($person) && !is_array($person))) - { - return error('Any parameters posted'); - } - - // Trim all the values - foreach($person as $key => $value) - { - if (gettype($value) == 'string') - { - $person[$key] = trim($value); - } - } - - if (isset($person['sprache']) && mb_strlen($person['sprache']) > 16) - { - return error('Sprache darf nicht laenger als 16 Zeichen sein'); - } - if (isset($person['anrede']) && mb_strlen($person['anrede']) > 16) - { - return error('Anrede darf nicht laenger als 16 Zeichen sein'); - } - if (isset($person['titelpost']) && mb_strlen($person['titelpost']) > 32) - { - return error('Titelpost darf nicht laenger als 32 Zeichen sein'); - } - if (isset($person['titelpre']) && mb_strlen($person['titelpre']) > 64) - { - return error('Titelpre darf nicht laenger als 64 Zeichen sein'); - } - if (isset($person['nachname']) && mb_strlen($person['nachname']) > 64) - { - return error('Nachname darf nicht laenger als 64 Zeichen sein'); - } - if (isset($person['nachname']) && ($person['nachname'] == '' || is_null($person['nachname']))) - { - return error('Nachname muss eingegeben werden'); - } - if (isset($person['vorname']) && mb_strlen($person['vorname']) > 32) - { - return error('Vorname darf nicht laenger als 32 Zeichen sein'); - } - if (isset($person['vornamen']) && mb_strlen($person['vornamen']) > 128) - { - return error('Vornamen darf nicht laenger als 128 Zeichen sein'); - } - if (isset($person['gebort']) && mb_strlen($person['gebort']) > 128) - { - return error('Geburtsort darf nicht laenger als 128 Zeichen sein'); - } - if (isset($person['homepage']) && mb_strlen($person['homepage']) > 256) - { - return error('Homepage darf nicht laenger als 256 Zeichen sein'); - } - if (isset($person['matr_nr']) && mb_strlen($person['matr_nr']) > 32) - { - return error('Matrikelnummer darf nicht laenger als 32 Zeichen sein'); - } - if (isset($person['ersatzkennzeichen']) && mb_strlen($person['ersatzkennzeichen']) > 10) - { - return error('Ersatzkennzeichen darf nicht laenger als 10 Zeichen sein'); - } - if (isset($person['familienstand']) && mb_strlen($person['familienstand']) > 1) - { - return error('Familienstand ist ungueltig'); - } - if (isset($person['anzahlkinder']) && $person['anzahlkinder'] != '' && !is_numeric($person['anzahlkinder'])) - { - return error('Anzahl der Kinder ist ungueltig'); - } - if (!isset($person['aktiv']) || (isset($person['aktiv']) && $person['aktiv'] !== true && $person['aktiv'] !== false)) - { - return error('Aktiv ist ungueltig'); - } - if (!isset($person['person_id']) && isset($person['insertvon']) && mb_strlen($person['insertvon']) > 32) - { - return error('Insertvon darf nicht laenger als 32 Zeichen sein'); - } - if (isset($person['updatevon']) && mb_strlen($person['updatevon']) > 32) - { - return error('Updatevon darf nicht laenger als 32 Zeichen sein'); - } - if (isset($person['geburtsnation']) && mb_strlen($person['geburtsnation']) > 3) - { - return error('Geburtsnation darf nicht laenger als 3 Zeichen sein'); - } - if (isset($person['staatsbuergerschaft']) && mb_strlen($person['staatsbuergerschaft']) > 3) - { - return error('Staatsbuergerschaft darf nicht laenger als 3 Zeichen sein'); - } - if (!isset($person['geschlecht']) || (isset($person['geschlecht']) && mb_strlen($person['geschlecht']) > 1)) - { - return error('Geschlecht darf nicht laenger als 1 Zeichen sein'); - } - if (isset($person['geschlecht']) && $person['geschlecht'] != 'm' && $person['geschlecht'] != 'w' && $person['geschlecht'] != 'u') - { - return error('Geschlecht muss w, m oder u sein!'); - } - - if (isset($person['svnr'])) - { - if ($person['svnr'] != '' && mb_strlen($person['svnr']) != 16 - && mb_strlen($person['svnr']) != 12 && mb_strlen($person['svnr']) != 10) - { - return error('SVNR muss 10, 12 oder 16 Zeichen lang sein'); - } - if (mb_strlen($person['svnr']) == 10 || mb_strlen($person['svnr']) == 12) - { - //SVNR mit Pruefziffer pruefen - //Die 4. Stelle in der SVNR ist die Pruefziffer - //(Summe von (gewichtung[i]*svnr[i])) modulo 11 ergibt diese Pruefziffer - //Falls nicht, ist die SVNR ungueltig - $gewichtung = array(3, 7, 9, 0, 5, 8, 4, 2, 1, 6); - $erg = 0; - $tmpSvnr = substr($person['svnr'], 0, 10); - //Quersumme bilden - for ($i = 0; $i < 10; $i++) - { - $erg += $gewichtung[$i] * $tmpSvnr{$i}; - } - - if ($tmpSvnr{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 - { - return error('SVNR ist ungueltig'); - } - - if (mb_strlen($person['svnr']) == 12) - { - $last = substr($person['svnr'], 10, 12); - if ($last{0} != 'v' || !is_numeric($last{1})) - { - return error('SVNR ist ungueltig'); - } - } - } - - //Pruefen ob das Geburtsdatum mit der SVNR uebereinstimmt. - if (isset($person['gebdatum']) && $person['svnr'] != '' && $person['gebdatum'] != '') - { - if (!mb_ereg('([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})', $person['gebdatum']) - && !mb_ereg('([0-9]{4})-([0-9]{2})-([0-9]{2})', $person['gebdatum'])) - { - return error('Format des Geburtsdatums ist ungueltig'); - } - } - } - - return success('Input data are valid'); - } -} + 'basis/person:rw', 'CheckBewerbung' => 'basis/person:r')); + // Load model PersonModel + $this->load->model('person/person_model', 'PersonModel'); + } + + /** + * @return void + */ + public function getPerson() + { + $person_id = $this->get('person_id'); + $code = $this->get('code'); + $email = $this->get('email'); + + if (isset($code) || isset($email) || isset($person_id)) + { + if (isset($code) && isset($email)) + { + $result = $this->PersonModel->getPersonKontaktByZugangscode($code, $email); + } + else + { + $parametersArray = array(); + + if (isset($code)) + { + $parametersArray['zugangscode'] = $code; + } + else + { + $parametersArray['person_id'] = $person_id; + } + + $result = $this->PersonModel->loadWhere($parametersArray); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function getCheckBewerbung() + { + $email = $this->get('email'); + $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); + + if (isset($email)) + { + $result = $this->PersonModel->checkBewerbung($email, $studiensemester_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPerson() + { + $person = $this->post(); + $validation = $this->_validate($person); + + if (isSuccess($validation)) + { + if(isset($person['person_id']) && !(is_null($person['person_id'])) && ($person['person_id'] != '')) + { + $result = $this->PersonModel->updatePerson($person); + } + else + { + $result = $this->PersonModel->insert($person); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response($validation, REST_Controller::HTTP_OK); + } + } + + private function _validate($person) + { + // If $person is consistent + if (!isset($person) || (isset($person) && !is_array($person))) + { + return error('Any parameters posted'); + } + + // Trim all the values + foreach($person as $key => $value) + { + if (gettype($value) == 'string') + { + $person[$key] = trim($value); + } + } + + if (isset($person['sprache']) && mb_strlen($person['sprache']) > 16) + { + return error('Sprache darf nicht laenger als 16 Zeichen sein'); + } + if (isset($person['anrede']) && mb_strlen($person['anrede']) > 16) + { + return error('Anrede darf nicht laenger als 16 Zeichen sein'); + } + if (isset($person['titelpost']) && mb_strlen($person['titelpost']) > 32) + { + return error('Titelpost darf nicht laenger als 32 Zeichen sein'); + } + if (isset($person['titelpre']) && mb_strlen($person['titelpre']) > 64) + { + return error('Titelpre darf nicht laenger als 64 Zeichen sein'); + } + if (isset($person['nachname']) && mb_strlen($person['nachname']) > 64) + { + return error('Nachname darf nicht laenger als 64 Zeichen sein'); + } + if (isset($person['nachname']) && ($person['nachname'] == '' || is_null($person['nachname']))) + { + return error('Nachname muss eingegeben werden'); + } + if (isset($person['vorname']) && mb_strlen($person['vorname']) > 32) + { + return error('Vorname darf nicht laenger als 32 Zeichen sein'); + } + if (isset($person['vornamen']) && mb_strlen($person['vornamen']) > 128) + { + return error('Vornamen darf nicht laenger als 128 Zeichen sein'); + } + if (isset($person['gebort']) && mb_strlen($person['gebort']) > 128) + { + return error('Geburtsort darf nicht laenger als 128 Zeichen sein'); + } + if (isset($person['homepage']) && mb_strlen($person['homepage']) > 256) + { + return error('Homepage darf nicht laenger als 256 Zeichen sein'); + } + if (isset($person['matr_nr']) && mb_strlen($person['matr_nr']) > 32) + { + return error('Matrikelnummer darf nicht laenger als 32 Zeichen sein'); + } + if (isset($person['ersatzkennzeichen']) && mb_strlen($person['ersatzkennzeichen']) > 10) + { + return error('Ersatzkennzeichen darf nicht laenger als 10 Zeichen sein'); + } + if (isset($person['familienstand']) && mb_strlen($person['familienstand']) > 1) + { + return error('Familienstand ist ungueltig'); + } + if (isset($person['anzahlkinder']) && $person['anzahlkinder'] != '' && !is_numeric($person['anzahlkinder'])) + { + return error('Anzahl der Kinder ist ungueltig'); + } + if (!isset($person['aktiv']) || (isset($person['aktiv']) && $person['aktiv'] !== true && $person['aktiv'] !== false)) + { + return error('Aktiv ist ungueltig'); + } + if (!isset($person['person_id']) && isset($person['insertvon']) && mb_strlen($person['insertvon']) > 32) + { + return error('Insertvon darf nicht laenger als 32 Zeichen sein'); + } + if (isset($person['updatevon']) && mb_strlen($person['updatevon']) > 32) + { + return error('Updatevon darf nicht laenger als 32 Zeichen sein'); + } + if (isset($person['geburtsnation']) && mb_strlen($person['geburtsnation']) > 3) + { + return error('Geburtsnation darf nicht laenger als 3 Zeichen sein'); + } + if (isset($person['staatsbuergerschaft']) && mb_strlen($person['staatsbuergerschaft']) > 3) + { + return error('Staatsbuergerschaft darf nicht laenger als 3 Zeichen sein'); + } + if (!isset($person['geschlecht']) || (isset($person['geschlecht']) && mb_strlen($person['geschlecht']) > 1)) + { + return error('Geschlecht darf nicht laenger als 1 Zeichen sein'); + } + if (isset($person['geschlecht']) && $person['geschlecht'] != 'm' && $person['geschlecht'] != 'w' && $person['geschlecht'] != 'u') + { + return error('Geschlecht muss w, m oder u sein!'); + } + + if (isset($person['svnr'])) + { + if ($person['svnr'] != '' && mb_strlen($person['svnr']) != 16 + && mb_strlen($person['svnr']) != 12 && mb_strlen($person['svnr']) != 10) + { + return error('SVNR muss 10, 12 oder 16 Zeichen lang sein'); + } + if (mb_strlen($person['svnr']) == 10 || mb_strlen($person['svnr']) == 12) + { + //SVNR mit Pruefziffer pruefen + //Die 4. Stelle in der SVNR ist die Pruefziffer + //(Summe von (gewichtung[i]*svnr[i])) modulo 11 ergibt diese Pruefziffer + //Falls nicht, ist die SVNR ungueltig + $gewichtung = array(3, 7, 9, 0, 5, 8, 4, 2, 1, 6); + $erg = 0; + $tmpSvnr = substr($person['svnr'], 0, 10); + //Quersumme bilden + for ($i = 0; $i < 10; $i++) + { + $erg += $gewichtung[$i] * $tmpSvnr{$i}; + } + + if ($tmpSvnr{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 + { + return error('SVNR ist ungueltig'); + } + + if (mb_strlen($person['svnr']) == 12) + { + $last = substr($person['svnr'], 10, 12); + if ($last{0} != 'v' || !is_numeric($last{1})) + { + return error('SVNR ist ungueltig'); + } + } + } + + //Pruefen ob das Geburtsdatum mit der SVNR uebereinstimmt. + if (isset($person['gebdatum']) && $person['svnr'] != '' && $person['gebdatum'] != '') + { + if (!mb_ereg('([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})', $person['gebdatum']) + && !mb_ereg('([0-9]{4})-([0-9]{2})-([0-9]{2})', $person['gebdatum'])) + { + return error('Format des Geburtsdatums ist ungueltig'); + } + } + } + + return success('Input data are valid'); + } +} From 01032c63d3a04c40f32ff182d37269d5e38dd74f Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 4 Nov 2020 15:29:36 +0100 Subject: [PATCH 03/84] Update der Person in ALMA Tabelle, wenn Personen zusammengelegt werden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Falls nur die zu löschende Person in ALMA vorhanden ist, mit der zu behaltenden Person ersetzen. Falls bereits die zu ersetzende UND zu löschende Person in ALMA vorhanden sind, muss erst direkt im ALMA Bibliothekssystem und in der tbl_alma gelöscht werden. Signed-off-by: Cris --- vilesci/stammdaten/personen_wartung.php | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/vilesci/stammdaten/personen_wartung.php b/vilesci/stammdaten/personen_wartung.php index c143a1390..6f4e25cc4 100644 --- a/vilesci/stammdaten/personen_wartung.php +++ b/vilesci/stammdaten/personen_wartung.php @@ -135,6 +135,52 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p } else { + // Wenn Person in ALMA Bibliothek vorkommt, ggf. die Person dort übernehmen + $alma_has_personToKeep = false; + $alma_has_personToDelete = false; + $alma_update_obj = new StdClass(); + $alma_query_upd = ''; + + $alma_query = " + SELECT * + FROM sync.tbl_alma + WHERE ( + person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " OR + person_id = " . $db->db_add_param($personToDelete, FHC_INTEGER) . " + )"; + + + if ($result = $db->db_query($alma_query)) + { + while ($row = $db->db_fetch_object($result)) + { + if ($row->person_id == $personToKeep) + { + $alma_has_personToKeep = true; + } + if ($row->person_id == $personToDelete) + { + $alma_has_personToDelete = true; + $alma_update_obj = $row; + } + } + } + + // Falls nur die zu löschende Person in ALMA vorhanden ist, mit der zu behaltenden Person ersetzen + if ($alma_has_personToDelete && !$alma_has_personToKeep) + { + $alma_query_upd = " + UPDATE sync.tbl_alma + SET person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " + WHERE alma_match_id = " . $alma_update_obj->alma_match_id . " + AND person_id = " . $alma_update_obj->person_id . ";"; + } + // Falls bereits doppelte Einträge in ALMA vorhanden sind, manuell lösen + elseif ($alma_has_personToDelete && $alma_has_personToKeep) + { + die('Es sind bereits beide Personen in ALMA vorhanden. Bitte zuerst direkt im ALMA Bibliotheksystem und in der tbl_alma lösen.'); + } + $personToDelete_obj = new person(); if ($personToDelete_obj->load($personToDelete)) { @@ -346,6 +392,7 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p $sql_query_upd1 .= "UPDATE system.tbl_person_lock SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; $sql_query_upd1 .= "UPDATE wawi.tbl_betriebsmittelperson SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; $sql_query_upd1 .= "UPDATE wawi.tbl_konto SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; + $sql_query_upd1 .= $alma_query_upd; $sql_query_upd1 .= "DELETE FROM public.tbl_person WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; From adb96ed33f0b7ca4f843d027f8e1a64e1fa98ad1 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 16 Nov 2020 15:11:08 +0100 Subject: [PATCH 04/84] Automatisch Personen in tbl_sap_students zusammenlegen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wenn doppelt angelegte Personen zusammengeführt werden, wird nun ggf auch in der Tabelle tbl_sap_students die hinterlegte Person upgedatet. Ausnahme: wenn in der tbl_sap_students die Person auch schon doppelt angelegt ist. In diesem Fall gibt es ein exit mit der Aufforderung, dies direkt (manuell) in der tbl_sap_students zu ändern. Signed-off-by: cris-technikum --- vilesci/stammdaten/personen_wartung.php | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/vilesci/stammdaten/personen_wartung.php b/vilesci/stammdaten/personen_wartung.php index 6f4e25cc4..9cc0bba15 100644 --- a/vilesci/stammdaten/personen_wartung.php +++ b/vilesci/stammdaten/personen_wartung.php @@ -181,6 +181,53 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p die('Es sind bereits beide Personen in ALMA vorhanden. Bitte zuerst direkt im ALMA Bibliotheksystem und in der tbl_alma lösen.'); } + + // Wenn Person in SAP students vorkommt, ggf. die Person dort übernehmen + $sap_students_has_personToKeep = false; + $sap_students_has_personToDelete = false; + $sap_students_update_obj = new StdClass(); + $sap_students_query_upd = ''; + + $sap_students_query = " + SELECT * + FROM sync.tbl_sap_students + WHERE ( + person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " OR + person_id = " . $db->db_add_param($personToDelete, FHC_INTEGER) . " + )"; + + if ($result = $db->db_query($sap_students_query)) + { + while ($row = $db->db_fetch_object($result)) + { + if ($row->person_id == $personToKeep) + { + $sap_students_has_personToKeep = true; + } + if ($row->person_id == $personToDelete) + { + $sap_students_has_personToDelete = true; + $sap_students_update_obj = $row; + } + } + } + + // Wenn die zu löschende Person in SAP students eingetragen ist, dann mit der zu behaltenden Person überschreiben + if ($sap_students_has_personToDelete && !$sap_students_has_personToKeep) + { + $sap_students_query_upd = " + UPDATE sync.tbl_sap_students + SET person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " + WHERE sap_user_id = " . $db->db_add_param($sap_students_update_obj->sap_user_id, FHC_STRING) . " + AND person_id = " . $sap_students_update_obj->person_id . ";"; + } + // Wenn doppelte Personeneinträge in SAP students vorhanden sind (zu löschende UND zu behaltende Person), + // dann manuell lösen + elseif ($sap_students_has_personToDelete && $sap_students_has_personToKeep) + { + die('Es sind bereits beide Personen in SAP vorhanden. Bitte zuerst direkt in der tbl_sap_students lösen.'); + } + $personToDelete_obj = new person(); if ($personToDelete_obj->load($personToDelete)) { @@ -393,6 +440,7 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p $sql_query_upd1 .= "UPDATE wawi.tbl_betriebsmittelperson SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; $sql_query_upd1 .= "UPDATE wawi.tbl_konto SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; $sql_query_upd1 .= $alma_query_upd; + $sql_query_upd1 .= $sap_students_query_upd; $sql_query_upd1 .= "DELETE FROM public.tbl_person WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; From 4cbbd662b6f34722845bed3c48453911419b6610 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 16 Nov 2020 17:48:24 +0100 Subject: [PATCH 05/84] Automatisch Personen in tbl_sap_mitarbeiter zusammenlegen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wenn doppelt angelegte Personen zusammengeführt werden, wird nun ggf auch in der Tabelle tbl_sap_mitarbeiter die hinterlegte Person upgedatet. Ausnahme: wenn in der tbl_sap_mitarbeiter die Person auch schon doppelt angelegt ist. In diesem Fall gibt es ein exit mit der Aufforderung, dies direkt (manuell) in der tbl_sap_mitarbeiter zu ändern. Signed-off-by: cris-technikum --- vilesci/stammdaten/personen_wartung.php | 145 ++++++++++++++++++------ 1 file changed, 110 insertions(+), 35 deletions(-) diff --git a/vilesci/stammdaten/personen_wartung.php b/vilesci/stammdaten/personen_wartung.php index 9cc0bba15..fdf3c0531 100644 --- a/vilesci/stammdaten/personen_wartung.php +++ b/vilesci/stammdaten/personen_wartung.php @@ -182,51 +182,117 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p } - // Wenn Person in SAP students vorkommt, ggf. die Person dort übernehmen - $sap_students_has_personToKeep = false; - $sap_students_has_personToDelete = false; - $sap_students_update_obj = new StdClass(); - $sap_students_query_upd = ''; + // Prüfen, ob Person Mitarbeiter oder Student ist + $uid_toDelete = new Benutzer(); + $uid_toDelete->getBenutzerFromPerson($personToDelete); + $uid_toDelete = $uid_toDelete->result[0]->uid; - $sap_students_query = " + $mitarbeiter = new Mitarbeiter(); + $is_Mitarbeiter = $mitarbeiter->load($uid_toDelete); + + // Wenn Person Mitarbeiter ist, gegebenenfalls die SAP Mitarbeiter Tabelle updaten + if($is_Mitarbeiter) + { + $uid_toKeep = new Benutzer(); + $uid_toKeep->getBenutzerFromPerson($personToKeep); + $uid_toKeep = $uid_toKeep->result[0]->uid; + + // Wenn Person in SAP students vorkommt, ggf. die Person dort übernehmen + $sap_mitarbeiter_has_uidToKeep = false; + $sap_mitarbeiter_has_uidToDelete = false; + $sap_mitarbeiter_update_obj = new StdClass(); + $sap_mitarbeiter_query_upd = ''; + + $sap_mitarbeiter_query = " + SELECT * + FROM sync.tbl_sap_mitarbeiter + WHERE ( + mitarbeiter_uid = " . $db->db_add_param($uid_toKeep) . " OR + mitarbeiter_uid = " . $db->db_add_param($uid_toDelete) . " + )"; + + if ($result = $db->db_query($sap_mitarbeiter_query)) + { + while ($row = $db->db_fetch_object($result)) + { + if ($row->mitarbeiter_uid == $uid_toKeep) + { + $sap_mitarbeiter_has_uidToKeep = true; + } + if ($row->mitarbeiter_uid == $uid_toDelete) + { + $sap_mitarbeiter_has_uidToDelete = true; + $sap_mitarbeiter_update_obj = $row; + } + } + } + + // Wenn die zu löschende Person in SAP students eingetragen ist, dann mit der zu behaltenden Person überschreiben + if ($sap_mitarbeiter_has_uidToDelete && !$sap_mitarbeiter_has_uidToKeep) + { + $sap_mitarbeiter_query_upd = " + UPDATE sync.tbl_sap_mitarbeiter + SET mitarbeiter_uid = " . $db->db_add_param($uid_toKeep) . " + WHERE sap_eeid = " . $db->db_add_param($sap_mitarbeiter_update_obj->sap_eeid) . " + AND mitarbeiter_uid = " . $db->db_add_param($sap_mitarbeiter_update_obj->mitarbeiter_uid) . ";"; + } + // Wenn doppelte Personeneinträge in SAP students vorhanden sind (zu löschende UND zu behaltende Person), + // dann manuell lösen + elseif ($sap_mitarbeiter_has_uidToDelete && $sap_mitarbeiter_has_uidToKeep) + { + die('Es sind bereits beide Personen in SAP vorhanden. Bitte zuerst direkt in der tbl_sap_mitarbeiter lösen.'); + } + + } + // Wenn Person Student ist, gegebenenfalls die SAP Studenten Tabelle updaten + else + { + $sap_students_has_personToKeep = false; + $sap_students_has_personToDelete = false; + $sap_students_update_obj = new StdClass(); + $sap_students_query_upd = ''; + + $sap_students_query = " SELECT * FROM sync.tbl_sap_students WHERE ( person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " OR person_id = " . $db->db_add_param($personToDelete, FHC_INTEGER) . " )"; - - if ($result = $db->db_query($sap_students_query)) - { - while ($row = $db->db_fetch_object($result)) - { - if ($row->person_id == $personToKeep) - { - $sap_students_has_personToKeep = true; - } - if ($row->person_id == $personToDelete) - { - $sap_students_has_personToDelete = true; - $sap_students_update_obj = $row; - } - } - } - - // Wenn die zu löschende Person in SAP students eingetragen ist, dann mit der zu behaltenden Person überschreiben - if ($sap_students_has_personToDelete && !$sap_students_has_personToKeep) - { - $sap_students_query_upd = " + + if ($result = $db->db_query($sap_students_query)) + { + while ($row = $db->db_fetch_object($result)) + { + if ($row->person_id == $personToKeep) + { + $sap_students_has_personToKeep = true; + } + if ($row->person_id == $personToDelete) + { + $sap_students_has_personToDelete = true; + $sap_students_update_obj = $row; + } + } + } + + // Wenn die zu löschende Person in SAP students eingetragen ist, dann mit der zu behaltenden Person überschreiben + if ($sap_students_has_personToDelete && !$sap_students_has_personToKeep) + { + $sap_students_query_upd = " UPDATE sync.tbl_sap_students SET person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE sap_user_id = " . $db->db_add_param($sap_students_update_obj->sap_user_id, FHC_STRING) . " AND person_id = " . $sap_students_update_obj->person_id . ";"; - } - // Wenn doppelte Personeneinträge in SAP students vorhanden sind (zu löschende UND zu behaltende Person), - // dann manuell lösen - elseif ($sap_students_has_personToDelete && $sap_students_has_personToKeep) - { - die('Es sind bereits beide Personen in SAP vorhanden. Bitte zuerst direkt in der tbl_sap_students lösen.'); - } + } + // Wenn doppelte Personeneinträge in SAP students vorhanden sind (zu löschende UND zu behaltende Person), + // dann manuell lösen + elseif ($sap_students_has_personToDelete && $sap_students_has_personToKeep) + { + die('Es sind bereits beide Personen in SAP vorhanden. Bitte zuerst direkt in der tbl_sap_students lösen.'); + } + } + $personToDelete_obj = new person(); if ($personToDelete_obj->load($personToDelete)) @@ -440,7 +506,16 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p $sql_query_upd1 .= "UPDATE wawi.tbl_betriebsmittelperson SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; $sql_query_upd1 .= "UPDATE wawi.tbl_konto SET person_id=" . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; $sql_query_upd1 .= $alma_query_upd; - $sql_query_upd1 .= $sap_students_query_upd; + // Wenn Person Mitarbeiter ist, ggf. SAP Mitarbeiter updaten + if ($is_Mitarbeiter) + { + $sql_query_upd1 .= $sap_mitarbeiter_query_upd; + } + // Wenn Person Student ist, ggf. SAP Studententabelle updaten + if (!$is_Mitarbeiter) + { + $sql_query_upd1 .= $sap_students_query_upd; + } $sql_query_upd1 .= "DELETE FROM public.tbl_person WHERE person_id=" . $db->db_add_param($personToDelete, FHC_INTEGER) . ";"; From 34e3756d744817dfbd7f4f2e909b88403989339e Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Nov 2020 13:14:59 +0100 Subject: [PATCH 06/84] Mitarbeiter zusammenlegen entfernt / Extension-Tabellen auf Vorhandensein pruefen - Mitarbeiter zusammenlegen entfernt. - Bevor Personen auch in extenstions zusammengelegt werden: pruefen, ob die entsprechenden Tabellen existieren. (diese sind nur vorhanden, wenn extensions FHC-Core-ALMA, FHC-Core-SAP installiert sind) Signed-off-by: cris-technikum --- vilesci/stammdaten/personen_wartung.php | 146 ++++++++++++------------ 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/vilesci/stammdaten/personen_wartung.php b/vilesci/stammdaten/personen_wartung.php index 9cc0bba15..2c4c4f0fa 100644 --- a/vilesci/stammdaten/personen_wartung.php +++ b/vilesci/stammdaten/personen_wartung.php @@ -135,97 +135,97 @@ if (isset($personToDelete) && isset($personToKeep) && $personToDelete >= 0 && $p } else { - // Wenn Person in ALMA Bibliothek vorkommt, ggf. die Person dort übernehmen - $alma_has_personToKeep = false; - $alma_has_personToDelete = false; - $alma_update_obj = new StdClass(); - $alma_query_upd = ''; - - $alma_query = " - SELECT * - FROM sync.tbl_alma - WHERE ( - person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " OR - person_id = " . $db->db_add_param($personToDelete, FHC_INTEGER) . " - )"; - - - if ($result = $db->db_query($alma_query)) + // Prüfen, ob tbl_alma existiert (also ob ALMA extension installiert ist) + if($result = @$db->db_query("SELECT 1 FROM sync.tbl_alma LIMIT 1")) { - while ($row = $db->db_fetch_object($result)) + // Wenn Person in ALMA Bibliothek vorkommt, ggf. die Person dort übernehmen + $alma_has_personToKeep = false; + $alma_has_personToDelete = false; + $alma_update_obj = new StdClass(); + $alma_query_upd = ''; + + $alma_query = " + SELECT * + FROM sync.tbl_alma + WHERE ( + person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " OR + person_id = " . $db->db_add_param($personToDelete, FHC_INTEGER) . " + )"; + + if ($result = $db->db_query($alma_query)) { - if ($row->person_id == $personToKeep) + while ($row = $db->db_fetch_object($result)) { - $alma_has_personToKeep = true; - } - if ($row->person_id == $personToDelete) - { - $alma_has_personToDelete = true; - $alma_update_obj = $row; + if ($row->person_id == $personToKeep) + { + $alma_has_personToKeep = true; + } + if ($row->person_id == $personToDelete) + { + $alma_has_personToDelete = true; + $alma_update_obj = $row; + } } } - } - - // Falls nur die zu löschende Person in ALMA vorhanden ist, mit der zu behaltenden Person ersetzen - if ($alma_has_personToDelete && !$alma_has_personToKeep) + + // Falls nur die zu löschende Person in ALMA vorhanden ist, mit der zu behaltenden Person ersetzen + if ($alma_has_personToDelete && !$alma_has_personToKeep) + { + $alma_query_upd = " + UPDATE sync.tbl_alma + SET person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " + WHERE alma_match_id = " . $alma_update_obj->alma_match_id . " + AND person_id = " . $alma_update_obj->person_id . ";"; + } + // Falls bereits doppelte Einträge in ALMA vorhanden sind (zu löschende und zu behaltende), manuell lösen + elseif ($alma_has_personToDelete && $alma_has_personToKeep) + { + die('Es sind bereits beide Personen in ALMA vorhanden. Bitte zuerst direkt im ALMA Bibliotheksystem und in der tbl_alma lösen.'); + } + } + + // Prüfen, ob tbl_sap_students exisitiert + if($result = @$db->db_query("SELECT 1 FROM sync.tbl_sap_students LIMIT 1")) { - $alma_query_upd = " - UPDATE sync.tbl_alma - SET person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " - WHERE alma_match_id = " . $alma_update_obj->alma_match_id . " - AND person_id = " . $alma_update_obj->person_id . ";"; - } - // Falls bereits doppelte Einträge in ALMA vorhanden sind, manuell lösen - elseif ($alma_has_personToDelete && $alma_has_personToKeep) - { - die('Es sind bereits beide Personen in ALMA vorhanden. Bitte zuerst direkt im ALMA Bibliotheksystem und in der tbl_alma lösen.'); - } - - - // Wenn Person in SAP students vorkommt, ggf. die Person dort übernehmen - $sap_students_has_personToKeep = false; - $sap_students_has_personToDelete = false; - $sap_students_update_obj = new StdClass(); - $sap_students_query_upd = ''; - - $sap_students_query = " + // Wenn Person in SAP students vorkommt, ggf. die Person dort übernehmen + $sap_students_has_personToKeep = false; + $sap_students_has_personToDelete = false; + $sap_students_update_obj = new StdClass(); + $sap_students_query_upd = ''; + + $sap_students_query = " SELECT * FROM sync.tbl_sap_students WHERE ( person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " OR person_id = " . $db->db_add_param($personToDelete, FHC_INTEGER) . " )"; - - if ($result = $db->db_query($sap_students_query)) - { - while ($row = $db->db_fetch_object($result)) - { - if ($row->person_id == $personToKeep) - { - $sap_students_has_personToKeep = true; - } - if ($row->person_id == $personToDelete) - { - $sap_students_has_personToDelete = true; - $sap_students_update_obj = $row; + + if ($result = $db->db_query($sap_students_query)) { + while ($row = $db->db_fetch_object($result)) { + if ($row->person_id == $personToKeep) { + $sap_students_has_personToKeep = true; + } + if ($row->person_id == $personToDelete) { + $sap_students_has_personToDelete = true; + $sap_students_update_obj = $row; + } } } - } - - // Wenn die zu löschende Person in SAP students eingetragen ist, dann mit der zu behaltenden Person überschreiben - if ($sap_students_has_personToDelete && !$sap_students_has_personToKeep) - { - $sap_students_query_upd = " + + // Wenn die zu löschende Person in SAP students eingetragen ist, dann mit der zu behaltenden Person überschreiben + if ($sap_students_has_personToDelete && !$sap_students_has_personToKeep) { + $sap_students_query_upd = " UPDATE sync.tbl_sap_students SET person_id = " . $db->db_add_param($personToKeep, FHC_INTEGER) . " WHERE sap_user_id = " . $db->db_add_param($sap_students_update_obj->sap_user_id, FHC_STRING) . " AND person_id = " . $sap_students_update_obj->person_id . ";"; - } - // Wenn doppelte Personeneinträge in SAP students vorhanden sind (zu löschende UND zu behaltende Person), - // dann manuell lösen - elseif ($sap_students_has_personToDelete && $sap_students_has_personToKeep) - { - die('Es sind bereits beide Personen in SAP vorhanden. Bitte zuerst direkt in der tbl_sap_students lösen.'); + } + // Wenn doppelte Personeneinträge in SAP students vorhanden sind (zu löschende UND zu behaltende Person), + // dann manuell lösen + elseif ($sap_students_has_personToDelete && $sap_students_has_personToKeep) { + die('Es sind bereits beide Personen in SAP vorhanden. Bitte zuerst direkt in der tbl_sap_students lösen.'); + } } $personToDelete_obj = new person(); From c3ab40282b1035d7e97efd058c2020b4427f8915 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Wed, 16 Dec 2020 16:39:43 +0100 Subject: [PATCH 07/84] add azgrelevant column and alter zeitaufzeichnung column in bis.tbl_bisverwendung --- system/dbupdate_3.3.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 2336ebad4..dafec165d 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4465,6 +4465,21 @@ if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE } } +// ADD COLUMN azgrelevant in bis.tbl_bisverwendung +if(!$result = @$db->db_query("SELECT incoming FROM bis.tbl_bisverwendung LIMIT 1")) +{ + $qry = " + ALTER TABLE bis.tbl_bisverwendung ADD COLUMN azgrelevant boolean; + UPDATE bis.tbl_bisverwendung SET azgrelevant = zeitaufzeichnungspflichtig; + UPDATE bis.tbl_bisverwendung SET zeitaufzeichnungspflichtig = true WHERE ba1code=103; + "; + + if(!$db->db_query($qry)) + echo 'bis.tbl_bisverwendung: '.$db->db_last_error().'
'; + else + echo '
bis.tbl_bisverwendung Spalte azgrelevant hinzugefügt.'; +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; From 30960adf8179e2131ce5df4e2b262e87c380ca88 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Mon, 21 Dec 2020 08:55:33 +0100 Subject: [PATCH 08/84] fix typo in query --- system/dbupdate_3.3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index dafec165d..e01105db6 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4466,7 +4466,7 @@ if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE } // ADD COLUMN azgrelevant in bis.tbl_bisverwendung -if(!$result = @$db->db_query("SELECT incoming FROM bis.tbl_bisverwendung LIMIT 1")) +if(!$result = @$db->db_query("SELECT azgrelevant FROM bis.tbl_bisverwendung LIMIT 1")) { $qry = " ALTER TABLE bis.tbl_bisverwendung ADD COLUMN azgrelevant boolean; From d62b1bead4692c7f9f97ea1bcf1aaa922a48e989 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Mon, 21 Dec 2020 09:27:23 +0100 Subject: [PATCH 09/84] change table --- include/bisverwendung.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index 9d92db489..798b2213b 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -47,6 +47,7 @@ class bisverwendung extends basis_db public $dv_art; public $inkludierte_lehre; public $zeitaufzeichnungspflichtig; + public $azgrelevant; public $ba1bez; public $ba2bez; @@ -122,6 +123,7 @@ class bisverwendung extends basis_db $this->dv_art = $row->dv_art; $this->inkludierte_lehre = $row->inkludierte_lehre; $this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $this->azgrelevant = $this->db_parse_bool($row->azgrelevant); return true; } else @@ -359,7 +361,7 @@ class bisverwendung extends basis_db $obj->dv_art = $row->dv_art; $obj->inkludierte_lehre = $row->inkludierte_lehre; $obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); - + $obj->azgrelevant = $this->db_parse_bool($row->azgrelevant); $this->result[] = $obj; } return true; @@ -416,6 +418,7 @@ class bisverwendung extends basis_db $obj->dv_art = $row->dv_art; $obj->inkludierte_lehre = $row->inkludierte_lehre; $obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $obj->azgrelevant = $this->db_parse_bool($row->azgrelevant); $this->result[] = $obj; } @@ -474,6 +477,7 @@ class bisverwendung extends basis_db $obj->dv_art = $row->dv_art; $obj->inkludierte_lehre = $row->inkludierte_lehre; $obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $obj->azgrelevant = $this->db_parse_bool($row->azgrelevant); $this->result[] = $obj; } @@ -525,6 +529,7 @@ class bisverwendung extends basis_db $this->dv_art = $row->dv_art; $this->inkludierte_lehre = $row->inkludierte_lehre; $this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $this->azgrelevant = $this->db_parse_bool($row->azgrelevant); } return true; } @@ -578,6 +583,7 @@ class bisverwendung extends basis_db $this->dv_art = $row->dv_art; $this->inkludierte_lehre = $row->inkludierte_lehre; $this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $this->azgrelevant = $this->db_parse_bool($row->azgrelevant); } return true; } @@ -640,6 +646,7 @@ class bisverwendung extends basis_db $obj->dv_art = $row->dv_art; $obj->inkludierte_lehre = $row->inkludierte_lehre; $obj->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $obj->azgrelevant = $this->db_parse_bool($row->azgrelevant); $this->result[] = $obj; } From 8441345d7a5e228300d611384bcd7ad574516736 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Tue, 19 Jan 2021 13:22:47 +0100 Subject: [PATCH 10/84] add azgrelevant to save method in bisverwendungclass --- include/bisverwendung.class.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index 798b2213b..774fe413f 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -220,13 +220,21 @@ class bisverwendung extends basis_db { $zeitaufzeichnungspflichtig = 'null'; } + if(is_bool($this->azgrelevant)) + { + $azgrelevant = $this->db_add_param($this->azgrelevant, FHC_BOOLEAN); + } + else + { + $azgrelevant = 'null'; + } if($new) { //Neuen Datensatz anlegen $qry = "BEGIN;INSERT INTO bis.tbl_bisverwendung (ba1code, ba2code, beschausmasscode, verwendung_code, mitarbeiter_uid, hauptberufcode, hauptberuflich, habilitation, beginn, ende, vertragsstunden, - updateamum, updatevon, insertamum, insertvon, dv_art, inkludierte_lehre, zeitaufzeichnungspflichtig) VALUES (". + updateamum, updatevon, insertamum, insertvon, dv_art, inkludierte_lehre, zeitaufzeichnungspflichtig, azgrelevant) VALUES (". $this->db_add_param($this->ba1code, FHC_INTEGER).', '. $this->db_add_param($this->ba2code, FHC_INTEGER).', '. $this->db_add_param($this->beschausmasscode, FHC_INTEGER).', '. @@ -244,7 +252,8 @@ class bisverwendung extends basis_db $this->db_add_param($this->insertvon).', '. $this->db_add_param($this->dv_art).','. $this->db_add_param($this->inkludierte_lehre).','. - $zeitaufzeichnungspflichtig. ');'; + $zeitaufzeichnungspflichtig.','. + $azgrelevant. ');'; } else @@ -268,7 +277,8 @@ class bisverwendung extends basis_db " insertvon=".$this->db_add_param($this->insertvon).",". " dv_art=".$this->db_add_param($this->dv_art).",". " inkludierte_lehre=".$this->db_add_param($this->inkludierte_lehre).",". - " zeitaufzeichnungspflichtig=". $zeitaufzeichnungspflichtig. + " zeitaufzeichnungspflichtig=". $zeitaufzeichnungspflichtig.",". + " azgrelevant =". $azgrelevant. " WHERE bisverwendung_id=".$this->db_add_param($this->bisverwendung_id, FHC_INTEGER); } From 943961127faaa084fc2947f41de8f79fcf6ac9a4 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Tue, 19 Jan 2021 16:15:03 +0100 Subject: [PATCH 11/84] implement checkbox --- content/mitarbeiter/mitarbeiterDBDML.php | 8 +++++++- content/mitarbeiter/mitarbeiteroverlay.js.php | 2 ++ .../mitarbeiter/mitarbeiterverwendungdialog.js.php | 14 +++++++++++++- .../mitarbeiterverwendungdialog.xul.php | 4 ++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/content/mitarbeiter/mitarbeiterDBDML.php b/content/mitarbeiter/mitarbeiterDBDML.php index 6bb1513d0..eb7ba6650 100644 --- a/content/mitarbeiter/mitarbeiterDBDML.php +++ b/content/mitarbeiter/mitarbeiterDBDML.php @@ -174,7 +174,13 @@ if(!$error) elseif($_POST['zeitaufzeichnungspflichtig']=='false') $verwendung->zeitaufzeichnungspflichtig = false; else - $verwendung->zeitaufzeichnungspflichtig = ''; + $verwendung->azgrelevant = ''; + if($_POST['azgrelevant']=='true') + $verwendung->azgrelevant = true; + elseif($_POST['azgrelevant']=='false') + $verwendung->azgrelevant = false; + else + $verwendung->azgrelevant = ''; if($verwendung->save()) { diff --git a/content/mitarbeiter/mitarbeiteroverlay.js.php b/content/mitarbeiter/mitarbeiteroverlay.js.php index d0aa4f40d..adf7bdf90 100644 --- a/content/mitarbeiter/mitarbeiteroverlay.js.php +++ b/content/mitarbeiter/mitarbeiteroverlay.js.php @@ -1210,6 +1210,7 @@ function MitarbeiterVerwendungSpeichern(dialog, bisverwendung_id, mitarbeiter_ui dv_art = dialog.getElementById('mitarbeiter-verwendung-detail-textbox-dv_art').value; inkludierte_lehre = dialog.getElementById('mitarbeiter-verwendung-detail-textbox-inkludierte_lehre').value; zeitaufzeichnungspflichtig = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked; + azgrelevant = dialog.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked; if(verwendung_code=='1') { @@ -1268,6 +1269,7 @@ function MitarbeiterVerwendungSpeichern(dialog, bisverwendung_id, mitarbeiter_ui req.add('dv_art', dv_art); req.add('inkludierte_lehre', inkludierte_lehre); req.add('zeitaufzeichnungspflichtig', zeitaufzeichnungspflichtig); + req.add('azgrelevant', azgrelevant); var response = req.executePOST(); diff --git a/content/mitarbeiter/mitarbeiterverwendungdialog.js.php b/content/mitarbeiter/mitarbeiterverwendungdialog.js.php index 841f167e9..123f471f8 100644 --- a/content/mitarbeiter/mitarbeiterverwendungdialog.js.php +++ b/content/mitarbeiter/mitarbeiterverwendungdialog.js.php @@ -70,6 +70,7 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id) dv_art = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#dv_art" )); inkludierte_lehre = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#inkludierte_lehre" )); zeitaufzeichnungspflichtig = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#zeitaufzeichnungspflichtig" )); + azgrelevant = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#azgrelevant" )); } else { @@ -112,6 +113,14 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id) { zeitaufzeichnungspflichtig='Nein'; } + if (azgrelevant=='Ja') + { + azgrelevant='Ja'; + } + else + { + azgrelevant='Nein'; + } } document.getElementById('mitarbeiter-verwendung-detail-menulist-beschart1').value=ba1code; @@ -138,7 +147,10 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id) document.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked=true; else document.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked=false; - + if(azgrelevant=='Ja') + document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=true; + else + document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=false; MitarbeiterVerwendungDetailToggleHauptberuf(); MitarbeiterVerwendungVerwendungChange(); } diff --git a/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php b/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php index bc87a097d..492b2f838 100644 --- a/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php +++ b/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php @@ -167,6 +167,10 @@ echo ' + + From 935b37016673dae276c0f0382a986502259aac8d Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 17 Feb 2021 15:07:09 +0100 Subject: [PATCH 12/84] added filter for bachelor and master --- application/config/infocenter.php | 5 ++ application/controllers/system/Variables.php | 16 +++- application/libraries/VariableLib.php | 12 +++ .../models/system/Variablenname_model.php | 3 +- .../system/infocenter/infocenterData.php | 10 +-- .../infocenter/infocenterFreigegebenData.php | 9 +- .../infocenterReihungstestAbsolviertData.php | 9 +- .../js/infocenter/infocenterPersonDataset.js | 90 +++++++++++++++++-- system/dbupdate_3.3.php | 1 + 9 files changed, 126 insertions(+), 29 deletions(-) create mode 100644 application/config/infocenter.php diff --git a/application/config/infocenter.php b/application/config/infocenter.php new file mode 100644 index 000000000..555c30996 --- /dev/null +++ b/application/config/infocenter.php @@ -0,0 +1,5 @@ + 'basis/variable:rw', 'getVar' => 'basis/variable:rw', - 'changeStudiensemesterVar' => 'basis/variable:rw' + 'changeStudiensemesterVar' => 'basis/variable:rw', + 'changeStudengangsTypVar' => 'basis/variable:rw' ) ); @@ -50,7 +51,9 @@ class Variables extends Auth_Controller public function getVar() { $name = $this->input->get('name'); - $this->outputJson($this->VariableModel->getVariables($this->_uid, array($name))); + $typ = $this->input->get('typ'); + + $this->outputJson($this->VariableModel->getVariables($this->_uid, array($name, $typ))); } /** @@ -66,6 +69,15 @@ class Variables extends Auth_Controller $this->outputJson($result); } + public function changeStudengangsTypVar() + { + $name = $this->input->post('name'); + $change = $this->input->post('change'); + + $result = $this->variablelib->changeStudengangsTypVar($this->_uid, $name, $change); + $this->outputJson($result); + } + /** * Retrieve the UID of the logged user and checks if it is valid */ diff --git a/application/libraries/VariableLib.php b/application/libraries/VariableLib.php index 2f038531b..a503eb999 100644 --- a/application/libraries/VariableLib.php +++ b/application/libraries/VariableLib.php @@ -100,6 +100,18 @@ class VariableLib return $result; } + public function changeStudengangsTypVar($uid, $name, $change) + { + $result = error('error when setting variable!'); + + if (isEmptyString($uid) || isEmptyString($name) || isEmptyString($change)) + return $result; + + $result = $this->_ci->VariableModel->setVariable($uid, $name, $change); + $this->_setVariable($uid, $name); + return $result; + } + /** * "Refreshes" variable value with given name by retrieving current value from db and saving it. * @param $uid diff --git a/application/models/system/Variablenname_model.php b/application/models/system/Variablenname_model.php index 7b2a2cf88..005834f67 100644 --- a/application/models/system/Variablenname_model.php +++ b/application/models/system/Variablenname_model.php @@ -11,7 +11,8 @@ class Variablenname_model extends DB_Model ORDER BY studienjahr_kurzbz, start ) sem WHERE start > now() - LIMIT 1;' + LIMIT 1;', + 'infocenter_studiensgangtyp' => 'SELECT infocenter_studiensgangtyp FROM public.tbl_variablename LIMIT 1' ); /** diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 0c7030059..d9f12eb56 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -1,16 +1,17 @@ config->load('infocenter'); $APP = '\'infocenter\''; $REJECTED_STATUS = '\'Abgewiesener\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\', \'Interessent rejected\''; $LOGDATA_NAME_PARKED = '\'Parked\''; $LOGDATA_NAME_ONHOLD = '\'Onhold\''; $LOGTYPE_KURZBZ = '\'Processstate\''; $STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\''; - $ADDITIONAL_STG = '10021,10027'; + $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $AKTE_TYP = '\'identity\', \'zgv_bakk\''; $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; @@ -142,10 +143,7 @@ AND pss.bewerbung_abgeschicktamum IS NOT NULL -- AND pss.bestaetigtam IS NULL AND ps.person_id = p.person_id - AND (sg.typ IN ('.$STUDIENGANG_TYP.') - OR - sg.studiengang_kz in('.$ADDITIONAL_STG.') - ) + AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' AND NOT EXISTS ( SELECT 1 diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index aab69b651..3b7ff1dbe 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -1,12 +1,13 @@ config->load('infocenter'); $APP = '\'infocenter\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\''; $REJECTED_STATUS = '\'Abgewiesener\''; - $ADDITIONAL_STG = '10021,10027,10002'; + $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\''; $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; @@ -109,10 +110,6 @@ WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id - AND (sg.typ IN ('.$STUDIENGANG_TYP.') - OR - sg.studiengang_kz in('.$ADDITIONAL_STG.') - ) AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' LIMIT 1 ) AS "StgAbgeschickt", diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 22b122bb0..6b0918174 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -1,11 +1,12 @@ config->load('infocenter'); $APP = '\'infocenter\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\''; - $ADDITIONAL_STG = '10021,10027'; + $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; $query = ' @@ -90,10 +91,6 @@ WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id - AND (sg.typ IN ('.$STUDIENGANG_TYP.') - OR - sg.studiengang_kz in('.$ADDITIONAL_STG.') - ) AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' LIMIT 1 ) AS "StgAbgeschickt", diff --git a/public/js/infocenter/infocenterPersonDataset.js b/public/js/infocenter/infocenterPersonDataset.js index 87a40c0f1..03d1d13a1 100644 --- a/public/js/infocenter/infocenterPersonDataset.js +++ b/public/js/infocenter/infocenterPersonDataset.js @@ -20,22 +20,30 @@ if (FHC_JS_DATA_STORAGE_OBJECT.called_method == 'index') */ var InfocenterPersonDataset = { infocenter_studiensemester_variablename: 'infocenter_studiensemester', + infocenter_studienganstyp_variablename: 'infocenter_studiensgangtyp', /** * adds person table additional actions html (above and beneath it) */ - appendTableActionsHtml: function(infocenter_studiensemester) + appendTableActionsHtml: function(infocenter_studiensemester, infocenter_studiengangstyp) { var url = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/system/messages/Messages/writeTemplate"; var formHtml = '
'; $("#datasetActionsTop").before(formHtml); - var studienSemesterHtml = ' ' + infocenter_studiensemester + - ' '; @@ -56,9 +64,19 @@ var InfocenterPersonDataset = { // userdefined Semestervariable shown independently of personcount, // it is possible to change the semester $("#datasetActionsTop, #datasetActionsBottom").append( - "
"+ - "
"+studienSemesterHtml+"
"+ - "

"); + "
" + + "
" + auswahlStudienart + "
" + + "
" + studienSemesterHtml + "
" + + "
" + + "

" + ); + + InfocenterPersonDataset.selectStudiengangTyp(infocenter_studiengangstyp) + + $('.auswahlStudienArt').change(function() + { + InfocenterPersonDataset.changeStudengangsTyp($(this).find('option:selected').attr('data-id')); + }); $("button.incStudiensemester").click(function() { InfocenterPersonDataset.changeStudiensemesterUservar(1); @@ -115,6 +133,22 @@ var InfocenterPersonDataset = { ); }, + selectStudiengangTyp: function(typ) + { + switch (typ) + { + case 'b, m' : + $('.auswahlStudienArt [data-id="all"]').attr('selected', 'selected'); + break; + case 'b' : + $('.auswahlStudienArt [data-id="bachelor"]').attr('selected', 'selected'); + break; + case 'm' : + $('.auswahlStudienArt [data-id="master"]').attr('selected', 'selected'); + break; + } + }, + /** * sets functionality for the actions above and beneath the person table */ @@ -173,6 +207,45 @@ var InfocenterPersonDataset = { }); }, + changeStudengangsTyp: function($typ) + { + switch ($typ) + { + case 'all' : + var change = 'b\', \'m'; + break; + case 'bachelor' : + var change = 'b'; + break; + case 'master' : + var change = 'm'; + break; + } + + FHC_AjaxClient.showVeil(); + + FHC_AjaxClient.ajaxCallPost( + 'system/Variables/changeStudengangsTypVar', + { + 'name': InfocenterPersonDataset.infocenter_studienganstyp_variablename, + 'change': change, + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + // refresh filterwidget with page reload + FHC_FilterWidget.reloadDataset(); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_AjaxClient.hideVeil(); + alert(textStatus); + } + } + ); + }, + /** * initializes change of the uservariable infocenter_studiensemesster, either * to next semester (change > 0) or previous semester (change < 0) @@ -211,7 +284,8 @@ var InfocenterPersonDataset = { FHC_AjaxClient.ajaxCallGet( 'system/Variables/getVar', { - 'name': InfocenterPersonDataset.infocenter_studiensemester_variablename + 'name' : InfocenterPersonDataset.infocenter_studiensemester_variablename, + 'typ' : InfocenterPersonDataset.infocenter_studienganstyp_variablename }, { successCallback: function(data, textStatus, jqXHR) { @@ -220,7 +294,7 @@ var InfocenterPersonDataset = { if (typeof callback === "function") { var infocenter_studiensemester = FHC_AjaxClient.getData(data); - callback(infocenter_studiensemester[InfocenterPersonDataset.infocenter_studiensemester_variablename]); + callback(infocenter_studiensemester[InfocenterPersonDataset.infocenter_studiensemester_variablename], infocenter_studiensemester[InfocenterPersonDataset.infocenter_studienganstyp_variablename]); } } }, diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 2336ebad4..4ed52c321 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -3232,6 +3232,7 @@ if(!@$db->db_query("SELECT 0 FROM public.tbl_variablenname WHERE 0 = 1")) INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'kontofilterstg\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'kollision_student\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'infocenter_studiensemester\', null); + INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'infocenter_studiensgangtyp\', \'b\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_zeitsperre\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_reservierung\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_kollision\', \'false\'); From d9cbea680e4c30660842bda00064b45ac5d188bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Thu, 25 Feb 2021 15:25:41 +0100 Subject: [PATCH 13/84] Fixed Loading of AZG Relevant Checkbox in FAS Fixed missing Column Warning in DB Update --- .../mitarbeiter/mitarbeiterverwendungdialog.xul.php | 2 +- rdf/bisverwendung.rdf.php | 10 ++++++++-- system/dbupdate_3.3.php | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php b/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php index 492b2f838..197df7d27 100644 --- a/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php +++ b/content/mitarbeiter/mitarbeiterverwendungdialog.xul.php @@ -168,7 +168,7 @@ echo '
- diff --git a/rdf/bisverwendung.rdf.php b/rdf/bisverwendung.rdf.php index 81eb1f444..16e6daba5 100644 --- a/rdf/bisverwendung.rdf.php +++ b/rdf/bisverwendung.rdf.php @@ -84,12 +84,17 @@ function draw_row($row) $hauptberuflich = $row->hauptberuflich?'Ja':'Nein'; else $hauptberuflich = ''; - + if(is_bool($row->zeitaufzeichnungspflichtig)) $zeitaufzeichnungspflichtig = $row->zeitaufzeichnungspflichtig?'Ja':'Nein'; else $zeitaufzeichnungspflichtig = ''; - + + if(is_bool($row->azgrelevant)) + $azgrelevant = $row->azgrelevant?'Ja':'Nein'; + else + $azgrelevant = ''; + echo ' @@ -119,6 +124,7 @@ function draw_row($row) dv_art.']]> inkludierte_lehre.']]> + '; diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 3e6b82111..97bae6eab 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4471,8 +4471,8 @@ if(!$result = @$db->db_query("SELECT azgrelevant FROM bis.tbl_bisverwendung LIMI $qry = " ALTER TABLE bis.tbl_bisverwendung ADD COLUMN azgrelevant boolean; UPDATE bis.tbl_bisverwendung SET azgrelevant = zeitaufzeichnungspflichtig; - UPDATE bis.tbl_bisverwendung SET zeitaufzeichnungspflichtig = true WHERE ba1code=103; - "; + UPDATE bis.tbl_bisverwendung SET zeitaufzeichnungspflichtig = true WHERE ba1code=103 AND beschausmasscode!=5; + "; if(!$db->db_query($qry)) echo 'bis.tbl_bisverwendung: '.$db->db_last_error().'
'; From 95c2e4bf9cbaecae638bae66206939844f0fc568 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Fri, 26 Feb 2021 00:25:59 +0100 Subject: [PATCH 14/84] fix true false --- .../mitarbeiter/mitarbeiterverwendungdialog.js.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/mitarbeiter/mitarbeiterverwendungdialog.js.php b/content/mitarbeiter/mitarbeiterverwendungdialog.js.php index 123f471f8..1119c468d 100644 --- a/content/mitarbeiter/mitarbeiterverwendungdialog.js.php +++ b/content/mitarbeiter/mitarbeiterverwendungdialog.js.php @@ -88,7 +88,7 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id) var predicateNS = "http://www.technikum-wien.at/mitarbeiter/rdf"; fixangestellt = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#fixangestellt" )); - + azgrelevant = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#azgrelevant" )); //neuer Datensatz wird angelegt MitarbeiterVerwendungDetailNeu='true'; @@ -113,13 +113,13 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id) { zeitaufzeichnungspflichtig='Nein'; } - if (azgrelevant=='Ja') + if (!azgrelevant) { - azgrelevant='Ja'; + azgrelevant='Nein'; } else { - azgrelevant='Nein'; + azgrelevant='Ja'; } } @@ -147,10 +147,10 @@ function MitarbeiterVerwendungInit(mitarbeiter_uid, bisverwendung_id) document.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked=true; else document.getElementById('mitarbeiter-verwendung-detail-checkbox-zeitaufzeichnungspflichtig').checked=false; - if(azgrelevant=='Ja') - document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=true; - else + if(azgrelevant=='Nein') document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=false; + else + document.getElementById('mitarbeiter-verwendung-detail-checkbox-azgrelevant').checked=true; MitarbeiterVerwendungDetailToggleHauptberuf(); MitarbeiterVerwendungVerwendungChange(); } From fb7835de57adb18f4e89a03b365e795744330d4f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 8 Mar 2021 12:53:59 +0100 Subject: [PATCH 15/84] added new zeitwuensche permission --- system/checkroles.php | 2 +- system/checksystem.php | 1 + vilesci/personen/lektor_uebersicht.php | 3 ++- vilesci/personen/zeitwunsch.php | 15 ++++++++++++--- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/system/checkroles.php b/system/checkroles.php index 54839437e..1f57857a1 100644 --- a/system/checkroles.php +++ b/system/checkroles.php @@ -54,7 +54,7 @@ $data = array 'rolle_kurzbz' => 'admin', 'berechtigung' => array ( - 'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', 'basis/organisationseinheit', 'basis/ort', 'basis/orgform', 'basis/person', 'basis/planner', 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/tempus', 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', 'lehre/vorrueckung', 'lv-plan', 'lv-plan/gruppenentfernen', 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', 'student/vorrueckung', 'system/developer', 'system/loginasuser', 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', 'wawi/storno' + 'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', 'basis/organisationseinheit', 'basis/ort', 'basis/orgform', 'basis/person', 'basis/planner', 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/tempus', 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', 'lehre/vorrueckung', 'lv-plan', 'lv-plan/gruppenentfernen', 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', 'mitarbeiter/zeitsperre', 'mitarbeiter/zeitwuensche', 'news', 'planner', 'preinteressent', 'raumres', 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', 'student/vorrueckung', 'system/developer', 'system/loginasuser', 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', 'wawi/storno' ) ) ); diff --git a/system/checksystem.php b/system/checksystem.php index 3253dd5d4..5f03a55ef 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -171,6 +171,7 @@ $berechtigungen = array( array('mitarbeiter/stammdaten','Stammdaten der Mitarbeiter'), array('mitarbeiter/urlaube','Mit diesem Recht werden im CIS die Urlaube von allen Mitarbeiter sichtbar'), array('mitarbeiter/zeitsperre','Zeitsperren- und Urlaubsverwaltung'), + array('mitarbeiter/zeitwuensche','Berechtigung um Zeitwünsche zu editieren'), array('news','News eintragen'), array('planner','Planner Verwaltung'), array('preinteressent','Verwaltung der Preinteressenten'), diff --git a/vilesci/personen/lektor_uebersicht.php b/vilesci/personen/lektor_uebersicht.php index 0a1f9b1cc..f96bbac27 100644 --- a/vilesci/personen/lektor_uebersicht.php +++ b/vilesci/personen/lektor_uebersicht.php @@ -106,7 +106,8 @@ if(!isset($_GET['searchstr'])) $email=$row->uid.'@'.DOMAIN; echo "$email"; - echo "Edit"; + if($rechte->isBerechtigt('student/stammdaten', null, 's') || $rechte->isBerechtigt('mitarbeiter/stammdaten', null, 's')) + echo "Edit"; echo ""; if ($row->lektor) { diff --git a/vilesci/personen/zeitwunsch.php b/vilesci/personen/zeitwunsch.php index 36f1c5e87..b5f88f97f 100644 --- a/vilesci/personen/zeitwunsch.php +++ b/vilesci/personen/zeitwunsch.php @@ -157,7 +157,13 @@ $updatevon = 0; ?> isBerechtigt('mitarbeiter/zeitwuensche', null, 'suid')) + $readonly = ''; + + for ($j=1; $j<7; $j++) { echo ''.$tagbez[1][$j].''; for ($i=0;$i<$num_rows_stunde;$i++) @@ -166,7 +172,7 @@ $updatevon = 0; if ($index=="") $index=1; $bgcolor=$cfgStdBgcolor[$index+3]; - echo ''; + echo ''; } echo ''; } @@ -189,7 +195,10 @@ $updatevon = 0;

- + isBerechtigt('mitarbeiter/zeitwuensche', null, 'suid')) + echo '' + ?>

From 2c9ca77500e7b26a41ddeb39ab5e250d28cd50f0 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 18 Mar 2021 19:14:56 +0100 Subject: [PATCH 16/84] Fixed code indentation, standart output, includes path, removed unused variables and added a check to mail send where missing --- system/account_deaktivierung_mail.php | 221 +++--- system/check_neue_lektoren.php | 46 +- system/check_studentlehrverband.php | 146 ++-- system/erinnerungsmail_coodle.php | 43 +- system/sync/sync_stpldev_stpl.php | 1003 +++++++++++++++---------- 5 files changed, 854 insertions(+), 605 deletions(-) diff --git a/system/account_deaktivierung_mail.php b/system/account_deaktivierung_mail.php index 8668290d7..ede3f1f2f 100644 --- a/system/account_deaktivierung_mail.php +++ b/system/account_deaktivierung_mail.php @@ -1,5 +1,7 @@ and * Rudolf Hangl . */ -/* - * - Dieses Script versendet automatisch Mails an Accounts die Deaktiviert wurden. - * und informiert die Benutzer ueber die Folgen der Deaktivierung - * + +/** + * Dieses Script versendet automatisch Mails an Accounts die Deaktiviert wurden. + * und informiert die Benutzer ueber die Folgen der Deaktivierung */ -require_once('../config/vilesci.config.inc.php'); -require_once('../include/basis_db.class.php'); -require_once('../include/mail.class.php'); + +require_once(dirname(__FILE__).'/../config/vilesci.config.inc.php'); +require_once(dirname(__FILE__).'/../include/basis_db.class.php'); +require_once(dirname(__FILE__).'/../include/mail.class.php'); $db = new basis_db(); -$text=''; -$wochen_zum_entfernen=1; -echo ' - - - Account Deaktivierung - Infomails - - - -

Account Deaktivierung - Infomails

'; +$text = ''; +$wochen_zum_entfernen = 1; // Alle die vor einer Woche inaktiv gesetzt wurden darueber informieren -$qry = "SELECT uid, (SELECT mitarbeiter_uid FROM public.tbl_mitarbeiter WHERE mitarbeiter_uid=uid) as mitarbeiter FROM public.tbl_benutzer WHERE aktiv=false AND updateaktivam=CURRENT_DATE- interval '".$wochen_zum_entfernen." week'"; -if($result = $db->db_query($qry)) +$qry = "SELECT uid, + (SELECT mitarbeiter_uid FROM public.tbl_mitarbeiter WHERE mitarbeiter_uid = uid) as mitarbeiter + FROM public.tbl_benutzer + WHERE aktiv = false + AND updateaktivam = CURRENT_DATE - interval '".$wochen_zum_entfernen." week'"; + +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - if($row->mitarbeiter!='') + if ($row->mitarbeiter != '') { - //Mitarbeiter + // Mitarbeiter $message = "Dies ist eine automatische Nachricht!\n"; $message .= "\n"; - $message .= "Wir möchten Sie darauf aufmerksam machen, dass Ihr Benutzerdatensatz deaktiviert wurde. Durch diese Deaktivierung wurden Sie auch aus allen Email-Verteilern gelöscht. \n\n"; - $message .= "Sollte innerhalb von 12 Monaten nach der Deaktivierung keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; + $message .= "Wir möchten Sie darauf aufmerksam machen, dass Ihr Benutzerdatensatz deaktiviert wurde. + Durch diese Deaktivierung wurden Sie auch aus allen Email-Verteilern gelöscht. \n\n"; + $message .= "Sollte innerhalb von 12 Monaten nach der Deaktivierung keine neuerliche Aktivierung Ihres + Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; $message .= " - Ihr Account, \n"; $message .= " - Ihre Mailbox (inkl. aller E-Mails) und\n"; $message .= " - Ihr Home-Verzeichnis (inkl. aller Dateien) gelöscht werden.\n"; $message .= "\n"; - $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, sich umgehend mit den KollegInnen in der Personalabteilung in Verbindung zu setzen: "; + $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, + sich umgehend mit den KollegInnen in der Personalabteilung in Verbindung zu setzen: "; $message .= "Frau Natalie König, natalie.koenig@technikum-wien.at\n"; $message .= "\n"; $message .= "Mit freundlichen Grüßen\n"; @@ -66,21 +69,25 @@ if($result = $db->db_query($qry)) $message .= "Höchstädtplatz 6\n"; $message .= "1200 Wien \n"; $message .= "\n"; - $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren."; + $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, + können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren."; } else { - //Student + // Student $message = "Dies ist eine automatische Nachricht!\n"; $message .= "\n"; - $message .= "Wir möchten Sie darauf aufmerksam machen, dass Ihr Benutzerdatensatz deaktiviert wurde. Durch diese Deaktivierung wurden Sie auch aus allen Email-Verteilern gelöscht.\n"; + $message .= "Wir möchten Sie darauf aufmerksam machen, dass Ihr Benutzerdatensatz deaktiviert wurde. + Durch diese Deaktivierung wurden Sie auch aus allen Email-Verteilern gelöscht.\n"; $message .= "\n"; - $message .= "Sollte innerhalb von 6 Monaten (für Studierende) bzw. 3 Wochen (für AbbrecherInnen) nach der Deaktivierung keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; + $message .= "Sollte innerhalb von 6 Monaten (für Studierende) bzw. 3 Wochen (für AbbrecherInnen) nach der + Deaktivierung keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; $message .= " - Ihr Account,\n"; $message .= " - Ihre Mailbox (inkl. aller E-Mails) und\n"; $message .= " - Ihr Home-Verzeichnis (inkl. aller Dateien) gelöscht werden.\n"; $message .= "\n"; - $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, sich umgehend mit Ihrer Studiengangsassistenz in Verbindung zu setzen.\n"; + $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, + sich umgehend mit Ihrer Studiengangsassistenz in Verbindung zu setzen.\n"; $message .= "\n"; $message .= "Mit freundlichen Grüßen\n"; $message .= "\n"; @@ -88,35 +95,44 @@ if($result = $db->db_query($qry)) $message .= "Höchstädtplatz 6\n"; $message .= "1200 Wien\n"; $message .= "\n"; - $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; + $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, + können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; } $to = $row->uid.'@'.DOMAIN; - $mail = new mail($to,'no-reply@'.DOMAIN,'Ihr Datensatz wurde deaktiviert! '.$row->uid, $message); - $mail->send(); - $text.= "Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + $mail = new mail($to, 'no-reply@'.DOMAIN, 'Ihr Datensatz wurde deaktiviert! '.$row->uid, $message); + if ($mail->send()) + $text .= "Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + else + $text .= "Fehler beim Senden des Mails an $to: ".$message; } } // Letzte Warnung vor Accountloeschung verschicken // Abbrecher -$qry = "SELECT uid FROM public.tbl_benutzer JOIN public.tbl_student ON(uid=student_uid) WHERE - aktiv=false AND updateaktivam=CURRENT_DATE- interval '".DEL_ABBRECHER_WEEKS." week' - AND get_rolle_prestudent (prestudent_id, NULL)='Abbrecher' "; -if($result = $db->db_query($qry)) +$qry = "SELECT uid + FROM public.tbl_benutzer + JOIN public.tbl_student ON(uid=student_uid) + WHERE aktiv = false + AND updateaktivam = CURRENT_DATE - interval '".DEL_ABBRECHER_WEEKS." week' + AND get_rolle_prestudent (prestudent_id, NULL) = 'Abbrecher'"; + +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { $message = "Dies ist eine automatische Nachricht!\n"; $message .= "\n"; - $message .= "ACHTUNG: Ihr Benutzerdatensatz wurde vor ".(DEL_ABBRECHER_WEEKS > 1?DEL_ABBRECHER_WEEKS." Wochen ":"einer Woche ")."deaktiviert! Sollte innerhalb der nächsten Tage keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; + $message .= "ACHTUNG: Ihr Benutzerdatensatz wurde vor ".(DEL_ABBRECHER_WEEKS > 1?DEL_ABBRECHER_WEEKS." Wochen ":"einer Woche ")."deaktiviert! + Sollte innerhalb der nächsten Tage keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; $message .= " - Ihr Account,\n"; $message .= " - Ihre Mailbox (inkl. aller E-Mails) und\n"; $message .= " - Ihr Home-Verzeichnis (inkl. aller Dateien) gelöscht werden.\n"; $message .= "\n"; - $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, sich umgehend mit Ihrer Studiengangsassistenz in Verbindung zu setzen.\n"; + $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, sich umgehend mit Ihrer + Studiengangsassistenz in Verbindung zu setzen.\n"; $message .= "\n"; $message .= "Mit freundlichen Grüßen\n"; $message .= "\n"; @@ -124,61 +140,84 @@ if($result = $db->db_query($qry)) $message .= "Höchstädtplatz 6\n"; $message .= "1200 Wien \n"; $message .= "\n"; - $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; + $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, + können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; $to = $row->uid.'@'.DOMAIN; - $mail = new mail($to,'no-reply@'.DOMAIN,'Ihr Datensatz wurde deaktiviert! Letzte Warnung '.$row->uid, $message); - $mail->send(); - $text.= "Letzte Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + $mail = new mail($to, 'no-reply@'.DOMAIN, 'Ihr Datensatz wurde deaktiviert! Letzte Warnung '.$row->uid, $message); + if ($mail->send()) + $text .= "Letzte Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + else + $text .= "Fehler beim Senden des Mails an $to: ".$message; } } - // Abbrecher an Bibliothek melden wenn diese inaktiv gesetzt wurden -$qry = "SELECT uid, vorname, nachname, titelpre, titelpost FROM public.tbl_benutzer JOIN public.tbl_student ON(uid=student_uid) JOIN public.tbl_person USING(person_id) WHERE - tbl_benutzer.aktiv=false AND tbl_benutzer.updateaktivam=(CURRENT_DATE - '1 day'::interval)::date - AND get_rolle_prestudent (prestudent_id, NULL)='Abbrecher' "; -if($result = $db->db_query($qry)) + +$qry = "SELECT uid, + vorname, + nachname, + titelpre, + titelpost + FROM public.tbl_benutzer + JOIN public.tbl_student ON (uid = student_uid) + JOIN public.tbl_person USING (person_id) + WHERE tbl_benutzer.aktiv = false + AND tbl_benutzer.updateaktivam = (CURRENT_DATE - '1 day'::interval)::date + AND get_rolle_prestudent (prestudent_id, NULL) = 'Abbrecher'"; + +if ($result = $db->db_query($qry)) { - if($db->db_num_rows($result)>0) + if ($db->db_num_rows($result) > 0) { $message = "Dies ist eine automatische Nachricht!\n\n"; - $message.= "Die folgenden Studierenden wurden als Abbrecher eingetragen:\n\n"; - while($row = $db->db_fetch_object($result)) + $message .= "Die folgenden Studierenden wurden als Abbrecher eingetragen:\n\n"; + + while ($row = $db->db_fetch_object($result)) { - $message.=trim($row->titelpre.' '.$row->vorname.' '.$row->nachname.' '.$row->titelpost).' ( '.$row->uid.'@'.DOMAIN." )\n"; + $message .= trim($row->titelpre.' '.$row->vorname.' '.$row->nachname.' '.$row->titelpost).' ( '.$row->uid.'@'.DOMAIN." )\n"; } + $message .= "\nMit freundlichen Grüßen\n"; $message .= "\n"; $message .= "Fachhochschule Technikum Wien\n"; $message .= "Höchstädtplatz 6\n"; $message .= "1200 Wien \n"; $to = 'wienerro@technikum-wien.at, astfaell@technikum-wien.at, olensky@technikum-wien.at'; - $mail = new mail($to,'no-reply@'.DOMAIN,'Abbrecher Information', $message); - if($mail->send()) - $text.="Abbrecher Infomail an $to verschickt\n"; + + $mail = new mail($to, 'no-reply@'.DOMAIN, 'Abbrecher Information', $message); + if ($mail->send()) + $text .= "Abbrecher Infomail an $to verschickt\n"; else - $text.="Fehler beim Versenden des Abbrecher Infomails an $to !\n"; + $text .= "Fehler beim Senden des Mails an $to: ".$message; } } // Studenten -$qry = "SELECT uid FROM public.tbl_benutzer JOIN public.tbl_student ON(uid=student_uid) WHERE - aktiv=false AND updateaktivam=CURRENT_DATE- interval '".DEL_STUDENT_WEEKS." week' - AND get_rolle_prestudent (prestudent_id, NULL)<>'Abbrecher'"; -if($result = $db->db_query($qry)) + +$qry = "SELECT uid + FROM public.tbl_benutzer + JOIN public.tbl_student ON (uid=student_uid) + WHERE aktiv = false + AND updateaktivam = CURRENT_DATE - interval '".DEL_STUDENT_WEEKS." week' + AND get_rolle_prestudent (prestudent_id, NULL) <> 'Abbrecher'"; + +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { $message = "Dies ist eine automatische Nachricht!\n"; $message .= "\n"; - $message .= "ACHTUNG: Ihr Benutzerdatensatz wurde vor ".(DEL_STUDENT_WEEKS > 1?DEL_STUDENT_WEEKS." Wochen ":"einer Woche ")."deaktiviert! Sollte innerhalb der nächsten Tage keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; + $message .= "ACHTUNG: Ihr Benutzerdatensatz wurde vor ".(DEL_STUDENT_WEEKS > 1?DEL_STUDENT_WEEKS." Wochen ":"einer Woche "). + "deaktiviert! Sollte innerhalb der nächsten Tage keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, + dann werden automatisch auch\n"; $message .= " - Ihr Account,\n"; $message .= " - Ihre Mailbox (inkl. aller E-Mails) und\n"; $message .= " - Ihr Home-Verzeichnis (inkl. aller Dateien) gelöscht werden\n"; $message .= "\n"; - $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, sich umgehend mit Ihrer Studiengangsassistenz in Verbindung zu setzen.\n"; + $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, + sich umgehend mit Ihrer Studiengangsassistenz in Verbindung zu setzen.\n"; $message .= "\n"; $message .= "Mit freundlichen Grüßen\n"; $message .= "\n"; @@ -186,32 +225,42 @@ if($result = $db->db_query($qry)) $message .= "Höchstädtplatz 6\n"; $message .= "1200 Wien \n"; $message .= "\n"; - $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; + $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, + können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; $to = $row->uid.'@'.DOMAIN; - $mail = new mail($to,'no-reply@'.DOMAIN,'Ihr Datensatz wurde deaktiviert! Letzte Warnung '.$row->uid, $message); - $mail->send(); - $text.= "Letzte Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + $mail = new mail($to, 'no-reply@'.DOMAIN, 'Ihr Datensatz wurde deaktiviert! Letzte Warnung '.$row->uid, $message); + if ($mail->send()) + $text .= "Letzte Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + else + $text .= "Fehler beim Versenden des Abbrecher Infomails an $to !\n"; } } // Mitarbeiter -$qry = "SELECT uid FROM public.tbl_benutzer JOIN public.tbl_mitarbeiter ON(uid=mitarbeiter_uid) WHERE - aktiv=false AND updateaktivam=CURRENT_DATE- interval '".DEL_MITARBEITER_WEEKS." week' "; -if($result = $db->db_query($qry)) +$qry = "SELECT uid + FROM public.tbl_benutzer + JOIN public.tbl_mitarbeiter ON (uid = mitarbeiter_uid) + WHERE aktiv = false + AND updateaktivam = CURRENT_DATE - interval '".DEL_MITARBEITER_WEEKS." week' "; + +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { $message = "Dies ist eine automatische Nachricht!\n"; $message .= "\n"; - $message .= "ACHTUNG: Ihr Benutzerdatensatz wurde vor ".(DEL_MITARBEITER_WEEKS > 1?DEL_MITARBEITER_WEEKS." Wochen ":"einer Woche ")."deaktiviert! Sollte innerhalb der nächsten Tage keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, dann werden automatisch auch\n"; + $message .= "ACHTUNG: Ihr Benutzerdatensatz wurde vor ".(DEL_MITARBEITER_WEEKS > 1?DEL_MITARBEITER_WEEKS." Wochen ":"einer Woche "). + "deaktiviert! Sollte innerhalb der nächsten Tage keine neuerliche Aktivierung Ihres Benutzerdatensatzes erfolgen, + dann werden automatisch auch\n"; $message .= " - Ihr Account,\n"; $message .= " - Ihre Mailbox (inkl. aller E-Mails) und\n"; $message .= " - Ihr Home-Verzeichnis (inkl. aller Dateien) gelöscht werden\n"; $message .= "\n"; - $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, sich umgehend mit den KollegInnen in der Personalabteilung in Verbindung zu setzen: "; + $message .= "Falls es sich bei der Deaktivierung um einen Irrtum handelt, würden wir Sie bitten, + sich umgehend mit den KollegInnen in der Personalabteilung in Verbindung zu setzen: "; $message .= "Frau Natalie König, natalie.koenig@technikum-wien.at\n"; $message .= "\n"; $message .= "Mit freundlichen Grüßen\n"; @@ -220,22 +269,20 @@ if($result = $db->db_query($qry)) $message .= "Höchstädtplatz 6\n"; $message .= "1200 Wien \n"; $message .= "\n"; - $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; + $message .= "Falls Sie weiterhin über Neuigkeiten an der FH Technikum Wien informiert werden wollen, + können Sie unter www.technikum-wien.at/newsletter den kostenlosen Newsletter abonnieren.\n"; $to = $row->uid.'@'.DOMAIN; - $mail = new mail($to,'no-reply@'.DOMAIN, 'Ihr Datensatz wurde deaktiviert! Letzte Warnung '.$row->uid, $message); - $mail->send(); - $text.= "Letzte Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + $mail = new mail($to, 'no-reply@'.DOMAIN, 'Ihr Datensatz wurde deaktiviert! Letzte Warnung '.$row->uid, $message); + if ($mail->send()) + $text .= "Letzte Warnung zur Accountloeschung wurde an $row->uid verschickt\n"; + else + $text .= "Fehler beim Versenden des Abbrecher Infomails an $to !\n"; } } -echo nl2br($text); -if($text!='') -{ - $mail = new mail(MAIL_IT.', vilesci@technikum-wien.at', 'vilesci@'.DOMAIN, 'Account Deaktivierung', "Dies ist eine automatische Mail!\nFolgende Warnungen zur Accountloeschung wurden versandt:\n\n".$text); - $mail->send(); -} +echo $text; -echo ''; ?> + diff --git a/system/check_neue_lektoren.php b/system/check_neue_lektoren.php index e84953998..43bb38bf5 100644 --- a/system/check_neue_lektoren.php +++ b/system/check_neue_lektoren.php @@ -1,5 +1,7 @@ and * Rudolf Hangl . */ -/* + +/** * Prueft ob am Vortag neue Lektoren einen Lehrauftrag bekommen haben * die vorher noch keinen hatten. * Diese werden dann an die Geschaeftsstelle gemeldet damit diese @@ -27,18 +30,19 @@ * Wenn kein aktuelles Studiensemester vorhanden ist, wird keine * Nachricht versendet. */ -require_once('../config/vilesci.config.inc.php'); -require_once('../include/studiensemester.class.php'); -require_once('../include/mail.class.php'); + +require_once(dirname(__FILE__).'/../config/vilesci.config.inc.php'); +require_once(dirname(__FILE__).'/../include/studiensemester.class.php'); +require_once(dirname(__FILE__).'/../include/mail.class.php'); $stsem = new studiensemester(); -if(!$studiensemester = $stsem->getakt()) +if (!$studiensemester = $stsem->getakt()) die('Es ist kein aktuelles Studiensemester vorhanden -> Versand nicht noetig'); $db = new basis_db(); -//Alle Lektoren holen die am Vortag zu einer Lehreinheit zugeteilt wurden -//und in diesem Studiensemester noch keinen Lehrauftrag haben. +// Alle Lektoren holen die am Vortag zu einer Lehreinheit zugeteilt wurden +// und in diesem Studiensemester noch keinen Lehrauftrag haben. $qry=" SELECT vorname, nachname, titelpre, titelpost, uid FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) @@ -56,29 +60,33 @@ WHERE uid IN( ) "; -if($result = $db->db_query($qry)) +if ($result = $db->db_query($qry)) { - if($db->db_num_rows($result)>0) + if ($db->db_num_rows($result) > 0) { - $mitarbeiter=''; - while($row = $db->db_fetch_object($result)) + $mitarbeiter = ''; + + while ($row = $db->db_fetch_object($result)) { $mitarbeiter .= trim($row->titelpre.' '.$row->vorname.' '.$row->nachname.' '.$row->titelpost)." ($row->uid)\n"; } + $message = "Dies ist eine automatische Mail!\n"; - $message.= "Folgende Lektoren haben in diesem Studiensemester zum ersten Mal einen Lehrauftrag erhalten:\n\n"; - $message.=$mitarbeiter; + $message .= "Folgende Lektoren haben in diesem Studiensemester zum ersten Mal einen Lehrauftrag erhalten:\n\n"; + $message .= $mitarbeiter; $to = MAIL_GST; - $mail = new mail($to,'vilesci@'.DOMAIN,'Neue Lektoren mit Lehrauftrag', $message); - if($mail->send()) - echo "Mail wurde an $to versandt:
".nl2br($message); + $mail = new mail($to, 'vilesci@'.DOMAIN, 'Neue Lektoren mit Lehrauftrag', $message); + if ($mail->send()) + echo "Mail wurde an $to versandt: ".$message; else - echo "Fehler beim Senden des Mails an $to:
".nl2br($message); + echo "Fehler beim Senden des Mails an $to: ".$message; } else { echo 'Es sind keine neuen Lektoren hinzugefuegt worden'; } } -?> \ No newline at end of file + +?> + diff --git a/system/check_studentlehrverband.php b/system/check_studentlehrverband.php index 60728ab6f..6546dc872 100644 --- a/system/check_studentlehrverband.php +++ b/system/check_studentlehrverband.php @@ -1,5 +1,7 @@ and * Gerald Simane-Sequens */ -// ************************************ -// * Script zur Pruefung und Korrektur -// * moeglicher Inkonsistenzen -// * -// * - Studenten ohne Prestudent_id werden korrigiert -// * - Inkonsistenzen der Tabellen tbl_studentlehrverband, tbl_student werden korrigiert -// ********************************** + +/** + * Script zur Pruefung und Korrektur + * moeglicher Inkonsistenzen + * + * - Studenten ohne Prestudent_id werden korrigiert + * - Inkonsistenzen der Tabellen tbl_studentlehrverband, tbl_student werden korrigiert + */ + require_once(dirname(__FILE__).'/../config/vilesci.config.inc.php'); require_once(dirname(__FILE__).'/../include/studiensemester.class.php'); require_once(dirname(__FILE__).'/../include/person.class.php'); @@ -38,34 +42,41 @@ require_once(dirname(__FILE__).'/../include/mail.class.php'); $db = new basis_db(); -$anzahl_neue_prestudent_id=0; -$anzahl_fehler_prestudent=0; -$anzahl_gruppenaenderung=0; -$anzahl_gruppenaenderung_fehler=0; -$text=''; -$statistik =''; -$abunterbrecher_verschoben_error=0; -$abunterbrecher_verschoben=0; +$anzahl_neue_prestudent_id = 0; +$anzahl_fehler_prestudent = 0; +$anzahl_gruppenaenderung = 0; +$anzahl_gruppenaenderung_fehler = 0; +$text = ''; +$statistik = ''; +$abunterbrecher_verschoben_error = 0; +$abunterbrecher_verschoben = 0; -// **** -// * Bei Studenten mit fehlener Prestudent_id wird die passende id ermittelt und Eingetragen -// **** -$qry = "SELECT student_uid, studiengang_kz FROM public.tbl_student WHERE prestudent_id is null"; -if($result = $db->db_query($qry)) +// Bei Studenten mit fehlener Prestudent_id wird die passende id ermittelt und Eingetragen +$qry = "SELECT student_uid, studiengang_kz FROM public.tbl_student WHERE prestudent_id IS NULL"; + +if ($result = $db->db_query($qry)) { - $text.="Suche Studenten mit fehlender Prestudent_id ...\n\n"; + $text .= "Suche Studenten mit fehlender Prestudent_id ...\n\n"; - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - $qry_id = "SELECT tbl_prestudent.prestudent_id FROM campus.vw_student JOIN public.tbl_prestudent USING(person_id) WHERE uid=".$db->db_add_param($row->student_uid)." AND tbl_prestudent.studiengang_kz=".$db->db_add_param($row->studiengang_kz); - if($result_id = $db->db_query($qry_id)) + $qry_id = "SELECT tbl_prestudent.prestudent_id + FROM campus.vw_student + JOIN public.tbl_prestudent USING(person_id) + WHERE uid = ".$db->db_add_param($row->student_uid)." + AND tbl_prestudent.studiengang_kz = ".$db->db_add_param($row->studiengang_kz); + + if ($result_id = $db->db_query($qry_id)) { - if($db->db_num_rows($result_id)==1) + if ($db->db_num_rows($result_id) == 1) { - if($row_id = $db->db_fetch_object($result_id)) + if ($row_id = $db->db_fetch_object($result_id)) { - $qry_upd = "UPDATE public.tbl_student SET prestudent_id=".$db->db_add_param($row_id->prestudent_id)." WHERE student_uid=".$db->db_add_param($row->student_uid); - if($db->db_query($qry_upd)) + $qry_upd = "UPDATE public.tbl_student + SET prestudent_id = ".$db->db_add_param($row_id->prestudent_id)." + WHERE student_uid = ".$db->db_add_param($row->student_uid); + + if ($db->db_query($qry_upd)) { $text .= "Prestudent_id von $row->student_uid wurde auf $row_id->prestudent_id gesetzt\n"; $anzahl_neue_prestudent_id++; @@ -77,12 +88,12 @@ if($result = $db->db_query($qry)) $anzahl_fehler_prestudent++; } } - elseif($db->db_num_rows($result_id)>1) + elseif ($db->db_num_rows($result_id) > 1) { $text .= "Student $row->student_uid hat keine Prestudent_id und MEHRERE passende Prestudenteintraege\n"; $anzahl_fehler_prestudent++; } - elseif($db->db_num_rows($result_id)==0) + elseif( $db->db_num_rows($result_id) == 0) { $text .= "Student $row->student_uid hat keine Prestudent_id und KEINE passenden Prestudenteintraege\n"; $anzahl_fehler_prestudent++; @@ -90,20 +101,18 @@ if($result = $db->db_query($qry)) } else { - $text.="Fehler bei Abfrage:".$db->db_last_error()."\n"; + $text .= "Fehler bei Abfrage:".$db->db_last_error()."\n"; $anzahl_fehler_prestudent++; } } } -// ***** -// * Gruppenzuteilung von Abbrechern und Unterbrechern korrigieren. -// * Abbrecher werden in die Gruppe 0A verschoben -// * Unterbrecher in die Gruppe 0B -// ***** -$text.="\n\nKorrigiere Gruppenzuteilungen von Ab-/Unterbrechern\n"; +// Gruppenzuteilung von Abbrechern und Unterbrechern korrigieren. +// Abbrecher werden in die Gruppe 0A verschoben +// Unterbrecher in die Gruppe 0B +$text .= "\n\nKorrigiere Gruppenzuteilungen von Ab-/Unterbrechern\n"; -//Alle Ab-/Unterbrecher holen die nicht im 0. Semester sind +// Alle Ab-/Unterbrecher holen die nicht im 0. Semester sind $qry = "SELECT student_uid, tbl_student.studiengang_kz, @@ -133,19 +142,19 @@ $qry = "SELECT ) "; -if($result = $db->db_query($qry)) +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - //Eintrag nur korrigieren wenn der Abbrecher/Unterbrecher Status der letzte in diesem Studiensemester ist + // Eintrag nur korrigieren wenn der Abbrecher/Unterbrecher Status der letzte in diesem Studiensemester ist $prestd = new prestudent(); $prestd->getLastStatus($row->prestudent_id, $row->studiensemester_kurzbz); - if($prestd->status_kurzbz=='Unterbrecher' || $prestd->status_kurzbz=='Abbrecher') + if ($prestd->status_kurzbz == 'Unterbrecher' || $prestd->status_kurzbz == 'Abbrecher') { - //Studentlehrverbandeintrag aktualisieren + // Studentlehrverbandeintrag aktualisieren $student = new student(); - if($student->studentlehrverband_exists($row->student_uid, $row->studiensemester_kurzbz)) + if ($student->studentlehrverband_exists($row->student_uid, $row->studiensemester_kurzbz)) $student->new = false; else { @@ -158,47 +167,45 @@ if($result = $db->db_query($qry)) $student->studiensemester_kurzbz=$row->studiensemester_kurzbz; $student->studiengang_kz = $row->studiengang_kz; $student->semester = '0'; - $student->verband = ($prestd->status_kurzbz=='Unterbrecher'?'B':'A'); + $student->verband = ($prestd->status_kurzbz == 'Unterbrecher' ? 'B' : 'A'); $student->gruppe = ' '; $student->updateamum = date('Y-m-d H:i:s'); $student->updatevon = 'chkstudentlvb'; - //Pruefen ob der Lehrverband exisitert, wenn nicht dann wird er angelegt + // Pruefen ob der Lehrverband exisitert, wenn nicht dann wird er angelegt $lehrverband = new lehrverband(); - if(!$lehrverband->exists($student->studiengang_kz, $student->semester, $student->verband, $student->gruppe)) + if (!$lehrverband->exists($student->studiengang_kz, $student->semester, $student->verband, $student->gruppe)) { $lehrverband->studiengang_kz = $student->studiengang_kz; $lehrverband->semester = $student->semester; $lehrverband->verband = $student->verband; $lehrverband->gruppe = $student->gruppe; - $lehrverband->bezeichnung = ($student->verband=='A'?'Abbrecher':'Unterbrecher'); + $lehrverband->bezeichnung = ($student->verband == 'A' ? 'Abbrecher' : 'Unterbrecher'); $lehrverband->save(true); } - if($student->save_studentlehrverband()) + if ($student->save_studentlehrverband()) { - $text.="Student $student->uid wurde im $row->studiensemester_kurzbz in die Gruppe $student->semester$student->verband verschoben\n"; + $text .= "Student $student->uid wurde im $row->studiensemester_kurzbz in die Gruppe $student->semester$student->verband verschoben\n"; $abunterbrecher_verschoben++; } else { - $text.="Fehler biem Speichern des Lehrverbandeintrages bei $student->student_uid:".$student->errormsg."\n"; + $text .= "Fehler biem Speichern des Lehrverbandeintrages bei $student->student_uid:".$student->errormsg."\n"; $abunterbrecher_verschoben_error++; } } } } -// ***** -// * Unterschiedliche Gruppenzuteilungen in tbl_studentlehrverband - tbl_student korrigieren -// ***** +// Unterschiedliche Gruppenzuteilungen in tbl_studentlehrverband - tbl_student korrigieren $stsem = new studiensemester(); $stsem = $stsem->getNearest(); -$text.="\n\nKorrigiere Inkonsitenzen in den Tabellen tbl_studentlehrverband, tbl_student (Verwendetes Studiensemester: $stsem)\n\n"; +$text .= "\n\nKorrigiere Inkonsitenzen in den Tabellen tbl_studentlehrverband, tbl_student (Verwendetes Studiensemester: $stsem)\n\n"; $qry = "SELECT tbl_student.studiengang_kz as studiengang_kz_old, @@ -221,25 +228,33 @@ $qry = "SELECT tbl_student.gruppe<>tbl_studentlehrverband.gruppe )"; -if($result = $db->db_query($qry)) +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - $qry = "UPDATE public.tbl_student SET studiengang_kz=".$db->db_add_param($row->studiengang_kz).", semester=".$db->db_add_param($row->semester).", verband=".$db->db_add_param($row->verband).", gruppe=".$db->db_add_param($row->gruppe)." WHERE student_uid=".$db->db_add_param($row->student_uid); - if($db->db_query($qry)) + $qry = "UPDATE public.tbl_student + SET studiengang_kz = ".$db->db_add_param($row->studiengang_kz).", + semester = ".$db->db_add_param($row->semester).", + verband = ".$db->db_add_param($row->verband).", + gruppe = ".$db->db_add_param($row->gruppe)." + WHERE student_uid = ".$db->db_add_param($row->student_uid); + + if ($db->db_query($qry)) { - $text .= "Bei Student $row->student_uid wurde die Gruppenzuordnung von $row->studiengang_kz_old/$row->semester_old/$row->verband_old/$row->gruppe_old auf $row->studiengang_kz/$row->semester/$row->verband/$row->gruppe geaendert\n"; + $text .= "Bei Student $row->student_uid wurde die Gruppenzuordnung + von $row->studiengang_kz_old/$row->semester_old/$row->verband_old/$row->gruppe_old + auf $row->studiengang_kz/$row->semester/$row->verband/$row->gruppe geaendert\n"; $anzahl_gruppenaenderung++; } else { - $text.="Fehler beim Aendern der Gruppe: ".$db->db_last_error()."\n"; + $text .= "Fehler beim Aendern der Gruppe: ".$db->db_last_error()."\n"; $anzahl_gruppenaenderung_fehler++; } } } else - $text.="Fehler bei Abfrage".$db->db_last_error(); + $text .= "Fehler bei Abfrage: ".$db->db_last_error(); $statistik .= "Prestudent_id wurde bei $anzahl_neue_prestudent_id Studenten korrigiert\n"; $statistik .= "$anzahl_fehler_prestudent Fehler sind bei der Korrektur der Prestudent_id aufgetreten\n"; @@ -250,11 +265,12 @@ $statistik .= "$anzahl_gruppenaenderung_fehler Fehler sind bei der Korrektur der $statistik .= "\n\n"; $mail = new mail(MAIL_ADMIN, 'vilesci@'.DOMAIN, 'CHECK Studentlehrverband', $statistik.$text); -if($mail->send()) +if ($mail->send()) echo 'Mail an '.MAIL_ADMIN.' wurde versandt'; else echo 'Fehler beim Versenden des Mails an '.MAIL_ADMIN; -echo nl2br("\n\n".$statistik.$text); +echo "\n\n".$statistik.$text; ?> + diff --git a/system/erinnerungsmail_coodle.php b/system/erinnerungsmail_coodle.php index caec9a9cb..963fa19ac 100644 --- a/system/erinnerungsmail_coodle.php +++ b/system/erinnerungsmail_coodle.php @@ -1,4 +1,5 @@ */ + /** * Cronjob zur Versendung von Infomails wenn Coodle Umfragen Beendet sind */ -require_once('../config/vilesci.config.inc.php'); -require_once('../include/coodle.class.php'); -require_once('../include/phrasen.class.php'); -require_once('../include/benutzer.class.php'); -require_once('../include/mail.class.php'); + +require_once(dirname(__FILE__).'/../config/vilesci.config.inc.php'); +require_once(dirname(__FILE__).'/../include/coodle.class.php'); +require_once(dirname(__FILE__).'/../include/phrasen.class.php'); +require_once(dirname(__FILE__).'/../include/benutzer.class.php'); +require_once(dirname(__FILE__).'/../include/mail.class.php'); $coodle = new coodle(); $coodle->getCoodleBeendet(); @@ -33,10 +36,10 @@ $p = new phrasen(); foreach($coodle->result as $row) { $benutzer = new benutzer($row->ersteller_uid); - $subject='Ablauf der Coodle Umfrage'; - - $mailtext=''; - $mailtexthtml=''; + $subject = 'Ablauf der Coodle Umfrage'; + $mailtext = ''; + $mailtexthtml = ''; + switch($benutzer->geschlecht) { case 'm': @@ -53,19 +56,23 @@ foreach($coodle->result as $row) break; } - $mailtext.="Ihre Terminumfrage zum Thema \"".$row->titel."\" ist beendet.\n"; - $mailtext.="Bitte folgen sie dem Link um die Terminumfrage abzuschließen: ".CIS_ROOT."cis/public/coodle.php?coodle_id=".$row->coodle_id."\n\n"; - $mailtext.= $p->t('mail/signatur'); + $mailtext .= "Ihre Terminumfrage zum Thema \"".$row->titel."\" ist beendet.\n"; + $mailtext .= "Bitte folgen sie dem Link um die Terminumfrage abzuschließen: ".CIS_ROOT."cis/public/coodle.php?coodle_id=".$row->coodle_id."\n\n"; + $mailtext .= $p->t('mail/signatur'); - $mailtexthtml.="Ihre Terminumfrage zum Thema \"".$row->titel."\" ist beendet.
"; - $mailtexthtml.="Bitte folgen sie dem Link um die Terminumfrage abzuschließen: coodle_id."\">Link zur Umfrage

"; - $mailtexthtml.= nl2br($p->t('mail/signatur')); + $mailtexthtml .= "Ihre Terminumfrage zum Thema \"".$row->titel."\" ist beendet.
"; + $mailtexthtml .= "Bitte folgen sie dem Link um die Terminumfrage abzuschließen: coodle_id."\">Link zur Umfrage

"; + $mailtexthtml .= nl2br($p->t('mail/signatur')); $mail = new mail($row->ersteller_uid.'@'.DOMAIN, 'no-reply@'.DOMAIN, $subject, $mailtext); $mail->setHTMLContent($mailtexthtml); + if($mail->send()) - echo "Mail versandt an $row->ersteller_uid CoodleID $row->coodle_id
\n"; + echo "Mail versandt an $row->ersteller_uid CoodleID $row->coodle_id\n"; else - echo "Fehler beim Mailversand an $row->ersteller_uid CoodleID $row->coodle_id
\n"; + echo "Fehler beim Mailversand an $row->ersteller_uid CoodleID $row->coodle_id\n"; } -?> \ No newline at end of file + +?> + diff --git a/system/sync/sync_stpldev_stpl.php b/system/sync/sync_stpldev_stpl.php index fedc9794c..ae5adc25d 100644 --- a/system/sync/sync_stpldev_stpl.php +++ b/system/sync/sync_stpldev_stpl.php @@ -1,4 +1,5 @@ and * Rudolf Hangl . */ + /** * Syncronisiert die Tabelle Stundenplandev mit der Tabelle Stundenplan - * und versendet Benachrichtigungsmails mit den geänderten Stunden + * und versendet Benachrichtigungsmails mit den geaenderten Stunden * an die Betroffenen Lektoren und Studenten * Uebersichtsmails werden an LV-Planung und Administration geschickt */ + require_once(dirname(__FILE__).'/../../config/vilesci.config.inc.php'); require_once(dirname(__FILE__).'/../../config/global.config.inc.php'); require_once(dirname(__FILE__).'/../../include/functions.inc.php'); @@ -36,109 +39,101 @@ require_once(dirname(__FILE__).'/../../include/phrasen.class.php'); $p_de = new phrasen('German'); $p_en = new phrasen('English'); -echo ' - - - LV-Plan-Synchro (stpldev-stpl) - -'; +$sendmail = (boolean)true; if (isset($_GET['sendmail'])) { if ($_GET['sendmail']=='true') - $sendmail=(boolean)true; + $sendmail = (boolean)true; else - $sendmail=(boolean)false; + $sendmail = (boolean)false; } -else - $sendmail=(boolean)true; -$mailstudents=(boolean)true; +$mailstudents = (boolean)true; // Commandline Paramter parsen bei Aufruf ueber Cronjob // zb php sync_stpldev_stpl.php --sendmail false $longopt = array( - "sendmail:", + "sendmail:", ); + $commandlineparams = getopt('', $longopt); -if(isset($commandlineparams['sendmail']) && $commandlineparams['sendmail']=='false') - $sendmail=false; +if (isset($commandlineparams['sendmail']) && $commandlineparams['sendmail']=='false') + $sendmail = false; $datum = new datum(); -$count_del=0; -$count_ins=0; -$count_upd=0; -$count_err=0; +$count_del = 0; +$count_ins = 0; +$count_upd = 0; +$count_err = 0; -// error log fuer jeden Studiengang -$error_log=array(); // Mails an die Lektoren und Verbaende -$message=array(); +$message = array(); + // Nachrichten fuer die LV-Planung -$message_stpl=' -'; -// error_log -$message_sync=''; +$message_stpl = ' + '; - -// Mail Headers festlegen -$headers= "MIME-Version: 1.0\r\n"; -$headers.="Content-Type: text/html; charset=UTF-8\r\n"; +$message_sync = ''; $stsem = new studiensemester(); $studiensemester = $stsem->getaktorNearest(); -$ss=new studiensemester($studiensemester); -$datum_begin=$ss->start; -$datum_ende=$ss->ende; +$ss = new studiensemester($studiensemester); +$datum_begin = $ss->start; +$datum_ende = $ss->ende; //$datum_begin='2012-08-03'; //$datum_ende='2013-02-02'; // $ss->ende -if(defined('LVPLAN_SYNC_ENDE') && LVPLAN_SYNC_ENDE!='') - $datum_ende=LVPLAN_SYNC_ENDE; +if (defined('LVPLAN_SYNC_ENDE') && LVPLAN_SYNC_ENDE != '') + $datum_ende = LVPLAN_SYNC_ENDE; -$db =new basis_db(); +$db = new basis_db(); $stgwhere = ''; $stgwheredev = ''; -if(isset($_GET['custom'])) + +if (isset($_GET['custom'])) { $sendmail = isset($_GET['mail']); $mailstudents = (isset($_GET['nostudentmail'])?false:true); - $studiengang_kz=$_GET['studiengang_kz']; + $studiengang_kz = $_GET['studiengang_kz']; $stgwhere = " AND studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER); $stgwheredev = " AND vw_stundenplandev.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER); $datum_begin = $datum->formatDatum($_GET['von'],'Y-m-d'); $datum_ende = $datum->formatDatum($_GET['bis'],'Y-m-d'); } + $message_summary = ''; // Beginnzeiten holen $qry = "SELECT stunde,to_char(beginn, 'HH24:MI') AS beginn FROM lehre.tbl_stunde"; -$beginnzeit_arr=array(); -if($result = $db->db_query($qry)) +$beginnzeit_arr = array(); + +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - $beginnzeit_arr[$row->stunde]=$row->beginn; + $beginnzeit_arr[$row->stunde] = $row->beginn; } } + // ************* FUNCTIONS **************** // function getStudentsFromGroup($studiengang_kz, $semester, $verband, $gruppe, $gruppe_kurzbz, $studiensemester_kurzbz) @@ -146,7 +141,7 @@ function getStudentsFromGroup($studiengang_kz, $semester, $verband, $gruppe, $gr $db = new basis_db(); $students = array(); - if($gruppe_kurzbz=='') + if ($gruppe_kurzbz=='') { $qry = "SELECT distinct student_uid @@ -159,12 +154,13 @@ function getStudentsFromGroup($studiengang_kz, $semester, $verband, $gruppe, $gr studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz)." AND studiengang_kz = ".$db->db_add_param($studiengang_kz)." AND semester = ".$db->db_add_param($semester); - if(trim($verband)!='') + + if (trim($verband) != '') { - $qry.=" AND verband = ".$db->db_add_param($verband); - if(trim($gruppe)!='') + $qry .= " AND verband = ".$db->db_add_param($verband); + if (trim($gruppe) != '') { - $qry.=" AND gruppe = ".$db->db_add_param($gruppe); + $qry .= " AND gruppe = ".$db->db_add_param($gruppe); } } } @@ -184,11 +180,11 @@ function getStudentsFromGroup($studiengang_kz, $semester, $verband, $gruppe, $gr } - if($db->db_query($qry)) + if ($db->db_query($qry)) { - while($row = $db->db_fetch_object()) + while ($row = $db->db_fetch_object()) { - $students[]=$row->student_uid; + $students[] = $row->student_uid; } } @@ -196,125 +192,145 @@ function getStudentsFromGroup($studiengang_kz, $semester, $verband, $gruppe, $gr } // **************************************** // -$message_begin=' - -'.$p_de->t('lvplan/automatischeMail').'
'.$p_de->t('lvplan/folgendeAenderungen').'
-'.$p_en->t('lvplan/automatischeMail').'
'.$p_en->t('lvplan/folgendeAenderungen').'
'; -/************************************************** +$message_begin = ' + + '.$p_de->t('lvplan/automatischeMail').'
'.$p_de->t('lvplan/folgendeAenderungen').'
+ '.$p_en->t('lvplan/automatischeMail').'
'.$p_en->t('lvplan/folgendeAenderungen').'
'; + +/** * Datensaetze holen die neu sind */ -echo 'Neue Datensätze werden geholt. ('.date('H:i:s').')
';flush(); + +echo 'Neue Datensaetze werden geholt. ('.date('H:i:s').')'."\n"; +flush(); + $message_stpl .= 'Neue Datensätze werden geholt. ('.date('H:i:s').')'; -$sql_query="SELECT * FROM lehre.vw_stundenplandev - WHERE +$sql_query = "SELECT * + FROM lehre.vw_stundenplandev + WHERE datum>=".$db->db_add_param($datum_begin)." AND datum<=".$db->db_add_param($datum_ende)." ".$stgwhere." - AND NOT EXISTS - (SELECT stundenplan_id FROM lehre.tbl_stundenplan - WHERE - datum>=".$db->db_add_param($datum_begin)." - AND datum<=".$db->db_add_param($datum_ende)." - AND stundenplan_id=stundenplandev_id) - ORDER BY datum, stunde;"; - + AND NOT EXISTS + (SELECT stundenplan_id FROM lehre.tbl_stundenplan + WHERE + datum>=".$db->db_add_param($datum_begin)." + AND datum<=".$db->db_add_param($datum_ende)." + AND stundenplan_id=stundenplandev_id) + ORDER BY datum, stunde;"; if (!$result = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); - $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!'.$db->db_last_error()."\n"; + $message_sync .= $sql_query.' fehlgeschlagen!'.$db->db_last_error(); } else { - echo 'Neue Datensätze werden angelegt.
';flush(); + echo 'Neue Datensaetze werden angelegt.'."\n"; + flush(); + while ($row = $db->db_fetch_object($result)) { - //echo '.';flush(); $sql_query='INSERT INTO lehre.tbl_stundenplan - (stundenplan_id,unr,mitarbeiter_uid,datum,stunde,ort_kurzbz,studiengang_kz,semester,verband,gruppe, - gruppe_kurzbz,titel,'.(LVPLAN_ANMERKUNG_ANZEIGEN?'anmerkung,':'').'fix,updateamum,updatevon,insertamum,insertvon,lehreinheit_id) VALUES'; //spalte anmerkung nur syncen, wenn im Config aktiv - $sql_query.="(".$db->db_add_param($row->stundenplandev_id).",". - $db->db_add_param($row->unr).",". - $db->db_add_param($row->uid).",". - $db->db_add_param($row->datum).",". - $db->db_add_param($row->stunde).",". - $db->db_add_param($row->ort_kurzbz).",". - $db->db_add_param($row->studiengang_kz).",". + (stundenplan_id, unr, mitarbeiter_uid, datum, stunde,ort_kurzbz, studiengang_kz, semester, verband,gruppe, + gruppe_kurzbz,titel,'.(LVPLAN_ANMERKUNG_ANZEIGEN?'anmerkung,':'').'fix,updateamum,updatevon,insertamum,insertvon,lehreinheit_id) + VALUES'; //spalte anmerkung nur syncen, wenn im Config aktiv + + $sql_query .= "(".$db->db_add_param($row->stundenplandev_id).", ". + $db->db_add_param($row->unr).", ". + $db->db_add_param($row->uid).", ". + $db->db_add_param($row->datum).", ". + $db->db_add_param($row->stunde).", ". + $db->db_add_param($row->ort_kurzbz).", ". + $db->db_add_param($row->studiengang_kz).", ". $db->db_add_param($row->semester); - if ($row->verband==null) - $sql_query.=',NULL'; + + if ($row->verband == null) + $sql_query .= ', NULL'; else - $sql_query.=",".$db->db_add_param($row->verband); - if ($row->gruppe==null) - $sql_query.=',NULL'; + $sql_query .= ", ".$db->db_add_param($row->verband); + + if ($row->gruppe == null) + $sql_query .= ', NULL'; else - $sql_query.=",".$db->db_add_param($row->gruppe); - if ($row->gruppe_kurzbz==null) - $sql_query.=',NULL'; + $sql_query .= ", ".$db->db_add_param($row->gruppe); + + if ($row->gruppe_kurzbz == null) + $sql_query .= ', NULL'; else - $sql_query.=",".$db->db_add_param($row->gruppe_kurzbz); - $sql_query.=",".$db->db_add_param($row->titel); + $sql_query .= ", ".$db->db_add_param($row->gruppe_kurzbz); + + $sql_query .= ", ".$db->db_add_param($row->titel); + if (LVPLAN_ANMERKUNG_ANZEIGEN) //spalte anmerkung nur syncen, wenn im Config aktiv - $sql_query.=",".$db->db_add_param($row->anmerkung); - if ($row->fix=='t') - $sql_query.=',TRUE'; + $sql_query .= ", ".$db->db_add_param($row->anmerkung); + + if ($row->fix == 't') + $sql_query .= ', TRUE'; else - $sql_query.=',FALSE'; - $sql_query.=",".$db->db_add_param($row->updateamum).','. - $db->db_add_param($row->updatevon).','. - $db->db_add_param($row->insertamum).','. + $sql_query .= ', FALSE'; + + $sql_query .= ", ".$db->db_add_param($row->updateamum).', '. + $db->db_add_param($row->updatevon).', '. + $db->db_add_param($row->insertamum).', '. $db->db_add_param($row->insertvon); - if ($row->lehreinheit_id==null) - $sql_query.=',NULL'; + + if ($row->lehreinheit_id == null) + $sql_query .= ', NULL'; else - $sql_query.=','.$db->db_add_param($row->lehreinheit_id); - $sql_query.=');'; - //echo $sql_query; + $sql_query .= ', '.$db->db_add_param($row->lehreinheit_id); + + $sql_query .= ');'; + if (!$result_insert = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); - $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!'.$db->db_last_error()."\n"; + $message_sync .= $sql_query.' fehlgeschlagen!'.$db->db_last_error(); $count_err++; } else { $count_ins++; - if ($count_ins%10==0) + + if ($count_ins % 10 == 0) { echo '-'; flush(); } + // Mails vorbereiten // Lektoren - if (mb_substr($row->uid,0,1)!='_') + if (mb_substr($row->uid, 0, 1) != '_') { if (!isset($message[$row->uid]->isneu)) { if(!isset($message[$row->uid])) $message[$row->uid] = new stdClass(); - $message[$row->uid]->isneu=true; - $message[$row->uid]->mailadress=$row->uid.'@'.DOMAIN; - $message[$row->uid]->message_begin=$message_begin.'
'; - $message[$row->uid]->message=''.$p_de->t('lvplan/neueStunden').' / '.$p_en->t('lvplan/neueStunden').'
+ $message[$row->uid]->isneu = true; + $message[$row->uid]->mailadress = $row->uid.'@'.DOMAIN; + $message[$row->uid]->message_begin = $message_begin.'
'; + $message[$row->uid]->message = ' + '.$p_de->t('lvplan/neueStunden').' / '.$p_en->t('lvplan/neueStunden').' +
@@ -326,114 +342,156 @@ else '; } - $message[$row->uid]->message.="\n"; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; + + $message[$row->uid]->message .= "\n"; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; } + // Verband if ($mailstudents) { - $studenten = getStudentsFromGroup($row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz); + $studenten = getStudentsFromGroup( + $row->studiengang_kz, + $row->semester, + $row->verband, + $row->gruppe, + $row->gruppe_kurzbz, + $ss->studiensemester_kurzbz + ); foreach ($studenten as $student) { if (!isset($message[$student]->isneu)) { - if(!isset($message[$student])) + if (!isset($message[$student])) $message[$student] = new stdClass(); - $message[$student]->isneu=true; - $message[$student]->mailadress=$student.'@'.DOMAIN; - $message[$student]->message_begin=$message_begin.'
'; - $message[$student]->message=''.$p_de->t('lvplan/neueStunden').' / '.$p_en->t('lvplan/neueStunden').'
+ $message[$student]->isneu = true; + $message[$student]->mailadress = $student.'@'.DOMAIN; + $message[$student]->message_begin = $message_begin.'
'; + $message[$student]->message = ' + + '.$p_de->t('lvplan/neueStunden').' / '.$p_en->t('lvplan/neueStunden').' +
'.$p_de->t('lvplan/raum').'
'.$p_en->t('lvplan/raum').'
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$row->ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
'.$row->ort_kurzbz.''. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz + .''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
- + - - - + + + '; } - $message[$student]->message.="\n"; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; + $message[$student]->message .= "\n"; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; } } } } + foreach($message as $msg) - if($msg->isneu) - $msg->message.='
'.$p_de->t('lvplan/raum').'
'.$p_en->t('lvplan/raum').'
'.$p_de->t('lvplan/lehrverband').'
'.$p_en->t('lvplan/lehrverband').'
'. + $p_de->t('lvplan/lehrverband').'
'. + $p_en->t('lvplan/lehrverband').' +
'.$p_de->t('lvplan/lektor').'
'.$p_en->t('lvplan/lektor').'
'.$p_de->t('global/datum').'
'.$p_en->t('global/datum').'
'.$p_de->t('lvplan/stdBeginn').'
'.$p_en->t('lvplan/stdBeginn').'
'.$p_de->t('lvplan/lehrfach').'
'.$p_en->t('lvplan/lehrfach').'
'. + $p_de->t('global/datum').'
'.$p_en->t('global/datum').' +
'. + $p_de->t('lvplan/stdBeginn').'
'. + $p_en->t('lvplan/stdBeginn').' +
'. + $p_de->t('lvplan/lehrfach').'
'.$p_en->t('lvplan/lehrfach').' +
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$row->ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
'.$row->ort_kurzbz.''. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz. + ''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'

'; + if ($msg->isneu) + $msg->message .= '
'; } /************************************************** * Datensaetze holen die alt sind */ -echo '
Alte Datensätze werden geholt.('.date('H:i:s').')
';flush(); +echo 'Alte Datensaetze werden geholt.('.date('H:i:s').')'."\n"; +flush(); + $message_stpl .='
Alte Datensätze werden geholt.('.date('H:i:s').')
'; -$sql_query="SELECT * FROM lehre.vw_stundenplan - WHERE datum>=".$db->db_add_param($datum_begin)." - AND datum<=".$db->db_add_param($datum_ende)." ".$stgwhere." - AND NOT EXISTS - (SELECT stundenplandev_id FROM lehre.tbl_stundenplandev - WHERE datum>=".$db->db_add_param($datum_begin)." - AND datum<=".$db->db_add_param($datum_ende)." - AND stundenplandev_id=stundenplan_id);"; + +$sql_query = "SELECT * + FROM lehre.vw_stundenplan + WHERE datum>=".$db->db_add_param($datum_begin)." + AND datum<=".$db->db_add_param($datum_ende)." ".$stgwhere." + AND NOT EXISTS + (SELECT stundenplandev_id FROM lehre.tbl_stundenplandev + WHERE datum>=".$db->db_add_param($datum_begin)." + AND datum<=".$db->db_add_param($datum_ende)." + AND stundenplandev_id=stundenplan_id);"; + if (!$result = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error()."\n"; + $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); } else { - echo '
Alte Datensätze werden gelöscht.
';flush(); + echo 'Alte Datensaetze werden geloescht.'."\n"; + flush(); + while ($row = $db->db_fetch_object($result)) { - $sql_query='DELETE FROM lehre.tbl_stundenplan WHERE stundenplan_id='.$db->db_add_param($row->stundenplan_id); + $sql_query = 'DELETE FROM lehre.tbl_stundenplan WHERE stundenplan_id='.$db->db_add_param($row->stundenplan_id); - if (!$result_delete=$db->db_query($sql_query)) + if (!$result_delete = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); - $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!'.$db->db_last_error()."\n"; + + $message_sync .= $sql_query.' fehlgeschlagen!'.$db->db_last_error(); $count_err++; } else { $count_del++; - if ($count_del%10==0) + + if ($count_del % 10 == 0) { echo '-'; flush(); } + // Mails vorbereiten // Lektoren - if (mb_substr($row->uid,0,1)!='_') + if (mb_substr($row->uid,0,1) != '_') { if (!isset($message[$row->uid]->isalt)) { - if(!isset($message[$row->uid])) + if (!isset($message[$row->uid])) $message[$row->uid] = new stdClass(); - $message[$row->uid]->isalt=true; - $message[$row->uid]->mailadress=$row->uid.'@'.DOMAIN; - $message[$row->uid]->message_begin=$message_begin.'
'; - if(!isset($message[$row->uid]->message)) - $message[$row->uid]->message=''; - $message[$row->uid]->message.=''.$p_de->t('lvplan/geloeschteStunden').' / '.$p_en->t('lvplan/geloeschteStunden').'
+ $message[$row->uid]->isalt = true; + $message[$row->uid]->mailadress = $row->uid.'@'.DOMAIN; + $message[$row->uid]->message_begin = $message_begin.'
'; + + if (!isset($message[$row->uid]->message)) + $message[$row->uid]->message = ''; + + $message[$row->uid]->message .= ' + + '.$p_de->t('lvplan/geloeschteStunden').' / '.$p_en->t('lvplan/geloeschteStunden').'
@@ -445,68 +503,93 @@ else '; } - $message[$row->uid]->message.="\n"; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; + $message[$row->uid]->message .= "\n"; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; } + // Verband if ($mailstudents) { - $studenten = getStudentsFromGroup($row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz); + $studenten = getStudentsFromGroup( + $row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz + ); foreach ($studenten as $student) { if (!isset($message[$student]->isalt)) { - if(!isset($message[$student])) + if (!isset($message[$student])) $message[$student] = new stdClass(); - $message[$student]->isalt=true; - $message[$student]->mailadress=$student.'@'.DOMAIN; - $message[$student]->message_begin=$message_begin.'
'; - if(!isset($message[$student]->message)) - $message[$student]->message=''; - $message[$student]->message.=''.$p_de->t('lvplan/geloeschteStunden').' / '.$p_en->t('lvplan/geloeschteStunden').'
+ $message[$student]->isalt = true; + $message[$student]->mailadress = $student.'@'.DOMAIN; + $message[$student]->message_begin = $message_begin.'
'; + + if (!isset($message[$student]->message)) + $message[$student]->message = ''; + + $message[$student]->message .= + ' + '.$p_de->t('lvplan/geloeschteStunden').' / '.$p_en->t('lvplan/geloeschteStunden'). + '
'.$p_de->t('lvplan/raum').'
'.$p_en->t('lvplan/raum').'
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$row->ort_kurzbz.''.strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
'.$row->ort_kurzbz.''. + strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
- + - - + + '; } - $message[$student]->message.="\n"; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; + + $message[$student]->message .= "\n"; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; } } } } - foreach($message as $msg) - if(isset($msg->isalt)) - $msg->message.='
'.$p_de->t('lvplan/raum').'
'.$p_en->t('lvplan/raum').'
'.$p_de->t('lvplan/lehrverband').'
'.$p_en->t('lvplan/lehrverband').'
' + .$p_de->t('lvplan/lehrverband').'
'.$p_en->t('lvplan/lehrverband'). + ' +
'.$p_de->t('lvplan/lektor').'
'.$p_en->t('lvplan/lektor').'
'.$p_de->t('global/datum').'
'.$p_en->t('global/datum').'
'.$p_de->t('lvplan/stdBeginn').'
'.$p_en->t('lvplan/stdBeginn').'
'.$p_de->t('lvplan/lehrfach').'
'.$p_en->t('lvplan/lehrfach').'
'. + $p_de->t('lvplan/stdBeginn').'
'.$p_en->t('lvplan/stdBeginn'). + ' +
'. + $p_de->t('lvplan/lehrfach').'
'.$p_en->t('lvplan/lehrfach'). + ' +
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$row->ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
'.$row->ort_kurzbz.''. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz. + ''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'

'; + + foreach ($message as $msg) + if (isset($msg->isalt)) + $msg->message .= '
'; } /************************************************** * Datensaetze holen die anders sind */ -echo '
Geänderte Datensätze werden geholt.('.date('H:i:s').')
';flush(); -$message_stpl.='
Geänderte Datensätze werden geholt.('.date('H:i:s').')
'; -$sql_query="SELECT vw_stundenplandev.*, vw_stundenplan.datum AS old_datum, vw_stundenplan.stunde AS old_stunde, +echo 'Geaenderte Datensaetze werden geholt.('.date('H:i:s').')'."\n"; +flush(); + +$message_stpl .= '
Geänderte Datensätze werden geholt.('.date('H:i:s').')
'; + +$sql_query = "SELECT vw_stundenplandev.*, vw_stundenplan.datum AS old_datum, vw_stundenplan.stunde AS old_stunde, vw_stundenplan.ort_kurzbz AS old_ort_kurzbz, vw_stundenplan.lektor AS old_lektor, vw_stundenplan.uid AS old_uid, vw_stundenplan.titel AS old_titel, vw_stundenplan.anmerkung AS old_anmerkung @@ -524,103 +607,124 @@ $sql_query="SELECT vw_stundenplandev.*, vw_stundenplan.datum AS old_datum, vw_st vw_stundenplandev.gruppe_kurzbz!=vw_stundenplan.gruppe_kurzbz OR coalesce(vw_stundenplandev.titel,'')!=coalesce(vw_stundenplan.titel,'') OR vw_stundenplandev.fix!=vw_stundenplan.fix OR"; + if (LVPLAN_ANMERKUNG_ANZEIGEN) $sql_query .= " coalesce(vw_stundenplandev.anmerkung,'')!=coalesce(vw_stundenplan.anmerkung,'') OR"; + $sql_query .= " vw_stundenplandev.lehreinheit_id!=vw_stundenplan.lehreinheit_id ) AND vw_stundenplandev.datum>=".$db->db_add_param($datum_begin)." AND vw_stundenplandev.datum<=".$db->db_add_param($datum_ende)." ".$stgwheredev.";"; -//echo $sql_query.'
'; - - if (!$result = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); - $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!'.$db->db_last_error()."\n"; + + $message_sync .= $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); } else { - echo '
Datensätze werden geändert.
';flush(); + echo 'Datensaetze werden geaendert.'."\n"; + flush(); + while ($row = $db->db_fetch_object($result)) { - //echo '.';flush(); // Alten Eintrag aus tbl_stundenplan holen - $sql_query="SELECT * FROM lehre.tbl_stundenplandev WHERE stundenplandev_id=".$db->db_add_param($row->stundenplandev_id).";"; + $sql_query = "SELECT * FROM lehre.tbl_stundenplandev WHERE stundenplandev_id=".$db->db_add_param($row->stundenplandev_id).";"; + if (!$result_old = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); - $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!'.$db->db_last_error()."\n"; + + $message_sync .= $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); } else - $row_old=$db->db_fetch_object($result_old); + $row_old = $db->db_fetch_object($result_old); // Datensaetze aendern - $sql_query="UPDATE lehre.tbl_stundenplan SET - unr=".$db->db_add_param($row->unr). - ",mitarbeiter_uid=".$db->db_add_param($row->uid). - ",datum=".$db->db_add_param($row->datum). - ",stunde=".$db->db_add_param($row->stunde). - ",ort_kurzbz=".$db->db_add_param($row->ort_kurzbz). - ",studiengang_kz=".$db->db_add_param($row->studiengang_kz). - ",semester=".$db->db_add_param($row->semester); - if ($row->verband==null) - $sql_query.=',verband=NULL'; + $sql_query = "UPDATE lehre.tbl_stundenplan SET + unr = ".$db->db_add_param($row->unr). + ", mitarbeiter_uid = ".$db->db_add_param($row->uid). + ", datum = ".$db->db_add_param($row->datum). + ", stunde = ".$db->db_add_param($row->stunde). + ", ort_kurzbz = ".$db->db_add_param($row->ort_kurzbz). + ", studiengang_kz = ".$db->db_add_param($row->studiengang_kz). + ", semester = ".$db->db_add_param($row->semester); + + if ($row->verband == null) + $sql_query .= ', verband = NULL'; else - $sql_query.=",verband=".$db->db_add_param($row->verband); - if ($row->gruppe==null) - $sql_query.=',gruppe=NULL'; + $sql_query .= ", verband = ".$db->db_add_param($row->verband); + + if ($row->gruppe == null) + $sql_query .= ', gruppe = NULL'; else - $sql_query.=",gruppe=".$db->db_add_param($row->gruppe); - if ($row->gruppe_kurzbz==null) -// $sql_query.=",gruppe_kurzbz=NULL, titel=$row->titel"; --> Das war die urspruengliche query. row->titel von kindlm am 16.03.2012 entfernt und in eigenes if geschrieben. - $sql_query.=',gruppe_kurzbz=NULL'; + $sql_query .= ", gruppe = ".$db->db_add_param($row->gruppe); + + if ($row->gruppe_kurzbz == null) + $sql_query .= ', gruppe_kurzbz = NULL'; else - $sql_query.=",gruppe_kurzbz=".$db->db_add_param($row->gruppe_kurzbz); + $sql_query .= ", gruppe_kurzbz = ".$db->db_add_param($row->gruppe_kurzbz); + if (LVPLAN_ANMERKUNG_ANZEIGEN) //spalte anmerkung nur syncen, wenn im Config aktiv - $sql_query.=",anmerkung=".$db->db_add_param($row->anmerkung); - if ($row->titel=='') - $sql_query.=',titel=NULL'; + $sql_query .= ", anmerkung = ".$db->db_add_param($row->anmerkung); + + if ($row->titel == '') + $sql_query .= ', titel = NULL'; else - $sql_query.=",titel=".$db->db_add_param($row->titel); - if ($row->fix=='t') - $sql_query.=',fix=TRUE'; + $sql_query .= ", titel = ".$db->db_add_param($row->titel); + + if ($row->fix == 't') + $sql_query .= ', fix = TRUE'; else - $sql_query.=',fix=FALSE'; - $sql_query.=",updateamum=".$db->db_add_param($row->updateamum).",updatevon=".$db->db_add_param($row->updatevon); - if ($row->lehreinheit_id==null) - $sql_query.=',lehreinheit_id=NULL'; + $sql_query.=', fix = FALSE'; + + $sql_query .= ", updateamum = ".$db->db_add_param($row->updateamum).", updatevon = ".$db->db_add_param($row->updatevon); + + if ($row->lehreinheit_id == null) + $sql_query .= ', lehreinheit_id = NULL'; else - $sql_query.=",lehreinheit_id=".$db->db_add_param($row->lehreinheit_id); - $sql_query.=" WHERE stundenplan_id=".$db->db_add_param($row->stundenplandev_id).";"; - //echo $sql_query.'
'; - if (!$result_update=$db->db_query($sql_query)) + $sql_query .= ", lehreinheit_id = ".$db->db_add_param($row->lehreinheit_id); + + $sql_query .= " WHERE stundenplan_id = ".$db->db_add_param($row->stundenplandev_id).";"; + + if (!$result_update = $db->db_query($sql_query)) { - echo $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); - $message_sync.=$sql_query.' fehlgeschlagen!
'.$db->db_last_error(); + echo $sql_query.' fehlgeschlagen!'.$db->db_last_error()."\n"; + + $message_sync .= $sql_query.' fehlgeschlagen!
'.$db->db_last_error(); $count_err++; } else { $count_upd++; - if ($count_upd%10==0) + + if ($count_upd % 10 == 0) { echo '-'; flush(); } + // Mails vorbereiten // Lektoren - if (mb_substr($row->uid,0,1)!='_') + if (mb_substr($row->uid, 0, 1) != '_') { if (!isset($message[$row->uid]->isset)) { - if(!isset($message[$row->uid])) + if (!isset($message[$row->uid])) $message[$row->uid] = new stdClass(); - $message[$row->uid]->isset=true; - $message[$row->uid]->mailadress=$row->uid.'@'.DOMAIN; - $message[$row->uid]->message_begin=$message_begin.'
'; - if(!isset($message[$row->uid]->message)) - $message[$row->uid]->message=''; - $message[$row->uid]->message.=''.$p_de->t('lvplan/geaenderteStunden').' / '.$p_en->t('lvplan/geaenderteStunden').'
+ + $message[$row->uid]->isset = true; + $message[$row->uid]->mailadress = $row->uid.'@'.DOMAIN; + $message[$row->uid]->message_begin = $message_begin.'
'; + + if (!isset($message[$row->uid]->message)) + $message[$row->uid]->message = ''; + + $message[$row->uid]->message .= ' + + '.$p_de->t('lvplan/geaenderteStunden').' / '.$p_en->t('lvplan/geaenderteStunden').' + +
@@ -633,51 +737,64 @@ else '; } - $message[$row->uid]->message.="\n"; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - $message[$row->uid]->message.=''; - - $message[$row->uid]->message.="\n"; - $message[$row->uid]->message.=''; - $myclass=($row->ort_kurzbz!=$row->old_ort_kurzbz?'marked':'unmarked'); - $message[$row->uid]->message.=''; + $message[$row->uid]->message .= "\n"; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= ''; + $message[$row->uid]->message .= "\n"; + $message[$row->uid]->message .= ''; + $myclass=($row->ort_kurzbz != $row->old_ort_kurzbz?'marked':'unmarked'); + $message[$row->uid]->message .= ''; $myclass='unmarked'; - $message[$row->uid]->message.=''; - $myclass=($row->lektor!=$row->old_lektor?'marked':'unmarked'); - $message[$row->uid]->message.=''; - $myclass=(($row->datum!=$row->old_datum)?'marked':'unmarked'); - $message[$row->uid]->message.=''; - $myclass=(($row->stunde!=$row->old_stunde)?'marked':'unmarked'); - $message[$row->uid]->message.=''; - $myclass='unmarked'; - $message[$row->uid]->message.=''; - $myclass=($row->titel!=$row->old_titel?'marked':'unmarked'); - $message[$row->uid]->message.=''; + $message[$row->uid]->message .= ''; + $myclass = ($row->lektor != $row->old_lektor ? 'marked' : 'unmarked'); + $message[$row->uid]->message .= ''; + $myclass = (($row->datum != $row->old_datum) ? 'marked' : 'unmarked'); + $message[$row->uid]->message .= ''; + $myclass = (($row->stunde != $row->old_stunde) ? 'marked' : 'unmarked'); + $message[$row->uid]->message .= ''; + $myclass = 'unmarked'; + $message[$row->uid]->message .= ''; + $myclass = ($row->titel != $row->old_titel ? 'marked' : 'unmarked'); + $message[$row->uid]->message .= ''; } //wenn sich der Lektor geaendert hat dann auch den vorherigen lektor informieren //sofern es kein dummylektor ist - if($row->uid!=$row->old_uid) + if ($row->uid != $row->old_uid) { - if (mb_substr($row->old_uid,0,1)!='_') + if (mb_substr($row->old_uid, 0, 1) != '_') { if (!isset($message[$row->old_uid]->isset)) { - if(!isset($message[$row->old_uid])) + if (!isset($message[$row->old_uid])) $message[$row->old_uid] = new stdClass(); - $message[$row->old_uid]->isset=true; - $message[$row->old_uid]->mailadress=$row->old_uid.'@'.DOMAIN; - $message[$row->old_uid]->message_begin=$message_begin.'
'; - if(!isset($message[$row->old_uid]->message)) + $message[$row->old_uid]->isset = true; + $message[$row->old_uid]->mailadress = $row->old_uid.'@'.DOMAIN; + $message[$row->old_uid]->message_begin = $message_begin.'
'; + + if (!isset($message[$row->old_uid]->message)) $message[$row->old_uid]->message = ''; - $message[$row->old_uid]->message.=''.$p_de->t('lvplan/geaenderteStunden').' / '.$p_en->t('lvplan/geaenderteStunden').'
+ + $message[$row->old_uid]->message .= ' + + '.$p_de->t('lvplan/geaenderteStunden').' / '.$p_en->t('lvplan/geaenderteStunden').' + +
'.$p_de->t('lvplan/status').'
'.$p_en->t('lvplan/status').'
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$p_de->t('lvplan/vorher').' / '.$p_en->t('lvplan/vorher').': '.$row->old_ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->old_lektor.''.$row->old_datum.''.$row->old_stunde.' ('.$beginnzeit_arr[$row->old_stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->old_titel.'
'.$p_de->t('lvplan/jetzt').' / '.$p_en->t('lvplan/jetzt').': '.$row->ort_kurzbz.'
'.$p_de->t('lvplan/vorher').' / '.$p_en->t('lvplan/vorher').': '.$row->old_ort_kurzbz.''. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz. + ''.$row->old_lektor.''.$row->old_datum.''.$row->old_stunde.' ('.$beginnzeit_arr[$row->old_stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->old_titel.'
'.$p_de->t('lvplan/jetzt').' / '.$p_en->t('lvplan/jetzt').': '.$row->ort_kurzbz.''.strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
----------------
+ '. + strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.' + + '.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].') + '.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.') + '.$row->titel.'
----------------
@@ -690,112 +807,148 @@ else '; } - $message[$row->old_uid]->message.="\n"; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.=''; - $message[$row->old_uid]->message.="\n"; - $message[$row->old_uid]->message.=''; - $myclass=($row->ort_kurzbz!=$row->old_ort_kurzbz?'marked':'unmarked'); - $message[$row->old_uid]->message.=''; - $myclass='unmarked'; - $message[$row->old_uid]->message.=''; - $myclass=($row->lektor!=$row->old_lektor?'marked':'unmarked'); - $message[$row->old_uid]->message.=''; - $myclass=(($row->datum!=$row->old_datum)?'marked':'unmarked'); - $message[$row->old_uid]->message.=''; - $myclass=(($row->stunde!=$row->old_stunde)?'marked':'unmarked'); - $message[$row->old_uid]->message.=''; - $myclass='unmarked'; - $message[$row->old_uid]->message.=''; - $myclass=($row->titel!=$row->old_titel?'marked':'unmarked'); - $message[$row->old_uid]->message.=''; + $message[$row->old_uid]->message .= "\n"; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= ''; + $message[$row->old_uid]->message .= "\n"; + $message[$row->old_uid]->message .= ''; + $myclass = ($row->ort_kurzbz!=$row->old_ort_kurzbz ? 'marked' : 'unmarked'); + $message[$row->old_uid]->message .= ''; + $myclass = 'unmarked'; + $message[$row->old_uid]->message .= ''; + $myclass = ($row->lektor != $row->old_lektor ? 'marked' : 'unmarked'); + $message[$row->old_uid]->message .= ''; + $myclass = (($row->datum != $row->old_datum) ? 'marked' : 'unmarked'); + $message[$row->old_uid]->message .= ''; + $myclass = (($row->stunde != $row->old_stunde) ? 'marked' : 'unmarked'); + $message[$row->old_uid]->message .= ''; + $myclass = 'unmarked'; + $message[$row->old_uid]->message .= ''; + $myclass = ($row->titel != $row->old_titel ? 'marked' : 'unmarked'); + $message[$row->old_uid]->message .= ''; } } + // Verband if ($mailstudents) { - $studenten = getStudentsFromGroup($row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz); + $studenten = getStudentsFromGroup( + $row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz + ); foreach ($studenten as $student) { if (!isset($message[$student]->isset)) { - if(!isset($message[$student])) + if (!isset($message[$student])) $message[$student] = new stdClass(); - $message[$student]->isset=true; - $message[$student]->mailadress=$student.'@'.DOMAIN; - $message[$student]->message_begin=$message_begin.'
'; - if(!isset($message[$student]->message)) - $message[$student]->message=''; - $message[$student]->message.=''.$p_de->t('lvplan/geaenderteStunden').' / '.$p_en->t('lvplan/geaenderteStunden').'
-
'.$p_de->t('lvplan/status').'
'.$p_en->t('lvplan/status').'
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$p_de->t('lvplan/vorher').' / '.$p_en->t('lvplan/vorher').': '.$row->old_ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->old_lektor.''.$row->old_datum.''.$row->old_stunde.' ('.$beginnzeit_arr[$row->old_stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->old_titel.'
'.$p_de->t('lvplan/jetzt').' / '.$p_en->t('lvplan/jetzt').': '.$row->ort_kurzbz.''.strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
----------------
'.$p_de->t('lvplan/vorher').' / '.$p_en->t('lvplan/vorher').': '.$row->old_ort_kurzbz.''. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz. + ''.$row->old_lektor.''.$row->old_datum.''.$row->old_stunde.' ('.$beginnzeit_arr[$row->old_stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->old_titel.'
'.$p_de->t('lvplan/jetzt').' / '.$p_en->t('lvplan/jetzt').': '.$row->ort_kurzbz.' + '. + strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz. + ' + '.$row->lektor.''.$row->datum.' + '.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].') + + '.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.') + + '.$row->titel.'
---------------- +
- - - - - - - - - '; - } - $message[$student]->message.="\n"; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; - $message[$student]->message.=''; + $message[$student]->isset = true; + $message[$student]->mailadress = $student.'@'.DOMAIN; + $message[$student]->message_begin = $message_begin.'
'; - $message[$student]->message.="\n"; - $message[$student]->message.=''; - $myclass=($row->ort_kurzbz!=$row->old_ort_kurzbz?'marked':'unmarked'); - $message[$student]->message.=''; - $myclass='unmarked'; - $message[$student]->message.=''; - $myclass=($row->lektor!=$row->old_lektor?'marked':'unmarked'); - $message[$student]->message.=''; - $myclass=(($row->datum!=$row->old_datum)?'marked':'unmarked'); - $message[$student]->message.=''; - $myclass=(($row->stunde!=$row->old_stunde)?'marked':'unmarked'); - $message[$student]->message.=''; - $myclass='unmarked'; - $message[$student]->message.=''; - $myclass=($row->titel!=$row->old_titel?'marked':'unmarked'); - $message[$student]->message.=''; + if (!isset($message[$student]->message)) + $message[$student]->message = ''; + + $message[$student]->message .= ' + + '.$p_de->t('lvplan/geaenderteStunden').' / '.$p_en->t('lvplan/geaenderteStunden').' + +
+
'.$p_de->t('lvplan/status').'
'.$p_en->t('lvplan/status').'
'.$p_de->t('lvplan/raum').'
'.$p_en->t('lvplan/raum').'
'.$p_de->t('lvplan/lehrverband').'
'.$p_en->t('lvplan/lehrverband').'
'.$p_de->t('lvplan/lektor').'
'.$p_en->t('lvplan/lektor').'
'.$p_de->t('global/datum').'
'.$p_en->t('global/datum').'
'.$p_de->t('lvplan/stdBeginn').'
'.$p_en->t('lvplan/stdBeginn').'
'.$p_de->t('lvplan/lehrfach').'
'.$p_en->t('lvplan/lehrfach').'
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$p_de->t('lvplan/vorher').' / '.$p_en->t('lvplan/vorher').': '.$row->old_ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->old_lektor.''.$row->old_datum.''.$row->old_stunde.' ('.$beginnzeit_arr[$row->old_stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->old_titel.'
'.$p_de->t('lvplan/jetzt').' / '.$p_en->t('lvplan/jetzt').': '.$row->ort_kurzbz.''.mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.''.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->titel.'
----------------
+ + + + + + + + + '; + } + + $message[$student]->message .= "\n"; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= ''; + $message[$student]->message .= "\n"; + $message[$student]->message .= ''; + $myclass = ($row->ort_kurzbz != $row->old_ort_kurzbz ? 'marked' : 'unmarked'); + $message[$student]->message .= ''; + $myclass = 'unmarked'; + $message[$student]->message .= ''; + $myclass = ($row->lektor != $row->old_lektor ? 'marked' : 'unmarked'); + $message[$student]->message .= ''; + $myclass = (($row->datum != $row->old_datum) ? 'marked' : 'unmarked'); + $message[$student]->message .= ''; + $myclass = (($row->stunde != $row->old_stunde) ? 'marked' : 'unmarked'); + $message[$student]->message .= ''; + $myclass = 'unmarked'; + $message[$student]->message .= ''; + $myclass = ($row->titel!=$row->old_titel ? 'marked' : 'unmarked'); + $message[$student]->message .= ''; } } } } - foreach($message as $msg) - if(isset($msg->isset)) - $msg->message.='
'.$p_de->t('lvplan/status').'
'.$p_en->t('lvplan/status').'
'.$p_de->t('lvplan/raum').'
'.$p_en->t('lvplan/raum').'
'.$p_de->t('lvplan/lehrverband').'
'.$p_en->t('lvplan/lehrverband').'
'.$p_de->t('lvplan/lektor').'
'.$p_en->t('lvplan/lektor').'
'.$p_de->t('global/datum').'
'.$p_en->t('global/datum').'
'.$p_de->t('lvplan/stdBeginn').'
'.$p_en->t('lvplan/stdBeginn').'
'.$p_de->t('lvplan/lehrfach').'
'.$p_en->t('lvplan/lehrfach').'
'.$p_de->t('lvplan/info').'
'.$p_en->t('lvplan/info').'
'.$p_de->t('lvplan/vorher').' / '.$p_en->t('lvplan/vorher').': '.$row->old_ort_kurzbz.''. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester.$row->verband.$row->gruppe.' '.$row->gruppe_kurzbz. + ''.$row->old_lektor.''.$row->old_datum.''.$row->old_stunde.' ('.$beginnzeit_arr[$row->old_stunde].')'.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.')'.$row->old_titel.'
'.$p_de->t('lvplan/jetzt').' / '.$p_en->t('lvplan/jetzt').': '.$row->ort_kurzbz.' + '. + mb_strtoupper($row->stg_typ.$row->stg_kurzbz).'-'.$row->semester. + $row->verband.$row->gruppe.' '.$row->gruppe_kurzbz.' + + '.$row->lektor.''.$row->datum.''.$row->stunde.' ('.$beginnzeit_arr[$row->stunde].') + '.$row->lehrfach.'-'.$row->lehrform.' ('.$row->lehrfach_bez.') + '.$row->titel.'
----------------

'; + + foreach ($message as $msg) + if (isset($msg->isset)) + $msg->message .= '
'; } /************************************************** * Mails an Lektoren und Studenten schicken */ + $message_help = ''; + if ($sendmail) { foreach ($message as $msg) { - $mail = new mail($msg->mailadress,MAIL_LVPLAN,'LV-Plan Update','Sie muessen diese Mail als HTML-Mail anzeigen um die LV-Plan Änderungen anzuzeigen'); + $mail = new mail($msg->mailadress, MAIL_LVPLAN, 'LV-Plan Update', 'Sie muessen diese Mail als HTML-Mail anzeigen um die LV-Plan Änderungen anzuzeigen'); $mail->setHTMLContent($msg->message_begin.$msg->message); + if ($mail->send()) { - echo 'Mail an '.$msg->mailadress.' wurde verschickt!
'; + echo 'Mail an '.$msg->mailadress.' wurde verschickt!'."\n"; + $message_stpl.='Mail an '.$msg->mailadress.' wurde verschickt!
'; + if ($message_help != $msg->message) { $message_summary .= $msg->message; @@ -805,81 +958,99 @@ if ($sendmail) } else { - echo 'Mail an '.$msg->mailadress.' konnte nicht verschickt werden!
'; - $message_sync.='Mail an '.$msg->mailadress.' konnte ***nicht*** verschickt werden!
'; + echo 'Mail an '.$msg->mailadress.' konnte nicht verschickt werden!'."\n"; + + $message_sync .= 'Mail an '.$msg->mailadress.' konnte ***nicht*** verschickt werden!
'; } } } -if(defined('LVPLAN_HORDE_SYNC') && LVPLAN_HORDE_SYNC===true) +if (defined('LVPLAN_HORDE_SYNC') && LVPLAN_HORDE_SYNC === true) { // Alle User bei denen sich der LVPlan veraendert hat // werden in ein File gesichert. Bei diesen Personen wird der LVPlan im Horde aktualisiert - $users=array(); - foreach ($message as $uid=>$msg) + $users = array(); + + foreach ($message as $uid => $msg) { - $users[]=$uid; + $users[] = $uid; } $uidfile = DOC_ROOT.'../system/hordelvplansync/lvplanupdate.txt'; // Letzte Durchlaufzeit des Scripts holen // anhand der Aenderungszeit des Textfiles mit den UIDs - if(!$lastmod = filemtime($uidfile)) - $lastmod=time()-86400; // Wenn die Zeit nicht ermittelt werden kann, werden die letzten 24 Std genommen + if (!$lastmod = filemtime($uidfile)) + $lastmod = time() - 86400; // Wenn die Zeit nicht ermittelt werden kann, werden die letzten 24 Std genommen // Zusaetzlich jene holen, bei denen sich die Reservierungen geaendert haben $qry = "SELECT * FROM campus.tbl_reservierung WHERE insertamum>'".date('Y-m-d H:i:s',$lastmod)."'"; - if($result = $db->db_query($qry)) + if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { $users[] = $row->uid; + //Wenn fuer eine Gruppe reserviert wurde, dann die Personen aus der Gruppe holen - if($row->semester!='' || $row->verband!='' || $row->gruppe!='' || $row->gruppe_kurzbz!='') + if ($row->semester != '' || $row->verband != '' || $row->gruppe != '' || $row->gruppe_kurzbz != '') { - $studenten = getStudentsFromGroup($row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz); + $studenten = getStudentsFromGroup( + $row->studiengang_kz, $row->semester, $row->verband, $row->gruppe, $row->gruppe_kurzbz, $ss->studiensemester_kurzbz + ); + $users = array_merge($users, $studenten); } } } + // geaenderte User in Textfile schreiben $users = array_unique($users); - if(count($users)>0) + + if (count($users) > 0) { - if($fp = fopen($uidfile, 'a')) + if ($fp = fopen($uidfile, 'a')) { foreach($users as $uid) { fwrite($fp, $uid."\n"); } - fclose($fp); - //Horde Syncro starten - //chdir(DOC_ROOT.'../system/hordelvplansync/'); - //exec('php5 synchordelvplan.php lvplanupdate.txt >>/var/log/sync/synchordelvplan.log 2>&1'); + fclose($fp); } } } + // Mail an Admin -$message_tmp=$count_upd.' Datensätze wurden geändert.
+$message_tmp = $count_upd.' Datensätze wurden geändert.
'.$count_ins.' Datensätze wurden hinzugefügt.
'.$count_del.' Datensätze wurden gelöscht.
'.$count_err.' Fehler sind dabei aufgetreten!

'; -echo '
'.$message_tmp; + +echo $count_upd.' Datensaetze wurden geaendert.'."\n". + $count_ins.' Datensaetze wurden hinzugefuegt.'."\n". + $count_del.' Datensaetze wurden geloescht.'."\n". + $count_err.' Fehler sind dabei aufgetreten!'."\n"; //Bricht den Code um, da es sonst zu Anzeigefehlern im Mail kommen kann $message_stpl = wordwrap($message_stpl, 70); $message_summary = wordwrap($message_summary, 70); -$message_sync=''.$message_tmp.$message_sync.$message_stpl.'

Details

'.$message_summary.''; -$mail = new mail(MAIL_ADMIN,MAIL_LVPLAN,'LV-Plan Update Zusammenfassung','Sie muessen diese Mail als HTML-Mail anzeigen um die LV-Plan Änderungen anzuzeigen'); + +// Message sync +$message_sync = ''.$message_tmp.$message_sync.$message_stpl.'

Details

'.$message_summary.''; + +$mail = new mail(MAIL_ADMIN, MAIL_LVPLAN, 'LV-Plan Update Zusammenfassung', 'Sie muessen diese Mail als HTML-Mail anzeigen um die LV-Plan Änderungen anzuzeigen'); $mail->setHTMLContent($message_sync); -$mail->send(); -$message_stpl=''.$message_tmp.$message_stpl.'

Details

'.$message_summary.''; +if (!$mail->send()) + echo 'Error occurred while sending email to '.MAIL_ADMIN."\n"; + +// Message stpl +$message_stpl = ''.$message_tmp.$message_stpl.'

Details

'.$message_summary.''; + $mail = new mail(MAIL_LVPLAN, MAIL_LVPLAN, 'LV-Plan Update Zusammenfassung', 'Sie muessen diese Mail als HTML-Mail anzeigen um die LV-Plan Änderungen anzuzeigen'); $mail->setHTMLContent($message_stpl); -$mail->send(); +if (!$mail->send()) + echo 'Error occurred while sending email to '.MAIL_LVPLAN."\n"; + ?> - - + From 287cddf926b4eb6d7442ff06a6ac0b12be3c7fdf Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 23 Mar 2021 09:25:24 +0100 Subject: [PATCH 17/84] added zgv ueberpruefung --- application/config/navigation.php | 9 + .../system/infocenter/InfoCenter.php | 254 +++++++++++++++++- .../system/infocenter/ZGVUeberpruefung.php | 33 +++ .../models/crm/ZGVPruefungStatus_model.php | 17 ++ application/models/crm/ZGVPruefung_model.php | 17 ++ .../views/system/infocenter/dokpruefung.php | 23 +- .../infocenter/infocenterZgvDetails.php | 203 ++++++++++++++ .../infocenter/infocenterZgvUeberpruefung.php | 49 ++++ .../infocenterZgvUeberpruefungData.php | 63 +++++ .../views/system/infocenter/zgvpruefungen.php | 26 +- public/js/infocenter/infocenterDetails.js | 99 +++++++ system/checkroles.php | 2 +- system/checksystem.php | 1 + system/dbupdate_3.3.php | 99 +++++++ system/filtersupdate.php | 8 + system/phrasesupdate.php | 120 +++++++++ 16 files changed, 1010 insertions(+), 13 deletions(-) create mode 100644 application/controllers/system/infocenter/ZGVUeberpruefung.php create mode 100644 application/models/crm/ZGVPruefungStatus_model.php create mode 100644 application/models/crm/ZGVPruefung_model.php create mode 100644 application/views/system/infocenter/infocenterZgvDetails.php create mode 100644 application/views/system/infocenter/infocenterZgvUeberpruefung.php create mode 100644 application/views/system/infocenter/infocenterZgvUeberpruefungData.php diff --git a/application/config/navigation.php b/application/config/navigation.php index 84004b58e..c2d221a80 100644 --- a/application/config/navigation.php +++ b/application/config/navigation.php @@ -62,6 +62,15 @@ $config['navigation_header'] = array( 'lehre/lehrauftrag_bestellen:r', 'lehre/lehrauftrag_erteilen:r' ) + ), + 'zgvueberpruefung' => array( + 'link' => site_url('system/infocenter/ZGVUeberpruefung'), + 'description' => 'ZGV Überprüfung', + 'expand' => true, + 'sort' => 50, + 'requiredPermissions' => array( + 'lehre/zgvpruefung:r' + ) ) ) ), diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 43de8bb60..46fe09c10 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -12,6 +12,7 @@ class InfoCenter extends Auth_Controller const APP = 'infocenter'; const TAETIGKEIT = 'bewerbung'; const FREIGABE_MAIL_VORLAGE = 'InfocenterMailFreigabeAssistenz'; + const ZGVPRUEFUNG_MAIL_VORLAGE = 'InfocenterMailZgvUeberpruefung'; const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller const INDEX_PAGE = 'index'; @@ -85,6 +86,7 @@ class InfoCenter extends Auth_Controller 'freigegeben' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', + 'showZGVDetails' => 'infocenter:r', 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', @@ -92,6 +94,8 @@ class InfoCenter extends Auth_Controller 'getZgvInfoForPrestudent' => 'infocenter:r', 'saveBewPriorisierung' => 'infocenter:rw', 'saveZgvPruefung' => 'infocenter:rw', + 'zgvRueckfragen' => 'infocenter:rw', + 'zgvStatusUpdate' => 'infocenter:rw', 'saveAbsage' => 'infocenter:rw', 'saveFreigabe' => 'infocenter:rw', 'getNotiz' => 'infocenter:r', @@ -117,6 +121,8 @@ class InfoCenter extends Auth_Controller $this->load->model('crm/Prestudent_model', 'PrestudentModel'); $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); $this->load->model('crm/Statusgrund_model', 'StatusgrundModel'); + $this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel'); + $this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel'); $this->load->model('person/Notiz_model', 'NotizModel'); $this->load->model('person/Person_model', 'PersonModel'); $this->load->model('system/Message_model', 'MessageModel'); @@ -178,6 +184,63 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/infocenterReihungstestAbsolviert.php'); } + /** + * Prestudenten/ZGV übersicht + * Holt sich die Informationen zu den ZGV vom Prestudenten und zeigt die dann an + */ + public function showZGVDetails() + { + $prestudent_id = $this->input->get('prestudent_id'); + + if (!is_numeric($prestudent_id)) + show_error('prestudent id is not numeric!'); + + $prestudentexists = $this->PrestudentModel->load($prestudent_id); + + if (isError($prestudentexists)) + show_error(getError($prestudentexists)); + + if (!hasData($prestudentexists)) + show_error('Prestudent does not exist!'); + + $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + + if (isError($zgvExist)) + show_error(getError($zgvExist)); + + if (!hasData($zgvExist)) + show_error('ZGV does not exist!'); + + $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); + $this->ZGVPruefungStatusModel->addLimit(1); + + $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id)); + + if (isError($statusZGV)) + show_error(getError($statusZGV)); + + if (!hasData($statusZGV)) + show_error('ZGV has no status.'); + + $statusZGV = array('status' => $statusZGV->retval[0]->status); + $origin_page = $this->input->get(self::ORIGIN_PAGE); + + + $persondata = $this->_loadPersonData($prestudentexists->retval[0]->person_id); + + $prestudent_id = array('prestudent_id' => $prestudent_id); + $data = array_merge( + $persondata, + $prestudent_id, + $statusZGV + ); + + $data[self::FHC_CONTROLLER_ID] = $this->getControllerId(); + $data[self::ORIGIN_PAGE] = $origin_page; + $data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID); + + $this->load->view('system/infocenter/infocenterZgvDetails.php', $data); + } /** * Personal details page of the InfoCenter tool * Initialization function, gets person and prestudent data and loads the view with the data @@ -429,6 +492,180 @@ class InfoCenter extends Auth_Controller $this->outputJson($json); } + /** + * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang + */ + private function sendZgvMail($mail){ + $data = array( + 'DataTest' => 'getestet.' + ); + $this->load->helper('hlp_sancho'); + sendSanchoMail( + self::ZGVPRUEFUNG_MAIL_VORLAGE, + $data, + $mail, + 'ZGV Ueberpruefung', + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg' + ); + + return true; + } + + /** + * Der Status von den ZGV wird geupdated + */ + public function zgvStatusUpdate() + { + $prestudent_id = $this->input->post('prestudent_id'); + $person_id = $this->input->post('person_id'); + $status = $this->input->post('status'); + + if (isEmptyString($prestudent_id) && isEmptyString($person_id) && isEmptyString($status)) + return $this->outputJsonError('Some data is missing'); + + $zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + + if (!hasData($zgv)) + return $this->outputJsonError('ZGV nicht gefunden'); + + $zgv = getData($zgv); + + $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); + $this->ZGVPruefungStatusModel->addLimit(1); + $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id)); + + if (!hasData($statusZGV)) + return $this->outputJsonError('ZGV-Status nicht gefunden'); + + $statusZGV = getData($statusZGV); + + if ($statusZGV[0]->status === 'rejected' && $status === 'rejected') + return $this->outputJsonError('Bereits abgelehnt worden'); + elseif ($statusZGV[0]->status === 'accepted' && $status === 'accepted') + return $this->outputJsonError('Bereits akzeptiert worden'); + + + $insert = $this->ZGVPruefungStatusModel->insert( + array( + 'zgvpruefung_id' => $zgv[0]->zgvpruefung_id, + 'status' => $status + ) + ); + + $update = $this->ZGVPruefungModel->update( + $zgv[0]->zgvpruefung_id, + array( + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isError($insert) && isError($update)) + return $this->outputJsonError('Fehler beim Speichern'); + + $personInfos = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + + $this->outputJsonSuccess( + array + ( + 'msg' => 'Erfolgreich gespeichert', + 'person_id' => $personInfos['person_id'] + ) + ); + + } + + /** + * Fügt einen neuen ZGV Status hinzu oder updated einen bestehenden + * Falls es erfolgreich war, sendet er die Mail raus + */ + public function zgvRueckfragen() + { + $prestudent_id = $this->input->post('prestudent_id'); + $person_id = $this->input->post('person_id'); + + if (isEmptyString($prestudent_id) && isEmptyString($person_id)) + return $this->outputJsonError('Prestudentid OR/AND Personid missing'); + + $zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + $sg = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + $mail = $sg['studiengang_mail']; + + if (hasData($zgv)) + { + $zgv = getData($zgv); + + $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); + $this->ZGVPruefungStatusModel->addLimit(1); + $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id)); + + if (!hasData($statusZGV)) + return $this->outputJsonError('ZGV-Status nicht gefunden'); + + $statusZGV = getData($statusZGV); + + if ($statusZGV[0]->status === 'pruefung_stg') + return $this->outputJsonError('Bereits in Prüfung'); + + $insert = $this->ZGVPruefungStatusModel->insert( + array( + 'zgvpruefung_id' => $zgv[0]->zgvpruefung_id, + 'status' => 'pruefung_stg' + ) + ); + + $update = $this->ZGVPruefungModel->update( + $zgv[0]->zgvpruefung_id, + array( + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => $this->_uid + ) + ); + + if (isSuccess($insert) && isSuccess($update)) + $mailStatus = $this->sendZgvMail($mail); + elseif (isError($insert) && isError($update)) + return $this->outputJsonError('Fehler beim Speichern'); + + }else + { + $insert = $this->ZGVPruefungModel->insert( + array( + 'prestudent_id' => $prestudent_id, + 'insertamum' => date('Y-m-d H:i:s'), + 'insertvon' => $this->_uid + ) + ); + + if (isSuccess($insert)) + { + $zgvpruefung_id = $this->ZGVPruefungModel->db->insert_id(); + $result = $this->ZGVPruefungStatusModel->insert( + array( + 'zgvpruefung_id' => $zgvpruefung_id, + 'status' => 'pruefung_stg' + ) + ); + + if (isSuccess($result)) + $mailStatus = $this->sendZgvMail($mail); + elseif (isError($result)) + return $this->outputJsonError('Fehler beim Speichern'); + } + } + if ($mailStatus) + { + $this->outputJsonSuccess( + array + ( + 'msg' => 'Erfolgreich gespeichert', + 'person_id' => $sg['person_id'] + ) + ); + } + } + /** * Saves Absage for Prestudent including the reason for the Absage (statusgrund). * inserts Studiensemester and Ausbildungssemester for the new Absage of (chronologically) last status. @@ -1421,8 +1658,20 @@ class InfoCenter extends Auth_Controller $zgvpruefung->changedown = $this->PrestudentModel->checkPrioChange($zgvpruefung->prestudent_id, $studiensemester, 1); } } + $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $zgvpruefung->prestudent_id)); - $zgvpruefungen[] = $zgvpruefung; + if (isSuccess($zgvExist) && hasData($zgvExist)) + { + $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); + $this->ZGVPruefungStatusModel->addLimit(1); + + $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id)); + + if (isSuccess($statusZGV) && hasData($statusZGV)) + $zgvpruefung->statusZGV = $statusZGV->retval[0]->status; + } + + $zgvpruefungen[] = $zgvpruefung; } $this->_sortPrestudents($zgvpruefungen); @@ -1545,8 +1794,9 @@ class InfoCenter extends Auth_Controller $person_id = $prestudentdata->person_id; $studiengang_kurzbz = $prestudentdata->studiengang; $studiengang_bezeichnung = $prestudentdata->studiengangbezeichnung; + $studiengang_mail = $prestudentdata->studiengangmail; - return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung); + return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung, 'studiengang_mail' => $studiengang_mail); } /** diff --git a/application/controllers/system/infocenter/ZGVUeberpruefung.php b/application/controllers/system/infocenter/ZGVUeberpruefung.php new file mode 100644 index 000000000..21728ea99 --- /dev/null +++ b/application/controllers/system/infocenter/ZGVUeberpruefung.php @@ -0,0 +1,33 @@ + 'lehre/zgvpruefung:r', + ) + ); + + $this->load->library('WidgetLib'); + $this->setControllerId(); // sets the controller id + } + + public function index() + { + + try{ + $this->load->view('system/infocenter/infocenterZgvUeberpruefung.php'); + }catch(Exception $e) + { + var_dump($e); + } + } +} \ No newline at end of file diff --git a/application/models/crm/ZGVPruefungStatus_model.php b/application/models/crm/ZGVPruefungStatus_model.php new file mode 100644 index 000000000..75e57cb05 --- /dev/null +++ b/application/models/crm/ZGVPruefungStatus_model.php @@ -0,0 +1,17 @@ +dbTable = 'public.tbl_zgvpruefungstatus_status'; + $this->pk = 'zgv_pruefung_status_id'; + $this->hasSequence = true; + } + +} \ No newline at end of file diff --git a/application/models/crm/ZGVPruefung_model.php b/application/models/crm/ZGVPruefung_model.php new file mode 100644 index 000000000..f8fd0a9ad --- /dev/null +++ b/application/models/crm/ZGVPruefung_model.php @@ -0,0 +1,17 @@ +dbTable = 'public.tbl_zgvpruefung'; + $this->pk = 'zgvpruefung_id'; + $this->hasSequence = true; + } + +} \ No newline at end of file diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index 7c431fc46..aa76bbd52 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -6,7 +6,10 @@ p->t('global','typ')) ?> p->t('global','uploaddatum')) ?> p->t('infocenter','ausstellungsnation')) ?> - p->t('infocenter','formalGeprueft')) ?> + " . ucfirst($this->p->t('infocenter','formalGeprueft')) . "" + ?> @@ -21,13 +24,17 @@ dokument_bezeichnung ?> erstelltam), 'd.m.Y') ?> langtext ?> - - > - - formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?> - - + + + > + + formal_geprueft_amum) ? date_format(date_create($dokument->formal_geprueft_amum), 'd.m.Y') : ''; ?> + + + diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php new file mode 100644 index 000000000..c6af4c436 --- /dev/null +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -0,0 +1,203 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'InfocenterZgvDetails', + 'jquery' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'jqueryui' => true, + 'dialoglib' => true, + 'ajaxlib' => true, + 'tablesorter' => true, + 'tinymce' => true, + 'sbadmintemplate' => true, + 'addons' => true, + 'navigationwidget' => true, + 'udfs' => true, + 'widgets' => true, + 'customCSSs' => array( + 'public/css/sbadmin2/admintemplate.css', + 'public/css/sbadmin2/tablesort_bootstrap.css', + 'public/css/infocenter/infocenterDetails.css' + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/tablesort/tablesort.js', + 'public/js/infocenter/messageList.js', + 'public/js/infocenter/infocenterDetails.js' + ), + 'phrases' => array( + 'infocenter' => array( + 'notizHinzufuegen', + 'notizAendern', + 'nichtsZumEntfernen', + 'fehlerBeimEntfernen', + 'zgvInPruefung', + 'zgvAkzeptiert', + 'zgvAbgelehnt' + ), + 'ui' => array( + 'gespeichert', + 'fehlerBeimSpeichern' + ), + 'global' => array( + 'bis', + 'zeilen' + ) + ) + ) + ); +?> + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+ +
+
+ +
+
+
+ p->t('global', 'wirdBearbeitetVon').': '; + echo $lockedby; + if ($origin_page == 'index'): + $unlockpath = 'unlockPerson/'.$stammdaten->person_id; + $unlockpath .= '?fhc_controller_id='.$fhc_controller_id; + $unlockpath .= '&filter_id='.$prev_filter_id; + ?> +    + +  p->t('ui', 'freigeben')) ?> + + + +   + +
+
+
+
+
+
+
+
+
+

p->t('global', 'stammdaten')) ?>

+
+
+ load->view('system/infocenter/stammdaten.php'); ?> + load->view('system/infocenter/anmerkungenZurBewerbung.php'); ?> +
+
+
+
+
+
+
+
+
+ +
+

+ p->t('infocenter', 'dokumentenpruefung')) ?> +

+
+
+ load->view('system/infocenter/dokpruefung.php', array('formalReadonly' => true)); ?> +
+ +
+ + + + p->t('infocenter', 'zgvInPruefung'); + break; + case 'accepted' : + echo $this->p->t('infocenter', 'zgvAkzeptiert'); + break; + case 'rejected' : + echo $this->p->t('infocenter', 'zgvAbgelehnt'); + break; + } + ?> + + +
+
+
+
+
+ +
+
+
+
+
+ +

+ p->t('global', 'nachrichten')) ?> +

+
+
+
+ load->view('system/infocenter/messageList.php', $messages); + ?> +
+
+
+
+
+
+
+
+
+
+
+ +

+ p->t('global', 'notizen'))?> +

+
+
+
+
+
+ load->view('system/infocenter/addNotiz.php'); ?> +
+
+ load->view('system/infocenter/notizen.php'); ?> +
+
+ +
+
+
+
+
+
+
+
+
+ + + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/infocenter/infocenterZgvUeberpruefung.php b/application/views/system/infocenter/infocenterZgvUeberpruefung.php new file mode 100644 index 000000000..e0b8f9eae --- /dev/null +++ b/application/views/system/infocenter/infocenterZgvUeberpruefung.php @@ -0,0 +1,49 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Info Center', + 'jquery' => true, + 'jqueryui' => true, + 'jquerycheckboxes' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'sbadmintemplate' => true, + 'tablesorter' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, + 'phrases' => array( + 'person' => array('vorname', 'nachname'), + 'global' => array('mailAnXversandt'), + 'ui' => array('bitteEintragWaehlen') + ), + 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterZgv.css'), + 'customJSs' => array('public/js/bootstrapper.js') + ) +); +?> + + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+ load->view('system/infocenter/infocenterZgvUeberpruefungData.php'); ?> +
+
+
+
+ + +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php new file mode 100644 index 000000000..ff1b85d9e --- /dev/null +++ b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php @@ -0,0 +1,63 @@ +getBerechtigungen($uid); +$oeKurz = $rechte->getOEkurzbz('lehre/zgvpruefung'); +$oeKurz = '\''. implode('\',\'', $oeKurz) . '\''; + +$query = ' + SELECT + ps.prestudent_id AS "PreStudentID", + p.vorname AS "Vorname", + p.nachname AS "Nachname", + sg.kurzbzlang AS "Studiengang" + FROM public.tbl_zgvpruefungstatus_status zgvstatus + JOIN public.tbl_zgvpruefung zgv USING (zgvpruefung_id) + JOIN public.tbl_prestudent ps USING (prestudent_id) + JOIN public.tbl_person p USING(person_id) + JOIN public.tbl_studiengang sg USING(studiengang_kz) + WHERE zgvstatus.status = ' . $STATUS . ' + AND oe_kurzbz IN ('. $oeKurz .') + AND zgvstatus.datum IN ( + SELECT MAX(zgvstatus.datum) + FROM public.tbl_zgvpruefungstatus_status zgvstatus GROUP BY zgvstatus.zgvpruefung_id) + ORDER BY ps.prestudent_id + '; + +$filterWidgetArray = array( + 'query' => $query, + 'app' => 'infocenter', + 'datasetName' => 'zgvUeberpruefung', + 'filter_id' => $this->input->get('filter_id'), + 'requiredPermissions' => 'infocenter', + 'datasetRepresentation' => 'tablesorter', + 'additionalColumns' => array('Details'), + 'hideOptions' => true, + 'columnsAliases' => array( + + ), + 'formatRow' => function($datasetRaw) { + + /* NOTE: Dont use $this here for PHP Version compatibility */ + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('system/infocenter/InfoCenter/showZGVDetails'), + $datasetRaw->{'PreStudentID'}, + 'zgvUeberpruefung', + (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), + (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') + ); + + return $datasetRaw; + }, +); + +echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 41b549616..eccbbd4ee 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -311,12 +311,34 @@
-
+
+ + + statusZGV)) + { + switch ($zgvpruefung->statusZGV) + { + case 'pruefung_stg' : + echo $this->p->t('infocenter', 'zgvInPruefung'); + break; + case 'accepted' : + echo $this->p->t('infocenter', 'zgvAkzeptiert'); + break; + case 'rejected' : + echo $this->p->t('infocenter', 'zgvAbgelehnt'); + break; + } + } + ?> +
-
+
diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 7023af277..d0668bbbc 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -221,6 +221,71 @@ var InfocenterDetails = { } ); }, + zgvRueckfragen: function(data) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/zgvRueckfragen', + data, + { + successCallback: function(data, textStatus, jqXHR) + { + if (FHC_AjaxClient.hasData(data)) + { + var response = FHC_AjaxClient.getData(data); + + var date = new Date(); + date.setDate(date.getDate() + 14); + + var dd = date.getDate(); + var mm = date.getMonth() + 1; + var y = date.getFullYear(); + + var formatedDate = mm + '/'+ dd + '/'+ y; + InfocenterDetails.setPersonOnHold(response.person_id, formatedDate); + + $('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', 'zgvInPruefung')); + InfocenterDetails._refreshZgv(); + FHC_DialogLib.alertSuccess(response.msg); + } else if(FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError((jqXHR.responseText)); + } + } + ); + }, + zgvStatusUpdate: function(data) + { + var status = data.status; + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/zgvStatusUpdate', + data, + { + successCallback: function(data, textStatus, jqXHR) + { + if (FHC_AjaxClient.hasData(data)) + { + var response = FHC_AjaxClient.getData(data) + FHC_DialogLib.alertSuccess(response.msg); + InfocenterDetails.removePersonOnHold(response.person_id); + if (status === 'rejected') + var p = 'zgvAbgelehnt' + else if (status === 'accepted') + var p = 'zgvAkzeptiert'; + $('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', p)); + } else if (FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError((jqXHR.responseText)); + } + } + ); + }, + saveZgv: function(data) { var zgvError = function(){ @@ -746,6 +811,40 @@ var InfocenterDetails = { InfocenterDetails.zgvUebernehmen(personid, prestudentid, btn); }); + $('.zgvRueckfragen').click(function () + { + //var btn = $(this); + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + //$('#zgvUebernehmenNotice').remove(); + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid + } + InfocenterDetails.zgvRueckfragen(data); + }); + + $('.zgvAkzeptieren').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid, + 'status' : 'accepted' + } + InfocenterDetails.zgvStatusUpdate(data); + }); + + $('.zgvAblehnen').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid, + 'status' : 'rejected' + } + InfocenterDetails.zgvStatusUpdate(data); + }); + //zgv speichern $(".saveZgv").click(function () { diff --git a/system/checkroles.php b/system/checkroles.php index 54839437e..9fae66ad3 100644 --- a/system/checkroles.php +++ b/system/checkroles.php @@ -54,7 +54,7 @@ $data = array 'rolle_kurzbz' => 'admin', 'berechtigung' => array ( - 'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', 'basis/organisationseinheit', 'basis/ort', 'basis/orgform', 'basis/person', 'basis/planner', 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/tempus', 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', 'lehre/vorrueckung', 'lv-plan', 'lv-plan/gruppenentfernen', 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', 'student/vorrueckung', 'system/developer', 'system/loginasuser', 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', 'wawi/storno' + 'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', 'basis/organisationseinheit', 'basis/ort', 'basis/orgform', 'basis/person', 'basis/planner', 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/tempus', 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', 'lehre/vorrueckung', 'lehre/zgvpruefung', 'lv-plan', 'lv-plan/gruppenentfernen', 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', 'student/vorrueckung', 'system/developer', 'system/loginasuser', 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', 'wawi/storno' ) ) ); diff --git a/system/checksystem.php b/system/checksystem.php index 3253dd5d4..164762f3a 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -162,6 +162,7 @@ $berechtigungen = array( array('lehre/studienordnungInaktiv','Studienordnung Inaktiv'), array('lehre/studienplan','Studienplan'), array('lehre/vorrueckung','Lehreinheitenvorrückung'), + array('lehre/zgvpruefung','Berechtigung um ZGV Überprüfungen vorzunehmen'), array('lv-plan','Stundenplan'), array('lv-plan/gruppenentfernen','Erlaut das Entfernen von Gruppen aus LVPlan vom FAS aus'), array('lv-plan/lektorentfernen','Erlaut das Entfernen von Lektoren aus LVPlan vom FAS aus'), diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 62beadbce..a20892fb4 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4700,6 +4700,102 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht } } + +// Add table zgvpruefungstatus +if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus LIMIT 1;")) +{ + $qry = " + CREATE TABLE public.tbl_zgvpruefungstatus + ( + status_kurzbz character varying(32), + bezeichnung character varying(256) + ); + + ALTER TABLE public.tbl_zgvpruefungstatus ADD CONSTRAINT status_kurzbz PRIMARY KEY (status_kurzbz); + INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('pruefung_stg', 'Wird vom Studiengang geprüft'); + INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('rejected', 'Vom Studiengang abgelehnt'); + INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted', 'Vom Studiengang akzeptiert'); + + GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus TO vilesci; + GRANT SELECT ON public.tbl_zgvpruefungstatus TO web; + "; + + if(!$db->db_query($qry)) + echo 'public.tbl_zgvpruefungstatus: '.$db->db_last_error().'
'; + else + echo ' public.tbl_zgvpruefungstatus: Tabelle hinzugefuegt
'; +} + +// Add table zgvpruefung +if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefung LIMIT 1;")) +{ + $qry = " + CREATE TABLE public.tbl_zgvpruefung + ( + zgvpruefung_id integer NOT NULL, + prestudent_id integer NOT NULL, + insertamum timestamp without time zone, + insertvon character varying(32), + updateamum timestamp without time zone, + updatevon character varying(32) + ); + + CREATE SEQUENCE public.tbl_zgvpruefung_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + ALTER TABLE public.tbl_zgvpruefung ADD CONSTRAINT pk_tbl_zgvpruefung PRIMARY KEY (zgvpruefung_id); + ALTER TABLE public.tbl_zgvpruefung ALTER COLUMN zgvpruefung_id SET DEFAULT nextval('public.tbl_zgvpruefung_id_seq'); + ALTER TABLE public.tbl_zgvpruefung ADD CONSTRAINT fk_tbl_zgvpruefung_student FOREIGN KEY (prestudent_id) REFERENCES public.tbl_prestudent (prestudent_id) ON DELETE RESTRICT ON UPDATE CASCADE; + + GRANT SELECT, UPDATE ON public.tbl_zgvpruefung_id_seq TO vilesci; + GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefung TO vilesci; + GRANT SELECT ON public.tbl_zgvpruefung TO web; + + "; + + if(!$db->db_query($qry)) + echo 'public.tbl_zgvpruefung: '.$db->db_last_error().'
'; + else + echo ' public.tbl_zgvpruefung: Tabelle hinzugefuegt
'; +} + +// Add table zgvpruefungstatus_status +if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus_status LIMIT 1;")) +{ + $qry = " + CREATE TABLE public.tbl_zgvpruefungstatus_status + ( + zgv_pruefung_status_id integer NOT NULL, + zgvpruefung_id integer NOT NULL, + status character varying(32), + datum timestamp without time zone DEFAULT now() + ); + + CREATE SEQUENCE public.tbl_zgvpruefungstatus_status_id_seq + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT pk_tbl_zgvpruefungstatus_status PRIMARY KEY (zgv_pruefung_status_id); + ALTER TABLE public.tbl_zgvpruefungstatus_status ALTER COLUMN zgv_pruefung_status_id SET DEFAULT nextval('tbl_zgvpruefungstatus_status_id_seq'); + ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT fk_tbl_zgvpruefung_zgvpruefung FOREIGN KEY (zgvpruefung_id) REFERENCES public.tbl_zgvpruefung (zgvpruefung_id) ON DELETE RESTRICT ON UPDATE CASCADE; + ALTER TABLE public.tbl_zgvpruefungstatus_status ADD CONSTRAINT fk_tbl_zgvpruefung_status FOREIGN KEY (status) REFERENCES public.tbl_zgvpruefungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE; + + GRANT SELECT, UPDATE ON public.tbl_zgvpruefungstatus_status_id_seq TO vilesci; + GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus_status TO vilesci; + GRANT SELECT ON public.tbl_zgvpruefungstatus_status TO web; + "; + + if(!$db->db_query($qry)) + echo 'public.tbl_zgvpruefungstatus_status: '.$db->db_last_error().'
'; + else + echo ' public.tbl_zgvpruefungstatus_status: Tabelle hinzugefuegt
'; +} + + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; @@ -4940,6 +5036,9 @@ $tabellen=array( "public.tbl_vorlage" => array("vorlage_kurzbz","bezeichnung","anmerkung","mimetype","attribute","archivierbar","signierbar","stud_selfservice","dokument_kurzbz","insertamum","insertvon","updateamum","updatevon"), "public.tbl_vorlagedokument" => array("vorlagedokument_id","sort","vorlagestudiengang_id","dokument_kurzbz"), "public.tbl_vorlagestudiengang" => array("vorlagestudiengang_id","vorlage_kurzbz","studiengang_kz","version","text","oe_kurzbz","style","berechtigung","anmerkung_vorlagestudiengang","aktiv","sprache","subject","orgform_kurzbz","insertamum","insertvon","updateamum","updatevon"), + "public.tbl_zgvpruefungstatus" => array("status_kurzbz","bezeichnung"), + "public.tbl_zgvpruefung" => array("zgvpruefung_id","prestudent_id","insertamum","insertvon","updateamum","updatevon"), + "public.tbl_zgvpruefungstatus_status" => array("zgv_pruefung_status_id","zgvpruefung_id","status","datum"), "testtool.tbl_ablauf" => array("ablauf_id","gebiet_id","studiengang_kz","reihung","gewicht","semester", "insertamum","insertvon","updateamum", "updatevon","ablauf_vorgaben_id","studienplan_id"), "testtool.tbl_ablauf_vorgaben" => array("ablauf_vorgaben_id","studiengang_kz","sprache","sprachwahl","content_id","insertamum","insertvon","updateamum", "updatevon"), "testtool.tbl_antwort" => array("antwort_id","pruefling_id","vorschlag_id"), diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 2d8daed4d..180e43cc4 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -401,6 +401,14 @@ $filters = array( ', 'oe_kurzbz' => null, ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'zgvUeberpruefung', + 'filter_kurzbz' => 'zgvUeberpruefung', + 'description' => '{ZGV Übersicht}', + 'sort' => 4, + ), + array( 'app' => 'budget', 'dataset_name' => 'budgetoverview', diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index cbfbdcdc9..a151a723b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3006,6 +3006,126 @@ $phrases = array( ) ) ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvRueckfragen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Prüfung beantragen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'apply for a ZGV examination', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAkzeptieren', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente akzeptieren', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'accept documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAblehnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente ablehnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'reject documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvInPruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV noch in Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV still in review', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAkzeptiert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente akzeptiert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'accepted documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAbgelehnt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente abgelehnt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'rejected documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'infocenter', 'category' => 'infocenter', From 23e502f02e0cad6f46ae43dce3a59589d713de54 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 25 Mar 2021 10:44:11 +0100 Subject: [PATCH 18/84] mail vorlage hinzugefuegt --- .../system/infocenter/InfoCenter.php | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 46fe09c10..41be8c6e0 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -496,10 +496,10 @@ class InfoCenter extends Auth_Controller * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang */ private function sendZgvMail($mail){ - $data = array( - 'DataTest' => 'getestet.' - ); + $data = array(); + $this->load->helper('hlp_sancho'); + sendSanchoMail( self::ZGVPRUEFUNG_MAIL_VORLAGE, $data, @@ -508,8 +508,6 @@ class InfoCenter extends Auth_Controller 'sancho_header_min_bw.jpg', 'sancho_footer_min_bw.jpg' ); - - return true; } /** @@ -624,7 +622,7 @@ class InfoCenter extends Auth_Controller ); if (isSuccess($insert) && isSuccess($update)) - $mailStatus = $this->sendZgvMail($mail); + $this->sendZgvMail($mail); elseif (isError($insert) && isError($update)) return $this->outputJsonError('Fehler beim Speichern'); @@ -649,21 +647,19 @@ class InfoCenter extends Auth_Controller ); if (isSuccess($result)) - $mailStatus = $this->sendZgvMail($mail); + $this->sendZgvMail($mail); elseif (isError($result)) return $this->outputJsonError('Fehler beim Speichern'); } } - if ($mailStatus) - { - $this->outputJsonSuccess( - array - ( - 'msg' => 'Erfolgreich gespeichert', - 'person_id' => $sg['person_id'] - ) - ); - } + + $this->outputJsonSuccess( + array + ( + 'msg' => 'Erfolgreich gespeichert', + 'person_id' => $sg['person_id'] + ) + ); } /** From e791e3267f5c3c2bbf2323ab75641bcee28ae855 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 25 Mar 2021 15:52:14 +0100 Subject: [PATCH 19/84] link zur mail vorlage hinzugefuegt --- application/controllers/system/infocenter/InfoCenter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 41be8c6e0..a441a43d9 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -496,7 +496,9 @@ class InfoCenter extends Auth_Controller * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang */ private function sendZgvMail($mail){ - $data = array(); + $data = array( + 'link' => site_url('system/infocenter/ZGVUeberpruefung') + ); $this->load->helper('hlp_sancho'); From 0c429984b9b3e5b342c97cc29b123971027ce63a Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Fri, 26 Mar 2021 18:43:05 +0100 Subject: [PATCH 20/84] add new function to bisverwendung --- include/bisverwendung.class.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index 774fe413f..94126f5c5 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -785,5 +785,29 @@ class bisverwendung extends basis_db return false; } } + + public function inZeitaufzeichnungspflichtigPeriod($date) + { + $dateToCheck = date('Y-m-d', strtotime($date)); + $beginn = date('Y-m-d', strtotime($this->beginn)); + $end = date('Y-m-d', strtotime($this->ende)); + $zp = $this->zeitaufzeichnungspflichtig; + + if ($zp) + { + if (($dateToCheck >= $beginn) && (($dateToCheck <= $end) OR is_null($this->ende))) + { + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } } ?> From 9b57248007f3c77dba1e20c1f189bbf1a2426ee0 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 31 Mar 2021 13:12:20 +0200 Subject: [PATCH 21/84] zgv auch bei master uebernehmen --- .../views/system/infocenter/zgvpruefungen.php | 14 ++++++++------ public/js/infocenter/infocenterDetails.js | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 41b549616..1e2f1cca4 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -259,7 +259,7 @@ echo $this->widgetlib->widget( 'Zgvmaster_widget', array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmas_code), - array('name' => 'zgvmas', 'id' => 'zgvmas') + array('name' => 'zgvmas', 'id' => 'zgvmas_'.$zgvpruefung->prestudent_id) ); ?>
@@ -272,7 +272,8 @@ ?> + name="zgvmaort" + id="zgvmaort_prestudent_id ?>">
@@ -288,7 +289,8 @@ + name="zgvmadatum" + id="zgvmadatum_prestudent_id ?>"> @@ -301,7 +303,7 @@ echo $this->widgetlib->widget( 'Nation_widget', array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmanation_code), - array('name' => 'zgvmanation', 'id' => 'zgvmanation') + array('name' => 'zgvmanation', 'id' => 'zgvmanation_'.$zgvpruefung->prestudent_id) ); ?> @@ -413,7 +415,7 @@ $disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt'); } - if ($studiengangtyp !== 'b') + /*if ($studiengangtyp !== 'b') { $disabled = 'disabled'; $disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); @@ -424,7 +426,7 @@ $disabledStg = 'disabled'; $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); } - } + }*/ ?>
diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 7023af277..91531c02a 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -207,6 +207,22 @@ var InfocenterDetails = { $("#zgvort_" + prestudentid).val(zgvort); $("#zgvdatum_" + prestudentid).val(gerzgvdatum); $("#zgvnation_" + prestudentid).val(zgvnation); + + var zgvmas_code = prestudent.zgvmas_code !== null ? prestudent.zgvmas_code : "null"; + var zgvmaort = prestudent.zgvmaort !== null ? prestudent.zgvmaort : ""; + var zgvmadatum = prestudent.zgvmadatum; + var gerzgvmadatum = ""; + if (zgvmadatum !== null) + { + zgvmadatum = $.datepicker.parseDate("yy-mm-dd", prestudent.zgvmadatum); + gerzgvmadatum = $.datepicker.formatDate("dd.mm.yy", zgvmadatum); + } + var zgvmanation = prestudent.zgvmanation !== null ? prestudent.zgvmanation : "null"; + + $("#zgvmas_" + prestudentid).val(zgvmas_code); + $("#zgvmaort_" + prestudentid).val(zgvmaort); + $("#zgvmadatum_" + prestudentid).val(gerzgvmadatum); + $("#zgvmanation_" + prestudentid).val(zgvmanation); } else { From 7f713670b583620373b04b0e088272ba2a16fc75 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 31 Mar 2021 17:57:35 +0200 Subject: [PATCH 22/84] fixed recht --- vilesci/personen/zeitwunsch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vilesci/personen/zeitwunsch.php b/vilesci/personen/zeitwunsch.php index b5f88f97f..416c6387d 100644 --- a/vilesci/personen/zeitwunsch.php +++ b/vilesci/personen/zeitwunsch.php @@ -66,7 +66,7 @@ $updatevon = 0; // Zeitwuensche speichern if (isset($_POST['save'])) { - if(!$rechte->isBerechtigt('mitarbeiter', null, 'suid')) + if(!$rechte->isBerechtigt('mitarbeiter/zeitwuensche', null, 'suid')) die($rechte->errormsg); for ($t=1;$t<7;$t++) From a6989fff110596580233a0e5a6c527c437c0aa0a Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Thu, 1 Apr 2021 14:44:28 +0200 Subject: [PATCH 23/84] Revert "impiment different text" This reverts commit 9bf8d58a --- rdf/studienblatt.xml.php | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/rdf/studienblatt.xml.php b/rdf/studienblatt.xml.php index e00fc9aed..7756901f5 100644 --- a/rdf/studienblatt.xml.php +++ b/rdf/studienblatt.xml.php @@ -156,26 +156,12 @@ foreach($uid_arr as $uid) echo "\t\tregelstudiendauer!=0?$studienordnung->ects/$studienplan->regelstudiendauer:0)."]]>"; echo "\t\t"; - $status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,null,null))?$prestudent->status_kurzbz:''; - if ($status_aktuell == 'Abbrecher') - { - $ausbildungssemester_titel = "Abgemeldet im Ausbildungssemester"; - $studiensemester_titel = "Abgemeldet im Studiensemester"; - } - else - { - $ausbildungssemester_titel = "Aktuelles Ausbildungssemester"; - $studiensemester_titel = "Abgemeldet im Studiensemester"; - } - - echo "\t\t"; echo "\t\tausbildungssemester."]]>"; $studiensemester_aktuell = new studiensemester(); $studiensemester_aktuell->load($studiensemester); - echo "\t\t"; echo "\t\tbezeichnung."]]>"; // check ob Oeh-Beitrag bezahlt wurde @@ -198,14 +184,15 @@ foreach($uid_arr as $uid) $abschluss = $studiensemester_abschluss->jump($prestudent->studiensemester_kurzbz, $studienplan->regelstudiendauer-$prestudent->ausbildungssemester); $studiensemester_abschluss->load($abschluss); echo "\t\tbezeichnung."]]>"; + echo "\t\tende))."]]>"; $studiensemester_endedatum = new studiensemester(); $studiensemester_endedatum->load($studiensemester_endedatum->getaktorNext(1)); + echo "\t\tende))."]]>"; + $status_aktuell = ($prestudent->getLastStatus($student->prestudent_id,null,null))?$prestudent->status_kurzbz:''; - $enddatum = date('d.m.Y',strtotime($studiensemester_abschluss->ende)); - $letztesStudiensemester_datum_titel = 'Voraussichtliches Abschlussdatum'; switch($status_aktuell) { case 'Student': @@ -222,20 +209,12 @@ foreach($uid_arr as $uid) break; case 'Abbrecher': $studierendenstatus_aktuell = 'AbbrecherIn'; - $letztesStudiensemester_datum_titel = 'Abgemeldet am:'; - $enddatum = date('d.m.Y',strtotime($prestudent->bestaetigtam)); break; default: $studierendenstatus_aktuell =''; } - echo "\t\tende))."]]>"; - - echo "\t\t"; - - echo "\t\t"; - - echo "\t\t\n"; + echo "\t\t\n"; echo "\t\tzgvdatum."]]>\n"; $zgv = new zgv($prestudent->zgv_code); echo "\t\tzgv_kurzbz."]]>\n"; From 3e7f75b43fff6978cba072ab5e612692c08f29b0 Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Thu, 1 Apr 2021 14:48:56 +0200 Subject: [PATCH 24/84] fix merge conflic at dbupdate_3.3 --- system/dbupdate_3.3.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 4fc966c9c..b878431df 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4465,21 +4465,21 @@ if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE } } -<<<<<<<<< Temporary merge branch 1 // ADD COLUMN azgrelevant in bis.tbl_bisverwendung if(!$result = @$db->db_query("SELECT azgrelevant FROM bis.tbl_bisverwendung LIMIT 1")) { $qry = " ALTER TABLE bis.tbl_bisverwendung ADD COLUMN azgrelevant boolean; UPDATE bis.tbl_bisverwendung SET azgrelevant = zeitaufzeichnungspflichtig; - UPDATE bis.tbl_bisverwendung SET zeitaufzeichnungspflichtig = true WHERE ba1code=103; - "; + UPDATE bis.tbl_bisverwendung SET zeitaufzeichnungspflichtig = true WHERE ba1code=103 AND beschausmasscode!=5; + "; if(!$db->db_query($qry)) echo 'bis.tbl_bisverwendung: '.$db->db_last_error().'
'; else echo '
bis.tbl_bisverwendung Spalte azgrelevant hinzugefügt.'; -========= +} + // Add column dms_id, studiensemester_kurzbz, anmerkung_student und empfehlung_anrechnung // Change genehmigt_von and begruendung_id to be NULLABLE if(!$result = @$db->db_query("SELECT dms_id FROM lehre.tbl_anrechnung")) From acdfdc028bd60e470fd7ccc3eb478db9756b946f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 6 Apr 2021 12:31:46 +0200 Subject: [PATCH 25/84] zgv beim master nur updaten wenn es sich um einen master handelt --- .../system/infocenter/InfoCenter.php | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 43de8bb60..508b65e15 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -374,12 +374,18 @@ class InfoCenter extends Auth_Controller $zgvdatum = isEmptyString($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d'); $zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation'); - // zgvmasterdata - $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); - $zgvmaort = $this->input->post('zgvmaort'); - $zgvmadatum = $this->input->post('zgvmadatum'); - $zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); - $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); + $prestudent = $this->PrestudentModel->getPrestudentWithZgv($prestudent_id); + $prestudentdata = getData($prestudent); + + if ($prestudentdata->studiengangtyp === 'm') + { + // zgvmasterdata + $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); + $zgvmaort = $this->input->post('zgvmaort'); + $zgvmadatum = $this->input->post('zgvmadatum'); + $zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); + $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); + } $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id, '', self::INTERESSENTSTATUS); @@ -395,19 +401,29 @@ class InfoCenter extends Auth_Controller ); } - $prestresult = $this->PrestudentModel->update( - $prestudent_id, - array( - 'zgv_code' => $zgv_code, - 'zgvort' => $zgvort, - 'zgvdatum' => $zgvdatum, - 'zgvnation' => $zgvnation_code, + $updateArray = array( + 'zgv_code' => $zgv_code, + 'zgvort' => $zgvort, + 'zgvdatum' => $zgvdatum, + 'zgvnation' => $zgvnation_code, + 'updateamum' => date('Y-m-d H:i:s') + ); + + if ($prestudentdata->studiengangtyp === 'm') + { + $updateMasterArray = array( 'zgvmas_code' => $zgvmas_code, 'zgvmaort' => $zgvmaort, 'zgvmadatum' => $zgvmadatum, - 'zgvmanation' => $zgvmanation_code, - 'updateamum' => date('Y-m-d H:i:s') - ) + 'zgvmanation' => $zgvmanation_code + ); + + $updateArray = array_merge($updateArray, $updateMasterArray); + } + + $prestresult = $this->PrestudentModel->update( + $prestudent_id, + $updateArray ); if (isError($prestresult)) From 42d2f455613c1501364fa3457bf43f70ff2ac3eb Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 6 Apr 2021 13:51:27 +0200 Subject: [PATCH 26/84] bei den anmerkungen studiengang hinzugefuegt --- application/models/person/Notiz_model.php | 6 ++++-- .../views/system/infocenter/anmerkungenZurBewerbung.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index 2e09875d8..fd08cc384 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -154,9 +154,11 @@ class Notiz_model extends DB_Model { // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - $this->addOrder('insertamum', 'DESC'); + $this->addJoin('public.tbl_prestudent', 'prestudent_id', 'LEFT'); + $this->addJoin('public.tbl_studiengang', 'studiengang_kz', 'LEFT'); + $this->addOrder('public.tbl_notiz.insertamum', 'DESC'); - return $this->loadWhere(array('person_id' => $person_id, 'titel LIKE' => $titel)); + return $this->loadWhere(array('public.tbl_notizzuordnung.person_id' => $person_id, 'titel LIKE' => $titel)); } /** diff --git a/application/views/system/infocenter/anmerkungenZurBewerbung.php b/application/views/system/infocenter/anmerkungenZurBewerbung.php index 85682d2a4..508f041de 100644 --- a/application/views/system/infocenter/anmerkungenZurBewerbung.php +++ b/application/views/system/infocenter/anmerkungenZurBewerbung.php @@ -15,6 +15,7 @@ insertamum), 'd.m.Y H:i:s') ?> + kurzbzlang)) ?: print_r('(' . nl2br($notiz->kurzbzlang) . ') - ') ?> text) ?> From bc7e3c5cc5a93aaeb764cfd2d4c53c5c9db69056 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 20 Apr 2021 13:51:41 +0200 Subject: [PATCH 27/84] zgv ueberpruefung hinzugefuegt --- .../system/infocenter/InfoCenter.php | 154 +++++++------- .../system/infocenter/ZGVUeberpruefung.php | 40 +++- .../models/crm/ZGVPruefungStatus_model.php | 33 +++ .../system/infocenter/infocenterData.php | 31 ++- .../system/infocenter/infocenterDetails.php | 9 +- .../infocenter/infocenterZgvDetails.php | 78 +++++-- .../infocenterZgvUeberpruefungData.php | 22 +- .../views/system/infocenter/zgvpruefungen.php | 23 +- public/js/infocenter/infocenterDetails.js | 103 +-------- public/js/infocenter/zgvUeberpruefung.js | 189 +++++++++++++++++ system/dbupdate_3.3.php | 1 + system/filtersupdate.php | 55 ++++- system/phrasesupdate.php | 196 +++++++++--------- 13 files changed, 602 insertions(+), 332 deletions(-) create mode 100644 public/js/infocenter/zgvUeberpruefung.js diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index a441a43d9..f0183c981 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -15,10 +15,13 @@ class InfoCenter extends Auth_Controller const ZGVPRUEFUNG_MAIL_VORLAGE = 'InfocenterMailZgvUeberpruefung'; const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller + const ZGV_UEBERPRUEFUNG_URI = 'system/infocenter/ZGVUeberpruefung'; const INDEX_PAGE = 'index'; const FREIGEGEBEN_PAGE = 'freigegeben'; const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert'; const SHOW_DETAILS_PAGE = 'showDetails'; + const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails'; + const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung'; const NAVIGATION_PAGE = 'navigation_page'; const ORIGIN_PAGE = 'origin_page'; @@ -64,6 +67,18 @@ class InfoCenter extends Auth_Controller 'name' => 'Note updated', 'message' => 'Note with title %s was updated', 'success' => null + ), + 'updatezgv' => array( + 'logtype' => 'Action', + 'name' => 'ZGV pruefung updated', + 'message' => 'ZGV with the ID %s was updated to %s', + 'success' => null + ), + 'newzgv' => array( + 'logtype' => 'Action', + 'name' => 'ZGV pruefung added', + 'message' => 'ZGV with the ID %s was added', + 'success' => null ) ); @@ -86,7 +101,7 @@ class InfoCenter extends Auth_Controller 'freigegeben' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', - 'showZGVDetails' => 'infocenter:r', + 'showZGVDetails' => 'lehre/zgvpruefung:r', 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', @@ -95,7 +110,7 @@ class InfoCenter extends Auth_Controller 'saveBewPriorisierung' => 'infocenter:rw', 'saveZgvPruefung' => 'infocenter:rw', 'zgvRueckfragen' => 'infocenter:rw', - 'zgvStatusUpdate' => 'infocenter:rw', + 'zgvStatusUpdate' => 'lehre/zgvpruefung:rw', 'saveAbsage' => 'infocenter:rw', 'saveFreigabe' => 'infocenter:rw', 'getNotiz' => 'infocenter:r', @@ -190,6 +205,8 @@ class InfoCenter extends Auth_Controller */ public function showZGVDetails() { + $this->_setNavigationMenuShowDetails(self::SHOW_ZGV_DETAILS_PAGE); + $prestudent_id = $this->input->get('prestudent_id'); if (!is_numeric($prestudent_id)) @@ -203,38 +220,26 @@ class InfoCenter extends Auth_Controller if (!hasData($prestudentexists)) show_error('Prestudent does not exist!'); - $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); - if (isError($zgvExist)) - show_error(getError($zgvExist)); + if (isError($zgv)) + show_error(getError($zgv)); - if (!hasData($zgvExist)) - show_error('ZGV does not exist!'); - - $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); - $this->ZGVPruefungStatusModel->addLimit(1); - - $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id)); - - if (isError($statusZGV)) - show_error(getError($statusZGV)); - - if (!hasData($statusZGV)) + if (!hasData($zgv)) show_error('ZGV has no status.'); - $statusZGV = array('status' => $statusZGV->retval[0]->status); - $origin_page = $this->input->get(self::ORIGIN_PAGE); - - - $persondata = $this->_loadPersonData($prestudentexists->retval[0]->person_id); - + $persondata = $this->_loadPersonData(getData($prestudentexists)[0]->person_id); $prestudent_id = array('prestudent_id' => $prestudent_id); + $status = array('status' => getData($zgv)[0]->status); + $data = array_merge( $persondata, $prestudent_id, - $statusZGV + $status ); + $origin_page = $this->input->get(self::ORIGIN_PAGE); + $data[self::FHC_CONTROLLER_ID] = $this->getControllerId(); $data[self::ORIGIN_PAGE] = $origin_page; $data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID); @@ -521,30 +526,27 @@ class InfoCenter extends Auth_Controller $person_id = $this->input->post('person_id'); $status = $this->input->post('status'); - if (isEmptyString($prestudent_id) && isEmptyString($person_id) && isEmptyString($status)) - return $this->outputJsonError('Some data is missing'); + if (isEmptyString($prestudent_id) || isEmptyString($person_id) || isEmptyString($status)) + $this->terminateWithJsonError('Some data is missing'); - $zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + $personInfos = $this->PrestudentModel->getPrestudentWithZgv($prestudent_id); + + if (!hasData($personInfos)) + $this->terminateWithJsonError('Person id nicht gefunden'); + + $personInfos = getData($personInfos); + + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); if (!hasData($zgv)) - return $this->outputJsonError('ZGV nicht gefunden'); + $this->terminateWithJsonError('ZGV-Status nicht gefunden'); $zgv = getData($zgv); - $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); - $this->ZGVPruefungStatusModel->addLimit(1); - $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id)); - - if (!hasData($statusZGV)) - return $this->outputJsonError('ZGV-Status nicht gefunden'); - - $statusZGV = getData($statusZGV); - - if ($statusZGV[0]->status === 'rejected' && $status === 'rejected') - return $this->outputJsonError('Bereits abgelehnt worden'); - elseif ($statusZGV[0]->status === 'accepted' && $status === 'accepted') - return $this->outputJsonError('Bereits akzeptiert worden'); - + if ($zgv[0]->status === 'rejected' && $status === 'rejected') + $this->terminateWithJsonError('Bereits abgelehnt worden'); + elseif ($zgv[0]->status === 'accepted' && $status === 'accepted') + $this->terminateWithJsonError('Bereits akzeptiert worden'); $insert = $this->ZGVPruefungStatusModel->insert( array( @@ -561,16 +563,23 @@ class InfoCenter extends Auth_Controller ) ); - if (isError($insert) && isError($update)) - return $this->outputJsonError('Fehler beim Speichern'); + if (isError($insert) || isError($update)) + $this->terminateWithJsonError('Fehler beim Speichern'); - $personInfos = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + $allZgvs = $this->ZGVPruefungStatusModel->getOpenZgvByPerson($personInfos->person_id, array('pruefung_stg')); + $openZgv = false; + + if (hasData($allZgvs)) + $openZgv = true; + + $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, $status)); $this->outputJsonSuccess( array ( 'msg' => 'Erfolgreich gespeichert', - 'person_id' => $personInfos['person_id'] + 'person_id' => $personInfos->person_id, + 'openZgv' => $openZgv ) ); @@ -585,28 +594,19 @@ class InfoCenter extends Auth_Controller $prestudent_id = $this->input->post('prestudent_id'); $person_id = $this->input->post('person_id'); - if (isEmptyString($prestudent_id) && isEmptyString($person_id)) - return $this->outputJsonError('Prestudentid OR/AND Personid missing'); + if (isEmptyString($prestudent_id) || isEmptyString($person_id)) + $this->terminateWithJsonError('Prestudentid OR/AND Personid missing'); - $zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); - $sg = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); - $mail = $sg['studiengang_mail']; + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); + $data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + $mail = $data['studiengang_mail']; if (hasData($zgv)) { $zgv = getData($zgv); - $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); - $this->ZGVPruefungStatusModel->addLimit(1); - $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id)); - - if (!hasData($statusZGV)) - return $this->outputJsonError('ZGV-Status nicht gefunden'); - - $statusZGV = getData($statusZGV); - - if ($statusZGV[0]->status === 'pruefung_stg') - return $this->outputJsonError('Bereits in Prüfung'); + if ($zgv[0]->status === 'pruefung_stg') + $this->terminateWithJsonError('Bereits in Prüfung'); $insert = $this->ZGVPruefungStatusModel->insert( array( @@ -615,7 +615,7 @@ class InfoCenter extends Auth_Controller ) ); - $update = $this->ZGVPruefungModel->update( + $this->ZGVPruefungModel->update( $zgv[0]->zgvpruefung_id, array( 'updateamum' => date('Y-m-d H:i:s'), @@ -623,11 +623,12 @@ class InfoCenter extends Auth_Controller ) ); - if (isSuccess($insert) && isSuccess($update)) - $this->sendZgvMail($mail); - elseif (isError($insert) && isError($update)) - return $this->outputJsonError('Fehler beim Speichern'); + $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg')); + if (isSuccess($insert)) + $this->sendZgvMail($mail); + elseif (isError($insert)) + $this->terminateWithJsonError('Fehler beim Speichern'); }else { $insert = $this->ZGVPruefungModel->insert( @@ -648,18 +649,25 @@ class InfoCenter extends Auth_Controller ) ); + $this->_log($person_id, 'newzgv', array($zgvpruefung_id)); + if (isSuccess($result)) $this->sendZgvMail($mail); elseif (isError($result)) - return $this->outputJsonError('Fehler beim Speichern'); + $this->terminateWithJsonError('Fehler beim Speichern'); } } + $hold = false; + if ($this->personloglib->getOnHoldDate($person_id) !== null) + $hold = true; + $this->outputJsonSuccess( array ( 'msg' => 'Erfolgreich gespeichert', - 'person_id' => $sg['person_id'] + 'person_id' => $data['person_id'], + 'hold' => $hold ) ); } @@ -1293,9 +1301,9 @@ class InfoCenter extends Auth_Controller /** * Define the navigation menu for the showDetails page */ - private function _setNavigationMenuShowDetails() + private function _setNavigationMenuShowDetails($page = self::SHOW_DETAILS_PAGE) { - $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::SHOW_DETAILS_PAGE)); + $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.$page)); $origin_page = $this->input->get(self::ORIGIN_PAGE); @@ -1308,6 +1316,8 @@ class InfoCenter extends Auth_Controller { $link = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); } + if ($origin_page === self::ZGV_UBERPRUEFUNG_PAGE) + $link = site_url(self::ZGV_UEBERPRUEFUNG_URI); $prevFilterId = $this->input->get(self::PREV_FILTER_ID); if (isset($prevFilterId)) @@ -1457,7 +1467,7 @@ class InfoCenter extends Auth_Controller * @param $person_id * @return array */ - private function _loadPersonData($person_id) + public function _loadPersonData($person_id) { $locked = $this->PersonLockModel->checkIfLocked($person_id, self::APP); diff --git a/application/controllers/system/infocenter/ZGVUeberpruefung.php b/application/controllers/system/infocenter/ZGVUeberpruefung.php index 21728ea99..bb0c36b66 100644 --- a/application/controllers/system/infocenter/ZGVUeberpruefung.php +++ b/application/controllers/system/infocenter/ZGVUeberpruefung.php @@ -1,9 +1,9 @@ 'lehre/zgvpruefung:r', + 'getZgvStatusByPrestudent' => 'lehre/zgvpruefung:r' ) ); + $this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel'); + $this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel'); $this->load->library('WidgetLib'); - $this->setControllerId(); // sets the controller id + + $this->setControllerId(); + $this->loadPhrases( + array( + 'infocenter' + ) + ); } public function index() { + $this->load->view('system/infocenter/infocenterZgvUeberpruefung.php'); + } - try{ - $this->load->view('system/infocenter/infocenterZgvUeberpruefung.php'); - }catch(Exception $e) - { - var_dump($e); - } + public function getZgvStatusByPrestudent() + { + $prestudent_id = $this->input->get('prestudent_id'); + + $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + + if (!hasData($zgvExist)) + $this->terminateWithJsonError('no ZGV exist'); + + $status = $this->ZGVPruefungStatusModel->getZgvStatus(getData($zgvExist)[0]->zgvpruefung_id); + + if (!hasData($status)) + $this->terminateWithJsonError('No status'); + + $status = getData($status)[0]->status; + + $this->outputJsonSuccess($status); } } \ No newline at end of file diff --git a/application/models/crm/ZGVPruefungStatus_model.php b/application/models/crm/ZGVPruefungStatus_model.php index 75e57cb05..5c51e45d8 100644 --- a/application/models/crm/ZGVPruefungStatus_model.php +++ b/application/models/crm/ZGVPruefungStatus_model.php @@ -14,4 +14,37 @@ class ZGVPruefungStatus_model extends DB_Model $this->hasSequence = true; } + public function getZgvStatus($zgvpruefung_id) + { + $this->addOrder('datum', 'DESC'); + $this->addLimit(1); + + return $this->loadWhere(array('zgvpruefung_id' => $zgvpruefung_id)); + } + + public function getZgvStatusByPrestudent($prestudent_id) + { + $this->addJoin('public.tbl_zgvpruefung', 'zgvpruefung_id'); + $this->addOrder($this->dbTable . '.datum', 'DESC'); + $this->addLimit(1); + return $this->loadWhere(array('prestudent_id' => $prestudent_id)); + } + + public function getOpenZgvByPerson($person_id, $status) + { + $query = 'SELECT status.zgvpruefung_id, status.datum, status.status + FROM public.tbl_zgvpruefungstatus_status status + INNER JOIN + ( + SELECT zgvpruefung_id, max(datum) as MaxDate + FROM public.tbl_zgvpruefungstatus_status + GROUP BY zgvpruefung_id + ) sub ON status.zgvpruefung_id = sub.zgvpruefung_id AND status.datum = sub.MaxDate + JOIN public.tbl_zgvpruefung ON status.zgvpruefung_id = public.tbl_zgvpruefung.zgvpruefung_id + JOIN public.tbl_prestudent USING (prestudent_id) + WHERE person_id = ? + AND status.status IN ?'; + + return $this->execQuery($query, array($person_id, $status)); + } } \ No newline at end of file diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 0c7030059..8c8f23b15 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -213,7 +213,24 @@ WHERE ps.person_id = p.person_id ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT tbl_organisationseinheit.bezeichnung + FROM public.tbl_benutzerfunktion + JOIN public.tbl_organisationseinheit USING(oe_kurzbz) + WHERE (tbl_benutzerfunktion.datum_von IS NULL OR tbl_benutzerfunktion.datum_von <= now()) + AND (tbl_benutzerfunktion.datum_bis IS NULL OR tbl_benutzerfunktion.datum_bis >= now()) + AND tbl_benutzerfunktion.uid = ( + SELECT l.insertvon + FROM system.tbl_log l + WHERE l.taetigkeit_kurzbz IN ('.$TAETIGKEIT_KURZBZ.') + AND l.logdata->>\'name\' NOT IN ('.$LOGDATA_NAME.') + AND l.person_id = p.person_id + ORDER BY l.zeitpunkt DESC + LIMIT 1 + ) + LIMIT 1 + ) AS "InfoCenterMitarbeiter" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -298,7 +315,8 @@ ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')', - 'ZGV Nation' + 'ZGV Nation', + 'InfoCenter Mitarbeiter' ), 'formatRow' => function($datasetRaw) { @@ -380,6 +398,15 @@ $datasetRaw->{'ZGVNation'} = '-'; } + if ($datasetRaw->{'InfoCenterMitarbeiter'} === 'InfoCenter') + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja'; + } + else + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein'; + } + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index d8e7c21d2..a448e95ce 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -25,7 +25,8 @@ 'public/js/bootstrapper.js', 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', - 'public/js/infocenter/infocenterDetails.js' + 'public/js/infocenter/infocenterDetails.js', + 'public/js/infocenter/zgvUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( @@ -43,7 +44,11 @@ 'nichtsZumEntfernen', 'fehlerBeimEntfernen', 'rueckstelldatumUeberschritten', - 'parkenZurueckstellenInfo' + 'parkenZurueckstellenInfo', + 'zgvInPruefung', + 'zgvErfuellt', + 'zgvNichtErfuellt', + 'zgvErfuelltPruefung' ), 'ui' => array( 'gespeichert', diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index c6af4c436..20c573e34 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -25,7 +25,8 @@ 'public/js/bootstrapper.js', 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', - 'public/js/infocenter/infocenterDetails.js' + 'public/js/infocenter/infocenterDetails.js', + 'public/js/infocenter/zgvUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( @@ -34,8 +35,9 @@ 'nichtsZumEntfernen', 'fehlerBeimEntfernen', 'zgvInPruefung', - 'zgvAkzeptiert', - 'zgvAbgelehnt' + 'zgvErfuellt', + 'zgvNichtErfuellt', + 'zgvErfuelltPruefung' ), 'ui' => array( 'gespeichert', @@ -116,36 +118,66 @@ load->view('system/infocenter/dokpruefung.php', array('formalReadonly' => true)); ?>
-
+
- - p->t('infocenter', 'zgvInPruefung'); - break; - case 'accepted' : - echo $this->p->t('infocenter', 'zgvAkzeptiert'); - break; - case 'rejected' : - echo $this->p->t('infocenter', 'zgvAbgelehnt'); - break; - } - ?> + + -
- +
+ +
diff --git a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php index ff1b85d9e..d2bf62dab 100644 --- a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php +++ b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php @@ -4,7 +4,6 @@ $APP = '\'infocenter\''; $INTERESSENT_STATUS = '\'Interessent\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\''; -$STATUS = '\'pruefung_stg\''; $uid = get_uid(); $rechte = new benutzerberechtigung(); @@ -17,14 +16,14 @@ $query = ' ps.prestudent_id AS "PreStudentID", p.vorname AS "Vorname", p.nachname AS "Nachname", - sg.kurzbzlang AS "Studiengang" + sg.kurzbzlang AS "Studiengang", + zgvstatus.status as "Status" FROM public.tbl_zgvpruefungstatus_status zgvstatus JOIN public.tbl_zgvpruefung zgv USING (zgvpruefung_id) JOIN public.tbl_prestudent ps USING (prestudent_id) JOIN public.tbl_person p USING(person_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) - WHERE zgvstatus.status = ' . $STATUS . ' - AND oe_kurzbz IN ('. $oeKurz .') + WHERE oe_kurzbz IN ('. $oeKurz .') AND zgvstatus.datum IN ( SELECT MAX(zgvstatus.datum) FROM public.tbl_zgvpruefungstatus_status zgvstatus GROUP BY zgvstatus.zgvpruefung_id) @@ -50,11 +49,24 @@ $filterWidgetArray = array( 'Details', site_url('system/infocenter/InfoCenter/showZGVDetails'), $datasetRaw->{'PreStudentID'}, - 'zgvUeberpruefung', + 'ZGVUeberpruefung', (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') ); + switch ($datasetRaw->{'Status'}) + { + case 'accepted' : + $datasetRaw->{'Status'} = $this->p->t('infocenter', 'zgvErfuellt'); + break; + case 'rejected' : + $datasetRaw->{'Status'} = $this->p->t('infocenter', 'zgvNichtErfuellt'); + break; + case 'accepted_pruefung' : + $datasetRaw->{'Status'} = $this->p->t('infocenter', 'zgvErfuelltPruefung'); + break; + } + return $datasetRaw; }, ); diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index eccbbd4ee..6cc9f2f7a 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -311,31 +311,14 @@
-
+
- - - statusZGV)) - { - switch ($zgvpruefung->statusZGV) - { - case 'pruefung_stg' : - echo $this->p->t('infocenter', 'zgvInPruefung'); - break; - case 'accepted' : - echo $this->p->t('infocenter', 'zgvAkzeptiert'); - break; - case 'rejected' : - echo $this->p->t('infocenter', 'zgvAbgelehnt'); - break; - } - } - ?> +
diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index d0668bbbc..6c094f23f 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -221,70 +221,6 @@ var InfocenterDetails = { } ); }, - zgvRueckfragen: function(data) - { - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + '/zgvRueckfragen', - data, - { - successCallback: function(data, textStatus, jqXHR) - { - if (FHC_AjaxClient.hasData(data)) - { - var response = FHC_AjaxClient.getData(data); - - var date = new Date(); - date.setDate(date.getDate() + 14); - - var dd = date.getDate(); - var mm = date.getMonth() + 1; - var y = date.getFullYear(); - - var formatedDate = mm + '/'+ dd + '/'+ y; - InfocenterDetails.setPersonOnHold(response.person_id, formatedDate); - - $('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', 'zgvInPruefung')); - InfocenterDetails._refreshZgv(); - FHC_DialogLib.alertSuccess(response.msg); - } else if(FHC_AjaxClient.isError(data)) - FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); - }, - errorCallback: function(jqXHR, textStatus, errorThrown) - { - FHC_DialogLib.alertError((jqXHR.responseText)); - } - } - ); - }, - zgvStatusUpdate: function(data) - { - var status = data.status; - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + '/zgvStatusUpdate', - data, - { - successCallback: function(data, textStatus, jqXHR) - { - if (FHC_AjaxClient.hasData(data)) - { - var response = FHC_AjaxClient.getData(data) - FHC_DialogLib.alertSuccess(response.msg); - InfocenterDetails.removePersonOnHold(response.person_id); - if (status === 'rejected') - var p = 'zgvAbgelehnt' - else if (status === 'accepted') - var p = 'zgvAkzeptiert'; - $('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', p)); - } else if (FHC_AjaxClient.isError(data)) - FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); - }, - errorCallback: function(jqXHR, textStatus, errorThrown) - { - FHC_DialogLib.alertError((jqXHR.responseText)); - } - } - ); - }, saveZgv: function(data) { @@ -405,8 +341,9 @@ var InfocenterDetails = { } ); }, - saveNotiz: function(personid, data) + saveNotiz: function(personid, data, callback) { + var callbackValue = data; FHC_AjaxClient.ajaxCallPost( CALLED_PATH + '/saveNotiz/' + encodeURIComponent(personid), data, @@ -416,6 +353,8 @@ var InfocenterDetails = { { InfocenterDetails._refreshNotizen(); InfocenterDetails._refreshLog(); + if ($.isFunction(callback)) + callback(callbackValue); } else { @@ -811,38 +750,8 @@ var InfocenterDetails = { InfocenterDetails.zgvUebernehmen(personid, prestudentid, btn); }); - $('.zgvRueckfragen').click(function () - { - //var btn = $(this); - var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - //$('#zgvUebernehmenNotice').remove(); - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid - } - InfocenterDetails.zgvRueckfragen(data); - }); - - $('.zgvAkzeptieren').click(function (){ - var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid, - 'status' : 'accepted' - } - InfocenterDetails.zgvStatusUpdate(data); - }); - - $('.zgvAblehnen').click(function (){ - var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid, - 'status' : 'rejected' - } - InfocenterDetails.zgvStatusUpdate(data); + $('.notizModal').on('hidden.bs.modal', function () { + $(':input', this).val(''); }); //zgv speichern diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js new file mode 100644 index 000000000..e76dcee2e --- /dev/null +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -0,0 +1,189 @@ +$(document).ready(function () +{ + var personid = $("#hiddenpersonid").val(); + + if ($('#zgvpruefungen').length) + { + $('#zgvpruefungen .zgvRueckfragen').each(function() { + if($(this).is(':disabled')) { + zgvUeberpruefung.checkStatus(InfocenterDetails._getPrestudentIdFromElementId($(this).attr('id'))); + } + }); + } else + { + zgvUeberpruefung.checkStatus(); + } + + $('.zgvRueckfragen').click(function () + { + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid + } + zgvUeberpruefung.zgvRueckfragen(data); + }); + + $('.zgvAkzeptieren').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid, + 'status' : 'accepted' + } + zgvUeberpruefung.zgvStatusUpdate(data); + }); + + $('.zgvAblehnen').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + $('#inputStatus_' + prestudentid).val('rejected'); + $('#notizModal_' + prestudentid).modal('show'); + }); + + $('.zgvAkzeptierenPruefung').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + $('#inputStatus_' + prestudentid).val('accepted_pruefung'); + $('#notizModal_' + prestudentid).modal('show'); + }); + + $('.saveZgvNotiz').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + if ($('#inputNotizTitelModal').val() === '' || $('#inputNotizTextModal').val() === '') + return FHC_DialogLib.alertWarning('Please fill out all fields'); + + var data = { + 'person_id' : personid, + 'notiztitel' : $('#inputNotizTitelModal').val(), + 'notiz' : $('#inputNotizTextModal').val(), + 'prestudent_id' : prestudentid, + 'status' : $('#inputStatus_' + prestudentid).val() + } + + InfocenterDetails.saveNotiz(personid, data, zgvUeberpruefung.zgvStatusUpdate); + + $('#notizModal_' + prestudentid).modal('hide'); + }); +}); + +var zgvUeberpruefung = { + checkStatus: function(prestudent_id) + { + if (prestudent_id === undefined) + prestudent_id = zgvUeberpruefung.getPrestudentId(); + + FHC_AjaxClient.ajaxCallGet( + "system/infocenter/ZGVUeberpruefung/getZgvStatusByPrestudent", + { + prestudent_id : prestudent_id + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + $('#zgvBearbeitungButtons_' + prestudent_id +' button').each(function() { + $(this).attr('disabled', false); + }); + var status = FHC_AjaxClient.getData(data); + + switch (status) + { + case 'rejected' : + $('#zgvAblehnen_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvNichtErfuellt')); + break; + case 'accepted' : + $('#zgvAkzeptieren_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvErfuellt')); + break; + case 'accepted_pruefung' : + $('#zgvAkzeptierenPruefung_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvErfuelltPruefung')); + break; + case 'pruefung_stg' : + $('#zgvRueckfragen_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvInPruefung')); + break; + } + } + }, + errorCallback: function(data, textStatus, errorThrown) + { + FHC_DialogLib.alertError(data); + }, + veilTimeout: 0 + } + ); + }, + + zgvRueckfragen: function(data) + { + var prestudent_id = data.prestudent_id; + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/zgvRueckfragen', + data, + { + successCallback: function(data, textStatus, jqXHR) + { + if (FHC_AjaxClient.hasData(data)) + { + zgvUeberpruefung.checkStatus(prestudent_id); + + var response = FHC_AjaxClient.getData(data); + + if (response.hold === false) + { + var datum = new Date(); + datum.setDate(datum.getDate() + 14); + var formatedDate = $.datepicker.formatDate("mm/dd/yy", datum); + InfocenterDetails.setPersonOnHold(response.person_id, formatedDate); + } + + FHC_DialogLib.alertSuccess(response.msg); + } else if(FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError((jqXHR.responseText)); + } + } + ); + }, + + zgvStatusUpdate: function(data) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/zgvStatusUpdate', + data, + { + successCallback: function(data, textStatus, jqXHR) + { + if (FHC_AjaxClient.hasData(data)) + { + zgvUeberpruefung.checkStatus(); + var response = FHC_AjaxClient.getData(data) + + if (response.openZgv === false) + InfocenterDetails.removePersonOnHold(response.person_id); + + FHC_DialogLib.alertSuccess(response.msg); + } else if (FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError((jqXHR.responseText)); + } + } + ); + }, + + getPrestudentId: function() + { + var id = $('.zgvBearbeitungButtons .zgvAkzeptierenPruefung').attr('id'); + return InfocenterDetails._getPrestudentIdFromElementId(id); + } +} \ No newline at end of file diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index a20892fb4..6ccf5de37 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4715,6 +4715,7 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus LIMIT 1 INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('pruefung_stg', 'Wird vom Studiengang geprüft'); INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('rejected', 'Vom Studiengang abgelehnt'); INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted', 'Vom Studiengang akzeptiert'); + INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted_pruefung', 'Vom Studiengang akzeptiert mit Prüfung'); GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus TO vilesci; GRANT SELECT ON public.tbl_zgvpruefungstatus TO web; diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 180e43cc4..5a5b983a2 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -404,11 +404,58 @@ $filters = array( array( 'app' => 'infocenter', 'dataset_name' => 'zgvUeberpruefung', - 'filter_kurzbz' => 'zgvUeberpruefung', - 'description' => '{ZGV Übersicht}', - 'sort' => 4, + 'filter_kurzbz' => 'zgvOffen', + 'description' => '{ZGV Überprüfung}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Zgv Überprüfung", + "columns": [ + {"name": "PreStudentID"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Studiengang"} + ], + "filters": [ + { + "name": "Status", + "condition": "stg", + "operation": "contains" + } + ] + } + ', + 'oe_kurzbz' => null, + ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'zgvUeberpruefung', + 'filter_kurzbz' => 'zgvRest', + 'description' => '{ZGV abgeschlossen}', + 'sort' => 2, + 'default_filter' => true, + 'filter' => ' + { + "name": "Zgv abgeschlossen", + "columns": [ + {"name": "PreStudentID"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Studiengang"}, + {"name": "Status"} + ], + "filters": [ + { + "name": "Status", + "condition": "stg", + "operation": "ncontains" + } + ] + } + ', + 'oe_kurzbz' => null, ), - array( 'app' => 'budget', 'dataset_name' => 'budgetoverview', diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index a151a723b..9f9c541d6 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -88,6 +88,26 @@ $phrases = array( ) ) ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'text', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Text', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'text', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', @@ -3006,66 +3026,86 @@ $phrases = array( ) ) ), - array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvRueckfragen', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'ZGV Prüfung beantragen', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'apply for a ZGV examination', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAkzeptieren', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente akzeptieren', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'accept documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvRueckfragen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Prüfung beantragen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'apply for a ZGV examination', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAblehnen', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente ablehnen', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'reject documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvErfuellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV erfüllt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV fulfilled', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvNichtErfuellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV nicht erfüllt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV unfulfilled', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvErfuelltPruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV erfüllt mit Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV fulfilled with exam', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'infocenter', 'category' => 'infocenter', @@ -3086,46 +3126,6 @@ $phrases = array( ) ) ), - array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAkzeptiert', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente akzeptiert', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'accepted documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), - array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAbgelehnt', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente abgelehnt', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'rejected documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( 'app' => 'infocenter', 'category' => 'infocenter', From c9bd10c3d033b14136f27150bfa0dacf7c8fbf2a Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 28 Apr 2021 16:53:43 +0200 Subject: [PATCH 28/84] zgv ueberpruefung bug fixes --- .../infocenter/infocenterZgvDetails.php | 2 +- .../infocenterZgvUeberpruefungData.php | 2 +- .../views/system/infocenter/zgvpruefungen.php | 8 ++++-- public/js/infocenter/infocenterDetails.js | 2 ++ public/js/infocenter/zgvUeberpruefung.js | 26 ++++++++----------- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 20c573e34..a1362d2fa 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -128,7 +128,7 @@ - +
diff --git a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php index d2bf62dab..6614e6b2a 100644 --- a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php +++ b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php @@ -35,7 +35,7 @@ $filterWidgetArray = array( 'app' => 'infocenter', 'datasetName' => 'zgvUeberpruefung', 'filter_id' => $this->input->get('filter_id'), - 'requiredPermissions' => 'infocenter', + 'requiredPermissions' => 'lehre/zgvpruefung', 'datasetRepresentation' => 'tablesorter', 'additionalColumns' => array('Details'), 'hideOptions' => true, diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 6cc9f2f7a..258353aaa 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -308,6 +308,10 @@
+ + statusZGV))) ?: print_r('data-info="need"')?>> + +
@@ -315,10 +319,10 @@ - - + statusZGV))) ?: print_r('data-info="need"')?>>
diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 6c094f23f..60e45584c 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -893,6 +893,8 @@ var InfocenterDetails = { } } ); + + zgvUeberpruefung.checkAfterReload(); }, _refreshMessages: function() { diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js index e76dcee2e..a5b3dfd19 100644 --- a/public/js/infocenter/zgvUeberpruefung.js +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -2,17 +2,7 @@ $(document).ready(function () { var personid = $("#hiddenpersonid").val(); - if ($('#zgvpruefungen').length) - { - $('#zgvpruefungen .zgvRueckfragen').each(function() { - if($(this).is(':disabled')) { - zgvUeberpruefung.checkStatus(InfocenterDetails._getPrestudentIdFromElementId($(this).attr('id'))); - } - }); - } else - { - zgvUeberpruefung.checkStatus(); - } + zgvUeberpruefung.checkAfterReload(); $('.zgvRueckfragen').click(function () { @@ -86,6 +76,7 @@ var zgvUeberpruefung = { $('#zgvBearbeitungButtons_' + prestudent_id +' button').each(function() { $(this).attr('disabled', false); }); + var status = FHC_AjaxClient.getData(data); switch (status) @@ -141,6 +132,7 @@ var zgvUeberpruefung = { InfocenterDetails.setPersonOnHold(response.person_id, formatedDate); } + InfocenterDetails._refreshLog(); FHC_DialogLib.alertSuccess(response.msg); } else if(FHC_AjaxClient.isError(data)) FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); @@ -155,6 +147,7 @@ var zgvUeberpruefung = { zgvStatusUpdate: function(data) { + var prestudent_id = data.prestudent_id; FHC_AjaxClient.ajaxCallPost( CALLED_PATH + '/zgvStatusUpdate', data, @@ -163,7 +156,7 @@ var zgvUeberpruefung = { { if (FHC_AjaxClient.hasData(data)) { - zgvUeberpruefung.checkStatus(); + zgvUeberpruefung.checkStatus(prestudent_id); var response = FHC_AjaxClient.getData(data) if (response.openZgv === false) @@ -181,9 +174,12 @@ var zgvUeberpruefung = { ); }, - getPrestudentId: function() + checkAfterReload: function() { - var id = $('.zgvBearbeitungButtons .zgvAkzeptierenPruefung').attr('id'); - return InfocenterDetails._getPrestudentIdFromElementId(id); + $('.zgvStatusText').each(function() { + if($(this).data('info')) { + zgvUeberpruefung.checkStatus(InfocenterDetails._getPrestudentIdFromElementId($(this).attr('id'))); + } + }); } } \ No newline at end of file From 5c339ce448cecd5480ed583f61867214c07881e2 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 28 Apr 2021 16:56:50 +0200 Subject: [PATCH 29/84] zgv ueberpruefung bug fixes --- public/js/infocenter/zgvUeberpruefung.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js index a5b3dfd19..d7de09ca6 100644 --- a/public/js/infocenter/zgvUeberpruefung.js +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -61,9 +61,6 @@ $(document).ready(function () var zgvUeberpruefung = { checkStatus: function(prestudent_id) { - if (prestudent_id === undefined) - prestudent_id = zgvUeberpruefung.getPrestudentId(); - FHC_AjaxClient.ajaxCallGet( "system/infocenter/ZGVUeberpruefung/getZgvStatusByPrestudent", { From d490eb4323c46dd3e6e102a4e7fc9d23426f3e79 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 29 Apr 2021 11:12:48 +0200 Subject: [PATCH 30/84] freigabe nur fuer den bachelor --- application/views/system/infocenter/zgvpruefungen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 1e2f1cca4..c80a4e15c 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -415,7 +415,7 @@ $disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt'); } - /*if ($studiengangtyp !== 'b') + if ($studiengangtyp !== 'b') { $disabled = 'disabled'; $disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); @@ -426,7 +426,7 @@ $disabledStg = 'disabled'; $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); } - }*/ + } ?>
From 062ff74b03bfac9e73bb17305172d1d94896def4 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 4 May 2021 22:09:47 +0200 Subject: [PATCH 31/84] Mails bei freigabe zum RT und Freigabe an Studiengang fuer Master hinzugefuegt --- .../views/system/infocenter/zgvpruefungen.php | 6 +++--- public/js/infocenter/infocenterDetails.js | 20 ++++++++++++++++--- system/phrasesupdate.php | 6 +++--- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 41b549616..140b6696b 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -413,16 +413,16 @@ $disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt'); } - if ($studiengangtyp !== 'b') + if ($studiengangtyp !== 'b' && $studiengangtyp !== 'm') { $disabled = 'disabled'; - $disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); + $disabledTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben'); // FIT-Lehrgänge: exceptions, can be freigegeben in Infocenter if (!in_array($studiengang_kz, $fit_programme_studiengaenge)) { $disabledStg = 'disabled'; - $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); + $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorMasterFreigeben'); } } ?> diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 7023af277..09f4ed6f7 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -3,9 +3,11 @@ const BASE_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJEC const CALLED_PATH = FHC_JS_DATA_STORAGE_OBJECT.called_path; const CONTROLLER_URL = BASE_URL + "/"+CALLED_PATH; const RTFREIGABE_MESSAGE_VORLAGE = "InfocenterRTfreigegeben"; +const RTFREIGABE_MESSAGE_VORLAGE_MASTER = "InfocenterRTfreigegebenM"; const RTFREIGABE_MESSAGE_VORLAGE_QUER = "InfocenterRTfreigegQuer"; const RTFREIGABE_MESSAGE_VORLAGE_QUER_KURZ = "InfocenterRTfreigegQuerKurz"; const STGFREIGABE_MESSAGE_VORLAGE = "InfocenterSTGfreigegeben"; +const STGFREIGABE_MESSAGE_VORLAGE_MASTER = "InfocenterSTGfreigegebenM"; //Statusgründe for which no Studiengang Freigabe Message should be sent const FIT_PROGRAMM_STUDIENGAENGE = [10021, 10027]; @@ -596,7 +598,7 @@ var InfocenterDetails = { var fitstg = $.inArray(parseInt(prestudent.studiengang_kz), FIT_PROGRAMM_STUDIENGAENGE) >= 0; if (receiverPrestudentstatus.studiensemester_kurzbz === prestudentstatus.studiensemester_kurzbz - && (prestudent.studiengangtyp === "b" || fitstg)) + && (prestudent.studiengangtyp === "b" || prestudent.studiengangtyp === "m" || fitstg)) { if (prestudent.isRtFreigegeben) { @@ -660,7 +662,13 @@ var InfocenterDetails = { else { //send normal RTfreigabe message - vorlage = RTFREIGABE_MESSAGE_VORLAGE + if (receiverPrestudent.studiengangtyp === 'm') + { + vorlage = RTFREIGABE_MESSAGE_VORLAGE_MASTER + }else + { + vorlage = RTFREIGABE_MESSAGE_VORLAGE + } } InfocenterDetails.sendFreigabeMessage(prestudent_id, vorlage, msgvars); @@ -671,7 +679,13 @@ var InfocenterDetails = { //if Freigabe to Studiengang, send StgFreigabe Message if not already sent and allowed to send if (!stgFreigegeben && receiverPrestudent.sendStgFreigabeMsg === true) { - InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE, msgvars); + if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) + { + InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE_MASTER, msgvars); + }else + { + InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE, msgvars); + } } } }; diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index cbfbdcdc9..12b28d10a 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3549,18 +3549,18 @@ $phrases = array( array( 'app' => 'infocenter', 'category' => 'infocenter', - 'phrase' => 'nurBachelorFreigeben', + 'phrase' => 'nurBachelorMasterFreigeben', 'insertvon' => 'system', 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'Nur Bachelorstudiengänge können freigegeben werden.', + 'text' => 'Nur Bachelorstudiengänge/Masterstudiengänge können freigegeben werden.', 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => 'Only bachelor programmes can be approved.', + 'text' => 'Only bachelor/master programmes can be approved.', 'description' => '', 'insertvon' => 'system' ) From 6f885fb924656bee76636e0bbec22a8d82766d00 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Fri, 7 May 2021 22:23:48 +0200 Subject: [PATCH 32/84] fixed typo and put the insert on a other position --- application/models/system/Variablenname_model.php | 2 +- system/dbupdate_3.3.php | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/application/models/system/Variablenname_model.php b/application/models/system/Variablenname_model.php index 005834f67..869a03275 100644 --- a/application/models/system/Variablenname_model.php +++ b/application/models/system/Variablenname_model.php @@ -12,7 +12,7 @@ class Variablenname_model extends DB_Model ) sem WHERE start > now() LIMIT 1;', - 'infocenter_studiensgangtyp' => 'SELECT infocenter_studiensgangtyp FROM public.tbl_variablename LIMIT 1' + 'infocenter_studiensgangtyp' => 'SELECT infocenter_studiensgangtyp FROM public.tbl_variablenname LIMIT 1' ); /** diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index f8d569cd7..8c105f470 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -3232,7 +3232,6 @@ if(!@$db->db_query("SELECT 0 FROM public.tbl_variablenname WHERE 0 = 1")) INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'kontofilterstg\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'kollision_student\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'infocenter_studiensemester\', null); - INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'infocenter_studiensgangtyp\', \'b\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_zeitsperre\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_reservierung\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_kollision\', \'false\'); @@ -3266,6 +3265,20 @@ if(!@$db->db_query("SELECT 0 FROM public.tbl_variablenname WHERE 0 = 1")) echo '
Granted privileges to vilesci on public.tbl_variablenname'; } +// Add new name type in public.tbl_variablenname +if ($result = @$db->db_query("SELECT 1 FROM public.tbl_variablenname WHERE name = 'infocenter_studiensgangtyp';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO public.tbl_variablenname(name, defaultwert) VALUES('infocenter_studiensgangtyp', 'b');"; + + if (!$db->db_query($qry)) + echo 'public.tbl_variablenname '.$db->db_last_error().'
'; + else + echo 'public.tbl_variablenname: Added name "infocenter_studiensgangtyp"
'; + } +} + // Add column projektphase_id to tbl_zeitaufzeichnung if(!$result = @$db->db_query("SELECT projektphase_id FROM campus.tbl_zeitaufzeichnung LIMIT 1")) { From ffa7abdf5a3118d97cf315b71eec387cae24fe93 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 12 May 2021 13:52:19 +0200 Subject: [PATCH 33/84] standardtitel hinzugefuegt --- public/js/infocenter/zgvUeberpruefung.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js index d7de09ca6..37189d9fb 100644 --- a/public/js/infocenter/zgvUeberpruefung.js +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -30,12 +30,14 @@ $(document).ready(function () var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); $('#inputStatus_' + prestudentid).val('rejected'); $('#notizModal_' + prestudentid).modal('show'); + $('#notizModal_' + prestudentid + ' #inputNotizTitelModal').val('ZGV wurde nicht erfüllt') }); $('.zgvAkzeptierenPruefung').click(function (){ var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); $('#inputStatus_' + prestudentid).val('accepted_pruefung'); $('#notizModal_' + prestudentid).modal('show'); + $('#notizModal_' + prestudentid + ' #inputNotizTitelModal').val('ZGV erfüllt mit Prüfung') }); $('.saveZgvNotiz').click(function (){ From 0285e3fc92bf1f71e7af55743385d7a4e2bb1029 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 20 May 2021 08:54:14 +0200 Subject: [PATCH 34/84] =?UTF-8?q?Adaptierungen=20Bewerbungstool=20=C3=9Cbe?= =?UTF-8?q?rsichtsseite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/dokument.class.php | 175 +++++++++++++++++++++++++++++++++++ include/prestudent.class.php | 53 +++++++++++ system/dbupdate_3.3.php | 17 +++- 3 files changed, 244 insertions(+), 1 deletion(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index a2eab0e68..b2b59b6dd 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -884,4 +884,179 @@ class dokument extends basis_db } } + + /** + * Akzeptiert ein bestimmtes Dokument + * Optional kann auch eine studiengang_kz uebergeben werden, ob speziell dort das Dokument akzeptiert wurde + * @param $dokument_kurzbz + * @param $person_id + * @param $studiengang_kz integer oder array aus mehreren studiengang_kz + * @return boolean true wenn akzeptiert, false wenn noch nicht akzeptiert + */ +function akzeptiereDokument($dokument_kurzbz, $person_id) +{ + $db = new basis_db(); + $arrayDoksZuAkzeptieren = array(); + + //get Prestudent_ids + $qry = "SELECT + prestudent_id + FROM + tbl_prestudent ps, tbl_studiengang sg + WHERE + ps.studiengang_kz = sg.studiengang_kz + AND sg.typ = 'm' + AND person_id = ".$this->db_add_param($person_id)." + AND not exists( + SELECT * + from tbl_dokumentprestudent dok + where dok.prestudent_id = ps.prestudent_id + and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).")"; + + + //echo var_dump($qry); + //for all prestudents + + + //gibt ein Array von zu akzeptierenden Dokumenten zurück + if($db->db_query($qry)) + { + $num_rows = $db->db_num_rows(); + // Wenn kein ergebnis return 0 sonst ID + if ($num_rows>0) + { + while($row = $db->db_fetch_object()) + { + //echo var_dump($row->prestudent_id); + $arrayDoksZuAkzeptieren[] = $row->prestudent_id; + } + //print_r($arrayDoksZuAkzeptieren); + + //und jetzt für alle prestudent_ids das Dokument akzeptieren + + $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; + //echo $qry; + + foreach ($arrayDoksZuAkzeptieren AS $prestudent_id){ + $qry.= "(".$this->db_add_param($dokument_kurzbz). ",". $prestudent_id . ")"; + + if (next($arrayDoksZuAkzeptieren)==true){ + $qry.= ","; + } + } + $qry.= ";"; + + echo $qry; + + if($this->db_query($qry)) + { + echo " Jawoll: query ausgeführt"; + return true; + } + else + { + $this->errormsg = 'Fehler beim Akzeptieren'; + return false; + } + + + } + else + { + echo "keine zu akzeptierenden Doks vorhanden"; + } + + return true; + } + + else + return false; +} + + /** + * entakzeptiert ein bestimmtes Dokument + * Optional kann auch eine studiengang_kz uebergeben werden, ob speziell dort das Dokument entakzeptiert wurde + * @param $dokument_kurzbz + * @param $person_id + * @param $studiengang_kz integer oder array aus mehreren studiengang_kz + * @return boolean true wenn entakzeptiert, false wenn noch nicht entakzeptiert + */ +function entakzeptiereDokument($dokument_kurzbz, $person_id) +{ + $db = new basis_db(); + $arrayDoksZuEntakzeptieren = array(); + + //get Prestudent_ids + + $qry = "SELECT + prestudent_id + from + tbl_dokumentprestudent + join + tbl_prestudent using (prestudent_id) + where + person_id = ".$this->db_add_param($person_id)." + and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz); + + // echo var_dump($qry); + //for all prestudents + + + //gibt ein Array von zu Entakzeptierenden Dokumenten zurück + if($db->db_query($qry)) + { + $num_rows = $db->db_num_rows(); + // Wenn kein ergebnis return 0 sonst ID + if ($num_rows>0) + { + while($row = $db->db_fetch_object()) + { + //echo var_dump($row->prestudent_id); + $arrayDoksZuEntakzeptieren[] = $row->prestudent_id; + } + print_r($arrayDoksZuEntakzeptieren); + + //und jetzt für alle prestudent_ids das Dokument Entakzeptieren + + $qry = "DELETE FROM public.tbl_dokumentprestudent WHERE prestudent_id in ("; + //echo $qry; + + foreach ($arrayDoksZuEntakzeptieren AS $prestudent_id){ + $qry.= $prestudent_id; + + if (next($arrayDoksZuEntakzeptieren)==true){ + $qry.= ","; + } + } + $qry.= ");"; + + echo $qry; + + if($this->db_query($qry)) + { + echo " Jawoll: query ausgeführt"; + return true; + } + else + { + $this->errormsg = 'Fehler beim Entakzeptieren'; + return false; + } + + + } + else + { + echo "keine Entzuakzeptierenden Doks vorhanden"; + } + + return true; + } + + else + return false; +} + + + } diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 823e5a9aa..3b1e4d8a2 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2234,4 +2234,57 @@ class prestudent extends person } } + + /** + * Prueft, ob eine Person einen aktuellen PreStudentstatus-Eintrag besitzt, der die ZGV Master ersetzt + * @param integer $person_id + * @return true wenn vorhanden + * false wenn nicht vorhanden + * false und errormsg wenn Fehler aufgetreten ist + */ + public function existsZGVIntern($person_id) + { + if(!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + + $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') + AND typ in ('b','m','d')"; + + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + if($row->anzahl>0) + { + $this->errormsg = ''; + return true; + } + else + { + $this->errormsg = ''; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + } diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index e658d7a97..bed369c1a 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4767,6 +4767,20 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht } } +// INSERT,DELETE,UPDATE Berechtigung für tbl_dokumentprestudent hinzufügen +if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_dokumentprestudent' AND table_schema='public' AND grantee='web' AND privilege_type in ('INSERT','DELETE','UPDATE')")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "GRANT INSERT, DELETE, UPDATE ON public.tbl_dokumentprestudent TO web;"; + + if(!$db->db_query($qry)) + echo 'dokumentprestudent Berechtigungen: '.$db->db_last_error().'
'; + else + echo '
Granted privileges to public.tbl_dokumentprestudent'; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; @@ -4886,8 +4900,9 @@ $tabellen=array( "lehre.tbl_lehrform" => array("lehrform_kurzbz","bezeichnung","verplanen","bezeichnung_kurz","bezeichnung_lang"), "lehre.tbl_lehrfunktion" => array("lehrfunktion_kurzbz","beschreibung","standardfaktor","sort"), "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"), + "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"), "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"), From 39668890f2a976784a7946cfa95dd32687d659c0 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 27 May 2021 16:22:47 +0200 Subject: [PATCH 35/84] neue Funktion ZGVMasterNation setzen --- include/dokument.class.php | 294 +++++++++++++++++------------------ include/prestudent.class.php | 145 +++++++++++++---- 2 files changed, 252 insertions(+), 187 deletions(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index b2b59b6dd..8e1f16346 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -339,11 +339,11 @@ class dokument extends basis_db } $qry = "SELECT tbl_dokumentprestudent.* , tbl_dokument.* - FROM public.tbl_dokumentprestudent + FROM public.tbl_dokumentprestudent JOIN public.tbl_dokument USING(dokument_kurzbz) LEFT JOIN public.tbl_vorlage ON (tbl_dokumentprestudent.dokument_kurzbz = tbl_vorlage.vorlage_kurzbz) WHERE prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER); - + if(!$archivdokumente) { $qry.=" AND (tbl_vorlage.archivierbar = FALSE OR tbl_vorlage.archivierbar IS NULL)"; @@ -401,7 +401,7 @@ class dokument extends basis_db } $qry = "SELECT tbl_dokument.* , tbl_dokumentstudiengang.* - FROM public.tbl_dokument + FROM public.tbl_dokument JOIN public.tbl_dokumentstudiengang USING(dokument_kurzbz) LEFT JOIN public.tbl_vorlage ON (tbl_dokument.dokument_kurzbz = tbl_vorlage.vorlage_kurzbz) WHERE studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER); @@ -836,11 +836,11 @@ class dokument extends basis_db return false; } } - + /** * Liefert die Studiengänge bei denen das übergebene Dokument benötigt wird * @param string $dokument_kurzbz Kurzbz des Dokuments - * @param integer $person_id Optional. Die Dokumente werden zusätzlich auf die Studiengänge eingeschränkt für die sich eine Person beworben hat. + * @param integer $person_id Optional. Die Dokumente werden zusätzlich auf die Studiengänge eingeschränkt für die sich eine Person beworben hat. * @return object Objekt mit den Studiengängen oder false. */ public function getStudiengaengeDokument($dokument_kurzbz, $person_id = null) @@ -854,7 +854,7 @@ class dokument extends basis_db AND person_id =".$this->db_add_param($person_id, FHC_INTEGER)." AND tbl_prestudentstatus.status_kurzbz = 'Interessent' AND get_rolle_prestudent (prestudent_id, NULL) NOT IN ('Abgewiesener','Abbrecher') - + ORDER BY kuerzel"; if($result = $this->db_query($qry)) @@ -869,12 +869,12 @@ class dokument extends basis_db $stg_obj->studiengang_kz = $row->studiengang_kz; $stg_obj->english = $row->english; $stg_obj->stufe = $row->stufe; - + $this->result[] = $stg_obj; } return $stg_obj; } - else + else return false; } else @@ -882,181 +882,167 @@ class dokument extends basis_db $this->errormsg="Fehler bei der Abfrage aufgetreten"; return false; } - } /** - * Akzeptiert ein bestimmtes Dokument - * Optional kann auch eine studiengang_kz uebergeben werden, ob speziell dort das Dokument akzeptiert wurde - * @param $dokument_kurzbz - * @param $person_id - * @param $studiengang_kz integer oder array aus mehreren studiengang_kz - * @return boolean true wenn akzeptiert, false wenn noch nicht akzeptiert - */ -function akzeptiereDokument($dokument_kurzbz, $person_id) -{ - $db = new basis_db(); - $arrayDoksZuAkzeptieren = array(); - - //get Prestudent_ids - $qry = "SELECT - prestudent_id - FROM - tbl_prestudent ps, tbl_studiengang sg - WHERE - ps.studiengang_kz = sg.studiengang_kz - AND sg.typ = 'm' - AND person_id = ".$this->db_add_param($person_id)." - AND not exists( - SELECT * - from tbl_dokumentprestudent dok - where dok.prestudent_id = ps.prestudent_id - and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).")"; - - - //echo var_dump($qry); - //for all prestudents - - - //gibt ein Array von zu akzeptierenden Dokumenten zurück - if($db->db_query($qry)) + * Akzeptiert ein bestimmtes Dokument + * @param char $dokument_kurzbz Bezeichner Dokument. + * @param int $person_id Personenkennzeichen. + * @return boolean true wenn akzeptiert, false wenn noch nicht akzeptiert + */ + protected function akzeptiereDokument($dokument_kurzbz, $person_id) { - $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID - if ($num_rows>0) + $db = new basis_db(); + $arrayDoksZuAkzeptieren = array(); + + //get Prestudent_ids + $qry = "SELECT + prestudent_id + FROM + tbl_prestudent ps, tbl_studiengang sg + WHERE + ps.studiengang_kz = sg.studiengang_kz + AND sg.typ = 'm' + AND person_id = ".$this->db_add_param($person_id)." + AND not exists( + SELECT * + from tbl_dokumentprestudent dok + where dok.prestudent_id = ps.prestudent_id + and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).")"; + + + //echo var_dump($qry); + //for all prestudents + + + //gibt ein Array von zu akzeptierenden Dokumenten zurück + if ($db->db_query($qry)) { - while($row = $db->db_fetch_object()) + $num_rows = $db->db_num_rows(); + // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) { - //echo var_dump($row->prestudent_id); - $arrayDoksZuAkzeptieren[] = $row->prestudent_id; - } - //print_r($arrayDoksZuAkzeptieren); - - //und jetzt für alle prestudent_ids das Dokument akzeptieren - - $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; - //echo $qry; - - foreach ($arrayDoksZuAkzeptieren AS $prestudent_id){ - $qry.= "(".$this->db_add_param($dokument_kurzbz). ",". $prestudent_id . ")"; - - if (next($arrayDoksZuAkzeptieren)==true){ - $qry.= ","; + while ($row = $db->db_fetch_object()) + { + //echo var_dump($row->prestudent_id); + $arrayDoksZuAkzeptieren[] = $row->prestudent_id; } - } - $qry.= ";"; + //print_r($arrayDoksZuAkzeptieren); - echo $qry; + //und jetzt für alle prestudent_ids das Dokument akzeptieren - if($this->db_query($qry)) - { - echo " Jawoll: query ausgeführt"; - return true; + $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; + //echo $qry; + + foreach ($arrayDoksZuAkzeptieren as $prestudent_id) + { + $qry .= "(".$this->db_add_param($dokument_kurzbz). ",". $prestudent_id. ")"; + + if (next($arrayDoksZuAkzeptieren) == true) + { + $qry .= ","; + } + } + $qry .= ";"; + + echo $qry; + + if ($this->db_query($qry)) + { + echo " Jawoll: query ausgeführt"; + return true; + } + else + { + $this->errormsg = 'Fehler beim Akzeptieren'; + return false; + } } else { - $this->errormsg = 'Fehler beim Akzeptieren'; - return false; + echo " Keine zu akzeptierenden Doks vorhanden"; } - - + return true; } + else - { - echo "keine zu akzeptierenden Doks vorhanden"; - } - - return true; + return false; } - else - return false; -} - /** - * entakzeptiert ein bestimmtes Dokument - * Optional kann auch eine studiengang_kz uebergeben werden, ob speziell dort das Dokument entakzeptiert wurde - * @param $dokument_kurzbz - * @param $person_id - * @param $studiengang_kz integer oder array aus mehreren studiengang_kz - * @return boolean true wenn entakzeptiert, false wenn noch nicht entakzeptiert - */ -function entakzeptiereDokument($dokument_kurzbz, $person_id) -{ - $db = new basis_db(); - $arrayDoksZuEntakzeptieren = array(); - - //get Prestudent_ids - - $qry = "SELECT - prestudent_id - from - tbl_dokumentprestudent - join - tbl_prestudent using (prestudent_id) - where - person_id = ".$this->db_add_param($person_id)." - and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz); - - // echo var_dump($qry); - //for all prestudents - - - //gibt ein Array von zu Entakzeptierenden Dokumenten zurück - if($db->db_query($qry)) + * entakzeptiert ein bestimmtes Dokument + * @param char $dokument_kurzbz Kurzbezeichnung des zu entakzeptierenden Dokuments. + * @param int $person_id Personenkennzeichen. + * @return boolean true wenn entakzeptiert, false wenn noch nicht entakzeptiert + */ + protected function entakzeptiereDokument($dokument_kurzbz, $person_id) { - $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID - if ($num_rows>0) + $db = new basis_db(); + $arrayDoksZuEntakzeptieren = array(); + + //get Prestudent_ids + + $qry = "SELECT + prestudent_id + from + tbl_dokumentprestudent + join + tbl_prestudent using (prestudent_id) + where + person_id = ".$this->db_add_param($person_id)." + and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz); + + // echo var_dump($qry); + + //gibt ein Array von zu Entakzeptierenden Dokumenten zurück + if ($db->db_query($qry)) { - while($row = $db->db_fetch_object()) + $num_rows = $db->db_num_rows(); + // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) { - //echo var_dump($row->prestudent_id); - $arrayDoksZuEntakzeptieren[] = $row->prestudent_id; - } - print_r($arrayDoksZuEntakzeptieren); - - //und jetzt für alle prestudent_ids das Dokument Entakzeptieren - - $qry = "DELETE FROM public.tbl_dokumentprestudent WHERE prestudent_id in ("; - //echo $qry; - - foreach ($arrayDoksZuEntakzeptieren AS $prestudent_id){ - $qry.= $prestudent_id; - - if (next($arrayDoksZuEntakzeptieren)==true){ - $qry.= ","; + while ($row = $db->db_fetch_object()) + { + //echo var_dump($row->prestudent_id); + $arrayDoksZuEntakzeptieren[] = $row->prestudent_id; } - } - $qry.= ");"; + print_r($arrayDoksZuEntakzeptieren); - echo $qry; + //und jetzt für alle prestudent_ids das Dokument Entakzeptieren - if($this->db_query($qry)) - { - echo " Jawoll: query ausgeführt"; - return true; + $qry = "DELETE FROM public.tbl_dokumentprestudent WHERE prestudent_id in ("; + //echo $qry; + + foreach ($arrayDoksZuEntakzeptieren as $prestudent_id) + { + $qry .= $prestudent_id; + + if (next($arrayDoksZuEntakzeptieren) == true) + { + $qry .= ","; + } + } + $qry .= ") AND dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).";"; + + echo $qry; + + if ($this->db_query($qry)) + { + return true; + } + else + { + $this->errormsg = 'Fehler beim Entakzeptieren'; + return false; + } } else { - $this->errormsg = 'Fehler beim Entakzeptieren'; - return false; + echo " Keine Entzuakzeptierenden Doks vorhanden"; } - - + return true; } else - { - echo "keine Entzuakzeptierenden Doks vorhanden"; - } - - return true; + return false; } - - else - return false; -} - - - } diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 3b1e4d8a2..a3e0f5620 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2232,51 +2232,44 @@ class prestudent extends person $this->errormsg = 'Fehler beim Laden der Daten'; return false; } - } /** * Prueft, ob eine Person einen aktuellen PreStudentstatus-Eintrag besitzt, der die ZGV Master ersetzt - * @param integer $person_id + * @param int $person_id ID der zu überprüfenden Person. * @return true wenn vorhanden * false wenn nicht vorhanden - * false und errormsg wenn Fehler aufgetreten ist - */ - public function existsZGVIntern($person_id) + * false und errormsg wenn Fehler aufgetreten ist + */ + public function existsZGVIntern($person_id) + { + if (!is_numeric($person_id)) { - if(!is_numeric($person_id)) + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + + $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') + AND typ in ('b','m','d')"; + + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) { - $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; - return false; - } - - - $qry = "SELECT count(*) as anzahl FROM public.tbl_prestudent - JOIN public.tbl_prestudentstatus USING (prestudent_id) - JOIN public.tbl_studiengang USING (studiengang_kz) - WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." - AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') - AND typ in ('b','m','d')"; - - - if($this->db_query($qry)) - { - if($row = $this->db_fetch_object()) + if ($row->anzahl > 0) { - if($row->anzahl>0) - { - $this->errormsg = ''; - return true; - } - else - { - $this->errormsg = ''; - return false; - } + $this->errormsg = ''; + return true; } else { - $this->errormsg = 'Fehler beim Laden der Daten'; + $this->errormsg = ''; return false; } } @@ -2286,5 +2279,91 @@ class prestudent extends person return false; } } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + /** + * Befüllt MasterZGV Nation mit Österreich + * @param int $person_id Personenkennzeichen. + * @return true wenn erfolgreich durchgeführt + * false und errormsg wenn ein Fehler aufgetreten ist + */ + public function setManationZGV($person_id) + { + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + $db = new basis_db(); + $arrayleereManations = array(); + + //all prestudent_ids mit leerer ZGV_Nation + $qry = "SELECT + * + FROM + public.tbl_prestudent + JOIN + public.tbl_studiengang USING (studiengang_kz) + WHERE + person_id = ".$this->db_add_param($person_id)." + AND + zgvmanation is NULL + AND + typ in ('m','d')"; + + if ($db->db_query($qry)) + { + $num_rows = $db->db_num_rows(); + + if ($num_rows > 0) + { + while ($row = $db->db_fetch_object()) + { + //echo var_dump($row->prestudent_id); + $arrayleereManations[] = $row->prestudent_id; + } + print_r($arrayleereManations); + + $qry = "UPDATE + public.tbl_prestudent + SET + zgvmanation = 'A' + WHERE + prestudent_id in ("; + + foreach ($arrayleereManations as $prestudent_id) + { + $qry .= $prestudent_id; + + if (next($arrayleereManations) == true) + { + $qry .= ","; + } + } + $qry .= ");"; + + echo $qry; + + if ($this->db_query($qry)) + { + echo " ZGV-Master Nation A eingetragen!"; + return true; + } + else + { + $this->errormsg = 'Fehler beim Eintragen zgvMasternation'; + return false; + } + } + else + echo " Keine leere ZGVManation gefunden"; + return true; + } + } } From 36f52cf3cc30ce51a52d5e015fcb3e7e695680c3 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 31 May 2021 13:20:45 +0200 Subject: [PATCH 36/84] dokumententyp kann nun im Infocenter geaendert werden und zgv master wird angezeigt --- .../system/infocenter/InfoCenter.php | 50 ++++++++++++++++++- .../views/system/infocenter/dokpruefung.php | 9 +++- .../system/infocenter/infocenterData.php | 4 +- .../infocenter/infocenterFreigegebenData.php | 4 +- .../infocenterReihungstestAbsolviertData.php | 4 +- public/js/infocenter/infocenterDetails.js | 27 +++++++++- 6 files changed, 88 insertions(+), 10 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 43de8bb60..950507b0c 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -63,7 +63,13 @@ class InfoCenter extends Auth_Controller 'name' => 'Note updated', 'message' => 'Note with title %s was updated', 'success' => null - ) + ), + 'updatedoctyp' => array( + 'logtype' => 'Action', + 'name' => 'Document type updated', + 'message' => 'Type of Document %s was updated, set to %s', + 'success' => null + ), ); // Name of Interessentenstatus @@ -87,6 +93,7 @@ class InfoCenter extends Auth_Controller 'showDetails' => 'infocenter:r', 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', + 'saveDocTyp' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', 'getLastPrestudentWithZgvJson' => 'infocenter:r', 'getZgvInfoForPrestudent' => 'infocenter:r', @@ -114,6 +121,7 @@ class InfoCenter extends Auth_Controller // Loads models $this->load->model('crm/Akte_model', 'AkteModel'); + $this->load->model('crm/Dokument_model', 'DokumentModel'); $this->load->model('crm/Prestudent_model', 'PrestudentModel'); $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); $this->load->model('crm/Statusgrund_model', 'StatusgrundModel'); @@ -211,9 +219,12 @@ class InfoCenter extends Auth_Controller $persondata = $this->_loadPersonData($person_id); $prestudentdata = $this->_loadPrestudentData($person_id); + $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load()))); + $data = array_merge( $persondata, - $prestudentdata + $prestudentdata, + $dokumentdata ); $data[self::FHC_CONTROLLER_ID] = $this->getControllerId(); @@ -898,6 +909,41 @@ class InfoCenter extends Auth_Controller $this->outputJsonSuccess('success'); } + public function saveDocTyp($person_id) + { + $akte_id = $this->input->post('akte_id'); + $typ = $this->input->post('typ'); + + if (!isset($akte_id) || !isset($typ) || !isset($person_id)) + $this->terminateWithJsonError("Nicht alle sind Parameter übergeben worden"); + + $akte = $this->AkteModel->load($akte_id); + + if (!hasData($akte)) + $this->terminateWithJsonError("Fehler beim Laden der Akte"); + + $result = $this->AkteModel->update($akte_id, array('dokument_kurzbz' => $typ)); + + if (!isSuccess($result)) + $this->terminateWithJsonError("Fehler beim Update aufgetreten"); + + $dokument = $this->DokumentModel->load($akte->retval[0]->dokument_kurzbz); + + if (!hasData($dokument)) + $this->terminateWithJsonError("Fehler beim Laden des Dokumententypes"); + + $this->_log( + $person_id, + 'updatedoctyp', + array( + isEmptyString($akte->retval[0]->titel) ? $akte->retval[0]->bezeichnung : $akte->retval[0]->titel, + isEmptyString($dokument->retval[0]->bezeichnung) ? $dokument->retval[0]->dokument_kurbz : $dokument->retval[0]->bezeichnung + ) + ); + + $this->outputJsonSuccess('success'); + } + // ----------------------------------------------------------------------------------------------------------------- // Private methods diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index 7c431fc46..b7b22150f 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -18,7 +18,14 @@ titel) ? $dokument->bezeichnung : $dokument->titel ?> - dokument_bezeichnung ?> + + + erstelltam), 'd.m.Y') ?> langtext ?> diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 0c7030059..6eb1accae 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -208,10 +208,10 @@ LIMIT 1 ) AS "StgAktiv", ( - SELECT ps.zgvnation + SELECT CONCAT(COALESCE(ps.zgvnation, \'-\'), \' / \' , COALESCE(ps.zgvmanation, \'-\')) FROM public.tbl_prestudent ps WHERE ps.person_id = p.person_id - ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC + ORDER BY ps.zgvnation, ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 ) AS "ZGVNation" FROM public.tbl_person p diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index aab69b651..02d15655a 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -205,10 +205,10 @@ LIMIT 1 ) AS "ReihungstestDate", ( - SELECT ps.zgvnation + SELECT CONCAT(COALESCE(ps.zgvnation, \'-\'), \' / \' , COALESCE(ps.zgvmanation, \'-\')) FROM public.tbl_prestudent ps WHERE ps.person_id = p.person_id - ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC + ORDER BY ps.zgvnation, ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 ) AS "ZGVNation" FROM public.tbl_person p diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 22b122bb0..9f7a5204a 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -161,10 +161,10 @@ LIMIT 1 ) AS "ReihungstestDatum", ( - SELECT ps.zgvnation + SELECT CONCAT(COALESCE(ps.zgvnation, \'-\'), \' / \' , COALESCE(ps.zgvmanation, \'-\')) FROM public.tbl_prestudent ps WHERE ps.person_id = p.person_id - ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC + ORDER BY ps.zgvnation, ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 ) AS "ZGVNation" FROM public.tbl_person p diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 7023af277..43f3315e0 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -114,7 +114,13 @@ $(document).ready(function () { $('html,body').animate({scrollTop:0},250,'linear'); } - ) + ); + + $('.aktenid').change(function(){ + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + var typ = $(this).val(); + InfocenterDetails.saveDocTyp(personid, akteid, typ); + }); }); var InfocenterDetails = { @@ -702,6 +708,25 @@ var InfocenterDetails = { ); }, + saveDocTyp: function(personid, akteid, typ) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), + { + "akte_id": akteid, + "typ" : typ + }, + { + successCallback: function(data, textStatus, jqXHR) { + InfocenterDetails._refreshLog(); + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Document type could not be updated"); + } + } + ); + }, + // ----------------------------------------------------------------------------------------------------------------- // (private) methods executed after ajax (refreshers) From 6550fb6301f1929a7fb8411ae7eceff4e8d7cb23 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 31 May 2021 13:29:13 +0200 Subject: [PATCH 37/84] wording angepasst --- public/js/infocenter/zgvUeberpruefung.js | 2 +- system/phrasesupdate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js index 37189d9fb..0be4dfdad 100644 --- a/public/js/infocenter/zgvUeberpruefung.js +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -37,7 +37,7 @@ $(document).ready(function () var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); $('#inputStatus_' + prestudentid).val('accepted_pruefung'); $('#notizModal_' + prestudentid).modal('show'); - $('#notizModal_' + prestudentid + ' #inputNotizTitelModal').val('ZGV erfüllt mit Prüfung') + $('#notizModal_' + prestudentid + ' #inputNotizTitelModal').val('ZGV mit Prüfungen erfüllt') }); $('.saveZgvNotiz').click(function (){ diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9f9c541d6..f5bfc2578 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3094,7 +3094,7 @@ $phrases = array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => 'ZGV erfüllt mit Prüfung', + 'text' => 'ZGV mit Prüfungen erfüllt', 'description' => '', 'insertvon' => 'system' ), From 9a0df4352670ee81c1aa03e655b4089fbd9b995a Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 1 Jun 2021 09:47:02 +0200 Subject: [PATCH 38/84] 13219 Master Dokumente: Anzeige akzeptierter Dokumente als nicht erforderlich --- include/dokument.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index 8e1f16346..da03983ab 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -890,7 +890,7 @@ class dokument extends basis_db * @param int $person_id Personenkennzeichen. * @return boolean true wenn akzeptiert, false wenn noch nicht akzeptiert */ - protected function akzeptiereDokument($dokument_kurzbz, $person_id) + public function akzeptiereDokument($dokument_kurzbz, $person_id) { $db = new basis_db(); $arrayDoksZuAkzeptieren = array(); @@ -975,7 +975,7 @@ class dokument extends basis_db * @param int $person_id Personenkennzeichen. * @return boolean true wenn entakzeptiert, false wenn noch nicht entakzeptiert */ - protected function entakzeptiereDokument($dokument_kurzbz, $person_id) + public function entakzeptiereDokument($dokument_kurzbz, $person_id) { $db = new basis_db(); $arrayDoksZuEntakzeptieren = array(); From a6b53b8fd7585be4d5e64fe64521dddc43363745 Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 7 Jun 2021 11:29:39 +0200 Subject: [PATCH 39/84] 13412 Refactoring Functions for Master Documents --- include/prestudent.class.php | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index a3e0f5620..06115dab2 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2366,4 +2366,99 @@ class prestudent extends person return true; } } + + /** + * liefert den letztgültigen Status des Prestudenten + * @param int $prestudent_id ID der zu überprüfenden Person. + * @return string $result wenn vorhanden + * false und errormsg wenn Fehler aufgetreten ist + */ + public function getLastPrestudentStatus($prestudent_id) + { + if (!is_numeric($prestudent_id)) + { + $this->errormsg = 'Prestudent_id muss eine gueltige Zahl sein'; + return false; + } + + $db = new basis_db(); + //get all prestudents + $qry = "SELECT pss.status_kurzbz + FROM public.tbl_prestudentstatus pss + JOIN public.tbl_prestudent ps using (prestudent_id) + where ps.prestudent_id = ".$this->db_add_param($prestudent_id)." + group by prestudent_id, pss.status_kurzbz, pss.insertamum + order by pss.insertamum DESC limit 1"; + + if ($db->db_query($qry)) + { + $row = $db->db_fetch_object(); + $result = $row->status_kurzbz; + return $result; + } + else + { + return false; + } + } + + /** + * Prueft, ob eine Person einen aktuellen PreStudentstatus-Eintrag Interessent für einen Masterstudiengang besitzt + * @param int $person_id ID der zu überprüfenden Person. + * @return true wenn vorhanden + * false wenn nicht vorhanden + * false und errormsg wenn Fehler aufgetreten ist + */ + public function existsStatusInteressentMaster($person_id) + { + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + $db = new basis_db(); + $prestudentsOfMaster = array(); + //get all prestudents + $qry = "SELECT + prestudent_id + FROM + tbl_prestudent ps, tbl_studiengang sg + WHERE + ps.studiengang_kz = sg.studiengang_kz + AND + sg.typ in ('m','d') + AND person_id = ".$this->db_add_param($person_id).";"; + + + + if ($db->db_query($qry)) + { + $num_rows = $db->db_num_rows(); + // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) + { + while ($row = $db->db_fetch_object()) + { + //echo var_dump($row->prestudent_id); + $prestudentsOfMaster[] = $row->prestudent_id; + } + + //prestudentIds auf Interessentenstatus prüfen + foreach ($prestudentsOfMaster as $prestudent_id) + { + //echo $prestudent_id; + //echo "last status = " . $this->getLastPrestudentStatus($prestudent_id); + //echo "
"; + if ($this->getLastPrestudentStatus($prestudent_id) == "Interessent") + { + return true; + } + } + } + } + else + return false; + } + } From 8a870fb4c8061dc10a357c7fbb7356c8ac0ee6cb Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 7 Jun 2021 12:07:34 +0200 Subject: [PATCH 40/84] reihungstest msg unterscheiden zwischen deutsch, englisch & bachelor & master --- public/js/infocenter/infocenterDetails.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 09f4ed6f7..48c5a08ae 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -4,6 +4,7 @@ const CALLED_PATH = FHC_JS_DATA_STORAGE_OBJECT.called_path; const CONTROLLER_URL = BASE_URL + "/"+CALLED_PATH; const RTFREIGABE_MESSAGE_VORLAGE = "InfocenterRTfreigegeben"; const RTFREIGABE_MESSAGE_VORLAGE_MASTER = "InfocenterRTfreigegebenM"; +const RTFREIGABE_MESSAGE_VORLAGE_MASTER_ENGLISCH = "InfocenterRTfreigegebenMEnglisch"; const RTFREIGABE_MESSAGE_VORLAGE_QUER = "InfocenterRTfreigegQuer"; const RTFREIGABE_MESSAGE_VORLAGE_QUER_KURZ = "InfocenterRTfreigegQuerKurz"; const STGFREIGABE_MESSAGE_VORLAGE = "InfocenterSTGfreigegeben"; @@ -662,10 +663,12 @@ var InfocenterDetails = { else { //send normal RTfreigabe message - if (receiverPrestudent.studiengangtyp === 'm') - { - vorlage = RTFREIGABE_MESSAGE_VORLAGE_MASTER - }else + if (receiverPrestudent.studiengangtyp === 'm') { + if (receiverPrestudentstatus.sprache === 'English') + vorlage = RTFREIGABE_MESSAGE_VORLAGE_MASTER_ENGLISCH + else + vorlage = RTFREIGABE_MESSAGE_VORLAGE_MASTER + } else { vorlage = RTFREIGABE_MESSAGE_VORLAGE } @@ -681,6 +684,12 @@ var InfocenterDetails = { { if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) { + msgvars = { + 'studiengangbezeichnung': studiengangbezeichnung, + 'studiengangbezeichnung_englisch': studiengangbezeichnung_englisch, + 'orgform_deutsch': orgform_deutsch, + 'orgform_englisch': orgform_englisch + } InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE_MASTER, msgvars); }else { From 4a2c90ac605d62558cdff4415d00a9a21df77aa7 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 7 Jun 2021 12:28:32 +0200 Subject: [PATCH 41/84] doktypen in zgv uebersicht nur readonly --- application/controllers/system/infocenter/InfoCenter.php | 6 +++++- application/views/system/infocenter/dokpruefung.php | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 621563c71..44d393e86 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -133,6 +133,7 @@ class InfoCenter extends Auth_Controller // Loads models $this->load->model('crm/Akte_model', 'AkteModel'); + $this->load->model('crm/Dokument_model', 'DokumentModel'); $this->load->model('crm/Prestudent_model', 'PrestudentModel'); $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); $this->load->model('crm/Statusgrund_model', 'StatusgrundModel'); @@ -232,10 +233,13 @@ class InfoCenter extends Auth_Controller $prestudent_id = array('prestudent_id' => $prestudent_id); $status = array('status' => getData($zgv)[0]->status); + $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load()))); + $data = array_merge( $persondata, $prestudent_id, - $status + $status, + $dokumentdata ); $origin_page = $this->input->get(self::ORIGIN_PAGE); diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index aa76bbd52..7ee77e815 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -21,7 +21,14 @@ titel) ? $dokument->bezeichnung : $dokument->titel ?> - dokument_bezeichnung ?> + + + erstelltam), 'd.m.Y') ?> langtext ?> Date: Mon, 7 Jun 2021 16:55:39 +0200 Subject: [PATCH 42/84] 13412 Refactoring Functions Dokumente ZGV Master --- include/dokument.class.php | 32 +++++--------------------------- include/prestudent.class.php | 14 +++++--------- 2 files changed, 10 insertions(+), 36 deletions(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index da03983ab..4d70891c0 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -888,7 +888,7 @@ class dokument extends basis_db * Akzeptiert ein bestimmtes Dokument * @param char $dokument_kurzbz Bezeichner Dokument. * @param int $person_id Personenkennzeichen. - * @return boolean true wenn akzeptiert, false wenn noch nicht akzeptiert + * @return boolean true wenn akzeptiert bzw geprüft ohne Akzeptieren, false wenn Fehler */ public function akzeptiereDokument($dokument_kurzbz, $person_id) { @@ -910,10 +910,7 @@ class dokument extends basis_db where dok.prestudent_id = ps.prestudent_id and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).")"; - //echo var_dump($qry); - //for all prestudents - //gibt ein Array von zu akzeptierenden Dokumenten zurück if ($db->db_query($qry)) @@ -929,10 +926,8 @@ class dokument extends basis_db } //print_r($arrayDoksZuAkzeptieren); - //und jetzt für alle prestudent_ids das Dokument akzeptieren - + //für alle prestudent_ids das Dokument akzeptieren $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; - //echo $qry; foreach ($arrayDoksZuAkzeptieren as $prestudent_id) { @@ -945,11 +940,8 @@ class dokument extends basis_db } $qry .= ";"; - echo $qry; - if ($this->db_query($qry)) { - echo " Jawoll: query ausgeführt"; return true; } else @@ -958,10 +950,6 @@ class dokument extends basis_db return false; } } - else - { - echo " Keine zu akzeptierenden Doks vorhanden"; - } return true; } @@ -973,7 +961,7 @@ class dokument extends basis_db * entakzeptiert ein bestimmtes Dokument * @param char $dokument_kurzbz Kurzbezeichnung des zu entakzeptierenden Dokuments. * @param int $person_id Personenkennzeichen. - * @return boolean true wenn entakzeptiert, false wenn noch nicht entakzeptiert + * @return boolean true wenn entakzeptiert bzw geprüft ohne Entakzeptieren, false wenn Fehler */ public function entakzeptiereDokument($dokument_kurzbz, $person_id) { @@ -981,7 +969,6 @@ class dokument extends basis_db $arrayDoksZuEntakzeptieren = array(); //get Prestudent_ids - $qry = "SELECT prestudent_id from @@ -1003,15 +990,12 @@ class dokument extends basis_db { while ($row = $db->db_fetch_object()) { - //echo var_dump($row->prestudent_id); $arrayDoksZuEntakzeptieren[] = $row->prestudent_id; } - print_r($arrayDoksZuEntakzeptieren); - - //und jetzt für alle prestudent_ids das Dokument Entakzeptieren + //print_r($arrayDoksZuEntakzeptieren); + //für alle prestudent_ids das Dokument Entakzeptieren $qry = "DELETE FROM public.tbl_dokumentprestudent WHERE prestudent_id in ("; - //echo $qry; foreach ($arrayDoksZuEntakzeptieren as $prestudent_id) { @@ -1024,8 +1008,6 @@ class dokument extends basis_db } $qry .= ") AND dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz).";"; - echo $qry; - if ($this->db_query($qry)) { return true; @@ -1036,10 +1018,6 @@ class dokument extends basis_db return false; } } - else - { - echo " Keine Entzuakzeptierenden Doks vorhanden"; - } return true; } else diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 06115dab2..747fd5da4 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2215,9 +2215,9 @@ class prestudent extends person WHERE laststatus NOT IN ('Abbrecher', 'Abgewiesener', 'Absolvent') AND priorisierung <= ".$this->db_add_param($priorisierungAbsolut, FHC_INTEGER); - if($result = $this->db_query($qry)) + if ($result = $this->db_query($qry)) { - if($row = $this->db_fetch_object($result)) + if ($row = $this->db_fetch_object($result)) { return $row->prio_relativ; } @@ -2328,7 +2328,7 @@ class prestudent extends person //echo var_dump($row->prestudent_id); $arrayleereManations[] = $row->prestudent_id; } - print_r($arrayleereManations); + //print_r($arrayleereManations); $qry = "UPDATE public.tbl_prestudent @@ -2352,7 +2352,7 @@ class prestudent extends person if ($this->db_query($qry)) { - echo " ZGV-Master Nation A eingetragen!"; + //echo " ZGV-Master Nation A eingetragen!"; return true; } else @@ -2362,7 +2362,7 @@ class prestudent extends person } } else - echo " Keine leere ZGVManation gefunden"; + //echo " Keine leere ZGVManation gefunden"; return true; } } @@ -2447,9 +2447,6 @@ class prestudent extends person //prestudentIds auf Interessentenstatus prüfen foreach ($prestudentsOfMaster as $prestudent_id) { - //echo $prestudent_id; - //echo "last status = " . $this->getLastPrestudentStatus($prestudent_id); - //echo "
"; if ($this->getLastPrestudentStatus($prestudent_id) == "Interessent") { return true; @@ -2460,5 +2457,4 @@ class prestudent extends person else return false; } - } From e157945ae9f016766412cc8e893b44d7686ffbcf Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 9 Jun 2021 08:58:17 +0200 Subject: [PATCH 43/84] Auskommentieren Testausgaben --- include/prestudent.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 747fd5da4..9f8b2fa27 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2348,7 +2348,7 @@ class prestudent extends person } $qry .= ");"; - echo $qry; + //echo $qry; if ($this->db_query($qry)) { From 49363e893b6d4ec0b1ea40ce86954e3dda7d0e51 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 10 Jun 2021 10:30:49 +0200 Subject: [PATCH 44/84] 13218 update Eintragen MasterZGV Nation --- include/prestudent.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 9f8b2fa27..8f76a8dd3 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2303,19 +2303,23 @@ class prestudent extends person $db = new basis_db(); $arrayleereManations = array(); - //all prestudent_ids mit leerer ZGV_Nation + //all prestudent_ids mit leerer ZGV_Nation und Status Interessent $qry = "SELECT * FROM public.tbl_prestudent JOIN public.tbl_studiengang USING (studiengang_kz) + JOIN + public.tbl_prestudentstatus USING (prestudent_id) WHERE person_id = ".$this->db_add_param($person_id)." AND zgvmanation is NULL AND - typ in ('m','d')"; + typ in ('m','d') + AND + status_kurzbz = 'Interessent'"; if ($db->db_query($qry)) { From 3ba88b43dd7a94541085da7b0008185c183a9759 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 10 Jun 2021 11:49:48 +0200 Subject: [PATCH 45/84] zgvmaster spalte hinzugefuegt --- .../system/infocenter/infocenterData.php | 23 +++++++++++++++---- .../infocenter/infocenterFreigegebenData.php | 21 +++++++++++++---- .../infocenterReihungstestAbsolviertData.php | 21 +++++++++++++---- system/filtersupdate.php | 6 +++++ 4 files changed, 58 insertions(+), 13 deletions(-) diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 6eb1accae..5f881b485 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -3,7 +3,7 @@ $APP = '\'infocenter\''; $REJECTED_STATUS = '\'Abgewiesener\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\'m\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\', \'Interessent rejected\''; $LOGDATA_NAME_PARKED = '\'Parked\''; @@ -208,12 +208,19 @@ LIMIT 1 ) AS "StgAktiv", ( - SELECT CONCAT(COALESCE(ps.zgvnation, \'-\'), \' / \' , COALESCE(ps.zgvmanation, \'-\')) + SELECT ps.zgvnation FROM public.tbl_prestudent ps WHERE ps.person_id = p.person_id - ORDER BY ps.zgvnation, ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC + ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT ps.zgvmanation + FROM public.tbl_prestudent ps + WHERE ps.person_id = p.person_id + ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC + LIMIT 1 + ) AS "ZGVMNation" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -298,7 +305,8 @@ ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')', - 'ZGV Nation' + 'ZGV Nation', + 'ZGV Master Nation' ), 'formatRow' => function($datasetRaw) { @@ -380,6 +388,11 @@ $datasetRaw->{'ZGVNation'} = '-'; } + if ($datasetRaw->{'ZGVMNation'} == null) + { + $datasetRaw->{'ZGVMNation'} = '-'; + } + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 02d15655a..244b96855 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -205,12 +205,19 @@ LIMIT 1 ) AS "ReihungstestDate", ( - SELECT CONCAT(COALESCE(ps.zgvnation, \'-\'), \' / \' , COALESCE(ps.zgvmanation, \'-\')) + SELECT ps.zgvnation FROM public.tbl_prestudent ps WHERE ps.person_id = p.person_id - ORDER BY ps.zgvnation, ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC + ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT ps.zgvmanation + FROM public.tbl_prestudent ps + WHERE ps.person_id = p.person_id + ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC + LIMIT 1 + ) AS "ZGVMNation" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -278,7 +285,8 @@ 'Reihungstest angetreten', 'Reihungstest angemeldet', 'Reihungstest date', - 'ZGV Nation' + 'ZGV Nation', + 'ZGV Master Nation' ), 'formatRow' => function($datasetRaw) { @@ -371,6 +379,11 @@ { $datasetRaw->{'ZGVNation'} = '-'; } + + if ($datasetRaw->{'ZGVMNation'} == null) + { + $datasetRaw->{'ZGVMNation'} = '-'; + } return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 9f7a5204a..121aa72da 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -161,12 +161,19 @@ LIMIT 1 ) AS "ReihungstestDatum", ( - SELECT CONCAT(COALESCE(ps.zgvnation, \'-\'), \' / \' , COALESCE(ps.zgvmanation, \'-\')) + SELECT ps.zgvnation FROM public.tbl_prestudent ps WHERE ps.person_id = p.person_id - ORDER BY ps.zgvnation, ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC + ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT ps.zgvmanation + FROM public.tbl_prestudent ps + WHERE ps.person_id = p.person_id + ORDER BY ps.zgvmanation DESC NULLS LAST, ps.prestudent_id DESC + LIMIT 1 + ) AS "ZGVMNation" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -225,7 +232,8 @@ 'Reihungstest angetreten', 'Reihungstest angemeldet', 'Reihungstest Datum', - 'ZGV Nation' + 'ZGV Nation', + 'ZGV Master Nation' ), 'formatRow' => function($datasetRaw) { @@ -313,6 +321,11 @@ { $datasetRaw->{'ZGVNation'} = '-'; } + + if ($datasetRaw->{'ZGVMNation'} == null) + { + $datasetRaw->{'ZGVMNation'} = '-'; + } return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 2d8daed4d..44772d249 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -33,6 +33,7 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "ZGVNation"}, + {"name": "ZGVMNation"}, {"name": "StgAbgeschickt"}, {"name": "Studiensemester"}, {"name": "LastAction"}, @@ -66,6 +67,7 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "ZGVNation"}, + {"name": "ZGVMNation"}, {"name": "StgAbgeschickt"}, {"name": "Studiensemester"}, {"name": "LastAction"}, @@ -105,6 +107,7 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "ZGVNation"}, + {"name": "ZGVMNation"}, {"name": "LastAction"}, {"name": "LastActionType"}, {"name": "User/Operator"}, @@ -140,6 +143,7 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "ZGVNation"}, + {"name": "ZGVMNation"}, {"name": "LastAction"}, {"name": "User/Operator"}, {"name": "LockUser"}, @@ -180,6 +184,7 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "ZGVNation"}, + {"name": "ZGVMNation"}, {"name": "StgAbgeschickt"}, {"name": "Studiensemester"}, {"name": "LastAction"}, @@ -218,6 +223,7 @@ $filters = array( {"name": "Vorname"}, {"name": "Nachname"}, {"name": "ZGVNation"}, + {"name": "ZGVMNation"}, {"name": "LastAction"}, {"name": "User/Operator"}, {"name": "LockUser"}, From cdfaf5b90bb8e884343f8250025c5598efc88531 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 10 Jun 2021 11:56:07 +0200 Subject: [PATCH 46/84] dokumententypen nach bezeichnung sortiert --- application/controllers/system/infocenter/InfoCenter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 950507b0c..ff9e54aa5 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -219,6 +219,7 @@ class InfoCenter extends Auth_Controller $persondata = $this->_loadPersonData($person_id); $prestudentdata = $this->_loadPrestudentData($person_id); + $this->DokumentModel->addOrder('bezeichnung'); $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load()))); $data = array_merge( From 3171ec2c4241c8a01eef4a469f59641eea0ec30c Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 10 Jun 2021 12:01:01 +0200 Subject: [PATCH 47/84] dokumententypen nach bezeichnung sortiert --- application/controllers/system/infocenter/InfoCenter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 44d393e86..f2a63c46b 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -233,6 +233,7 @@ class InfoCenter extends Auth_Controller $prestudent_id = array('prestudent_id' => $prestudent_id); $status = array('status' => getData($zgv)[0]->status); + $this->DokumentModel->addOrder('bezeichnung'); $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load()))); $data = array_merge( From c9ec4cb6749b5ea7b85ea3141a5afcb2b73f3867 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 10 Jun 2021 12:19:42 +0200 Subject: [PATCH 48/84] ist infocentermitarbeiter spalte nachgezogen --- .../infocenter/infocenterFreigegebenData.php | 32 +++++++++++++++++-- .../infocenterReihungstestAbsolviertData.php | 32 +++++++++++++++++-- system/filtersupdate.php | 9 ++++++ 3 files changed, 69 insertions(+), 4 deletions(-) diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 3b7ff1dbe..62ecaef96 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -207,7 +207,24 @@ WHERE ps.person_id = p.person_id ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT tbl_organisationseinheit.bezeichnung + FROM public.tbl_benutzerfunktion + JOIN public.tbl_organisationseinheit USING(oe_kurzbz) + WHERE (tbl_benutzerfunktion.datum_von IS NULL OR tbl_benutzerfunktion.datum_von <= now()) + AND (tbl_benutzerfunktion.datum_bis IS NULL OR tbl_benutzerfunktion.datum_bis >= now()) + AND tbl_benutzerfunktion.uid = ( + SELECT l.insertvon + FROM system.tbl_log l + WHERE l.taetigkeit_kurzbz IN ('.$TAETIGKEIT_KURZBZ.') + AND l.logdata->>\'name\' NOT IN ('.$LOGDATA_NAME.') + AND l.person_id = p.person_id + ORDER BY l.zeitpunkt DESC + LIMIT 1 + ) + LIMIT 1 + ) AS "InfoCenterMitarbeiter" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -275,7 +292,8 @@ 'Reihungstest angetreten', 'Reihungstest angemeldet', 'Reihungstest date', - 'ZGV Nation' + 'ZGV Nation', + 'InfoCenter Mitarbeiter' ), 'formatRow' => function($datasetRaw) { @@ -368,6 +386,16 @@ { $datasetRaw->{'ZGVNation'} = '-'; } + + if ($datasetRaw->{'InfoCenterMitarbeiter'} === 'InfoCenter') + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja'; + } + else + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein'; + } + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 6b0918174..b11fdc481 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -163,7 +163,24 @@ WHERE ps.person_id = p.person_id ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT tbl_organisationseinheit.bezeichnung + FROM public.tbl_benutzerfunktion + JOIN public.tbl_organisationseinheit USING(oe_kurzbz) + WHERE (tbl_benutzerfunktion.datum_von IS NULL OR tbl_benutzerfunktion.datum_von <= now()) + AND (tbl_benutzerfunktion.datum_bis IS NULL OR tbl_benutzerfunktion.datum_bis >= now()) + AND tbl_benutzerfunktion.uid = ( + SELECT l.insertvon + FROM system.tbl_log l + WHERE l.taetigkeit_kurzbz IN ('.$TAETIGKEIT_KURZBZ.') + AND l.logdata->>\'name\' NOT IN ('.$LOGDATA_NAME.') + AND l.person_id = p.person_id + ORDER BY l.zeitpunkt DESC + LIMIT 1 + ) + LIMIT 1 + ) AS "InfoCenterMitarbeiter" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -222,7 +239,8 @@ 'Reihungstest angetreten', 'Reihungstest angemeldet', 'Reihungstest Datum', - 'ZGV Nation' + 'ZGV Nation', + 'InfoCenter Mitarbeiter' ), 'formatRow' => function($datasetRaw) { @@ -310,6 +328,16 @@ { $datasetRaw->{'ZGVNation'} = '-'; } + + if ($datasetRaw->{'InfoCenterMitarbeiter'} === 'InfoCenter') + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja'; + } + else + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein'; + } + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 5a5b983a2..4624dc042 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -38,6 +38,7 @@ $filters = array( {"name": "LastAction"}, {"name": "LastActionType"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"} ], "filters": [ @@ -71,6 +72,7 @@ $filters = array( {"name": "LastAction"}, {"name": "LastActionType"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"} ], "filters": [ @@ -108,6 +110,7 @@ $filters = array( {"name": "LastAction"}, {"name": "LastActionType"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"}, {"name": "StgNichtAbgeschickt"}, {"name": "StgAbgeschickt"}, @@ -142,6 +145,7 @@ $filters = array( {"name": "ZGVNation"}, {"name": "LastAction"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"}, {"name": "StgNichtAbgeschickt"}, {"name": "StgAbgeschickt"}, @@ -184,6 +188,7 @@ $filters = array( {"name": "Studiensemester"}, {"name": "LastAction"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"} ], "filters": [ @@ -220,6 +225,7 @@ $filters = array( {"name": "ZGVNation"}, {"name": "LastAction"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"}, {"name": "StgNichtAbgeschickt"}, {"name": "StgAbgeschickt"}, @@ -266,6 +272,7 @@ $filters = array( {"name": "StgAbgeschickt"}, {"name": "LastAction"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"}, {"name": "Statusgrund"} ], @@ -302,6 +309,7 @@ $filters = array( {"name": "LastAction"}, {"name": "LastActionType"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"}, {"name": "Statusgrund"}, {"name": "Studiensemester"}, @@ -383,6 +391,7 @@ $filters = array( {"name": "StgAbgeschickt"}, {"name": "LastAction"}, {"name": "User/Operator"}, + {"name": "InfoCenterMitarbeiter"}, {"name": "LockUser"} ], "filters": [ From 42ff593cb160412d5d15302350be748ce8b095a1 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 14 Jun 2021 15:44:38 +0200 Subject: [PATCH 49/84] zgvnation spalten umbenannt --- application/views/system/infocenter/infocenterData.php | 4 ++-- .../views/system/infocenter/infocenterFreigegebenData.php | 4 ++-- .../infocenter/infocenterReihungstestAbsolviertData.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 5f881b485..4660cba6c 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -305,8 +305,8 @@ ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')', - 'ZGV Nation', - 'ZGV Master Nation' + 'ZGV Nation BA', + 'ZGV Nation MA' ), 'formatRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 244b96855..93e524d2c 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -285,8 +285,8 @@ 'Reihungstest angetreten', 'Reihungstest angemeldet', 'Reihungstest date', - 'ZGV Nation', - 'ZGV Master Nation' + 'ZGV Nation BA', + 'ZGV Nation MA' ), 'formatRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 121aa72da..7ac66e71a 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -232,8 +232,8 @@ 'Reihungstest angetreten', 'Reihungstest angemeldet', 'Reihungstest Datum', - 'ZGV Nation', - 'ZGV Master Nation' + 'ZGV Nation BA', + 'ZGV Nation MA' ), 'formatRow' => function($datasetRaw) { From 6a3fb14ea66ffd4af21df6844c998beb11673775 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 16 Jun 2021 09:16:15 +0200 Subject: [PATCH 50/84] zgv ueberpruefung zwischen master und bachelor unterscheiden --- .../controllers/system/infocenter/InfoCenter.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index f2a63c46b..db62748fa 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -13,6 +13,7 @@ class InfoCenter extends Auth_Controller const TAETIGKEIT = 'bewerbung'; const FREIGABE_MAIL_VORLAGE = 'InfocenterMailFreigabeAssistenz'; const ZGVPRUEFUNG_MAIL_VORLAGE = 'InfocenterMailZgvUeberpruefung'; + const ZGVPRUEFUNG_MAIL_VORLAGE_MASTER = 'InfocenterMailZgvUeberpruefungM'; const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller const ZGV_UEBERPRUEFUNG_URI = 'system/infocenter/ZGVUeberpruefung'; @@ -521,7 +522,7 @@ class InfoCenter extends Auth_Controller /** * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang */ - private function sendZgvMail($mail){ + private function sendZgvMail($mail, $typ){ $data = array( 'link' => site_url('system/infocenter/ZGVUeberpruefung') ); @@ -529,7 +530,7 @@ class InfoCenter extends Auth_Controller $this->load->helper('hlp_sancho'); sendSanchoMail( - self::ZGVPRUEFUNG_MAIL_VORLAGE, + ($typ === 'm' ? self::ZGVPRUEFUNG_MAIL_VORLAGE_MASTER : self::ZGVPRUEFUNG_MAIL_VORLAGE), $data, $mail, 'ZGV Ueberpruefung', @@ -622,6 +623,8 @@ class InfoCenter extends Auth_Controller $data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); $mail = $data['studiengang_mail']; + $typ = $data['studiengang_typ']; + if (hasData($zgv)) { $zgv = getData($zgv); @@ -647,7 +650,7 @@ class InfoCenter extends Auth_Controller $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg')); if (isSuccess($insert)) - $this->sendZgvMail($mail); + $this->sendZgvMail($mail, $typ); elseif (isError($insert)) $this->terminateWithJsonError('Fehler beim Speichern'); }else @@ -673,7 +676,7 @@ class InfoCenter extends Auth_Controller $this->_log($person_id, 'newzgv', array($zgvpruefung_id)); if (isSuccess($result)) - $this->sendZgvMail($mail); + $this->sendZgvMail($mail, $typ); elseif (isError($result)) $this->terminateWithJsonError('Fehler beim Speichern'); } @@ -1824,8 +1827,9 @@ class InfoCenter extends Auth_Controller $studiengang_kurzbz = $prestudentdata->studiengang; $studiengang_bezeichnung = $prestudentdata->studiengangbezeichnung; $studiengang_mail = $prestudentdata->studiengangmail; + $studiengang_typ = $prestudentdata->studiengangtyp; - return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung, 'studiengang_mail' => $studiengang_mail); + return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung, 'studiengang_mail' => $studiengang_mail, 'studiengang_typ' => $studiengang_typ); } /** From 8b3df557192ed9133c7b9869291db664935f1ea0 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 17 Jun 2021 14:08:49 +0200 Subject: [PATCH 51/84] =?UTF-8?q?response=20bei=20doktyp=20=C3=A4nderung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/infocenter/infocenterDetails.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 0df271dd5..de2ba0064 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -761,7 +761,15 @@ var InfocenterDetails = { }, { successCallback: function(data, textStatus, jqXHR) { - InfocenterDetails._refreshLog(); + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + InfocenterDetails._refreshLog(); + } + else + { + FHC_DialogLib.alertError("Fehler beim Speichern des Dokumententypes!"); + } }, errorCallback: function() { FHC_DialogLib.alertWarning("Document type could not be updated"); From 3fca876f8df3f73f05e2ef986afb183a68acf6c5 Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 21 Jun 2021 15:12:33 +0200 Subject: [PATCH 52/84] #13749 MasterZGV Art und Ort setzen --- include/prestudent.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 8f76a8dd3..c5b632ca5 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2287,12 +2287,13 @@ class prestudent extends person } /** - * Befüllt MasterZGV Nation mit Österreich + * Befüllt MasterZGV Nation mit Österreich, + * MasterZGV-code mit FH-Bachelor(I) und MasterZGV-Ort mit Wien(FHTW) * @param int $person_id Personenkennzeichen. * @return true wenn erfolgreich durchgeführt * false und errormsg wenn ein Fehler aufgetreten ist */ - public function setManationZGV($person_id) + public function setZGVMasterFields($person_id) { if (!is_numeric($person_id)) { @@ -2337,7 +2338,7 @@ class prestudent extends person $qry = "UPDATE public.tbl_prestudent SET - zgvmanation = 'A' + (zgvmanation, zgvmaort, zgvmas_code) = ('A','Wien (FHTW)',1) WHERE prestudent_id in ("; @@ -2356,12 +2357,12 @@ class prestudent extends person if ($this->db_query($qry)) { - //echo " ZGV-Master Nation A eingetragen!"; + //echo " ZGV-Master Eintragungen vorgenommen!"; return true; } else { - $this->errormsg = 'Fehler beim Eintragen zgvMasternation'; + $this->errormsg = 'Fehler beim Eintragen zgvMasterFields'; return false; } } From e1a6a899f60ec3421c46fc5ea9e82340dfd2fa0a Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 21 Jun 2021 17:03:40 +0200 Subject: [PATCH 53/84] - Renamed libraries/LDAPLib.php to libraries/AuthLDAPLib.php - Removed constants LDAP_NO_USER_DN and LDAP_TOO_MANY_USER_DN from config/constants.php - Added config entry timeout to config/ldap.php - Changed private method libraries/AuthLib->_checkLDAPAuthentication to use libraries/AuthLDAPLib->checkUsernamePassword - Changed AuthLDAPLib to have only one public method called checkUsernamePassword that makes use of the other private methods to check if a username and password are valid on many LDAP servers --- application/config/constants.php | 8 - application/config/ldap.php | 13 +- application/libraries/AuthLDAPLib.php | 309 ++++++++++++++++++++++++++ application/libraries/AuthLib.php | 35 +-- application/libraries/LDAPLib.php | 228 ------------------- 5 files changed, 323 insertions(+), 270 deletions(-) create mode 100644 application/libraries/AuthLDAPLib.php delete mode 100644 application/libraries/LDAPLib.php diff --git a/application/config/constants.php b/application/config/constants.php index f21b6c962..cbbf55d8b 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -57,14 +57,6 @@ define('AUTH_SUCCESS', 0); define('AUTH_NOT_AUTHENTICATED', 1); define('AUTH_INVALID_CREDENTIALS', 2); -/* -|-------------------------------------------------------------------------- -| LDAP constants -|-------------------------------------------------------------------------- -*/ -define('LDAP_NO_USER_DN', 10); -define('LDAP_TOO_MANY_USER_DN', 11); - /* |-------------------------------------------------------------------------- | Language constants diff --git a/application/config/ldap.php b/application/config/ldap.php index b7134e3ce..be8474c1e 100644 --- a/application/config/ldap.php +++ b/application/config/ldap.php @@ -17,7 +17,8 @@ if (defined('LDAP_SERVER')) // 1st LDAP server 'basedn' => LDAP_BASE_DN, 'username' => LDAP_BIND_USER, 'password' => LDAP_BIND_PASSWORD, - 'usf' => LDAP_USER_SEARCH_FILTER + 'usf' => LDAP_USER_SEARCH_FILTER, + 'timeout' => 1 ); } @@ -30,7 +31,8 @@ if (defined('LDAP2_SERVER')) // 2nd LDAP server 'basedn' => LDAP2_BASE_DN, 'username' => LDAP2_BIND_USER, 'password' => LDAP2_BIND_PASSWORD, - 'usf' => LDAP2_USER_SEARCH_FILTER + 'usf' => LDAP2_USER_SEARCH_FILTER, + 'timeout' => 1 ); } @@ -45,7 +47,8 @@ if (defined('LDAP_SERVER')) // 1st LDAP server 'basedn' => LDAP_BASE_DN, 'username' => LDAP_BIND_USER, 'password' => LDAP_BIND_PASSWORD, - 'usf' => LDAP_USER_SEARCH_FILTER + 'usf' => LDAP_USER_SEARCH_FILTER, + 'timeout' => 1 ); } @@ -58,6 +61,8 @@ if (defined('LDAP2_SERVER')) // 2nd LDAP server 'basedn' => LDAP2_BASE_DN, 'username' => LDAP2_BIND_USER, 'password' => LDAP2_BIND_PASSWORD, - 'usf' => LDAP2_USER_SEARCH_FILTER + 'usf' => LDAP2_USER_SEARCH_FILTER, + 'timeout' => 1 ); } + diff --git a/application/libraries/AuthLDAPLib.php b/application/libraries/AuthLDAPLib.php new file mode 100644 index 000000000..711b7f5b9 --- /dev/null +++ b/application/libraries/AuthLDAPLib.php @@ -0,0 +1,309 @@ +_ci =& get_instance(); + + // Loads the LogLib + $this->_ci->load->library('LogLib'); + } + + //------------------------------------------------------------------------------------------------------------------ + // Public methods + + /** + * Checks if the given credentials are valid on one of the configured LDAP servers + */ + public function checkUsernamePassword($username, $password) + { + $authenticated = false; + + if (isEmptyString($username) || isEmptyString($password)) return error('Wrong username and password'); + + $ldapConfigArrays = $this->_loadConfig(); // NOTE: always the last to be called! + + // For each configured LDAP server + foreach ($ldapConfigArrays as $ldapConfigs) + { + // Check if the LDAP server is up and running + if (!$this->_servicePing($ldapConfigs)) + { + // If not available log debug and skip to the next configured server + $this->_ci->loglib->logError('This LDAP server is not available: '.$ldapConfigs[self::SERVER]); + continue; + } + + // Connection without username and passoword _or_ with the configured username and password + $noCredentialsConnectResult = $this->_connect($ldapConfigs); + if (isError($noCredentialsConnectResult)) // If an error occurred + { + // If the error is due to invalid credentials or + // the LDAP server does not support anonymous authentication + if (getCode($noCredentialsConnectResult) == AUTH_INVALID_CREDENTIALS) + { + $this->_ci->loglib->logDebug(getError($noCredentialsConnectResult).' on server '.$ldapConfigs[self::SERVER]); + } + else // otherwise if it was due to a fatal error + { + $this->_ci->loglib->logError(getError($noCredentialsConnectResult).' on server '.$ldapConfigs[self::SERVER]); + } + + continue; // anyway skip to the next configured server + } + + // If it is a success + $noCredentialsConnection = getData($noCredentialsConnectResult); + + // Check if the user exists on this LDAP server + $userDNResult = $this->_getUserDN( + $noCredentialsConnection, + $ldapConfigs[self::BASEDN], + $ldapConfigs[self::USF], + $username + ); + // If an error occurred or the user was not found or many users were found + if (isError($userDNResult)) + { + // Log debug and skip to the next configured server + // If the error is due to invalid credentials or + // the LDAP server does not support anonymous authentication + if (getCode($userDNResult) == self::LDAP_NO_USER_DN) + { + $this->_ci->loglib->logDebug(getError($userDNResult).' on server '.$ldapConfigs[self::SERVER]); + } + elseif (getCode($userDNResult) == self::LDAP_TOO_MANY_USER_DN) + { + $this->_ci->loglib->logDebug(getError($userDNResult).' on server '.$ldapConfigs[self::SERVER]); + } + else // otherwise if it was due to a fatal error + { + $this->_ci->loglib->logError(getError($userDNResult).' on server '.$ldapConfigs[self::SERVER]); + } + + $this->_close($noCredentialsConnection); // Close the current LDAP connection + continue; // anyway skip to the next configured server + } + + $this->_close($noCredentialsConnection); // Close the current LDAP connection + + // Connect to LDAP with the userDN and password + $credentialsConnectResult = $this->_connect($ldapConfigs, getData($userDNResult), $password); + if (isError($credentialsConnectResult)) // If an error occurred + { + // Log debug and skip to the next configured server + $this->_ci->loglib->logError(getError($credentialsConnectResult).' on server '.$ldapConfigs[self::SERVER]); + continue; + } + else // otherwise the user is authenticated + { + $this->_close(getData($credentialsConnectResult)); + $authenticated = true; + break; + } + } + + return $authenticated; + } + + //------------------------------------------------------------------------------------------------------------------ + // Private methods + + /** + * Loads the LDAP configuration file and returns the LDAP configuration array + */ + private function _loadConfig() + { + // Tries to require the LDAP configuration file... + // ...first in the ENVIRONMENT subdirectory... + if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php')) + { + require_once(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php'); + } + else // ...then in the default config directory + { + require_once(APPPATH.'config/'.self::LDAP_CONF_FILE.'.php'); + } + + return $ldap[$ldap_active_group]; + } + + /** + * Establish a connection to LDAP with the given LDAP configuration array and eventually with + * with a given username and password + */ + private function _connect($ldapConfigs, $username = null, $password = null) + { + // Checks if the LDAP configuraion is empty + if (isEmptyArray($ldapConfigs)) return error('Wrong parameters given'); + + // LDAP connection + $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]); + if ($ldapConnection) // if success + { + // Sets the LDAP protocol version + if (!@ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, self::LDAP_PROTOCOL_VERSION)) + { + return error('Was not possible to set the protocol version using LDAP sever '.$ldapConfigs[self::SERVER]); + } + + // Enable/disable the LDAP referrals + if (!@ldap_set_option($ldapConnection, LDAP_OPT_REFERRALS, self::LDAP_REFERRALS)) + { + return error('Was not possible to enable referrals using LDAP sever '.$ldapConfigs[self::SERVER]); + } + + // Starts TLS if required + if ($ldapConfigs[self::STARTTLS] === true && !@ldap_start_tls($ldapConnection)) + { + return error('Was not possible to enable TLS using LDAP sever '.$ldapConfigs[self::SERVER]); + } + + // If username or password are not provided... + if (isEmptyString($username) || isEmptyString($password)) + { + // ...use those provided by the configuration + $username = $ldapConfigs[self::USERNAME]; + $password = $ldapConfigs[self::PASSWORD]; + } + + // Binds to LDAP directory + if (!@ldap_bind($ldapConnection, $username, $password)) + { + // Wrong username and/or password + if (ldap_errno($ldapConnection) == self::LDAP_INVALID_CREDENTIALS) + { + return error('Invalid credentials', AUTH_INVALID_CREDENTIALS); + } + else // Error + { + return error('Was not possible to bind to the LDAP sever '.$ldapConfigs[self::SERVER]); + } + } + + return success($ldapConnection); // connected!!! + } + else // Connection error + { + return error('An error occurred while connecting to the LDAP server '.$ldapConfigs[self::SERVER]); + } + } + + /** + * Check if the network service is up and running + */ + private function _servicePing($ldapConfigs) + { + // Set the default timeout + $timeout = self::LDAP_DEFAULT_TIMEOUT; + + // If a timeout was configured for this server then use it + if (isset($ldapConfigs[self::TIMEOUT])) $timeout = $ldapConfigs[self::TIMEOUT]; + + // The LDAP server name or URL + $host = $ldapConfigs[self::SERVER]; + + // If it is a URL + if (strpos($ldapConfigs[self::SERVER], 'ldap://') !== false + || strpos($ldapConfigs[self::SERVER], 'ldaps://') !== false) + { + // Get the host from the URL + $host = parse_url($ldapConfigs[self::SERVER], PHP_URL_HOST); + } + + // Check if the given host answers on the given port using the given timeout + if ($op = @fsockopen($host, $ldapConfigs[self::PORT], $errno, $errstr, $timeout)) + { + // If it works then close the socket connection + fclose($op); + return true; + } + + return false; // otherwise this server is not up or LDAP service is not running on the given port + } + + /** + * Close the current connection to LDAP if present + */ + private function _close($connection) + { + @ldap_unbind($connection); + } + + /** + * Get the user DN from LDAP using the given username + */ + private function _getUserDN($connection, $baseDN, $usf, $username) + { + $userDN = error('AuthLDAPLib->_getUserDN() failed'); + + // Tries to search for a user DN using the given username + $searchResultIdentifier = @ldap_search( + $connection, + $baseDN, + $usf.'='.$username + ); + if (!$searchResultIdentifier) // Error + { + $userDN = error(ldap_error($connection)); + } + + // Counts the number of found entries + $countEntries = @ldap_count_entries($connection, $searchResultIdentifier); + if ($countEntries === false) // Error + { + $userDN = error(ldap_error($connection)); + } + elseif ($countEntries == 0) + { + $userDN = error('No user DN were found with username: '.$username, self::LDAP_NO_USER_DN); + } + elseif ($countEntries > 1) + { + $userDN = error('Too many users DN were found with username: '.$username, self::LDAP_TOO_MANY_USER_DN); + } + else // One entry was found + { + $entries = @ldap_get_entries($connection, $searchResultIdentifier); + if (!$entries) // Error + { + $userDN = error(ldap_error($connection)); + } + else + { + $userDN = success($entries[0][self::DN]); + } + } + + return $userDN; + } +} + diff --git a/application/libraries/AuthLib.php b/application/libraries/AuthLib.php index 67a527655..ae30d41fa 100644 --- a/application/libraries/AuthLib.php +++ b/application/libraries/AuthLib.php @@ -385,7 +385,7 @@ class AuthLib // Invalid credentials // NOTE: this is a corner case because of the HTTP basic authentication if (getCode($hta) == AUTH_NOT_AUTHENTICATED || getCode($hta) == AUTH_INVALID_CREDENTIALS - || getCode($hta) == LDAP_NO_USER_DN || getCode($hta) == LDAP_TOO_MANY_USER_DN) + || getCode($hta) == AuthLDAPLib::LDAP_NO_USER_DN || getCode($hta) == AuthLDAPLib::LDAP_TOO_MANY_USER_DN) { $this->_showInvalidAuthentication(); // this also stop the execution } @@ -404,37 +404,12 @@ class AuthLib { $ldap = error('Not authenticated', AUTH_NOT_AUTHENTICATED); // by default is NOT authenticated - $this->_ci->load->library('LDAPLib'); // Loads the LDAP library + $this->_ci->load->library('AuthLDAPLib'); // Loads the LDAP library - $ldapConnection = $this->_ci->ldaplib->anonymousConnect(); // connect anonymously! - if (isSuccess($ldapConnection)) // connected!! + // If it is possible to authenticate on LDAP with the given username and password + if ($this->_ci->authldaplib->checkUsernamePassword($username, $password) === true) { - // Get the user DN from LDAP - $userDN = $this->_ci->ldaplib->getUserDN($username); - if (isSuccess($userDN)) // got it! - { - $this->_ci->ldaplib->close(); // close the previous LDAP anonymous connection - - // Connects to LDAP using the last working configuration + the retrieved user DN + the provided password - $ldapConnection = $this->_ci->ldaplib->connectUsernamePassword(getData($userDN), $password); - if (isSuccess($ldapConnection)) // connected! - { - $this->_ci->ldaplib->close(); // close the previous connection - $ldap = success('Authenticated', AUTH_SUCCESS); // authenticated! - } - else // blocking error - { - $ldap = $ldapConnection; - } - } - else // blocking error - { - $ldap = $userDN; - } - } - else // blocking error - { - $ldap = $ldapConnection; + $ldap = success('Authenticated', AUTH_SUCCESS); // authenticated! } return $ldap; diff --git a/application/libraries/LDAPLib.php b/application/libraries/LDAPLib.php deleted file mode 100644 index 195dddc88..000000000 --- a/application/libraries/LDAPLib.php +++ /dev/null @@ -1,228 +0,0 @@ -_connection = null; - $this->_workingConfigArray = null; - $this->_ldapConfigArray = null; - - $this->_loadConfig(); // NOTE: always the last to be called! - } - - //------------------------------------------------------------------------------------------------------------------ - // Public methods - - /** - * Tries to connect to LDAP using configurations in property _ldapConfigArray - * The first that works is used and stored in property _workingConfigArray - * The LDAP connection link is stored in _connection - */ - public function anonymousConnect() - { - $connect = error('Did not found a working LDAP configuration'); - - // Loops through LDAP configurations - foreach ($this->_ldapConfigArray as $ldapConfigs) - { - // Tries to establish a connection - $connect = $this->_connect($ldapConfigs); - if (isSuccess($connect)) - { - break; // found a working LDAP configuration and successfully connected! - } - else - { - $this->close(); // close the eventually established connection - } - } - - return $connect; - } - - /** - * Tries to connect using the given username and password and the last working configuration with anonymous connection - */ - public function connectUsernamePassword($username, $password) - { - if (isEmptyString($username) || isEmptyString($password)) return error('Wrong username and password'); - - return $this->_connect($this->_workingConfigArray, $username, $password); - } - - /** - * Close the current connection to LDAP if present - */ - public function close() - { - if ($this->_connection != null) @ldap_unbind($this->_connection); - } - - /** - * Get the user DN from LDAP using the given username - */ - public function getUserDN($username) - { - $userDN = error('No user DN were found', LDAP_NO_USER_DN); - - // Tries to search for a user DN using the given username - $searchResultIdentifier = @ldap_search( - $this->_connection, - $this->_workingConfigArray[self::BASEDN], - $this->_workingConfigArray[self::USF].'='.$username - ); - if (!$searchResultIdentifier) // Error - { - $userDN = error(ldap_error($this->_connection)); - } - - // Counts the number of found entries - $countEntries = @ldap_count_entries($this->_connection, $searchResultIdentifier); - if ($countEntries === false) // Error - { - $userDN = error(ldap_error($this->_connection)); - } - elseif ($countEntries == 0) - { - $userDN = error('No user DN were found', LDAP_NO_USER_DN); - } - elseif ($countEntries > 1) - { - $userDN = error('Too many users DN were found', LDAP_TOO_MANY_USER_DN); - } - else // One entry was found - { - $entries = @ldap_get_entries($this->_connection, $searchResultIdentifier); - if (!$entries) // Error - { - $userDN = error(ldap_error($this->_connection)); - } - else - { - $userDN = success($entries[0][self::DN]); - } - } - - return $userDN; - } - - //------------------------------------------------------------------------------------------------------------------ - // Private methods - - /** - * Loads the LDAP configuration file and store the LDAP configuration array into _ldapConfigArray property - */ - private function _loadConfig() - { - // Tries to require the LDAP configuration file... - // ...first in the ENVIRONMENT subdirectory... - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php')) - { - require_once(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php'); - } - else // ...then in the default config directory - { - require_once(APPPATH.'config/'.self::LDAP_CONF_FILE.'.php'); - } - - $this->_ldapConfigArray = $ldap[$ldap_active_group]; // store the active LDAP configuration array - } - - /** - * Establish a connection to LDAP with the given LDAP configuration array and eventually with - * with a given username and password - */ - private function _connect($ldapConfigs, $username = null, $password = null) - { - // Checks if the LDAP configuraion is empty - if (isEmptyArray($ldapConfigs)) - { - return error('Wrong parameters given'); - } - - // LDAP connection - $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]); - if ($ldapConnection) // if success - { - // Sets the LDAP protocol version - if (!@ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, self::LDAP_PROTOCOL_VERSION)) - { - return error(ldap_error($ldapConnection)); - } - - // Enable/disable the LDAP referrals - if (!@ldap_set_option($ldapConnection, LDAP_OPT_REFERRALS, self::LDAP_REFERRALS)) - { - return error(ldap_error($ldapConnection)); - } - - // Starts TLS if required - if ($ldapConfigs[self::STARTTLS] === true) - { - if (!@ldap_start_tls($ldapConnection)) - { - return error(ldap_error($ldapConnection)); - } - } - - // If username and password are not provided... - if ($username == null || $password == null) - { - // ...uses those provided by the configuration - $username = $ldapConfigs[self::USERNAME]; - $password = $ldapConfigs[self::PASSWORD]; - } - - // Binds to LDAP directory - if (!@ldap_bind($ldapConnection, $username, $password)) - { - // Wrong username and/or password - if (ldap_errno($ldapConnection) == self::LDAP_INVALID_CREDENTIALS) - { - return error('Invalid credentials', AUTH_INVALID_CREDENTIALS); - } - else // Error - { - return error(ldap_error($ldapConnection)); - } - } - - $this->_connection = $ldapConnection; // save the connection into _connection property - $this->_workingConfigArray = $ldapConfigs; // save the working LDAP configuration into _workingConfigArray property - - return success('Connected'); // connected!!! - } - else // Connection error - { - return error( - 'An error occurred while connecting to the LDAP server: '.$ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT] - ); - } - } -} From 35366efdadb912cf95bd34fd368ce9f5882240f7 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 22 Jun 2021 10:20:56 +0200 Subject: [PATCH 54/84] =?UTF-8?q?Bewerbungstool:=20Korrektur=20Anzeige=20v?= =?UTF-8?q?orl=C3=A4ufiges=20Sprachzertifikat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/dms.php | 1 + 1 file changed, 1 insertion(+) diff --git a/cms/dms.php b/cms/dms.php index 7e587b6ec..307bc002f 100644 --- a/cms/dms.php +++ b/cms/dms.php @@ -85,6 +85,7 @@ if($doc->isLocked($id)) $dokumente_arr[] .= 'ZgvBaPre'; $dokumente_arr[] .= 'ZgvMaPre'; $dokumente_arr[] .= 'InvitLet'; + $dokumente_arr[] .= 'VorlSpB2'; } if ($person_id!=$akte_person || !in_array($akte_dokument_kurzbz, $dokumente_arr)) die('Sie haben keinen Zugriff auf dieses Dokument'); From 537ad8ab88d4e59b7b98ad11f21c135edae136c4 Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 23 Jun 2021 11:41:38 +0200 Subject: [PATCH 55/84] Adaptierungen setZGVMasterFields() --- include/prestudent.class.php | 69 ++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index c5b632ca5..73432e76e 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2318,9 +2318,9 @@ class prestudent extends person AND zgvmanation is NULL AND - typ in ('m','d') - AND - status_kurzbz = 'Interessent'"; + typ in ('m','d')";"; + -- AND + -- status_kurzbz = Interessent"; if ($db->db_query($qry)) { @@ -2330,44 +2330,54 @@ class prestudent extends person { while ($row = $db->db_fetch_object()) { - //echo var_dump($row->prestudent_id); - $arrayleereManations[] = $row->prestudent_id; + // echo ($row->prestudent_id . " = id " . $row->status_kurzbz . " = status " . $row->studiengang_kz . " = stg
"); + echo ($this->getLastPrestudentStatus($row->prestudent_id)); + if ($this->getLastPrestudentStatus($row->prestudent_id) == "Interessent") + { + $arrayleereManations[] = $row->prestudent_id; + } + } - //print_r($arrayleereManations); + print_r($arrayleereManations); - $qry = "UPDATE - public.tbl_prestudent - SET - (zgvmanation, zgvmaort, zgvmas_code) = ('A','Wien (FHTW)',1) - WHERE - prestudent_id in ("; - foreach ($arrayleereManations as $prestudent_id) + if($arrayleereManations) { - $qry .= $prestudent_id; + $qry = "UPDATE + public.tbl_prestudent + SET + (zgvmanation, zgvmaort, zgvmas_code) = ('A','Wien (FHTW)',1) + WHERE + prestudent_id in ("; - if (next($arrayleereManations) == true) + foreach ($arrayleereManations as $prestudent_id) { - $qry .= ","; + $qry .= $prestudent_id; + + if (next($arrayleereManations) == true) + { + $qry .= ","; + } } - } - $qry .= ");"; + $qry .= ");"; - //echo $qry; + echo $qry; - if ($this->db_query($qry)) - { - //echo " ZGV-Master Eintragungen vorgenommen!"; - return true; - } - else - { - $this->errormsg = 'Fehler beim Eintragen zgvMasterFields'; - return false; + if ($this->db_query($qry)) + { + echo " ZGV-Master Eintragungen vorgenommen!"; + return true; + } + else + { + $this->errormsg = 'Fehler beim Eintragen zgvMasterFields'; + return false; + } + } } else - //echo " Keine leere ZGVManation gefunden"; + echo " Keine prestudentId Master gefunden"; return true; } } @@ -2445,7 +2455,6 @@ class prestudent extends person { while ($row = $db->db_fetch_object()) { - //echo var_dump($row->prestudent_id); $prestudentsOfMaster[] = $row->prestudent_id; } From 84950649c4b56dc1a37a85728092303021f9c359 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 24 Jun 2021 12:00:49 +0200 Subject: [PATCH 56/84] Adaptierungen ZGV-Master Funktionen --- include/prestudent.class.php | 97 +++++++----------------------------- 1 file changed, 17 insertions(+), 80 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 73432e76e..8e19927ff 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2287,13 +2287,13 @@ class prestudent extends person } /** - * Befüllt MasterZGV Nation mit Österreich, - * MasterZGV-code mit FH-Bachelor(I) und MasterZGV-Ort mit Wien(FHTW) + * Befüllt MasterZGV-Felder: Nation mit Österreich und MasterZGV-code mit FH-Bachelor(I) * @param int $person_id Personenkennzeichen. + * @param varchar $ort Ort. * @return true wenn erfolgreich durchgeführt * false und errormsg wenn ein Fehler aufgetreten ist */ - public function setZGVMasterFields($person_id) + public function setZGVMasterFields($person_id, $ort) { if (!is_numeric($person_id)) { @@ -2311,16 +2311,14 @@ class prestudent extends person public.tbl_prestudent JOIN public.tbl_studiengang USING (studiengang_kz) - JOIN - public.tbl_prestudentstatus USING (prestudent_id) WHERE person_id = ".$this->db_add_param($person_id)." AND zgvmanation is NULL AND - typ in ('m','d')";"; - -- AND - -- status_kurzbz = Interessent"; + typ ='m' + And + get_rolle_prestudent(prestudent_id, null) = 'Interessent';"; if ($db->db_query($qry)) { @@ -2330,23 +2328,15 @@ class prestudent extends person { while ($row = $db->db_fetch_object()) { - // echo ($row->prestudent_id . " = id " . $row->status_kurzbz . " = status " . $row->studiengang_kz . " = stg
"); - echo ($this->getLastPrestudentStatus($row->prestudent_id)); - if ($this->getLastPrestudentStatus($row->prestudent_id) == "Interessent") - { - $arrayleereManations[] = $row->prestudent_id; - } - + $arrayleereManations[] = $row->prestudent_id; } - print_r($arrayleereManations); - - if($arrayleereManations) + if ($arrayleereManations) { $qry = "UPDATE public.tbl_prestudent SET - (zgvmanation, zgvmaort, zgvmas_code) = ('A','Wien (FHTW)',1) + (zgvmanation, zgvmaort, zgvmas_code) = ('A',".$this->db_add_param($ort).",1) WHERE prestudent_id in ("; @@ -2361,11 +2351,8 @@ class prestudent extends person } $qry .= ");"; - echo $qry; - if ($this->db_query($qry)) { - echo " ZGV-Master Eintragungen vorgenommen!"; return true; } else @@ -2373,56 +2360,18 @@ class prestudent extends person $this->errormsg = 'Fehler beim Eintragen zgvMasterFields'; return false; } - } } else - echo " Keine prestudentId Master gefunden"; return true; } } - /** - * liefert den letztgültigen Status des Prestudenten - * @param int $prestudent_id ID der zu überprüfenden Person. - * @return string $result wenn vorhanden - * false und errormsg wenn Fehler aufgetreten ist - */ - public function getLastPrestudentStatus($prestudent_id) - { - if (!is_numeric($prestudent_id)) - { - $this->errormsg = 'Prestudent_id muss eine gueltige Zahl sein'; - return false; - } - - $db = new basis_db(); - //get all prestudents - $qry = "SELECT pss.status_kurzbz - FROM public.tbl_prestudentstatus pss - JOIN public.tbl_prestudent ps using (prestudent_id) - where ps.prestudent_id = ".$this->db_add_param($prestudent_id)." - group by prestudent_id, pss.status_kurzbz, pss.insertamum - order by pss.insertamum DESC limit 1"; - - if ($db->db_query($qry)) - { - $row = $db->db_fetch_object(); - $result = $row->status_kurzbz; - return $result; - } - else - { - return false; - } - } /** * Prueft, ob eine Person einen aktuellen PreStudentstatus-Eintrag Interessent für einen Masterstudiengang besitzt * @param int $person_id ID der zu überprüfenden Person. - * @return true wenn vorhanden - * false wenn nicht vorhanden - * false und errormsg wenn Fehler aufgetreten ist + * @return true wenn vorhanden, false wenn nicht vorhanden */ public function existsStatusInteressentMaster($person_id) { @@ -2434,7 +2383,7 @@ class prestudent extends person $db = new basis_db(); $prestudentsOfMaster = array(); - //get all prestudents + $qry = "SELECT prestudent_id FROM @@ -2442,30 +2391,18 @@ class prestudent extends person WHERE ps.studiengang_kz = sg.studiengang_kz AND - sg.typ in ('m','d') - AND person_id = ".$this->db_add_param($person_id).";"; - - + sg.typ in ('m') + AND + person_id = ".$this->db_add_param($person_id)." + And + get_rolle_prestudent(prestudent_id, null) = 'Interessent';"; if ($db->db_query($qry)) { $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID if ($num_rows > 0) { - while ($row = $db->db_fetch_object()) - { - $prestudentsOfMaster[] = $row->prestudent_id; - } - - //prestudentIds auf Interessentenstatus prüfen - foreach ($prestudentsOfMaster as $prestudent_id) - { - if ($this->getLastPrestudentStatus($prestudent_id) == "Interessent") - { - return true; - } - } + return true; } } else From d4d84a93ba82e5710b9e5f1f02635f2cc7f92415 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 29 Jun 2021 14:43:19 +0200 Subject: [PATCH 57/84] Nachreichdatum kann nun auch ueber das Infocenter gesetzt werden --- .../system/infocenter/InfoCenter.php | 59 +++++++ .../views/system/infocenter/dokpruefung.php | 30 ++++ .../system/infocenter/infocenterDetails.php | 3 +- public/css/infocenter/infocenterDetails.css | 11 ++ public/js/infocenter/docUeberpruefung.js | 145 ++++++++++++++++++ public/js/infocenter/infocenterDetails.js | 32 ---- system/phrasesupdate.php | 20 +++ 7 files changed, 267 insertions(+), 33 deletions(-) create mode 100644 public/js/infocenter/docUeberpruefung.js diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 4ac74dde5..7dceb954c 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -112,6 +112,7 @@ class InfoCenter extends Auth_Controller 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', 'saveDocTyp' => 'infocenter:rw', + 'saveNachreichung' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', 'getLastPrestudentWithZgvJson' => 'infocenter:r', 'getZgvInfoForPrestudent' => 'infocenter:r', @@ -1211,6 +1212,64 @@ class InfoCenter extends Auth_Controller $this->outputJsonSuccess('success'); } + public function saveNachreichung($person_id) + { + $nachreichungAm = $this->input->post('nachreichungAm'); + $nachreichungAnmerkung = empty($this->input->post('nachreichungAnmerkung')) ? NULL : $this->input->post('nachreichungAnmerkung'); + $typ = $this->input->post('typ'); + + $allowedTypes = [ + 'VorlSpB2' => 'SprachB2', + 'ZgvBaPre' => 'zgv_bakk', + 'ZgvMaPre' => 'zgv_mast' + ]; + + if (!in_array($typ, array_keys($allowedTypes))) + $this->terminateWithJsonError('Bei dem Dokument ist keine Nachreichung möglich'); + + if (empty($nachreichungAm)) + $this->terminateWithJsonError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + + if (!preg_match('/^\d{2}\.\d{2}\.(\d{2}|\d{4})$/ ', $nachreichungAm)) + $this->terminateWithJsonError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj'); + + $akte = $this->AkteModel->loadWhere(array('person_id' => $person_id, 'dokument_kurzbz' => $allowedTypes[$typ])); + + if (hasData($akte)) { + $akte = getData($akte)[0]; + $this->AkteModel->update( + $akte->akte_id, + array( + 'anmerkung' => $nachreichungAnmerkung, + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => get_uid(), + 'nachgereicht' => true, + 'nachgereicht_am' => date_format(date_create($nachreichungAm), 'Y-m-d') + ) + ); + } + else + { + $this->AkteModel->insert( + array( + 'dokument_kurzbz' => $allowedTypes[$typ], + 'person_id' => $person_id, + 'erstelltam' => NULL, + 'gedruckt' => false, + 'anmerkung' => $nachreichungAnmerkung, + 'updateamum' => date('Y-m-d H:i:s'), + 'updatevon' => get_uid(), + 'insertamum' => date('Y-m-d H:i:s'), + 'insertvon' => get_uid(), + 'uid' => NULL, + 'nachgereicht' => true, + 'nachgereicht_am' => date_format(date_create($nachreichungAm), 'Y-m-d') + ) + ); + } + + $this->outputJsonSuccess("Done!"); + } // ----------------------------------------------------------------------------------------------------------------- // Private methods diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index 7ee77e815..214f450b0 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -28,6 +28,36 @@ echo "" ?> + +
+ +
+ + + + erstelltam), 'd.m.Y') ?> langtext ?> diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index a448e95ce..dbfff7d08 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -26,7 +26,8 @@ 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', - 'public/js/infocenter/zgvUeberpruefung.js' + 'public/js/infocenter/zgvUeberpruefung.js', + 'public/js/infocenter/docUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( diff --git a/public/css/infocenter/infocenterDetails.css b/public/css/infocenter/infocenterDetails.css index 38a7824fa..2f2debc00 100644 --- a/public/css/infocenter/infocenterDetails.css +++ b/public/css/infocenter/infocenterDetails.css @@ -76,6 +76,17 @@ font-weight: normal; } +.nachreichungInfos +{ + float: right; + margin: 5px 15px 0 0; +} + +.nachreichungInputs .row +{ + margin-top: 5px; +} + @media screen and (max-width: 1510px) { #postponing{ diff --git a/public/js/infocenter/docUeberpruefung.js b/public/js/infocenter/docUeberpruefung.js new file mode 100644 index 000000000..495257f41 --- /dev/null +++ b/public/js/infocenter/docUeberpruefung.js @@ -0,0 +1,145 @@ +$(document).ready(function () +{ + var personid = $("#hiddenpersonid").val(); + + DocUeberpruefung.checkNachreichungButtons(); + + $('select.aktenid').change(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + var typ = $(this).val(); + DocUeberpruefung.saveDocTyp(personid, akteid, typ); + }); + + $('.nachreichungInfos').click(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + DocUeberpruefung.checkNachreichungInputs(akteid); + }); + + $('.nachreichungAbbrechen').click(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + DocUeberpruefung.checkNachreichungInputs(akteid); + }); + + $('.nachreichungSpeichern').click(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + var typ = $('#aktenid_' + akteid).val(); + + var nachreichungAm = $('#nachreichungAm_' + akteid).val(); + var nachreichungAnmerkung = $('#nachreichungAnmerkung_' + akteid).val(); + + if(nachreichungAm === '') + { + FHC_DialogLib.alertError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + return false; + } + + var regEx = /^\d{2}\.\d{2}\.(\d{2}|\d{4})$/; + if(nachreichungAm.match(regEx) === null) + { + FHC_DialogLib.alertError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj') + return false; + } + + DocUeberpruefung.saveNachreichung(personid, nachreichungAm, nachreichungAnmerkung, typ); + }) +}); + +var DocUeberpruefung = { + + saveDocTyp: function(personid, akteid, typ) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), + { + "akte_id": akteid, + "typ" : typ + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + InfocenterDetails._refreshLog(); + DocUeberpruefung.checkNachreichungButton(akteid); + } + else + { + FHC_DialogLib.alertError(data); + } + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Fehler beim Speichern!"); + } + } + ); + }, + + saveNachreichung: function (personid, nachreichungAm, nachreichungAnmerkung, typ) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/saveNachreichung/"+encodeURIComponent(personid), + { + "nachreichungAm": nachreichungAm, + "nachreichungAnmerkung" : nachreichungAnmerkung, + "typ" : typ + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + InfocenterDetails._refreshLog(); + } + else + { + FHC_DialogLib.alertError(data); + } + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Fehler beim Speichern!"); + } + } + ); + }, + + checkNachreichungInputs: function(akteid) + { + var inputs = $('#nachreichungInputs_' + akteid); + + if (inputs.hasClass('hidden')) + { + inputs.removeClass('hidden'); + } + else + { + inputs.addClass('hidden'); + $('#nachreichungAnmerkung_' + akteid).val(""); + $('#nachreichungAm_' + akteid).val(""); + } + }, + + checkNachreichungButtons: function() + { + $('select.aktenid').each(function () { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + DocUeberpruefung.checkNachreichungButton(akteid); + }); + }, + + checkNachreichungButton: function(akteid) + { + var allowedTyps = ['VorlSpB2', 'ZgvBaPre', 'ZgvMaPre']; + var typ = $('#aktenid_' + akteid).val(); + var infos = $('#nachreichungInfos_' + akteid); + + if ($.inArray(typ, allowedTyps) === -1) + infos.addClass('hidden'); + else + infos.removeClass('hidden'); + } + +} \ No newline at end of file diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index de2ba0064..1e393fc28 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -119,11 +119,6 @@ $(document).ready(function () } ); - $('.aktenid').change(function(){ - var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - var typ = $(this).val(); - InfocenterDetails.saveDocTyp(personid, akteid, typ); - }); }); var InfocenterDetails = { @@ -751,33 +746,6 @@ var InfocenterDetails = { ); }, - saveDocTyp: function(personid, akteid, typ) - { - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), - { - "akte_id": akteid, - "typ" : typ - }, - { - successCallback: function(data, textStatus, jqXHR) { - if (FHC_AjaxClient.isSuccess(data)) - { - FHC_DialogLib.alertSuccess("Done!"); - InfocenterDetails._refreshLog(); - } - else - { - FHC_DialogLib.alertError("Fehler beim Speichern des Dokumententypes!"); - } - }, - errorCallback: function() { - FHC_DialogLib.alertWarning("Document type could not be updated"); - } - } - ); - }, - // ----------------------------------------------------------------------------------------------------------------- // (private) methods executed after ajax (refreshers) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index b977e28a8..9559cb0c2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3486,6 +3486,26 @@ $phrases = array( ) ) ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'dokumentWirdNachgereicht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokument wird nachgereicht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Document will be submitted later', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', From 67aa88798116444c3eb4d70c30639523830c333d Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 29 Jun 2021 14:47:57 +0200 Subject: [PATCH 58/84] anzeige des errors --- public/js/infocenter/docUeberpruefung.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/infocenter/docUeberpruefung.js b/public/js/infocenter/docUeberpruefung.js index 495257f41..ba45b8986 100644 --- a/public/js/infocenter/docUeberpruefung.js +++ b/public/js/infocenter/docUeberpruefung.js @@ -68,7 +68,7 @@ var DocUeberpruefung = { } else { - FHC_DialogLib.alertError(data); + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); } }, errorCallback: function() { @@ -96,7 +96,7 @@ var DocUeberpruefung = { } else { - FHC_DialogLib.alertError(data); + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); } }, errorCallback: function() { From 36507959acd1be8c9c21b333ec0d591603d50ca4 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 30 Jun 2021 13:09:56 +0200 Subject: [PATCH 59/84] dokumentenpruefung im infocenter in eigenes js ausgelagert, reloaden der anzeige beim nachreichen eines doks --- .../system/infocenter/InfoCenter.php | 42 +++++++-- .../system/infocenter/dokNachzureichend.php | 32 +++++++ .../views/system/infocenter/dokpruefung.php | 34 +------ .../system/infocenter/infocenterDetails.php | 7 +- .../infocenter/infocenterZgvDetails.php | 3 + public/js/infocenter/docUeberpruefung.js | 91 +++++++++++++++++-- public/js/infocenter/infocenterDetails.js | 49 ---------- system/phrasesupdate.php | 60 ++++++++++++ 8 files changed, 218 insertions(+), 100 deletions(-) create mode 100644 application/views/system/infocenter/dokNachzureichend.php diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 7dceb954c..deb388add 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -127,6 +127,7 @@ class InfoCenter extends Auth_Controller 'updateNotiz' => 'infocenter:rw', 'reloadZgvPruefungen' => 'infocenter:r', 'reloadMessages' => 'infocenter:r', + 'reloadDoks' => 'infocenter:r', 'reloadNotizen' => 'infocenter:r', 'reloadLogs' => 'infocenter:r', 'outputAkteContent' => 'infocenter:r', @@ -1023,6 +1024,13 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/logs.php', array('logs' => $logs)); } + public function reloadDoks($person_id) + { + $dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true); + + $this->load->view('system/infocenter/dokNachzureichend.php', array('dokumente_nachgereicht' => $dokumente_nachgereicht->retval)); + } + /** * Outputs content of an Akte, sends appropriate headers (so the document can be downloaded) * @param $akte_id @@ -1225,13 +1233,31 @@ class InfoCenter extends Auth_Controller ]; if (!in_array($typ, array_keys($allowedTypes))) - $this->terminateWithJsonError('Bei dem Dokument ist keine Nachreichung möglich'); + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); if (empty($nachreichungAm)) - $this->terminateWithJsonError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); if (!preg_match('/^\d{2}\.\d{2}\.(\d{2}|\d{4})$/ ', $nachreichungAm)) - $this->terminateWithJsonError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj'); + { + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); + } + else + { + $ds = explode('.', $nachreichungAm); + if (! checkdate($ds[1], $ds[0], $ds[2])) + { + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); + } + } + + $nachreichungAm = (date_format(date_create($nachreichungAm), 'Y-m-d')); + + $today = date('Y-m-d H:i:s'); + + if($nachreichungAm < $today) + $this->terminateWithJsonError($this->p->t('infocenter', 'nachreichDatumNichtVergangenheit')); + $akte = $this->AkteModel->loadWhere(array('person_id' => $person_id, 'dokument_kurzbz' => $allowedTypes[$typ])); @@ -1241,10 +1267,10 @@ class InfoCenter extends Auth_Controller $akte->akte_id, array( 'anmerkung' => $nachreichungAnmerkung, - 'updateamum' => date('Y-m-d H:i:s'), + 'updateamum' => $today, 'updatevon' => get_uid(), 'nachgereicht' => true, - 'nachgereicht_am' => date_format(date_create($nachreichungAm), 'Y-m-d') + 'nachgereicht_am' => $nachreichungAm ) ); } @@ -1257,13 +1283,13 @@ class InfoCenter extends Auth_Controller 'erstelltam' => NULL, 'gedruckt' => false, 'anmerkung' => $nachreichungAnmerkung, - 'updateamum' => date('Y-m-d H:i:s'), + 'updateamum' => $today, 'updatevon' => get_uid(), - 'insertamum' => date('Y-m-d H:i:s'), + 'insertamum' => $today, 'insertvon' => get_uid(), 'uid' => NULL, 'nachgereicht' => true, - 'nachgereicht_am' => date_format(date_create($nachreichungAm), 'Y-m-d') + 'nachgereicht_am' => $nachreichungAm ) ); } diff --git a/application/views/system/infocenter/dokNachzureichend.php b/application/views/system/infocenter/dokNachzureichend.php new file mode 100644 index 000000000..7a3b3aa03 --- /dev/null +++ b/application/views/system/infocenter/dokNachzureichend.php @@ -0,0 +1,32 @@ + 0): ?> +
+

p->t('infocenter','nachzureichendeDokumente')) ?>

+ + + + + + + + + + + + + + + + + + + +
p->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>
dokument_bezeichnung ?> + nachgereicht_am) ? date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; ?> + + langtext ?> + + anmerkung; ?> +
+ \ No newline at end of file diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index 214f450b0..95e383569 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -76,36 +76,4 @@ -
- 0): ?> -
-

p->t('infocenter','nachzureichendeDokumente')) ?>

- - - - - - - - - - - - - - - - - - - -
p->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>
dokument_bezeichnung ?> - nachgereicht_am) ? date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; ?> - - langtext ?> - - anmerkung; ?> -
- +
\ No newline at end of file diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index dbfff7d08..30acb8617 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -49,7 +49,9 @@ 'zgvInPruefung', 'zgvErfuellt', 'zgvNichtErfuellt', - 'zgvErfuelltPruefung' + 'zgvErfuelltPruefung', + 'datumUngueltig', + 'nachreichDatumNichtVergangenheit' ), 'ui' => array( 'gespeichert', @@ -127,6 +129,9 @@
load->view('system/infocenter/dokpruefung.php'); ?> +
+ load->view('system/infocenter/dokNachzureichend.php'); ?> +
diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index a1362d2fa..1f50aa147 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -116,6 +116,9 @@
load->view('system/infocenter/dokpruefung.php', array('formalReadonly' => true)); ?> +
+ load->view('system/infocenter/dokNachzureichend.php'); ?> +
diff --git a/public/js/infocenter/docUeberpruefung.js b/public/js/infocenter/docUeberpruefung.js index ba45b8986..acb0ca60f 100644 --- a/public/js/infocenter/docUeberpruefung.js +++ b/public/js/infocenter/docUeberpruefung.js @@ -1,8 +1,20 @@ +const ALLOWED_DOC_TYPES = ['VorlSpB2', 'ZgvBaPre', 'ZgvMaPre']; + $(document).ready(function () { + DocUeberpruefung._formatDocTable(); + DocUeberpruefung.checkNachreichungButtons(); + var personid = $("#hiddenpersonid").val(); - DocUeberpruefung.checkNachreichungButtons(); + //add click events to "formal geprüft" checkboxes + $(".prchbox").click(function () + { + var boxid = this.id; + var akteid = InfocenterDetails._getPrestudentIdFromElementId(boxid); + var checked = this.checked; + DocUeberpruefung.saveFormalGeprueft(personid, akteid, checked) + }); $('select.aktenid').change(function() { @@ -33,14 +45,15 @@ $(document).ready(function () if(nachreichungAm === '') { - FHC_DialogLib.alertError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + FHC_DialogLib.alertError(FHC_PhrasesLib.t('infocenter', 'datumUngueltig')); return false; } var regEx = /^\d{2}\.\d{2}\.(\d{2}|\d{4})$/; + if(nachreichungAm.match(regEx) === null) { - FHC_DialogLib.alertError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj') + FHC_DialogLib.alertError(FHC_PhrasesLib.t('infocenter', 'datumUngueltig')) return false; } @@ -50,10 +63,48 @@ $(document).ready(function () var DocUeberpruefung = { + saveFormalGeprueft: function(personid, akteid, checked) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/saveFormalGeprueft/' + encodeURIComponent(personid), + { + akte_id: akteid, + formal_geprueft: checked + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + var timestamp = data.retval[0]; + if (timestamp === "") + { + $("#formalgeprueftam_" + akteid).text(""); + } + else + { + var fgdatum = $.datepicker.parseDate("yy-mm-dd", timestamp); + var gerfgdatum = $.datepicker.formatDate("dd.mm.yy", fgdatum); + $("#formalgeprueftam_" + akteid).text(gerfgdatum); + } + //refresh doctable tablesorter, formal geprueft changed! + $("#doctable").trigger("update"); + InfocenterDetails._refreshLog(); + } + else + { + InfocenterDetails._genericSaveError(); + } + }, + errorCallback: InfocenterDetails._genericSaveError, + veilTimeout: 0 + } + ); + }, + saveDocTyp: function(personid, akteid, typ) { FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), + CALLED_PATH + "/saveDocTyp/" + encodeURIComponent(personid), { "akte_id": akteid, "typ" : typ @@ -81,7 +132,7 @@ var DocUeberpruefung = { saveNachreichung: function (personid, nachreichungAm, nachreichungAnmerkung, typ) { FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + "/saveNachreichung/"+encodeURIComponent(personid), + CALLED_PATH + "/saveNachreichung/" + encodeURIComponent(personid), { "nachreichungAm": nachreichungAm, "nachreichungAnmerkung" : nachreichungAnmerkung, @@ -91,8 +142,9 @@ var DocUeberpruefung = { successCallback: function(data, textStatus, jqXHR) { if (FHC_AjaxClient.isSuccess(data)) { - FHC_DialogLib.alertSuccess("Done!"); + DocUeberpruefung._refreshNachzureichendeDoks(); InfocenterDetails._refreshLog(); + FHC_DialogLib.alertSuccess("Done!"); } else { @@ -132,14 +184,35 @@ var DocUeberpruefung = { checkNachreichungButton: function(akteid) { - var allowedTyps = ['VorlSpB2', 'ZgvBaPre', 'ZgvMaPre']; var typ = $('#aktenid_' + akteid).val(); var infos = $('#nachreichungInfos_' + akteid); - if ($.inArray(typ, allowedTyps) === -1) + if ($.inArray(typ, ALLOWED_DOC_TYPES) === -1) + { infos.addClass('hidden'); + } else + { infos.removeClass('hidden'); - } + } + }, + + _refreshNachzureichendeDoks: function() + { + var personid = $("#hiddenpersonid").val(); + + $("#nachzureichendeDoks").load( + CONTROLLER_URL + '/reloadDoks/' + personid + '?fhc_controller_id=' + FHC_AjaxClient.getUrlParameter('fhc_controller_id'), + function () { + DocUeberpruefung._formatDocTable(); + } + ); + }, + + _formatDocTable: function() + { + Tablesort.addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]); + Tablesort.addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]); + }, } \ No newline at end of file diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 1e393fc28..871516935 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -21,9 +21,6 @@ const ONHOLDNAME = 'onhold'; */ $(document).ready(function () { - //initialise table sorter - Tablesort.addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]); - Tablesort.addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]); InfocenterDetails._formatMessageTable(); InfocenterDetails._formatNotizTable(); @@ -37,15 +34,6 @@ $(document).ready(function () $("#sendmsgform").submit(); }); - //add click events to "formal geprüft" checkboxes - $(".prchbox").click(function () - { - var boxid = this.id; - var akteid = InfocenterDetails._getPrestudentIdFromElementId(boxid); - var checked = this.checked; - InfocenterDetails.saveFormalGeprueft(personid, akteid, checked) - }); - //add click events to zgv Prüfung section InfocenterDetails._addZgvPruefungEvents(personid); @@ -133,43 +121,6 @@ var InfocenterDetails = { // ----------------------------------------------------------------------------------------------------------------- // ajax calls - saveFormalGeprueft: function(personid, akteid, checked) - { - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + '/saveFormalGeprueft/' + encodeURIComponent(personid), - { - akte_id: akteid, - formal_geprueft: checked - }, - { - successCallback: function(data, textStatus, jqXHR) { - if (FHC_AjaxClient.hasData(data)) - { - var timestamp = data.retval[0]; - if (timestamp === "") - { - $("#formalgeprueftam_" + akteid).text(""); - } - else - { - var fgdatum = $.datepicker.parseDate("yy-mm-dd", timestamp); - var gerfgdatum = $.datepicker.formatDate("dd.mm.yy", fgdatum); - $("#formalgeprueftam_" + akteid).text(gerfgdatum); - } - //refresh doctable tablesorter, formal geprueft changed! - $("#doctable").trigger("update"); - InfocenterDetails._refreshLog(); - } - else - { - InfocenterDetails._genericSaveError(); - } - }, - errorCallback: InfocenterDetails._genericSaveError, - veilTimeout: 0 - } - ); - }, saveBewPriorisierung: function(data) { FHC_AjaxClient.ajaxCallPost( diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9559cb0c2..587308519 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3506,6 +3506,66 @@ $phrases = array( ) ) ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'datumUngueltig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Das Datumsformat ist ungültig oder liegt außerhalb des gültigen Bereichs. Bitte geben Sie ein gültiges Datum im Format tt.mm.jjjj ein.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Date is invalid or out of range. Please enter a valid date in the format dd.mm.yyyy.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'dokUngueltig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bei dem Dokument ist keine Nachreichung möglich.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Date is invalid or out of range. Please enter a valid date in the format dd.mm.yyyy.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'nachreichDatumNichtVergangenheit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Das Datum der Nachreichung darf nicht in der Vergangenheit liegen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The date of submission may not be in the past.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', From 745ecf47111293f47aa1231473a14677102c3cab Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 30 Jun 2021 13:29:09 +0200 Subject: [PATCH 60/84] zgv pruefung unterscheiden zwischen bachelor und master --- .../system/infocenter/InfoCenter.php | 4 +++- .../infocenter/infocenterZgvDetails.php | 13 +++++++--- public/js/infocenter/zgvUeberpruefung.js | 24 ++++++++++++++----- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index deb388add..12d9a9c4d 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -242,6 +242,7 @@ class InfoCenter extends Auth_Controller $persondata = $this->_loadPersonData(getData($prestudentexists)[0]->person_id); $prestudent_id = array('prestudent_id' => $prestudent_id); $status = array('status' => getData($zgv)[0]->status); + $prestudent_data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); $this->DokumentModel->addOrder('bezeichnung'); $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load()))); @@ -250,7 +251,8 @@ class InfoCenter extends Auth_Controller $persondata, $prestudent_id, $status, - $dokumentdata + $dokumentdata, + $prestudent_data ); $origin_page = $this->input->get(self::ORIGIN_PAGE); diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 1f50aa147..62fefbec8 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -59,6 +59,7 @@
+
diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js index 0be4dfdad..6181083f2 100644 --- a/public/js/infocenter/zgvUeberpruefung.js +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -2,6 +2,8 @@ $(document).ready(function () { var personid = $("#hiddenpersonid").val(); + var studiengang = $('#studiengangtyp').val(); + zgvUeberpruefung.checkAfterReload(); $('.zgvRueckfragen').click(function () @@ -18,12 +20,22 @@ $(document).ready(function () $('.zgvAkzeptieren').click(function (){ var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid, - 'status' : 'accepted' + if (studiengang === 'b') + { + $('#inputStatus_' + prestudentid).val('accepted'); + $('#notizModal_' + prestudentid).modal('show'); + $('#notizModal_' + prestudentid + ' #inputNotizTitelModal').val('ZGV wurde erfüllt') } - zgvUeberpruefung.zgvStatusUpdate(data); + else + { + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid, + 'status' : 'accepted' + } + zgvUeberpruefung.zgvStatusUpdate(data); + } + }); $('.zgvAblehnen').click(function (){ @@ -176,7 +188,7 @@ var zgvUeberpruefung = { checkAfterReload: function() { $('.zgvStatusText').each(function() { - if($(this).data('info')) { + if ($(this).data('info')) { zgvUeberpruefung.checkStatus(InfocenterDetails._getPrestudentIdFromElementId($(this).attr('id'))); } }); From 36d162d2d7d2ff58dc3b0b18371e808bb3577116 Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 30 Jun 2021 14:29:58 +0200 Subject: [PATCH 61/84] =?UTF-8?q?13850=20Best=C3=A4tigungsmail=20an=20Mita?= =?UTF-8?q?rbeiter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/urlaubsfreigabe.php | 36 +++++++++++++++++++++++++ locale/de-AT/urlaubstool.php | 6 +++++ locale/en-US/urlaubstool.php | 5 ++++ 3 files changed, 47 insertions(+) diff --git a/cis/private/profile/urlaubsfreigabe.php b/cis/private/profile/urlaubsfreigabe.php index 251e1ee3e..bf790871e 100644 --- a/cis/private/profile/urlaubsfreigabe.php +++ b/cis/private/profile/urlaubsfreigabe.php @@ -18,6 +18,7 @@ * Authors: Christian Paminger , * Andreas Oesterreicher , * Rudolf Hangl and + * Manuela Thamer */ require_once('../../../config/cis.config.inc.php'); require_once('../../../include/functions.inc.php'); @@ -28,6 +29,13 @@ require_once('../../../include/benutzer.class.php'); require_once('../../../include/mitarbeiter.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); require_once('../../../include/addon.class.php'); +require_once('../../../include/mail.class.php'); +require_once('../../../include/phrasen.class.php'); +require_once('../../../include/globals.inc.php'); +require_once('../../../include/sprache.class.php'); + +$sprache = getSprache(); +$p = new phrasen($sprache); if (!$db = new basis_db()) die('Fehler beim Oeffnen der Datenbankverbindung'); @@ -54,6 +62,7 @@ if(isset($_GET['uid'])) else $uid=''; + $datum_obj = new datum(); echo ' @@ -141,7 +150,34 @@ if(isset($_GET['action']) && $_GET['action']=='freigabe') $zeitsperre->freigabeamum = date('Y-m-d H:i:s'); $zeitsperre->freigabevon = $user; if(!$zeitsperre->save(false)) + { echo "Fehler bei der Freigabe: $zeitsperre->errormsg"; + } + + + //Bestätigungsmail an Mitarbeiter*in + $to = $uid . '@'.DOMAIN; + $benutzer = new benutzer(); + $benutzer->load($uid); + $person = new person(); + $fullName = $person->getFullNameFromBenutzer($uid); + $from = 'noreply@'.DOMAIN; + $subject = $p->t('urlaubstool/urlaubsfreigabe') . date("d.m.Y", strtotime($zeitsperre->vondatum)). " " . $p->t('urlaubstool/bis'). " ". date("d.m.Y", strtotime($zeitsperre->bisdatum)); + $text = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n"; + $text .= $p->t('urlaubstool/urlaubVon')." ".date("d.m.Y", strtotime($zeitsperre->vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($zeitsperre->bisdatum)); + $text .= $p->t('urlaubstool/urlaubBis',array($fullName)); + $text .= "\n". "\n". $p->t('urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen'); + $text .= "\n". APP_ROOT . 'cis/private/profile/urlaubstool.php?uid='.$uid; + + + $mail = new mail($to, $from, $subject, $text); + + if($mail->send()) + { + echo "".$p->t('urlaubstool/bestaetigungsmailWurdeVersandt',array($fullName)).""; + + } + } else { diff --git a/locale/de-AT/urlaubstool.php b/locale/de-AT/urlaubstool.php index cd34be0da..6d6edde09 100644 --- a/locale/de-AT/urlaubstool.php +++ b/locale/de-AT/urlaubstool.php @@ -40,4 +40,10 @@ $this->phrasen['urlaubstool/freigegebenerUrlaubGeloescht']='Bereits Freigegebene $this->phrasen['urlaubstool/VorgesetzteInformiert']='Email wurde an %s versandt'; $this->phrasen['urlaubstool/konnteKeinInformationsemailVersendetWerden']='Es konnte kein Email versendet werden, da kein Vorgesetzter eingetragen ist!'; $this->phrasen['urlaubstool/xHatUrlaubGeloescht']='%s %s hat bereits freigegebenen Urlaub gelöscht'; +$this->phrasen['urlaubstool/urlaubsfreigabe']='Freigabe Urlaub: '; +$this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Bestätigungsmail an %s versandt'; +$this->phrasen['urlaubstool/urlaubVon']='Ihr angefragter Urlaub von'; +$this->phrasen['urlaubstool/urlaubBis']=' wurde von %s freigegeben.'; +$this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen']='Sie können diesen unter folgender Adresse einsehen:'; + ?> diff --git a/locale/en-US/urlaubstool.php b/locale/en-US/urlaubstool.php index f52f2d981..d8c947947 100644 --- a/locale/en-US/urlaubstool.php +++ b/locale/en-US/urlaubstool.php @@ -36,4 +36,9 @@ $this->phrasen['urlaubstool/meineZeitsperren']='My Planned Absences'; $this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseFreigeben']='Sie können diesen unter folgender Adresse freigeben'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll $this->phrasen['urlaubstool/freigabeansuchenUrlaub']='Freigabeansuchen Urlaub'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll $this->phrasen['urlaubstool/freigabeFehlt']='Vacation has not been approved yet'; +$this->phrasen['urlaubstool/urlaubsfreigabe']='Vacation approval: '; +$this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Confirmation mail to %s sent'; +$this->phrasen['urlaubstool/urlaubVon']='The requested vacation from'; +$this->phrasen['urlaubstool/urlaubBis']=' was approved by %s.'; +$this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen']='Review your vacation here:'; ?> From 6246312ce52115f5484793523955122bc6dfafad Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 30 Jun 2021 15:24:25 +0200 Subject: [PATCH 62/84] bei ergaenzungspruefungen immer eine mail rausschicken und unterscheiden zw englisch und deutsch --- public/js/infocenter/infocenterDetails.js | 34 +++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 871516935..f5f435acb 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -9,6 +9,7 @@ const RTFREIGABE_MESSAGE_VORLAGE_QUER = "InfocenterRTfreigegQuer"; const RTFREIGABE_MESSAGE_VORLAGE_QUER_KURZ = "InfocenterRTfreigegQuerKurz"; const STGFREIGABE_MESSAGE_VORLAGE = "InfocenterSTGfreigegeben"; const STGFREIGABE_MESSAGE_VORLAGE_MASTER = "InfocenterSTGfreigegebenM"; +const STGFREIGABE_MESSAGE_VORLAGE_MASTER_ENGLISCH = "InfocenterSTGfreigegebenMEng"; //Statusgründe for which no Studiengang Freigabe Message should be sent const FIT_PROGRAMM_STUDIENGAENGE = [10021, 10027]; @@ -588,6 +589,7 @@ var InfocenterDetails = { var ausbildungssemester = receiverPrestudentstatus.ausbildungssemester; var studiengangbezeichnung = receiverPrestudentstatus.studiengangbezeichnung; var studiengangbezeichnung_englisch = receiverPrestudentstatus.studiengangbezeichnung_englisch; + var vorlage = null; var orgform_deutsch, orgform_englisch; orgform_deutsch = orgform_englisch = ""; @@ -625,7 +627,6 @@ var InfocenterDetails = { } else //not already for RT freigegeben - send RTfreigabe message { - var vorlage = null; //send Quereinstiegsmessage if later Ausbildungssemester if (ausbildungssemester > 1) { @@ -651,22 +652,25 @@ var InfocenterDetails = { } else { - //if Freigabe to Studiengang, send StgFreigabe Message if not already sent and allowed to send - if (!stgFreigegeben && receiverPrestudent.sendStgFreigabeMsg === true) + if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) { - if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) - { - msgvars = { - 'studiengangbezeichnung': studiengangbezeichnung, - 'studiengangbezeichnung_englisch': studiengangbezeichnung_englisch, - 'orgform_deutsch': orgform_deutsch, - 'orgform_englisch': orgform_englisch - } - InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE_MASTER, msgvars); - }else - { - InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE, msgvars); + msgvars = { + 'studiengangbezeichnung': studiengangbezeichnung, + 'studiengangbezeichnung_englisch': studiengangbezeichnung_englisch, + 'orgform_deutsch': orgform_deutsch, + 'orgform_englisch': orgform_englisch } + if (receiverPrestudentstatus.sprache === 'English') + vorlage = STGFREIGABE_MESSAGE_VORLAGE_MASTER_ENGLISCH + else + vorlage = STGFREIGABE_MESSAGE_VORLAGE_MASTER + + InfocenterDetails.sendFreigabeMessage(prestudent_id, vorlage, msgvars); + } + //if Freigabe to Studiengang, send StgFreigabe Message if not already sent and allowed to send + else if (!stgFreigegeben && receiverPrestudent.sendStgFreigabeMsg === true) + { + InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE, msgvars); } } }; From 3dd67b90b2a168b56a6d124327eb7b3671daa0ba Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 1 Jul 2021 08:13:17 +0200 Subject: [PATCH 63/84] Update Phrasen --- cis/private/profile/urlaubsfreigabe.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cis/private/profile/urlaubsfreigabe.php b/cis/private/profile/urlaubsfreigabe.php index bf790871e..dde27d5fc 100644 --- a/cis/private/profile/urlaubsfreigabe.php +++ b/cis/private/profile/urlaubsfreigabe.php @@ -40,7 +40,8 @@ $p = new phrasen($sprache); if (!$db = new basis_db()) die('Fehler beim Oeffnen der Datenbankverbindung'); -$user = get_uid(); +//$user = get_uid(); +$user = 'ma0080'; $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($user); @@ -61,6 +62,7 @@ if(isset($_GET['uid'])) $uid=$_GET['uid']; else $uid=''; +echo "uid: " . $uid; $datum_obj = new datum(); @@ -157,15 +159,14 @@ if(isset($_GET['action']) && $_GET['action']=='freigabe') //Bestätigungsmail an Mitarbeiter*in $to = $uid . '@'.DOMAIN; - $benutzer = new benutzer(); - $benutzer->load($uid); $person = new person(); - $fullName = $person->getFullNameFromBenutzer($uid); + $fullNameVG = $person->getFullNameFromBenutzer($user); + $fullNameMA = $person->getFullNameFromBenutzer($uid); $from = 'noreply@'.DOMAIN; $subject = $p->t('urlaubstool/urlaubsfreigabe') . date("d.m.Y", strtotime($zeitsperre->vondatum)). " " . $p->t('urlaubstool/bis'). " ". date("d.m.Y", strtotime($zeitsperre->bisdatum)); $text = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n"; $text .= $p->t('urlaubstool/urlaubVon')." ".date("d.m.Y", strtotime($zeitsperre->vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($zeitsperre->bisdatum)); - $text .= $p->t('urlaubstool/urlaubBis',array($fullName)); + $text .= $p->t('urlaubstool/urlaubBis',array($fullNameVG)); $text .= "\n". "\n". $p->t('urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen'); $text .= "\n". APP_ROOT . 'cis/private/profile/urlaubstool.php?uid='.$uid; @@ -174,7 +175,7 @@ if(isset($_GET['action']) && $_GET['action']=='freigabe') if($mail->send()) { - echo "".$p->t('urlaubstool/bestaetigungsmailWurdeVersandt',array($fullName)).""; + echo "".$p->t('urlaubstool/bestaetigungsmailWurdeVersandt',array($fullNameMA)).""; } From 2bef17d65b01f5c3b964e5069e0602363802d54d Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 1 Jul 2021 15:23:41 +0200 Subject: [PATCH 64/84] Update Phrasen Englisch und Codesniffer --- cis/private/profile/urlaubsfreigabe.php | 107 +++++++++++------------- locale/en-US/urlaubstool.php | 7 +- 2 files changed, 54 insertions(+), 60 deletions(-) diff --git a/cis/private/profile/urlaubsfreigabe.php b/cis/private/profile/urlaubsfreigabe.php index dde27d5fc..6d705a5b9 100644 --- a/cis/private/profile/urlaubsfreigabe.php +++ b/cis/private/profile/urlaubsfreigabe.php @@ -40,8 +40,7 @@ $p = new phrasen($sprache); if (!$db = new basis_db()) die('Fehler beim Oeffnen der Datenbankverbindung'); -//$user = get_uid(); -$user = 'ma0080'; +$user = get_uid(); $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($user); @@ -52,18 +51,16 @@ else { //Bis August das aktuelle Jahr anzeigen //Ab September das naechste - if(date('m')<9) + if (date('m') < 9) $year = date('Y'); else - $year = date('Y')+1; + $year = date('Y') + 1; } -if(isset($_GET['uid'])) - $uid=$_GET['uid']; +if (isset($_GET['uid'])) + $uid = $_GET['uid']; else - $uid=''; -echo "uid: " . $uid; - + $uid = ''; $datum_obj = new datum(); @@ -109,76 +106,74 @@ echo ' $mitarbeiter = new mitarbeiter(); $mitarbeiter->getUntergebene($user); -if(count($mitarbeiter->untergebene)==0 && !$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) +if (count($mitarbeiter->untergebene) == 0 && !$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) die('Es sind Ihnen keine Mitarbeiter zugeteilt für die sie den Urlaub freigeben dürfen'); $untergebene = ''; foreach ($mitarbeiter->untergebene as $row) { - if($untergebene!='') - $untergebene.=','; + if ($untergebene != '') + $untergebene .= ','; $untergebene .= $db->db_add_param($row); } -if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) +if ($rechte->isBerechtigt('admin') || $rechte->isBerechtigt('mitarbeiter/urlaube', null, 'suid')) { - if($untergebene!='') - $untergebene.=','; + if ($untergebene != '') + $untergebene .= ','; $untergebene .= $db->db_add_param($uid); } $qry = "SELECT * FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) WHERE uid in($untergebene)"; $mitarbeiter = array(); -if($result = $db->db_query($qry)) +if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { - $mitarbeiter[$row->uid]['vorname']=$row->vorname; - $mitarbeiter[$row->uid]['nachname']=$row->nachname; - $mitarbeiter[$row->uid]['titelpre']=$row->titelpre; - $mitarbeiter[$row->uid]['titelpost']=$row->titelpost; + $mitarbeiter[$row->uid]['vorname'] = $row->vorname; + $mitarbeiter[$row->uid]['nachname'] = $row->nachname; + $mitarbeiter[$row->uid]['titelpre'] = $row->titelpre; + $mitarbeiter[$row->uid]['titelpost'] = $row->titelpost; } } -if($uid!='' && !isset($mitarbeiter[$uid]) && $uid!=$user && !$rechte->isBerechtigt('admin')) +if ($uid != '' && !isset($mitarbeiter[$uid]) && $uid != $user && !$rechte->isBerechtigt('admin')) die('Sie haben keine Berechtigung fuer diesen Mitarbeiter'); //Freigeben eines Urlaubes -if(isset($_GET['action']) && $_GET['action']=='freigabe') +if (isset($_GET['action']) && $_GET['action'] == 'freigabe') { $zeitsperre = new zeitsperre(); - if($zeitsperre->load($_GET['id'])) + if ($zeitsperre->load($_GET['id'])) { - if(isset($mitarbeiter[$zeitsperre->mitarbeiter_uid])) + if (isset($mitarbeiter[$zeitsperre->mitarbeiter_uid])) { $zeitsperre->freigabeamum = date('Y-m-d H:i:s'); $zeitsperre->freigabevon = $user; - if(!$zeitsperre->save(false)) + if (!$zeitsperre->save(false)) { echo "Fehler bei der Freigabe: $zeitsperre->errormsg"; } - //Bestätigungsmail an Mitarbeiter*in - $to = $uid . '@'.DOMAIN; + $to = $uid. '@'.DOMAIN; $person = new person(); $fullNameVG = $person->getFullNameFromBenutzer($user); $fullNameMA = $person->getFullNameFromBenutzer($uid); $from = 'noreply@'.DOMAIN; - $subject = $p->t('urlaubstool/urlaubsfreigabe') . date("d.m.Y", strtotime($zeitsperre->vondatum)). " " . $p->t('urlaubstool/bis'). " ". date("d.m.Y", strtotime($zeitsperre->bisdatum)); + $subject = $p->t('urlaubstool/urlaubsfreigabe'). date("d.m.Y", strtotime($zeitsperre->vondatum)). " ". + $p->t('urlaubstool/bis'). " ". date("d.m.Y", strtotime($zeitsperre->bisdatum)); $text = $p->t('urlaubstool/diesIstEineAutomatischeMail')."\n"; - $text .= $p->t('urlaubstool/urlaubVon')." ".date("d.m.Y", strtotime($zeitsperre->vondatum))." ".$p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($zeitsperre->bisdatum)); - $text .= $p->t('urlaubstool/urlaubBis',array($fullNameVG)); + $text .= $p->t('urlaubstool/urlaubVon')." ".date("d.m.Y", strtotime($zeitsperre->vondatum))." ". + $p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($zeitsperre->bisdatum)); + $text .= $p->t('urlaubstool/urlaubBis', array($fullNameVG)); $text .= "\n". "\n". $p->t('urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen'); - $text .= "\n". APP_ROOT . 'cis/private/profile/urlaubstool.php?uid='.$uid; - + $text .= "\n". APP_ROOT. 'cis/private/profile/urlaubstool.php?uid='. $uid; $mail = new mail($to, $from, $subject, $text); - if($mail->send()) + if ($mail->send()) { - echo "".$p->t('urlaubstool/bestaetigungsmailWurdeVersandt',array($fullNameMA)).""; - + echo "".$p->t('urlaubstool/bestaetigungsmailWurdeVersandt', array($fullNameMA)).""; } - } else { @@ -189,40 +184,38 @@ if(isset($_GET['action']) && $_GET['action']=='freigabe') { echo 'Die Zeitsperre konnte nicht geladen werden'; } - } -//Monat zeichenen +//Monat zeichnen function draw_monat($monat) { global $untergebene, $mitarbeiter, $year, $datum_obj, $uid; - if (!$db = new basis_db()) - die('Fehler beim Oeffnen der Datenbankverbindung'); - + if (!$db = new basis_db()) + die('Fehler beim Oeffnen der Datenbankverbindung'); echo ''; echo '
'; - echo date('F',mktime(0,0,0,$monat,1,date('Y'))); - echo " ".($monat>8?$year-1:$year); + echo date('F', mktime(0,0,0,$monat,1,date('Y'))); + echo " ".($monat > 8?$year-1:$year); echo '
'; //Alle Anzeigen bei denen das von- oder bisdatum in dieses monat fallen $qry = "SELECT * FROM campus.tbl_zeitsperre WHERE zeitsperretyp_kurzbz='Urlaub' AND ( - (date_part('month', vondatum)='$monat' AND date_part('year', vondatum)='".($monat>8?$year-1:$year)."') + (date_part('month', vondatum)='$monat' AND date_part('year', vondatum)='".($monat > 8?$year - 1:$year)."') OR - (date_part('month', bisdatum)='$monat' AND date_part('year', bisdatum)='".($monat>8?$year-1:$year)."') + (date_part('month', bisdatum)='$monat' AND date_part('year', bisdatum)='".($monat > 8?$year - 1:$year)."') )"; - if($uid=='') - $qry.=" AND mitarbeiter_uid in($untergebene)"; + if($uid == '') + $qry.= " AND mitarbeiter_uid in($untergebene)"; else - $qry.=" AND mitarbeiter_uid=".$db->db_add_param($uid); + $qry.= " AND mitarbeiter_uid=". $db->db_add_param($uid); $qry.="ORDER BY vondatum, mitarbeiter_uid"; - if($result = $db->db_query($qry)) + if ($result = $db->db_query($qry)) { - while($row = $db->db_fetch_object($result)) + while ($row = $db->db_fetch_object($result)) { $vertretung = new benutzer($row->vertretung_uid); $freigabe=''; @@ -235,7 +228,7 @@ function draw_monat($monat) if ($vertretung->uid != '') echo ' (Vertretung: '.$vertretung->nachname.')'; if($row->freigabeamum=='') - echo " zeitsperre_id&year=$year&uid=$uid' class='Item'>Freigabe"; + echo " zeitsperre_id&year=$year&uid=$uid class='Item'>Freigabe"; echo ""; echo '
'; } @@ -244,7 +237,7 @@ function draw_monat($monat) } //Jahr mit Pfeilen zum blaettern anzeigen -if($uid!='') +if ($uid!='') { echo '"; @@ -269,16 +262,16 @@ echo '
'; //Tabelle mit den Monaten ausgeben echo '
'; echo "Alle Mitarbeiter anzeigen
'; $monat=9; -for($i=0;$i<12;$i++) +for($i = 0;$i < 12;$i++) { - if($i%3==0) + if ($i%3 == 0) { echo ''; } draw_monat($monat); $monat++; - if($monat>12) - $monat=1; + if ($monat > 12) + $monat = 1; } echo '
diff --git a/locale/en-US/urlaubstool.php b/locale/en-US/urlaubstool.php index d8c947947..697117c34 100644 --- a/locale/en-US/urlaubstool.php +++ b/locale/en-US/urlaubstool.php @@ -38,7 +38,8 @@ $this->phrasen['urlaubstool/freigabeansuchenUrlaub']='Freigabeansuchen Urlaub'; $this->phrasen['urlaubstool/freigabeFehlt']='Vacation has not been approved yet'; $this->phrasen['urlaubstool/urlaubsfreigabe']='Vacation approval: '; $this->phrasen['urlaubstool/bestaetigungsmailWurdeVersandt']='Confirmation mail to %s sent'; -$this->phrasen['urlaubstool/urlaubVon']='The requested vacation from'; -$this->phrasen['urlaubstool/urlaubBis']=' was approved by %s.'; -$this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen']='Review your vacation here:'; +$this->phrasen['urlaubstool/urlaubVon']='Ihr angefragter Urlaub von'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll +$this->phrasen['urlaubstool/urlaubBis']=' wurde von %s freigegeben.'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll +$this->phrasen['urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen']='Sie können diesen unter folgender Adresse einsehen:'; //Nur übersetzen, wenn die eMail in der eingestellten Sprache versandt werden soll + ?> From 752a891c6bb5153dade5747424616068649b4026 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 1 Jul 2021 15:29:19 +0200 Subject: [PATCH 65/84] 13887 Freigabemail bei \"Alle Anzeigen\" --- cis/private/profile/urlaubsfreigabe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/profile/urlaubsfreigabe.php b/cis/private/profile/urlaubsfreigabe.php index 6d705a5b9..384a3415d 100644 --- a/cis/private/profile/urlaubsfreigabe.php +++ b/cis/private/profile/urlaubsfreigabe.php @@ -228,7 +228,7 @@ function draw_monat($monat) if ($vertretung->uid != '') echo ' (Vertretung: '.$vertretung->nachname.')'; if($row->freigabeamum=='') - echo " zeitsperre_id&year=$year&uid=$uid class='Item'>Freigabe"; + echo " zeitsperre_id&year=$year&uid=$row->mitarbeiter_uid' class='Item'>Freigabe"; echo ""; echo '
'; } From 5d48b0aad049a0e0999e89489874241df4c1e828 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 2 Jul 2021 13:14:08 +0200 Subject: [PATCH 66/84] =?UTF-8?q?BT:=20neue=20zu=20akzeptierende=20Dokumen?= =?UTF-8?q?te,=20Studiengang=20als=20=C3=BCbergebener=20zgvma=5FOrt,=20Sty?= =?UTF-8?q?ling=20nicht=20verpflichtende=20Dokumente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/dokument.class.php | 13 +++------ include/prestudent.class.php | 51 +++++++++++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index 4d70891c0..6dec9a66d 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -1,5 +1,5 @@ db_add_param($dokument_kurzbz).")"; - //echo var_dump($qry); - //gibt ein Array von zu akzeptierenden Dokumenten zurück if ($db->db_query($qry)) { $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) { while ($row = $db->db_fetch_object()) { - //echo var_dump($row->prestudent_id); $arrayDoksZuAkzeptieren[] = $row->prestudent_id; } - //print_r($arrayDoksZuAkzeptieren); //für alle prestudent_ids das Dokument akzeptieren $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; @@ -979,20 +975,17 @@ class dokument extends basis_db person_id = ".$this->db_add_param($person_id)." and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz); - // echo var_dump($qry); - //gibt ein Array von zu Entakzeptierenden Dokumenten zurück if ($db->db_query($qry)) { $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) { while ($row = $db->db_fetch_object()) { $arrayDoksZuEntakzeptieren[] = $row->prestudent_id; } - //print_r($arrayDoksZuEntakzeptieren); //für alle prestudent_ids das Dokument Entakzeptieren $qry = "DELETE FROM public.tbl_dokumentprestudent WHERE prestudent_id in ("; diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 8e19927ff..0fe4a06e6 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -1,5 +1,5 @@ , - * Andreas Oesterreicher and - * Rudolf Hangl . + * Andreas Oesterreicher , + * Rudolf Hangl and + * Manuela Thamer . */ require_once(dirname(__FILE__).'/person.class.php'); require_once(dirname(__FILE__).'/log.class.php'); @@ -2408,4 +2409,48 @@ class prestudent extends person else return false; } + + + /** + * Liefert den wahrscheinlichen Studiengang der MasterZGV einer Person + * @param int $person_id ID der zu überprüfenden Person. + * @return string studiengangkurzbzlang + */ + public function getZGVMasterStg($person_id) + { + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + $qry = "SELECT kurzbzlang + FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') + AND typ in ('b','m','d') + ORDER BY status_kurzbz ASC + LIMIT 1;"; + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + $stg = $row->kurzbzlang; + return $stg; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } } From cee615664605f1e18c8ca31264e97f8a372bcac0 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 7 Jul 2021 20:22:53 +0200 Subject: [PATCH 67/84] - added Bisioaufenthaltfoerderung_model.php - dbupdate_3.3.php: added Buchungstyp "ZuschussIO" --- .../codex/Bisioaufenthaltfoerderung_model.php | 15 +++++++++++++++ system/dbupdate_3.3.php | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 application/models/codex/Bisioaufenthaltfoerderung_model.php diff --git a/application/models/codex/Bisioaufenthaltfoerderung_model.php b/application/models/codex/Bisioaufenthaltfoerderung_model.php new file mode 100644 index 000000000..7a817d67c --- /dev/null +++ b/application/models/codex/Bisioaufenthaltfoerderung_model.php @@ -0,0 +1,15 @@ +dbTable = 'bis.tbl_bisio_aufenthaltfoerderung'; + $this->pk = array('bisio_id', 'aufenthaltfoerderung_code'); + $this->hasSequence = false; + } +} diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 407a4aa24..045170661 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4781,6 +4781,19 @@ if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_pruef } } +// Added Buchungstyp "ZuschussIO" +if ($result = @$db->db_query("SELECT 1 FROM public.tbl_buchungstyp WHERE buchungstyp_kurzbz = 'ZuschussIO';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO public.tbl_buchungstyp (buchungstyp_kurzbz, beschreibung, standardtext) VALUES ('ZuschussIO', 'Zuschuss IO', 'Zuschuss Incoming Outgoing');"; + if (!$db->db_query($qry)) + echo 'public.tbl_buchungstyp '.$db->db_last_error().'
'; + else + echo ' public.tbl_buchungstyp: Added buchungstyp "ZuschussIO"
'; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; From 1c0de3ec451b49b8857396e835b1cc2256dde2cc Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Thu, 8 Jul 2021 15:05:19 +0200 Subject: [PATCH 68/84] Fixed: Doppelte Tabellenanzeige in SanchoMail korrigiert Signed-off-by: cris-technikum --- application/controllers/jobs/LehrauftragJob.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/application/controllers/jobs/LehrauftragJob.php b/application/controllers/jobs/LehrauftragJob.php index 4ba327a2f..7f5754595 100644 --- a/application/controllers/jobs/LehrauftragJob.php +++ b/application/controllers/jobs/LehrauftragJob.php @@ -383,8 +383,8 @@ class LehrauftragJob extends JOB_Controller } // Else if UID exists else { - // Search if studiensemester exists - $ss_index = array_search($data['studiensemester_kurzbz'], array_column($mail_data_arr, 'studiensemester_kurzbz')); + // Search if studiensemester exists inside the existing UID array + $ss_index = array_search($data['studiensemester_kurzbz'], array_column($mail_data_arr[$uid_index], 'studiensemester_kurzbz')); // If studiensemester is new, add studiensemester to existing UID if ($ss_index === false) @@ -394,13 +394,6 @@ class LehrauftragJob extends JOB_Controller $data[$i] ); } - // Else if studiensemester exists - else - { - // Add corresponding data to existing studiensemester of UID - $mail_data_arr[$uid_index]['studiensemester_kurbz'][] = $data[$i]; - } - } } } From f16ea874dbd7c457e7d11c4842d8336d137bf146 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 8 Jul 2021 15:47:31 +0200 Subject: [PATCH 69/84] fragt bei den mails auch nun den studiengangtyp ab --- public/js/infocenter/infocenterDetails.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index f5f435acb..70f5ed982 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -571,7 +571,8 @@ var InfocenterDetails = { { var fitstg = $.inArray(parseInt(prestudent.studiengang_kz), FIT_PROGRAMM_STUDIENGAENGE) >= 0; - if (receiverPrestudentstatus.studiensemester_kurzbz === prestudentstatus.studiensemester_kurzbz + if ((receiverPrestudentstatus.studiensemester_kurzbz === prestudentstatus.studiensemester_kurzbz) + && (receiverPrestudent.studiengangtyp === prestudent.studiengangtyp) && (prestudent.studiengangtyp === "b" || prestudent.studiengangtyp === "m" || fitstg)) { if (prestudent.isRtFreigegeben) @@ -596,7 +597,7 @@ var InfocenterDetails = { if (typeof receiverPrestudentstatus.bezeichnung_orgform_german === 'string') { - orgform_deutsch = receiverPrestudentstatus.bezeichnung_orgform_german.toLowerCase(); + orgform_deutsch = receiverPrestudentstatus.bezeichnung_orgform_german; } if (typeof receiverPrestudentstatus.bezeichnung_orgform_english === 'string') From a10cacaf4b83f2630561b5a6ee9a93b14da979ef Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 9 Jul 2021 08:28:26 +0200 Subject: [PATCH 70/84] =?UTF-8?q?Anzeige=20j=C3=BCngster=20Eintrag=20Beruf?= =?UTF-8?q?st=C3=A4tigkeit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/notiz.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/notiz.class.php b/include/notiz.class.php index 459bdc6a6..e1d9e9006 100644 --- a/include/notiz.class.php +++ b/include/notiz.class.php @@ -411,7 +411,7 @@ class notiz extends basis_db $qry .= " AND prestudent_id = ".$this->db_add_param($prestudent_id, FHC_INTEGER); } - $qry .= " ORDER BY notiz_id"; + $qry .= " ORDER BY notiz_id DESC"; if($result = $this->db_query($qry)) { From bd153921c6df8ab90ce479b8da8bc7076186a9e6 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 9 Jul 2021 11:09:43 +0200 Subject: [PATCH 71/84] =?UTF-8?q?13989=20Merge=20=C3=84nderungen=20Berufst?= =?UTF-8?q?=C3=A4tigkeit=20master?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/notiz.class.php | 1237 ++++++++++++++++++++------------------- 1 file changed, 619 insertions(+), 618 deletions(-) diff --git a/include/notiz.class.php b/include/notiz.class.php index e1d9e9006..5d237e2b8 100644 --- a/include/notiz.class.php +++ b/include/notiz.class.php @@ -1,618 +1,619 @@ - and - */ -require_once(dirname(__FILE__).'/basis_db.class.php'); -require_once(dirname(__FILE__).'/dms.class.php'); - -class notiz extends basis_db -{ - public $new; - public $result=array(); - public $dokumente=array(); - - //Tabellenspalten - public $notiz_id; - public $titel; - public $text; - public $verfasser_uid; - public $bearbeiter_uid; - public $start; - public $ende; - public $erledigt; - public $insertamum; - public $insertvon; - public $updateamum; - public $updatevon; - - public $projekt_kurzbz; - public $projektphase_id; - public $projekttask_id; - public $uid; - public $person_id; - public $prestudent_id; - public $bestellung_id; - public $lehreinheit_id; - public $anrechnung_id; - - /** - * Konstruktor - * @param $notiz_id - */ - public function __construct($notiz_id = null) - { - parent::__construct(); - - if($notiz_id != null) - $this->load($notiz_id); - } - - /** - * Laedt eine Notiz - * @param $notiz_id - * @return true wenn ok, false im Fehlerfall - */ - public function load($notiz_id) - { - if(!is_numeric($notiz_id)) - { - $this->errormsg = 'NotizID ist ungueltig'; - return false; - } - - $qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER); - - if($this->db_query($qry)) - { - if($row = $this->db_fetch_object()) - { - $this->notiz_id=$row->notiz_id; - $this->titel=$row->titel; - $this->text=$row->text; - $this->verfasser_uid=$row->verfasser_uid; - $this->bearbeiter_uid=$row->bearbeiter_uid; - $this->start=$row->start; - $this->ende=$row->ende; - $this->erledigt=$this->db_parse_bool($row->erledigt); - $this->insertamum=$row->insertamum; - $this->insertvon=$row->insertvon; - $this->updateamum=$row->updateamum; - $this->updatevon=$row->updatevon; - $this->getDokumente($row->notiz_id); - - return true; - } - else - { - $this->errormsg = 'Datensatz wurde nicht gefunden'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Löscht eine Notiz - * @param $notiz_id - * @return true wenn ok, false im Fehlerfall - */ - public function delete($notiz_id) - { - if(!is_numeric($notiz_id)) - { - $this->errormsg = 'NotizID ist ungueltig'; - return false; - } - - // Dokumente der Notiz löschen - $this->getDokumente($notiz_id); - if(!empty($this->dokumente)) - { - $dms = new dms(); - - foreach($this->dokumente as $dms_id) - { - $dms->deleteDms($dms_id); - } - } - - $qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER); - - if(!$this->db_query($qry)) - { - $this->errormsg = 'Fehler beim Loeschen der Daten'; - return false; - } - return true; - } - - /** - * Prueft die Daten vor dem Speichern - * auf Gueltigkeit - */ - public function validate() - { - return true; - } - - /** - * Speichert den aktuellen Datensatz in die Datenbank - * Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt - * andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert - * @return true wenn ok, false im Fehlerfall - */ - public function save($new=null) - { - if($new==null) - $new=$this->new; - - if(!$this->validate()) - return false; - - if($new) - { - //Neuen Datensatz einfuegen - $qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid, - bearbeiter_uid, start, ende, erledigt, insertamum, insertvon, - updateamum, updatevon) VALUES('. - $this->db_add_param($this->titel).', '. - $this->db_add_param($this->text).', '. - $this->db_add_param($this->verfasser_uid).','. - $this->db_add_param($this->bearbeiter_uid).','. - $this->db_add_param($this->start).','. - $this->db_add_param($this->ende).','. - $this->db_add_param($this->erledigt,FHC_BOOLEAN).','. - $this->db_add_param($this->insertamum).','. - $this->db_add_param($this->insertvon).','. - $this->db_add_param($this->updateamum).','. - $this->db_add_param($this->updatevon).');'; - } - else - { - $qry='UPDATE public.tbl_notiz SET '. - 'titel='.$this->db_add_param($this->titel).', '. - 'text='.$this->db_add_param($this->text).', '. - 'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '. - 'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '. - 'start='.$this->db_add_param($this->start).', '. - 'ende='.$this->db_add_param($this->ende).', '. - 'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '. - 'updateamum='.$this->db_add_param($this->updateamum).', '. - 'updatevon='.$this->db_add_param($this->updatevon).' '. - 'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';'; - } - - if($this->db_query($qry)) - { - if($new) - { - $qry="SELECT currval('seq_notiz_notiz_id') as id;"; - if($result = $this->db_query($qry)) - { - if($row = $this->db_fetch_object($result)) - { - $this->notiz_id = $row->id; - $this->db_query('COMMIT;'); - return true; - } - else - { - $this->errormsg = 'Fehler beim Lesen der Sequence'; - $this->db_query('ROLLBACK'); - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Lesen der Sequence'; - $this->db_query('ROLLBACK'); - return false; - } - } - return true; - } - else - { - $this->errormsg = 'Fehler beim Speichern des Datensatzes'; - return false; - } - } - - /** - * Speichert die Zuordnung einer Notiz - * - */ - public function saveZuordnung() - { - $qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id, - uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(". - $this->db_add_param($this->notiz_id, FHC_INTEGER).','. - $this->db_add_param($this->projekt_kurzbz).','. - $this->db_add_param($this->projektphase_id, FHC_INTEGER).','. - $this->db_add_param($this->projekttask_id, FHC_INTEGER).','. - $this->db_add_param($this->uid).','. - $this->db_add_param($this->person_id, FHC_INTEGER).','. - $this->db_add_param($this->prestudent_id, FHC_INTEGER).','. - $this->db_add_param($this->bestellung_id, FHC_INTEGER).','. - $this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','. - $this->db_add_param($this->anrechnung_id, FHC_INTEGER).');'; - - if($this->db_query($qry)) - { - return true; - } - else - { - $this->errormsg = 'Fehler beim Speichern der Daten'; - return false; - } - } - - /** - * Speichert ein Dokument zur Notiz - * @param int $dms_id - * @return boolean - */ - public function saveDokument($dms_id) - { - $qry = "INSERT INTO public.tbl_notiz_dokument(notiz_id, dms_id) VALUES(". - $this->db_add_param($this->notiz_id, FHC_INTEGER).','. - $this->db_add_param($dms_id, FHC_INTEGER).');'; - - if($this->db_query($qry)) - { - return true; - } - else - { - $this->errormsg = 'Fehler beim Speichern der Daten'; - return false; - } - } - - /** - * - * Laedt die Notizen - * @param $erledigt - * @param $projekt_kurzbz - * @param $projektphase_id - * @param $projekttask_id - * @param $uid - * @param $person_id - * @param $prestudent_id - * @param $bestellung_id - * @param $user - * @param $lehreinheit_id - * @param $anrechnung_id - * @return boolean - */ - public function getNotiz( - $erledigt=null, - $projekt_kurzbz=null, - $projektphase_id=null, - $projekttask_id=null, - $uid=null, - $person_id=null, - $prestudent_id=null, - $bestellung_id=null, - $user=null, - $lehreinheit_id=null, - $stundenplandev_id=null, - $anrechnung_id=null, - $titel=null) - { - $qry = "SELECT - * - FROM - public.tbl_notiz - LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) - WHERE 1=1"; - - if(!is_null($erledigt)) - { - if($erledigt) - $qry.=" AND erledigt=true"; - else - $qry.=" AND erledigt=false"; - } - if($projekt_kurzbz!='') - $qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz); - if($projektphase_id!='') - $qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER); - if($projekttask_id!='') - $qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER); - if($uid!='') - $qry.=" AND uid=".$this->db_add_param($uid); - if($person_id!='') - $qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER); - if($prestudent_id!='') - $qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER); - if($bestellung_id!='') - $qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER); - if($user!='') - $qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")"; - if($lehreinheit_id!='') - $qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER); - if($anrechnung_id!='') - $qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER); - if($titel!='') - $qry.=" AND titel=".$this->db_add_param($titel); - - $qry.=' ORDER BY start, ende, titel'; - - if($result = $this->db_query($qry)) - { - while($row = $this->db_fetch_object($result)) - { - $obj = new notiz(); - - $obj->notiz_id=$row->notiz_id; - $obj->titel=$row->titel; - $obj->text=$row->text; - $obj->verfasser_uid=$row->verfasser_uid; - $obj->bearbeiter_uid=$row->bearbeiter_uid; - $obj->start=$row->start; - $obj->ende=$row->ende; - $obj->erledigt=$this->db_parse_bool($row->erledigt); - $obj->insertamum=$row->insertamum; - $obj->insertvon=$row->insertvon; - $obj->updateamum=$row->updateamum; - $obj->updatevon=$row->updatevon; - $obj->getDokumente($row->notiz_id); - - $this->result[] = $obj; - } - return true; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * - * Laedt die Notizen vom Bewerbungstool - * @param integer $person_id - * @param integer $prestudent_id - * @return boolean - */ - public function getBewerbungstoolNotizen($person_id, $prestudent_id = null) - { - $qry = "SELECT - * - FROM - public.tbl_notiz - LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) - WHERE (insertvon = 'online' OR insertvon = 'online_notiz') - AND person_id = ".$this->db_add_param($person_id, FHC_INTEGER); - if ($prestudent_id != '') - { - $qry .= " AND prestudent_id = ".$this->db_add_param($prestudent_id, FHC_INTEGER); - } - - $qry .= " ORDER BY notiz_id DESC"; - - if($result = $this->db_query($qry)) - { - while($row = $this->db_fetch_object($result)) - { - $obj = new notiz(); - - $obj->notiz_id=$row->notiz_id; - $obj->titel=$row->titel; - $obj->text=$row->text; - $obj->verfasser_uid=$row->verfasser_uid; - $obj->bearbeiter_uid=$row->bearbeiter_uid; - $obj->start=$row->start; - $obj->ende=$row->ende; - $obj->erledigt=$this->db_parse_bool($row->erledigt); - $obj->insertamum=$row->insertamum; - $obj->insertvon=$row->insertvon; - $obj->updateamum=$row->updateamum; - $obj->updatevon=$row->updatevon; - - $this->result[] = $obj; - } - return true; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - - /** - * TEMPORARY: kurzfristig wird für das Onlinebewerbungstool die Ausbildung - * (Name und Adresse der besuchten Schule) in eine Notiz mit - * insertvon = online_ausbildung gespeichert. - * Wird auf UDF umgebaut! - * - * Laedt die Notizen zur Ausbilund vom Bewerbungstool - * @param $person_id int - * @return boolean - */ - public function getBewerbungstoolNotizenAusbildung($person_id) - { - $qry = 'SELECT - * - FROM - public.tbl_notiz - LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) - WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) . - ' AND insertvon = ' . $this->db_add_param('online_ausbildung') . - ' ORDER BY notiz_id'; - - if($result = $this->db_query($qry)) - { - while($row = $this->db_fetch_object($result)) - { - $obj = new notiz(); - - $obj->notiz_id=$row->notiz_id; - $obj->titel=$row->titel; - $obj->text=$row->text; - $obj->verfasser_uid=$row->verfasser_uid; - $obj->bearbeiter_uid=$row->bearbeiter_uid; - $obj->start=$row->start; - $obj->ende=$row->ende; - $obj->erledigt=$this->db_parse_bool($row->erledigt); - $obj->insertamum=$row->insertamum; - $obj->insertvon=$row->insertvon; - $obj->updateamum=$row->updateamum; - $obj->updatevon=$row->updatevon; - - $this->result[] = $obj; - } - return true; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - - - /** - - * - - * Laedt die Notizen - * @param $erledigt - * @param $projekt_kurzbz - * @param $projektphase_id - * @param $projekttask_id - * @param $uid - * @param $person_id - * @param $prestudent_id - * @param $bestellung_id - * @param $user - * @param $lehreinheit_id - * @param $anrechnung_id - * @return boolean - */ - public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null) - { - $qry = "SELECT - count(*) as anzahl - FROM - public.tbl_notiz - LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) - WHERE 1=1"; - - if(!is_null($erledigt)) - { - if($erledigt) - $qry.=" AND erledigt=true"; - else - $qry.=" AND erledigt=false"; - } - if($projekt_kurzbz!='') - $qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz); - if($projektphase_id!='') - $qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER); - if($projekttask_id!='') - $qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER); - if($uid!='') - $qry.=" AND uid=".$this->db_add_param($uid); - if($person_id!='') - $qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER); - if($prestudent_id!='') - $qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER); - if($bestellung_id!='') - $qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER); - if($user!='') - $qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")"; - if($lehreinheit_id!='') - $qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER); - if($anrechnung_id!='') - $qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER); - - if($result = $this->db_query($qry)) - { - if($row = $this->db_fetch_object($result)) - return $row->anzahl; - else - { - $this->errormsg='Fehler beim Laden der Daten'; - return false; - } - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Laedt die Dokumente der Notiz - * @return boolean - */ - public function getDokumente($notiz_id) - { - $qry = "SELECT dms_id FROM public.tbl_notiz_dokument WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER); - - if($this->db_query($qry)) - { - while($row = $this->db_fetch_object()) - { - $this->dokumente[] = $row->dms_id; - } - - return true; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } - - /** - * Prueft ob das Dokument an einer Notiz haengt - * @param $dms_id DMS id des Dokuments. - * @return boolean true wenn das Dokument an einer Notiz hängt, sonst false. - */ - public function isNotizDokument($dms_id) - { - $qry = "SELECT * FROM public.tbl_notiz_dokument WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER); - - if($result = $this->db_query($qry)) - { - if($this->db_num_rows($result)>0) - return true; - else - return false; - } - else - { - $this->errormsg = 'Fehler beim Laden der Daten'; - return false; - } - } -} + and + */ +require_once(dirname(__FILE__).'/basis_db.class.php'); +require_once(dirname(__FILE__).'/dms.class.php'); + +class notiz extends basis_db +{ + public $new; + public $result=array(); + public $dokumente=array(); + + //Tabellenspalten + public $notiz_id; + public $titel; + public $text; + public $verfasser_uid; + public $bearbeiter_uid; + public $start; + public $ende; + public $erledigt; + public $insertamum; + public $insertvon; + public $updateamum; + public $updatevon; + + public $projekt_kurzbz; + public $projektphase_id; + public $projekttask_id; + public $uid; + public $person_id; + public $prestudent_id; + public $bestellung_id; + public $lehreinheit_id; + public $anrechnung_id; + + /** + * Konstruktor + * @param $notiz_id + */ + public function __construct($notiz_id = null) + { + parent::__construct(); + + if($notiz_id != null) + $this->load($notiz_id); + } + + /** + * Laedt eine Notiz + * @param $notiz_id + * @return true wenn ok, false im Fehlerfall + */ + public function load($notiz_id) + { + if(!is_numeric($notiz_id)) + { + $this->errormsg = 'NotizID ist ungueltig'; + return false; + } + + $qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER); + + if($this->db_query($qry)) + { + if($row = $this->db_fetch_object()) + { + $this->notiz_id=$row->notiz_id; + $this->titel=$row->titel; + $this->text=$row->text; + $this->verfasser_uid=$row->verfasser_uid; + $this->bearbeiter_uid=$row->bearbeiter_uid; + $this->start=$row->start; + $this->ende=$row->ende; + $this->erledigt=$this->db_parse_bool($row->erledigt); + $this->insertamum=$row->insertamum; + $this->insertvon=$row->insertvon; + $this->updateamum=$row->updateamum; + $this->updatevon=$row->updatevon; + $this->getDokumente($row->notiz_id); + + return true; + } + else + { + $this->errormsg = 'Datensatz wurde nicht gefunden'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Löscht eine Notiz + * @param $notiz_id + * @return true wenn ok, false im Fehlerfall + */ + public function delete($notiz_id) + { + if(!is_numeric($notiz_id)) + { + $this->errormsg = 'NotizID ist ungueltig'; + return false; + } + + // Dokumente der Notiz löschen + $this->getDokumente($notiz_id); + if(!empty($this->dokumente)) + { + $dms = new dms(); + + foreach($this->dokumente as $dms_id) + { + $dms->deleteDms($dms_id); + } + } + + $qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER); + + if(!$this->db_query($qry)) + { + $this->errormsg = 'Fehler beim Loeschen der Daten'; + return false; + } + return true; + } + + /** + * Prueft die Daten vor dem Speichern + * auf Gueltigkeit + */ + public function validate() + { + return true; + } + + /** + * Speichert den aktuellen Datensatz in die Datenbank + * Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt + * andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert + * @return true wenn ok, false im Fehlerfall + */ + public function save($new=null) + { + if($new==null) + $new=$this->new; + + if(!$this->validate()) + return false; + + if($new) + { + //Neuen Datensatz einfuegen + $qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid, + bearbeiter_uid, start, ende, erledigt, insertamum, insertvon, + updateamum, updatevon) VALUES('. + $this->db_add_param($this->titel).', '. + $this->db_add_param($this->text).', '. + $this->db_add_param($this->verfasser_uid).','. + $this->db_add_param($this->bearbeiter_uid).','. + $this->db_add_param($this->start).','. + $this->db_add_param($this->ende).','. + $this->db_add_param($this->erledigt,FHC_BOOLEAN).','. + $this->db_add_param($this->insertamum).','. + $this->db_add_param($this->insertvon).','. + $this->db_add_param($this->updateamum).','. + $this->db_add_param($this->updatevon).');'; + } + else + { + $qry='UPDATE public.tbl_notiz SET '. + 'titel='.$this->db_add_param($this->titel).', '. + 'text='.$this->db_add_param($this->text).', '. + 'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '. + 'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '. + 'start='.$this->db_add_param($this->start).', '. + 'ende='.$this->db_add_param($this->ende).', '. + 'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '. + 'updateamum='.$this->db_add_param($this->updateamum).', '. + 'updatevon='.$this->db_add_param($this->updatevon).' '. + 'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';'; + } + + if($this->db_query($qry)) + { + if($new) + { + $qry="SELECT currval('seq_notiz_notiz_id') as id;"; + if($result = $this->db_query($qry)) + { + if($row = $this->db_fetch_object($result)) + { + $this->notiz_id = $row->id; + $this->db_query('COMMIT;'); + return true; + } + else + { + $this->errormsg = 'Fehler beim Lesen der Sequence'; + $this->db_query('ROLLBACK'); + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Lesen der Sequence'; + $this->db_query('ROLLBACK'); + return false; + } + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Speichern des Datensatzes'; + return false; + } + } + + /** + * Speichert die Zuordnung einer Notiz + * + */ + public function saveZuordnung() + { + $qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id, + uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(". + $this->db_add_param($this->notiz_id, FHC_INTEGER).','. + $this->db_add_param($this->projekt_kurzbz).','. + $this->db_add_param($this->projektphase_id, FHC_INTEGER).','. + $this->db_add_param($this->projekttask_id, FHC_INTEGER).','. + $this->db_add_param($this->uid).','. + $this->db_add_param($this->person_id, FHC_INTEGER).','. + $this->db_add_param($this->prestudent_id, FHC_INTEGER).','. + $this->db_add_param($this->bestellung_id, FHC_INTEGER).','. + $this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','. + $this->db_add_param($this->anrechnung_id, FHC_INTEGER).');'; + + if($this->db_query($qry)) + { + return true; + } + else + { + $this->errormsg = 'Fehler beim Speichern der Daten'; + return false; + } + } + + /** + * Speichert ein Dokument zur Notiz + * @param int $dms_id + * @return boolean + */ + public function saveDokument($dms_id) + { + $qry = "INSERT INTO public.tbl_notiz_dokument(notiz_id, dms_id) VALUES(". + $this->db_add_param($this->notiz_id, FHC_INTEGER).','. + $this->db_add_param($dms_id, FHC_INTEGER).');'; + + if($this->db_query($qry)) + { + return true; + } + else + { + $this->errormsg = 'Fehler beim Speichern der Daten'; + return false; + } + } + + /** + * + * Laedt die Notizen + * @param $erledigt + * @param $projekt_kurzbz + * @param $projektphase_id + * @param $projekttask_id + * @param $uid + * @param $person_id + * @param $prestudent_id + * @param $bestellung_id + * @param $user + * @param $lehreinheit_id + * @param $anrechnung_id + * @return boolean + */ + public function getNotiz( + $erledigt=null, + $projekt_kurzbz=null, + $projektphase_id=null, + $projekttask_id=null, + $uid=null, + $person_id=null, + $prestudent_id=null, + $bestellung_id=null, + $user=null, + $lehreinheit_id=null, + $stundenplandev_id=null, + $anrechnung_id=null, + $titel=null) + { + $qry = "SELECT + * + FROM + public.tbl_notiz + LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) + WHERE 1=1"; + + if(!is_null($erledigt)) + { + if($erledigt) + $qry.=" AND erledigt=true"; + else + $qry.=" AND erledigt=false"; + } + if($projekt_kurzbz!='') + $qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz); + if($projektphase_id!='') + $qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER); + if($projekttask_id!='') + $qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER); + if($uid!='') + $qry.=" AND uid=".$this->db_add_param($uid); + if($person_id!='') + $qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER); + if($prestudent_id!='') + $qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER); + if($bestellung_id!='') + $qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER); + if($user!='') + $qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")"; + if($lehreinheit_id!='') + $qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER); + if($anrechnung_id!='') + $qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER); + if($titel!='') + $qry.=" AND titel=".$this->db_add_param($titel); + + $qry.=' ORDER BY start, ende, titel'; + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new notiz(); + + $obj->notiz_id=$row->notiz_id; + $obj->titel=$row->titel; + $obj->text=$row->text; + $obj->verfasser_uid=$row->verfasser_uid; + $obj->bearbeiter_uid=$row->bearbeiter_uid; + $obj->start=$row->start; + $obj->ende=$row->ende; + $obj->erledigt=$this->db_parse_bool($row->erledigt); + $obj->insertamum=$row->insertamum; + $obj->insertvon=$row->insertvon; + $obj->updateamum=$row->updateamum; + $obj->updatevon=$row->updatevon; + $obj->getDokumente($row->notiz_id); + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * + * Laedt die Notizen vom Bewerbungstool + * @param integer $person_id + * @param integer $prestudent_id + * @param string $order Sorting order. Default: "notiz_id" + * @return boolean + */ + public function getBewerbungstoolNotizen($person_id, $prestudent_id = null, $order = 'notiz_id') + { + $qry = "SELECT + * + FROM + public.tbl_notiz + LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) + WHERE (insertvon = 'online' OR insertvon = 'online_notiz') + AND person_id = ".$this->db_add_param($person_id, FHC_INTEGER); + if ($prestudent_id != '') + { + $qry .= " AND prestudent_id = ".$this->db_add_param($prestudent_id, FHC_INTEGER); + } + + $qry .= " ORDER BY ".$order; + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new notiz(); + + $obj->notiz_id=$row->notiz_id; + $obj->titel=$row->titel; + $obj->text=$row->text; + $obj->verfasser_uid=$row->verfasser_uid; + $obj->bearbeiter_uid=$row->bearbeiter_uid; + $obj->start=$row->start; + $obj->ende=$row->ende; + $obj->erledigt=$this->db_parse_bool($row->erledigt); + $obj->insertamum=$row->insertamum; + $obj->insertvon=$row->insertvon; + $obj->updateamum=$row->updateamum; + $obj->updatevon=$row->updatevon; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + + /** + * TEMPORARY: kurzfristig wird für das Onlinebewerbungstool die Ausbildung + * (Name und Adresse der besuchten Schule) in eine Notiz mit + * insertvon = online_ausbildung gespeichert. + * Wird auf UDF umgebaut! + * + * Laedt die Notizen zur Ausbilund vom Bewerbungstool + * @param $person_id int + * @return boolean + */ + public function getBewerbungstoolNotizenAusbildung($person_id) + { + $qry = 'SELECT + * + FROM + public.tbl_notiz + LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) + WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) . + ' AND insertvon = ' . $this->db_add_param('online_ausbildung') . + ' ORDER BY notiz_id'; + + if($result = $this->db_query($qry)) + { + while($row = $this->db_fetch_object($result)) + { + $obj = new notiz(); + + $obj->notiz_id=$row->notiz_id; + $obj->titel=$row->titel; + $obj->text=$row->text; + $obj->verfasser_uid=$row->verfasser_uid; + $obj->bearbeiter_uid=$row->bearbeiter_uid; + $obj->start=$row->start; + $obj->ende=$row->ende; + $obj->erledigt=$this->db_parse_bool($row->erledigt); + $obj->insertamum=$row->insertamum; + $obj->insertvon=$row->insertvon; + $obj->updateamum=$row->updateamum; + $obj->updatevon=$row->updatevon; + + $this->result[] = $obj; + } + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + + + /** + + * + + * Laedt die Notizen + * @param $erledigt + * @param $projekt_kurzbz + * @param $projektphase_id + * @param $projekttask_id + * @param $uid + * @param $person_id + * @param $prestudent_id + * @param $bestellung_id + * @param $user + * @param $lehreinheit_id + * @param $anrechnung_id + * @return boolean + */ + public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null) + { + $qry = "SELECT + count(*) as anzahl + FROM + public.tbl_notiz + LEFT JOIN public.tbl_notizzuordnung USING(notiz_id) + WHERE 1=1"; + + if(!is_null($erledigt)) + { + if($erledigt) + $qry.=" AND erledigt=true"; + else + $qry.=" AND erledigt=false"; + } + if($projekt_kurzbz!='') + $qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz); + if($projektphase_id!='') + $qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER); + if($projekttask_id!='') + $qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER); + if($uid!='') + $qry.=" AND uid=".$this->db_add_param($uid); + if($person_id!='') + $qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER); + if($prestudent_id!='') + $qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER); + if($bestellung_id!='') + $qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER); + if($user!='') + $qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")"; + if($lehreinheit_id!='') + $qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER); + if($anrechnung_id!='') + $qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER); + + if($result = $this->db_query($qry)) + { + if($row = $this->db_fetch_object($result)) + return $row->anzahl; + else + { + $this->errormsg='Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Laedt die Dokumente der Notiz + * @return boolean + */ + public function getDokumente($notiz_id) + { + $qry = "SELECT dms_id FROM public.tbl_notiz_dokument WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER); + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + $this->dokumente[] = $row->dms_id; + } + + return true; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + + /** + * Prueft ob das Dokument an einer Notiz haengt + * @param $dms_id DMS id des Dokuments. + * @return boolean true wenn das Dokument an einer Notiz hängt, sonst false. + */ + public function isNotizDokument($dms_id) + { + $qry = "SELECT * FROM public.tbl_notiz_dokument WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER); + + if($result = $this->db_query($qry)) + { + if($this->db_num_rows($result)>0) + return true; + else + return false; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } +} From e9705e69e732ee01168cad7ca0d3548cca2c552b Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 13 Jul 2021 14:36:41 +0200 Subject: [PATCH 72/84] =?UTF-8?q?ZGV-Felder=20f=C3=BCr=20alle=20aktuellen?= =?UTF-8?q?=20Bewerbungen=20mit=20Inhouse-ZGV=20=C3=BCberschreiben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 0fe4a06e6..eb8767883 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2305,7 +2305,7 @@ class prestudent extends person $db = new basis_db(); $arrayleereManations = array(); - //all prestudent_ids mit leerer ZGV_Nation und Status Interessent + //all prestudent_ids mit Status Interessent $qry = "SELECT * FROM @@ -2314,8 +2314,6 @@ class prestudent extends person public.tbl_studiengang USING (studiengang_kz) WHERE person_id = ".$this->db_add_param($person_id)." - AND - zgvmanation is NULL AND typ ='m' And From 47326fe9fb56c4cdb3993ee6f331d7397243c5fb Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 14 Jul 2021 13:02:08 +0200 Subject: [PATCH 73/84] - Added new protected method getOldestJobs to core/JQW_Controller - Changed method JQW_Controller->getOldestJob to be a wrapper for getOldestJobs - Changed method generateJobs to be a wrapper for static method JobsQueueLib::generateJobs - Removed method JobsQueueLib->getOldestJob - Added new public method getOldestJobs to JobsQueueLib - Added new public static method generateJobs to JobsQueueLib --- application/core/JQW_Controller.php | 19 ++++++++++++------- application/libraries/JobsQueueLib.php | 24 ++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/application/core/JQW_Controller.php b/application/core/JQW_Controller.php index 1b78a2a70..361efd998 100644 --- a/application/core/JQW_Controller.php +++ b/application/core/JQW_Controller.php @@ -49,10 +49,20 @@ abstract class JQW_Controller extends JOB_Controller /** * To get the oldest added job using the given job type + * NOTE: just a wrapper */ protected function getOldestJob($type) { - $jobs = $this->jobsqueuelib->getOldestJob($type); + return $this->getOldestJobs($type, 1); + } + + /** + * To get the oldest added jobs using the given job type + * It is eventually specify the maximum amount of jobs to be retrieved + */ + protected function getOldestJobs($type, $maxAmount) + { + $jobs = $this->jobsqueuelib->getOldestJobs($type, $maxAmount); // If an error occurred then log it in database if (isError($jobs)) $this->logError(getError($jobs), $type); @@ -131,12 +141,7 @@ abstract class JQW_Controller extends JOB_Controller */ protected function generateJobs($status, $input) { - $job = new stdClass(); - - $job->{JobsQueueLib::PROPERTY_STATUS} = $status; - $job->{JobsQueueLib::PROPERTY_INPUT} = $input; - - return array($job); + return JobsQueueLib::generateJobs($status, $input); } } diff --git a/application/libraries/JobsQueueLib.php b/application/libraries/JobsQueueLib.php index a65bb0d29..d264f7119 100644 --- a/application/libraries/JobsQueueLib.php +++ b/application/libraries/JobsQueueLib.php @@ -58,13 +58,16 @@ class JobsQueueLib /** * To get the oldest added jobs using the given job type + * It is eventually specify the maximum amount of jobs to be retrieved */ - public function getOldestJob($type) + public function getOldestJobs($type, $maxAmount = null) { $this->_ci->JobsQueueModel->resetQuery(); $this->_ci->JobsQueueModel->addOrder('creationtime', 'ASC'); - $this->_ci->JobsQueueModel->addLimit('1'); + + // If the maximum amount of jobs to retrieve have been specified + if (is_numeric($maxAmount)) $this->_ci->JobsQueueModel->addLimit($maxAmount); return $this->_ci->JobsQueueModel->loadWhere(array('status' => self::STATUS_NEW, 'type' => $type)); } @@ -221,6 +224,23 @@ class JobsQueueLib return success($results); // otherwise return results in a success object } + //------------------------------------------------------------------------------------------------------------------ + // Public static methods + + /** + * Utility method to generate a job with the given parameters and return it inside an array + * ready to be used by addNewJobsToQueue and updateJobsQueue + */ + public static function generateJobs($status, $input) + { + $job = new stdClass(); + + $job->{self::PROPERTY_STATUS} = $status; + $job->{self::PROPERTY_INPUT} = $input; + + return array($job); + } + //------------------------------------------------------------------------------------------------------------------ // Private methods From 05a06de109373d8fefe2407cb1e86df8fddb3b6c Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 15 Jul 2021 09:10:35 +0200 Subject: [PATCH 74/84] =?UTF-8?q?alle=20prestudents=20im=20Status=20Intere?= =?UTF-8?q?ssent=20mit=20leerem=20zgvmatum=20=C3=BCberschreiben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index eb8767883..fcafd36b8 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2316,6 +2316,8 @@ class prestudent extends person person_id = ".$this->db_add_param($person_id)." AND typ ='m' + AND + zgvmadatum IS NULL And get_rolle_prestudent(prestudent_id, null) = 'Interessent';"; From 113ac6a2c2be187383209b44d01abb6444b8e39a Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Thu, 15 Jul 2021 22:23:11 +0200 Subject: [PATCH 75/84] bisMeldung studentenmeldung.php: added parameter "nur_bewerber" which lets export only bewerberdata --- vilesci/bis/studentenmeldung.php | 130 ++++++++++++++++--------------- 1 file changed, 68 insertions(+), 62 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index fb723df75..213cd4a7b 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -100,6 +100,7 @@ $bwlist=''; $storgfor=''; $verwendete_orgformen=array(); $student_data=array(); +$nur_bewerber=false; $datum_obj = new datum(); @@ -138,6 +139,9 @@ else die('

Es wurde kein Studiengang ausgewählt!

'); } +//Parameter wenn nur Bewerbermeldung durchgeführt werden soll +$nur_bewerber=filter_input(INPUT_GET, 'nur_bewerber', FILTER_VALIDATE_BOOLEAN); + /* standortcode 22=Wien derzeit fuer alle Studierende der gleiche Standort @@ -269,58 +273,58 @@ if($result_in = $db->db_query($qry_in)) } } -//Hauptselect -// An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird -if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) +if ($nur_bewerber !== true) { - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - )) - ORDER BY student_uid, nachname, vorname - "; -} -else -{ - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." - AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") - AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' - OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) - OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") - OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - ))) - ORDER BY student_uid, nachname, vorname - "; + //Hauptselect + // An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird + if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) + { + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + )) + ORDER BY student_uid, nachname, vorname + "; + } + else + { + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." + AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") + AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' + OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) + OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") + OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + ))) + ORDER BY student_uid, nachname, vorname + "; + } } -if($result = $db->db_query($qry)) -{ - - $datei.=" +$datei.=" ".$erhalter." ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." @@ -328,26 +332,28 @@ if($result = $db->db_query($qry)) ".$stg_kz.""; +if($nur_bewerber !== true && $result = $db->db_query($qry)) +{ while($row = $db->db_fetch_object($result)) { $datei.= GenerateXMLStudentBlock($row); } +} - //Bewerberblock bei Ausserordentlichen nicht anzeigen - if($stg_kz!=('9'.$erhalter)) +//Bewerberblock bei Ausserordentlichen nicht anzeigen +if($stg_kz!=('9'.$erhalter)) +{ + $stg_obj = new studiengang(); + + if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) { - $stg_obj = new studiengang(); - - if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) - { - $orgcodes = array_unique($orgform_code_array); - //Mischform - foreach($orgcodes as $code) - $datei.= GenerateXMLBewerberBlock($code); - } - else - $datei.= GenerateXMLBewerberBlock(); + $orgcodes = array_unique($orgform_code_array); + //Mischform + foreach($orgcodes as $code) + $datei.= GenerateXMLBewerberBlock($code); } + else + $datei.= GenerateXMLBewerberBlock(); } $datei.=" From 143053b893f320efc9818ebac2b2c9cb023b5d91 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 20 Jul 2021 13:53:38 +0200 Subject: [PATCH 76/84] =?UTF-8?q?Bewerbungstool:=20alle=20Masterbewerbunge?= =?UTF-8?q?n=20mit=20Status=20Interessent=20mit=20ZGV-Ort=20=C3=BCberschre?= =?UTF-8?q?iben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index fcafd36b8..eb8767883 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2316,8 +2316,6 @@ class prestudent extends person person_id = ".$this->db_add_param($person_id)." AND typ ='m' - AND - zgvmadatum IS NULL And get_rolle_prestudent(prestudent_id, null) = 'Interessent';"; From ccf4d0e49beb17d708b3f74760fe581adb8b1ac5 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 20 Jul 2021 20:21:50 +0200 Subject: [PATCH 77/84] studentenmeldung.php: link for file with bewerberdaten only added, instead of previous way of passing a GET parameter for bewerdaten only export --- vilesci/bis/studentenmeldung.php | 155 +++++++++++++++++-------------- 1 file changed, 86 insertions(+), 69 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 213cd4a7b..dceb4d30c 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -76,6 +76,7 @@ $stgart=''; $orgform_code=''; $status=''; $datei=''; +$dateiNurBewerber=''; $aktstatus=''; $aktstatus_datum=''; $mob=''; @@ -100,7 +101,6 @@ $bwlist=''; $storgfor=''; $verwendete_orgformen=array(); $student_data=array(); -$nur_bewerber=false; $datum_obj = new datum(); @@ -139,9 +139,6 @@ else die('

Es wurde kein Studiengang ausgewählt!

'); } -//Parameter wenn nur Bewerbermeldung durchgeführt werden soll -$nur_bewerber=filter_input(INPUT_GET, 'nur_bewerber', FILTER_VALIDATE_BOOLEAN); - /* standortcode 22=Wien derzeit fuer alle Studierende der gleiche Standort @@ -273,58 +270,57 @@ if($result_in = $db->db_query($qry_in)) } } -if ($nur_bewerber !== true) +//Hauptselect +// An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird +if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) { - //Hauptselect - // An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird - if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) - { - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - )) - ORDER BY student_uid, nachname, vorname - "; - } - else - { - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." - AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") - AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' - OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) - OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") - OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - ))) - ORDER BY student_uid, nachname, vorname - "; - } + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + )) + ORDER BY student_uid, nachname, vorname + "; +} +else +{ + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." + AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") + AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' + OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) + OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") + OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + ))) + ORDER BY student_uid, nachname, vorname + "; } -$datei.=" +if($result = $db->db_query($qry)) +{ + $header =" ".$erhalter." ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." @@ -332,34 +328,48 @@ $datei.=" ".$stg_kz.""; -if($nur_bewerber !== true && $result = $db->db_query($qry)) -{ + + $datei .= $header; + $dateiNurBewerber .= $header; + while($row = $db->db_fetch_object($result)) { $datei.= GenerateXMLStudentBlock($row); } -} -//Bewerberblock bei Ausserordentlichen nicht anzeigen -if($stg_kz!=('9'.$erhalter)) -{ - $stg_obj = new studiengang(); - - if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) + //Bewerberblock bei Ausserordentlichen nicht anzeigen + if($stg_kz!=('9'.$erhalter)) { - $orgcodes = array_unique($orgform_code_array); - //Mischform - foreach($orgcodes as $code) - $datei.= GenerateXMLBewerberBlock($code); + $stg_obj = new studiengang(); + + if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) + { + $orgcodes = array_unique($orgform_code_array); + //Mischform + foreach($orgcodes as $code) + { + $bewerberBlock=GenerateXMLBewerberBlock($code); + $datei.=$bewerberBlock; + $dateiNurBewerber.=$bewerberBlock; + } + } + else + { + $bewerberBlock=GenerateXMLBewerberBlock(); + $datei.=$bewerberBlock; + $dateiNurBewerber.=$bewerberBlock; + } } - else - $datei.= GenerateXMLBewerberBlock(); } -$datei.=" +$footer=" "; + +$datei.=$footer; +$dateiNurBewerber.=$footer; + echo ' @@ -598,6 +608,12 @@ $dateiausgabe=fopen($ddd,'w'); fwrite($dateiausgabe,$datei); fclose($dateiausgabe); +$dddNurBew='bisdaten/bismeldung_bewerber_'.$ssem.'_Stg'.$stg_kz.'.xml'; + +$dateiausgabe=fopen($dddNurBew,'w'); +fwrite($dateiausgabe,$dateiNurBewerber); +fclose($dateiausgabe); + $eee='bisdaten/tabelle_'.$ssem.'_Stg'.$stg_kz.'.html'; $dateiausgabe=fopen($eee,'w'); @@ -608,6 +624,7 @@ if(file_exists($ddd)) { echo 'BIS-Meldung Stg '.$stg_kz.' archivieren
'; echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.'
'; + echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.' - nur Bewerberdaten
'; } if(file_exists($eee)) { From e4aa42ad586049f6ab882c4dfbcdb08c0e4b32b7 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 21 Jul 2021 10:39:52 +0200 Subject: [PATCH 78/84] models/CL/Messages_model->getVorlage now filters out the _not_ active templates --- application/models/CL/Messages_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 9ffd12cf6..4975af382 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -612,9 +612,9 @@ class Messages_model extends CI_Model if (!isEmptyString($vorlage_kurzbz)) { $this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel'); - $this->VorlagestudiengangModel->addOrder('version','DESC'); + $this->VorlagestudiengangModel->addOrder('version', 'DESC'); - $getVorlage = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz)); + $getVorlage = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz, 'aktiv' => true)); } return $getVorlage; From c2527e1b137669464b3f4cd7fc293fbf403722b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Thu, 22 Jul 2021 15:03:27 +0200 Subject: [PATCH 79/84] Updated FHComplete Domain --- cis/index.html | 2 +- cis/index_login.php | 2 +- content/fasoverlay.js.php | 2 +- content/tempus.js.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cis/index.html b/cis/index.html index 792be7e10..2a3809f6f 100644 --- a/cis/index.html +++ b/cis/index.html @@ -25,7 +25,7 @@ -
Powered by FH Complete
+
Powered by FH Complete


diff --git a/cis/index_login.php b/cis/index_login.php index 4c4d75f93..74c87f649 100644 --- a/cis/index_login.php +++ b/cis/index_login.php @@ -69,7 +69,7 @@ if(isset($_GET['login'])) -
Powered by FH Complete
+
Powered by FH Complete


diff --git a/content/fasoverlay.js.php b/content/fasoverlay.js.php index f7a30158f..9504285ce 100644 --- a/content/fasoverlay.js.php +++ b/content/fasoverlay.js.php @@ -1539,7 +1539,7 @@ function OpenAboutDialog() // **** function OpenManual() { - window.open('https://wiki.fhcomplete.org/doku.php?','_blank'); + window.open('https://wiki.fhcomplete.info/','_blank'); } // **** diff --git a/content/tempus.js.php b/content/tempus.js.php index e4dad5e43..5a734ebf3 100644 --- a/content/tempus.js.php +++ b/content/tempus.js.php @@ -473,7 +473,7 @@ function SyncLVPlan() // **** function OpenManualTempus() { - window.open('https://wiki.fhcomplete.org/doku.php?id=tempus:allgemeines','Manual'); + window.open('https://wiki.fhcomplete.info/doku.php?id=tempus:allgemeines','Manual'); } // **** From 6267a1bc37f8ed2c7db4dd507d9b125ad283a5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 23 Jul 2021 13:06:15 +0200 Subject: [PATCH 80/84] =?UTF-8?q?-=20Hautpberuf=20wird=20im=20CIS=20Profil?= =?UTF-8?q?=20angezeigt=20f=C3=BCr=20den=20Mitarbeiter=20-=20Fehler=20beho?= =?UTF-8?q?ben=20wodurch=20die=20letzte=20Verwendung=20nicht=20korrekt=20e?= =?UTF-8?q?rmittelt=20wurde=20wenn=20das=20Ende=20Datum=20leer=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/index.php | 17 +++++++++++++++++ include/bisverwendung.class.php | 8 +++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index dd39cf301..80062a932 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -44,6 +44,7 @@ require_once('../../../include/addon.class.php'); require_once('../../../include/gruppe.class.php'); require_once('../../../include/adresse.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/bisverwendung.class.php'); $sprache = getSprache(); $p = new phrasen($sprache); @@ -271,6 +272,22 @@ if (!$ansicht) } +if (!$ansicht) +{ + if ($is_employee) + { + $verwendung = new bisverwendung(); + if($verwendung->getLastVerwendung($uid)) + { + if (!$verwendung->hauptberuflich) + { + echo 'Hauptberuf: '. $verwendung->hauptberuf; + } + } + echo "

"; + } +} + if (!$ansicht) { $adresse = new adresse(); diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index 799cfc93e..07f2a74de 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -524,12 +524,13 @@ class bisverwendung extends basis_db { //laden des Datensatzes $qry = "SELECT - * + *, tbl_hauptberuf.bezeichnung as hauptberuf FROM bis.tbl_bisverwendung + LEFT JOIN bis.tbl_hauptberuf USING(hauptberufcode) WHERE mitarbeiter_uid=".$this->db_add_param($uid)." - ORDER BY ende DESC NULLS LAST,beginn DESC NULLS LAST LIMIT 1;"; + ORDER BY ende DESC NULLS FIRST,beginn DESC NULLS LAST LIMIT 1;"; if($this->db_query($qry)) { @@ -543,6 +544,7 @@ class bisverwendung extends basis_db $this->mitarbeiter_uid = $row->mitarbeiter_uid; $this->hauptberufcode = $row->hauptberufcode; $this->hauptberuflich = $this->db_parse_bool($row->hauptberuflich); + $this->hauptberuf = $row->hauptberuf; $this->habilitation = $this->db_parse_bool($row->habilitation); $this->beginn = $row->beginn; $this->ende = $row->ende; @@ -582,7 +584,7 @@ class bisverwendung extends basis_db (beginn<=now() OR beginn IS NULL) AND (ende>=now() OR ende IS NULL) - ORDER BY ende DESC NULLS LAST,beginn DESC NULLS LAST LIMIT 1;"; + ORDER BY ende DESC NULLS FIRST,beginn DESC NULLS LAST LIMIT 1;"; if($this->db_query($qry)) { From 023994b12cb8dfc4f9e4d894b29c5b300e774ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 23 Jul 2021 13:07:23 +0200 Subject: [PATCH 81/84] =?UTF-8?q?PHP=20Error=20behoben=20wenn=20Lehrauftr?= =?UTF-8?q?=C3=A4ge=20f=C3=BCr=20einzelne=20Studieng=C3=A4nge=20erstellt?= =?UTF-8?q?=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rdf/lehrauftrag_annehmen.xml.php | 90 ++++++++++++++++---------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/rdf/lehrauftrag_annehmen.xml.php b/rdf/lehrauftrag_annehmen.xml.php index c0f691fe3..990701901 100644 --- a/rdf/lehrauftrag_annehmen.xml.php +++ b/rdf/lehrauftrag_annehmen.xml.php @@ -275,29 +275,29 @@ function drawLehrauftrag($uid) FROM campus.vw_lehreinheit JOIN lehre.tbl_lehreinheitmitarbeiter lema USING (lehreinheit_id, mitarbeiter_uid) - JOIN lehre.tbl_vertrag_vertragsstatus vvst USING (vertrag_id) + JOIN lehre.tbl_vertrag_vertragsstatus vvst USING (vertrag_id) WHERE mitarbeiter_uid=".$db->db_add_param($uid)." AND studiensemester_kurzbz=".$db->db_add_param($ss). " - AND lema.vertrag_id IS NOT NULL - AND vertragsstatus_kurzbz = 'akzeptiert'"; + AND lema.vertrag_id IS NOT NULL + AND vertragsstatus_kurzbz = 'akzeptiert'"; if ($studiengang_kz != '') //$studiengang_kz!='0' && - { - $qry .= " AND lv_studiengang_kz=".$db->db_add_param($studiengang_kz); - } + { + $qry .= " AND lv_studiengang_kz=".$db->db_add_param($studiengang_kz); + } elseif (!empty($xsl_oe_kurzbz)) - { - if ($xsl_oe_kurzbz == 'etw') - { - $qry .= " AND lv_studiengang_kz > 0"; - } + { + if ($xsl_oe_kurzbz == 'etw') + { + $qry .= " AND lv_studiengang_kz > 0"; + } - if ($xsl_oe_kurzbz == 'lehrgang') - { - $qry .= " AND lv_studiengang_kz <= 0"; - } - } + if ($xsl_oe_kurzbz == 'lehrgang') + { + $qry .= " AND lv_studiengang_kz <= 0"; + } + } $qry .= " ORDER BY lv_orgform_kurzbz, lv_bezeichnung, lehreinheit_id"; $lv = array(); @@ -390,8 +390,8 @@ function drawLehrauftrag($uid) $gesamtstunden = $gesamtstunden + $stunden; } } - $qry = 'SELECT - pa.projektarbeit_id, + $qry = 'SELECT + pa.projektarbeit_id, pb.faktor, pb.stunden, pb.stundensatz, @@ -401,37 +401,37 @@ function drawLehrauftrag($uid) student.studiengang_kz, projekttyp_kurzbz, lv.oe_kurzbz, - vertragsstatus_kurzbz + vertragsstatus_kurzbz FROM lehre.tbl_projektbetreuer pb - JOIN lehre.tbl_projektarbeit pa USING (projektarbeit_id) - JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id) - JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id) - JOIN PUBLIC.tbl_organisationseinheit oe USING (oe_kurzbz) - JOIN public.tbl_benutzer benutzer ON pb.person_id = benutzer.person_id - JOIN campus.vw_student student ON pa.student_uid = student.uid - LEFT JOIN lehre.tbl_vertrag vertrag USING (vertrag_id) - LEFT JOIN lehre.tbl_vertrag_vertragsstatus vvst USING (vertrag_id) + JOIN lehre.tbl_projektarbeit pa USING (projektarbeit_id) + JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id) + JOIN PUBLIC.tbl_organisationseinheit oe USING (oe_kurzbz) + JOIN public.tbl_benutzer benutzer ON pb.person_id = benutzer.person_id + JOIN campus.vw_student student ON pa.student_uid = student.uid + LEFT JOIN lehre.tbl_vertrag vertrag USING (vertrag_id) + LEFT JOIN lehre.tbl_vertrag_vertragsstatus vvst USING (vertrag_id) WHERE pb.vertrag_id IS NOT NULL - AND vvst.vertragsstatus_kurzbz = \'akzeptiert\' - AND benutzer.uid = '.$db->db_add_param($uid).' - AND le.studiensemester_kurzbz = '.$db->db_add_param($ss); + AND vvst.vertragsstatus_kurzbz = \'akzeptiert\' + AND benutzer.uid = '.$db->db_add_param($uid).' + AND le.studiensemester_kurzbz = '.$db->db_add_param($ss); if ($studiengang_kz != '') - { - $qry .= " AND tbl_lehrveranstaltung.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER); - } - elseif (!empty($xsl_oe_kurzbz)) - { - if ($xsl_oe_kurzbz == 'etw') - { - $qry .= " AND lv.studiengang_kz > 0"; - } + { + $qry .= " AND lv.studiengang_kz=".$db->db_add_param($studiengang_kz, FHC_INTEGER); + } + elseif (!empty($xsl_oe_kurzbz)) + { + if ($xsl_oe_kurzbz == 'etw') + { + $qry .= " AND lv.studiengang_kz > 0"; + } - if ($xsl_oe_kurzbz == 'lehrgang') - { - $qry .= " AND lv.studiengang_kz <= 0"; - } - } + if ($xsl_oe_kurzbz == 'lehrgang') + { + $qry .= " AND lv.studiengang_kz <= 0"; + } + } if ($result = $db->db_query($qry)) { @@ -471,8 +471,6 @@ function drawLehrauftrag($uid) } } - - foreach ($lv as $lv_row) { $xml .= ' From c8cfc49af93dbbd6a6ab48bbad32913954269c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 23 Jul 2021 13:59:21 +0200 Subject: [PATCH 82/84] =?UTF-8?q?Mailempf=C3=A4nger=20bei=20Urlaubsfreigab?= =?UTF-8?q?email=20korrigiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/urlaubsfreigabe.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cis/private/profile/urlaubsfreigabe.php b/cis/private/profile/urlaubsfreigabe.php index 384a3415d..f71d7adda 100644 --- a/cis/private/profile/urlaubsfreigabe.php +++ b/cis/private/profile/urlaubsfreigabe.php @@ -154,10 +154,10 @@ if (isset($_GET['action']) && $_GET['action'] == 'freigabe') } //Bestätigungsmail an Mitarbeiter*in - $to = $uid. '@'.DOMAIN; + $to = $zeitsperre->mitarbeiter_uid. '@'.DOMAIN; $person = new person(); $fullNameVG = $person->getFullNameFromBenutzer($user); - $fullNameMA = $person->getFullNameFromBenutzer($uid); + $fullNameMA = $person->getFullNameFromBenutzer($zeitsperre->mitarbeiter_uid); $from = 'noreply@'.DOMAIN; $subject = $p->t('urlaubstool/urlaubsfreigabe'). date("d.m.Y", strtotime($zeitsperre->vondatum)). " ". $p->t('urlaubstool/bis'). " ". date("d.m.Y", strtotime($zeitsperre->bisdatum)); @@ -166,7 +166,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'freigabe') $p->t('urlaubstool/bis')." ".date("d.m.Y", strtotime($zeitsperre->bisdatum)); $text .= $p->t('urlaubstool/urlaubBis', array($fullNameVG)); $text .= "\n". "\n". $p->t('urlaubstool/sieKoennenDiesenUnterFolgenderAdresseEinsehen'); - $text .= "\n". APP_ROOT. 'cis/private/profile/urlaubstool.php?uid='. $uid; + $text .= "\n". APP_ROOT. 'cis/private/profile/urlaubstool.php'; $mail = new mail($to, $from, $subject, $text); @@ -228,7 +228,7 @@ function draw_monat($monat) if ($vertretung->uid != '') echo ' (Vertretung: '.$vertretung->nachname.')'; if($row->freigabeamum=='') - echo " zeitsperre_id&year=$year&uid=$row->mitarbeiter_uid' class='Item'>Freigabe"; + echo " zeitsperre_id&year=$year&uid=$uid' class='Item'>Freigabe"; echo ""; echo '
'; } From c8919f2878858b5e27ab630cc4259d11f333d658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 23 Jul 2021 15:17:43 +0200 Subject: [PATCH 83/84] =?UTF-8?q?Benotungstool=20zeigt=20den=20Namen=20sta?= =?UTF-8?q?tt=20der=20UID=20bei=20der=20Anlage=20von=20Nachpr=C3=BCfungste?= =?UTF-8?q?rminen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lehre/benotungstool/lvgesamtnoteverwalten.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php index 713b93dc5..407502178 100644 --- a/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php +++ b/cis/private/lehre/benotungstool/lvgesamtnoteverwalten.php @@ -12,10 +12,13 @@ * 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: Christian Paminger , + * + * Authors: + * Christian Paminger , * Andreas Oesterreicher and * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > + * Manuela Thamer */ require_once ('../../../../config/cis.config.inc.php'); require_once ('../../../../config/global.config.inc.php'); @@ -306,6 +309,8 @@ foreach ($noten_obj->result as $row) { if(typeof(typ)=='undefined') typ = 'Termin2'; + var nn = document.getElementById(uid+"_nn").innerHTML; + var vn = document.getElementById(uid+"_vn").innerHTML; var str = "
"; str += ""; @@ -314,7 +319,7 @@ foreach ($noten_obj->result as $row) anlegendiv.style.top = y+"px"; var x = getOffset('x'); x = x+300; anlegendiv.style.left = x+"px"; - str += ""; + str += ""; str += ""; str += " - - '; + + '; // Bereits eingetragene Note ermitteln if ($lvgesamtnote = new lvgesamtnote($lvid, $uid, $stsem)) From cb855e786471703a8052804a7de9d9b57264bb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Wed, 28 Jul 2021 19:05:48 +0200 Subject: [PATCH 84/84] =?UTF-8?q?Zeitaufzeichnungspflichtig=20Pr=C3=BCfung?= =?UTF-8?q?=20auf=20Zeitraum=20erweitert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/bisverwendung.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index bbe5c37dc..598edcac1 100644 --- a/include/bisverwendung.class.php +++ b/include/bisverwendung.class.php @@ -817,16 +817,22 @@ class bisverwendung extends basis_db } } - public function inZeitaufzeichnungspflichtigPeriod($date) + public function inZeitaufzeichnungspflichtigPeriod($PeriodStartDate, $PeriodEndDate) { - $dateToCheck = date('Y-m-d', strtotime($date)); + $PeriodStartDateISO = date('Y-m-d', strtotime($PeriodStartDate)); + $PeriodEndDateISO = date('Y-m-d', strtotime($PeriodEndDate)); + $beginn = date('Y-m-d', strtotime($this->beginn)); $end = date('Y-m-d', strtotime($this->ende)); $zp = $this->zeitaufzeichnungspflichtig; if ($zp) { - if (($dateToCheck >= $beginn) && (($dateToCheck <= $end) OR is_null($this->ende))) + if ( + (($PeriodStartDateISO >= $beginn) && (($PeriodStartDateISO <= $end) || is_null($this->ende))) + || + (($PeriodEndDateISO >= $beginn) && (($PeriodEndDateISO <= $end) || is_null($this->ende))) + ) { return true; }
X
t('benotungstool/pruefungAnlegenFuer');?> "+uid+":
t('benotungstool/pruefungAnlegenFuer');?> "+nn+" "+vn+":
t('global/datum');?>:"; str += ""; @@ -1166,8 +1171,8 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG $htmlstring .= '
' . $db->convert_html_chars($uid) . '' . $db->convert_html_chars($data['nachname']) . '' . $db->convert_html_chars($data['vorname']) . '' . $db->convert_html_chars($data['nachname']) . '' . $db->convert_html_chars($data['vorname']) . '