From 0239246ab09c6c3ef8f6001f0c956b7451af5128 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 7 Feb 2020 15:11:00 +0100 Subject: [PATCH 001/301] - 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 002/301] 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 a86dcbd290c6fd9e7239315a088a0292e87580c9 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 11 Nov 2020 23:29:18 +0100 Subject: [PATCH 003/301] - Added matr_aktiv to person table for indication of not yet active matrikelnummern - PersonModel getPersonStammdaten: staatsbuergerschafts- and geburtsnationcode are also retrieved --- application/models/person/Person_model.php | 3 ++- system/dbupdate_3.3.php | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index d8ddb381c..f200bb3c3 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -152,7 +152,8 @@ class Person_model extends DB_Model */ public function getPersonStammdaten($person_id, $zustellung_only = false) { - $this->addSelect('public.tbl_person.*, s.kurztext as staatsbuergerschaft, g.kurztext as geburtsnation'); + $this->addSelect('public.tbl_person.*, tbl_person.staatsbuergerschaft AS staatsbuergerschaft_code, tbl_person.geburtsnation AS geburtsnation_code, + s.kurztext as staatsbuergerschaft, g.kurztext as geburtsnation'); $this->addJoin('bis.tbl_nation s', 'public.tbl_person.staatsbuergerschaft = s.nation_code', 'LEFT'); $this->addJoin('bis.tbl_nation g', 'public.tbl_person.geburtsnation = g.nation_code', 'LEFT'); diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 62682fb75..55f971d7d 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4428,6 +4428,25 @@ if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE } } +//Spalte matr_aktiv in tbl_person zum Markieren von noch nicht scharfgeschaltenen Matrikelnummern vom Datenverbund +if(!$result = @$db->db_query("SELECT matr_aktiv FROM public.tbl_person LIMIT 1")) +{ + $qry = "ALTER TABLE public.tbl_person ADD COLUMN matr_aktiv boolean NOT NULL DEFAULT false; + COMMENT ON COLUMN public.tbl_person.matr_aktiv IS 'Zeigt an, ob Matrikelnummer aktiv oder nur vorläufig ist.';"; + + if(!$db->db_query($qry)) + echo 'public.tbl_person: '.$db->db_last_error().'
'; + else + echo '
public.tbl_person: Spalte matr_aktiv hinzugefuegt'; + + $qry = "UPDATE public.tbl_person SET matr_aktiv = true;"; + + if(!$db->db_query($qry)) + echo 'public.tbl_person: '.$db->db_last_error().'
'; + else + echo '
public.tbl_person: Spalte matr_aktiv auf true gesetzt'; +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

'; @@ -4627,7 +4646,7 @@ $tabellen=array( "public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"), "public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre","standort","warn_semesterstunden_frei","warn_semesterstunden_fix","standort_id"), "public.tbl_organisationseinheittyp" => array("organisationseinheittyp_kurzbz", "bezeichnung", "beschreibung"), - "public.tbl_person" => array("person_id","staatsbuergerschaft","geburtsnation","sprache","anrede","titelpost","titelpre","nachname","vorname","vornamen","gebdatum","gebort","gebzeit","foto","anmerkung","homepage","svnr","ersatzkennzeichen","familienstand","geschlecht","anzahlkinder","aktiv","insertamum","insertvon","updateamum","updatevon","ext_id","bundesland_code","kompetenzen","kurzbeschreibung","zugangscode", "foto_sperre","matr_nr","zugangscode_timestamp","udf_values","bpk"), + "public.tbl_person" => array("person_id","staatsbuergerschaft","geburtsnation","sprache","anrede","titelpost","titelpre","nachname","vorname","vornamen","gebdatum","gebort","gebzeit","foto","anmerkung","homepage","svnr","ersatzkennzeichen","familienstand","geschlecht","anzahlkinder","aktiv","insertamum","insertvon","updateamum","updatevon","ext_id","bundesland_code","kompetenzen","kurzbeschreibung","zugangscode", "foto_sperre","matr_nr","zugangscode_timestamp","udf_values","bpk","matr_aktiv"), "public.tbl_person_fotostatus" => array("person_fotostatus_id","person_id","fotostatus_kurzbz","datum","insertamum","insertvon","updateamum","updatevon"), "public.tbl_personfunktionstandort" => array("personfunktionstandort_id","funktion_kurzbz","person_id","standort_id","position","anrede"), "public.tbl_preincoming" => array("preincoming_id","person_id","mobilitaetsprogramm_code","zweck_code","firma_id","universitaet","aktiv","bachelorthesis","masterthesis","von","bis","uebernommen","insertamum","insertvon","updateamum","updatevon","anmerkung","zgv","zgv_ort","zgv_datum","zgv_name","zgvmaster","zgvmaster_datum","zgvmaster_ort","zgvmaster_name","program_name","bachelor","master","jahre","person_id_emergency","person_id_coordinator_dep","person_id_coordinator_int","code","deutschkurs1","deutschkurs2","research_area","deutschkurs3","ext_id"), From 3c2fdc1991c23601d274235557dbeb185f21567e Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 25 Nov 2020 16:31:13 +0100 Subject: [PATCH 004/301] added Aufenthaltsfoerderung_model --- .../models/codex/Aufenthaltfoerderung_model.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 application/models/codex/Aufenthaltfoerderung_model.php diff --git a/application/models/codex/Aufenthaltfoerderung_model.php b/application/models/codex/Aufenthaltfoerderung_model.php new file mode 100644 index 000000000..b650b3a05 --- /dev/null +++ b/application/models/codex/Aufenthaltfoerderung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_aufenthaltfoerderung'; + $this->pk = 'aufenthaltfoerderung_code'; + } +} From ace636ef52832991ef2ecc7100105df2fa79e7b2 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 27 Nov 2020 03:03:37 +0100 Subject: [PATCH 005/301] workerqueues (JQW_Controller and JobsQueueLib.php): added getJobsByTypeStatus method --- application/core/JQW_Controller.php | 13 +++++++++++++ application/libraries/JobsQueueLib.php | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/application/core/JQW_Controller.php b/application/core/JQW_Controller.php index 72a2a972b..2d471f03b 100644 --- a/application/core/JQW_Controller.php +++ b/application/core/JQW_Controller.php @@ -47,6 +47,19 @@ abstract class JQW_Controller extends JOB_Controller return $jobs; } + /** + * To get all the jobs specified by the given parameters + */ + protected function getJobsByTypeStatus($type, $status) + { + $jobs = $this->jobsqueuelib->getJobsByTypeStatus($type, $status); + + // If an error occurred then log it in database + if (isError($jobs)) $this->logError(getError($jobs), array($type, $status)); + + return $jobs; + } + /** * To get all the jobs specified by the given parameters */ diff --git a/application/libraries/JobsQueueLib.php b/application/libraries/JobsQueueLib.php index 0eb7c9b72..aaa318b97 100644 --- a/application/libraries/JobsQueueLib.php +++ b/application/libraries/JobsQueueLib.php @@ -56,6 +56,18 @@ class JobsQueueLib return $this->_ci->JobsQueueModel->loadWhere(array('status' => self::STATUS_NEW, 'type' => $type)); } + /** + * To get all the jobs specified by the given parameters + */ + public function getJobsByTypeStatus($type, $status) + { + $this->_ci->JobsQueueModel->resetQuery(); + + $this->_ci->JobsQueueModel->addOrder('creationtime', 'DESC'); + + return $this->_ci->JobsQueueModel->loadWhere(array('status' => $status, 'type' => $type)); + } + /** * To get all the jobs specified by the given parameters */ From d9d71c42ce26b92735ec420c54964f1822ddbd36 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 17 Feb 2021 18:54:53 +0100 Subject: [PATCH 006/301] Added feature to withdraw approvals/rejections for STGL Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 44 +++++++++++- .../models/education/Anrechnung_model.php | 15 ++++ .../anrechnung/approveAnrechnungDetail.php | 11 ++- .../anrechnung/approveAnrechnungDetail.js | 69 +++++++++++++++++++ system/phrasesupdate.php | 60 ++++++++++++++++ 5 files changed, 197 insertions(+), 2 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index c5e4b94d8..0b79c3b89 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -25,7 +25,8 @@ class approveAnrechnungDetail extends Auth_Controller 'download' => 'lehre/anrechnung_genehmigen:rw', 'approve' => 'lehre/anrechnung_genehmigen:rw', 'reject' => 'lehre/anrechnung_genehmigen:rw', - 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw' + 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw', + 'withdraw' => 'lehre/anrechnung_genehmigen:rw' ) ); @@ -275,6 +276,47 @@ class approveAnrechnungDetail extends Auth_Controller return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); } } + + /** + * Withdraw approved / rejected Anrechnung and reset to 'inProgressDP'. + */ + public function withdraw() + { + $anrechnung_id = $this->input->post('anrechnung_id'); + + if (!is_numeric($anrechnung_id)) + { + show_error('Wrong parameter.'); + } + + // Get last Anrechnungstatus + if (!$result = getData($this->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error('Failed loading Anrechnung'); + } + + $last_status = $result->status_kurzbz; + $anrechnungstatus_id = $result->anrechnungstatus_id; + + // Return if last status is not approved / rejected + if ($last_status != self::ANRECHNUNGSTATUS_APPROVED && $last_status != self::ANRECHNUNGSTATUS_REJECTED) + { + return $this->outputJsonError('Nothing to withdraw. Application is still in progress.'); + } + + // Withdraw status approved / rejected + $result = $this->AnrechnungModel->deleteAnrechnungstatus($anrechnungstatus_id); + + if (isError($result)) + { + return $this->outputJsonError('Could not withdraw this application.'); + } + + // Success output to AJAX + return $this->outputJsonSuccess(array( + 'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id)) + ); + } /** * Download and open uploaded document (Nachweisdokument). diff --git a/application/models/education/Anrechnung_model.php b/application/models/education/Anrechnung_model.php index b4c7de835..ce0cfe8d8 100644 --- a/application/models/education/Anrechnung_model.php +++ b/application/models/education/Anrechnung_model.php @@ -83,4 +83,19 @@ class Anrechnung_model extends DB_Model return $this->execQuery($qry, array($anrechnung_id)); } + + /** + * Delete Anrechnungstatus. + * + * @param $anrechnungstatus_id + */ + public function deleteAnrechnungstatus($anrechnungstatus_id){ + + $qry = ' + DELETE FROM lehre.tbl_anrechnung_anrechnungstatus + WHERE anrechnungstatus_id = ? + '; + + return $this->execQuery($qry, array($anrechnungstatus_id)); + } } diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index 75059ec69..e30fb8da5 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -36,7 +36,11 @@ $this->load->view( 'lehrveranstaltung', 'ects', 'lektor', - ) + ), + 'anrechnung' => array( + 'genehmigungAblehnungWirklichZuruecknehmen', + 'erfolgreichZurueckgenommen' + ) ), 'customCSSs' => array( 'public/css/Tabulator.css' @@ -327,6 +331,11 @@ $this->load->view(
+
+
@@ -311,11 +311,11 @@ $this->load->view(
@@ -333,14 +333,17 @@ $this->load->view(
diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 91d821fde..7ec175384 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -155,11 +155,12 @@ $this->load->view(
-
@@ -173,11 +174,12 @@ $this->load->view(
-
@@ -221,11 +223,14 @@ $this->load->view(
+ class="btn btn-default btn-w200 btn-mr50" type="button"> + p->t('anrechnung', 'empfehlungAnfordern')); ?> + class="btn btn-danger btn-w200" type="button"> + p->t('global', 'ablehnen')); ?> + class="btn btn-primary btn-w200" type="button"> + p->t('global', 'genehmigen')); ?>
diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index 455c31e65..8e0fc4b46 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -209,11 +209,11 @@ $this->load->view(
@@ -229,11 +229,11 @@ $this->load->view(
@@ -248,10 +248,12 @@ $this->load->view(
diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php index 55c82b4e3..c3ca0754a 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php @@ -154,11 +154,12 @@ $this->load->view(
-
@@ -172,11 +173,12 @@ $this->load->view(
-
@@ -222,9 +224,11 @@ $this->load->view(
+ class="btn btn-danger btn-w200" type="button"> + p->t('anrechnung', 'nichtEmpfehlen')); ?> + class="btn btn-primary btn-w200" type="button"> + p->t('anrechnung', 'empfehlen')); ?>
diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js index 33cce7118..872da890b 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -43,9 +43,6 @@ $(function(){ // Approve Anrechnungen $("#approveAnrechnungDetail-approve-anrechnung-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -107,9 +104,6 @@ $(function(){ // Reject Anrechnungen $("#approveAnrechnungDetail-reject-anrechnung-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -167,10 +161,7 @@ $(function(){ }); // Request Recommendation for Anrechnungen - $("#approveAnrechnungDetail-request-recommendation").click(function(e){ - - // Avoid form redirecting automatically - e.preventDefault(); + $("#approveAnrechnungDetail-request-recommendation").click(function(){ // Get form data let form_data = $('form').serializeArray(); @@ -212,10 +203,7 @@ $(function(){ }); // Request Recommendation for Anrechnungen - $("#approveAnrechnungDetail-withdraw-anrechnung-approvement").click(function(e){ - - // Avoid form redirecting automatically - e.preventDefault(); + $("#approveAnrechnungDetail-withdraw-anrechnung-approvement").click(function(){ if(!confirm(FHC_PhrasesLib.t("anrechnung", "genehmigungAblehnungWirklichZuruecknehmen"))) { @@ -276,7 +264,7 @@ $(function(){ // Break Begruendung abgeben $('#approveAnrechnungDetail-begruendung-abbrechen').click(function(){ - $('#approveAnrechnungDetail-begruendung').val(''); + begruendung_panel.slideUp('slow'); }) diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index b5be4c3a2..112d48f85 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -223,9 +223,6 @@ $(function(){ // Approve Anrechnungen $("#approveAnrechnungUebersicht-approve-anrechnungen-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -298,9 +295,6 @@ $(function(){ // Reject Anrechnungen $("#approveAnrechnungUebersicht-reject-anrechnungen-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -370,10 +364,7 @@ $(function(){ }); // Request Recommendation for Anrechnungen - $("#approveAnrechnungUebersicht-request-recommendation").click(function(e){ - - // Avoid form redirecting automatically - e.preventDefault(); + $("#approveAnrechnungUebersicht-request-recommendation").click(function(){ // Get selected rows data let selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData'); @@ -444,7 +435,7 @@ $(function(){ // Break Ablehnung abgeben $('#approveAnrechnungUebersicht-begruendung-abbrechen').click(function(){ - $('#approveAnrechnungUebersicht-begruendung').val(''); + begruendung_panel.slideUp('slow'); }) diff --git a/public/js/lehre/anrechnung/reviewAnrechnungDetail.js b/public/js/lehre/anrechnung/reviewAnrechnungDetail.js index 6648792bd..d4f8ec5a7 100644 --- a/public/js/lehre/anrechnung/reviewAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/reviewAnrechnungDetail.js @@ -49,9 +49,6 @@ $(function(){ // Recommend Anrechnung $("#reviewAnrechnungDetail-recommend-anrechnung-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -113,9 +110,6 @@ $(function(){ // Dont recommend Anrechnung $("#reviewAnrechnungDetail-dont-recommend-anrechnung-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -180,7 +174,7 @@ $(function(){ // Break Begruendung abgeben $('#reviewAnrechnungDetail-begruendung-abbrechen').click(function(){ - $('#reviewAnrechnungDetail-begruendung').val(''); + begruendung_panel.slideUp('slow'); }) diff --git a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js index b4efd2cf7..1785bc6b1 100644 --- a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js @@ -221,9 +221,6 @@ $(function(){ // Recommend Anrechnungen $("#reviewAnrechnungUebersicht-recommend-anrechnungen-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -297,9 +294,6 @@ $(function(){ // Dont recommend Anrechnungen $("#reviewAnrechnungUebersicht-dont-recommend-anrechnungen-confirm").click(function(e){ - // Avoid form redirecting automatically - e.preventDefault(); - // Avoid bubbling click event to sibling break button e.stopImmediatePropagation(); @@ -376,7 +370,7 @@ $(function(){ // Break Begruendung abgeben $('#reviewAnrechnungUebersicht-begruendung-abbrechen').click(function(){ - $('#reviewAnrechnungUebersicht-begruendung').val(''); + begruendung_panel.slideUp('slow'); }) From 83b1286e085b016954328c37b79e7302ddf34683 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 23 Feb 2021 14:21:21 +0100 Subject: [PATCH 015/301] Added column Antragsdatum to STGL/Lector Overview Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungUebersichtData.php | 3 +++ .../anrechnung/reviewAnrechnungUebersichtData.php | 3 +++ .../anrechnung/approveAnrechnungUebersicht.js | 14 ++++++++++++++ .../lehre/anrechnung/reviewAnrechnungUebersicht.js | 14 ++++++++++++++ 4 files changed, 34 insertions(+) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index 0ee3fdc57..10521b100 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -20,6 +20,7 @@ $query = ' begruendung.bezeichnung AS "begruendung", dmsversion.name AS "dokument_bezeichnung", anrechnung.anmerkung_student, + anrechnung.insertamum::date AS "antragsdatum", empfehlung_anrechnung, (SELECT status_kurzbz FROM lehre.tbl_anrechnungstatus @@ -65,6 +66,7 @@ $filterWidgetArray = array( ucfirst($this->p->t('global', 'begruendung')), ucfirst($this->p->t('anrechnung', 'nachweisdokumente')), ucfirst($this->p->t('anrechnung', 'herkunft')), + ucfirst($this->p->t('anrechnung', 'antragdatum')), ucfirst($this->p->t('anrechnung', 'empfehlung')), 'status_kurzbz', 'Status' @@ -117,6 +119,7 @@ $filterWidgetArray = array( target:"_blank" }}, anmerkung_student: {headerFilter:"input"}, + antragsdatum: {align:"center", headerFilter:"input", mutator: mut_formatStringDate}, empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse}, status_kurzbz: {visible: false}, status_bezeichnung: {headerFilter:"input"} diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php index 7382df85b..5f8e2b9d0 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php @@ -20,6 +20,7 @@ $query = ' begruendung.bezeichnung AS "begruendung", dmsversion.name AS "dokument_bezeichnung", anrechnung.anmerkung_student, + anrechnung.insertamum::date AS "antragsdatum", empfehlung_anrechnung, (SELECT status_kurzbz FROM lehre.tbl_anrechnungstatus @@ -75,6 +76,7 @@ $filterWidgetArray = array( ucfirst($this->p->t('global', 'begruendung')), ucfirst($this->p->t('anrechnung', 'nachweisdokumente')), ucfirst($this->p->t('anrechnung', 'herkunft')), + ucfirst($this->p->t('anrechnung', 'antragdatum')), ucfirst($this->p->t('anrechnung', 'empfehlung')), 'status_kurzbz', 'Status' @@ -127,6 +129,7 @@ $filterWidgetArray = array( target:"_blank" }}, anmerkung_student: {headerFilter:"input"}, + antragsdatum: {align:"center", headerFilter:"input", mutator: mut_formatStringDate}, empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse}, status_kurzbz: {visible: false}, status_bezeichnung: {headerFilter:"input"} diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index 112d48f85..6e4474026 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -9,6 +9,20 @@ const ANRECHNUNGSTATUS_REJECTED = 'rejected'; const COLOR_LIGHTGREY = "#f5f5f5"; +// ----------------------------------------------------------------------------------------------------------------- +// Mutators - setter methods to manipulate table data when entering the tabulator +// ----------------------------------------------------------------------------------------------------------------- + +// Converts string date postgre style to string DD.MM.YYYY. +// This will allow correct filtering. +var mut_formatStringDate = function(value, data, type, params, component) { + if (value != null) + { + var d = new Date(value); + return ("0" + (d.getDate())).slice(-2) + "." + ("0" + (d.getMonth() + 1)).slice(-2) + "." + d.getFullYear(); + } +} + // TABULATOR FUNCTIONS // --------------------------------------------------------------------------------------------------------------------- // Returns relative height (depending on screen size) diff --git a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js index 1785bc6b1..379358eea 100644 --- a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js @@ -9,6 +9,20 @@ const ANRECHNUNGSTATUS_REJECTED = 'rejected'; const COLOR_LIGHTGREY = "#f5f5f5"; +// ----------------------------------------------------------------------------------------------------------------- +// Mutators - setter methods to manipulate table data when entering the tabulator +// ----------------------------------------------------------------------------------------------------------------- + +// Converts string date postgre style to string DD.MM.YYYY. +// This will allow correct filtering. +var mut_formatStringDate = function(value, data, type, params, component) { + if (value != null) + { + var d = new Date(value); + return ("0" + (d.getDate())).slice(-2) + "." + ("0" + (d.getMonth() + 1)).slice(-2) + "." + d.getFullYear(); + } +} + // TABULATOR FUNCTIONS // --------------------------------------------------------------------------------------------------------------------- // Returns relative height (depending on screen size) From 6f27fccc090d0173f205826cf2dc7e64e280c760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 23 Feb 2021 17:55:41 +0100 Subject: [PATCH 016/301] - Corrected Permissions for Anrechnungen - Removed Useless Sequence --- system/dbupdate_3.3.php | 76 ++++++++++------------------------------- 1 file changed, 18 insertions(+), 58 deletions(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index b68d36bfa..d7467ae2c 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -212,21 +212,21 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.vw_msg_vars_user LIMIT 1")) JOIN public.tbl_mitarbeiter ma ON ma.mitarbeiter_uid = b.uid WHERE ma.personalnummer > 0 );'; - + if(!$db->db_query($qry)) echo 'public.vw_msg_vars_user: '.$db->db_last_error().'
'; else echo '
public.vw_msg_vars_user view created'; - + $qry = 'GRANT SELECT ON TABLE public.vw_msg_vars_user TO web;'; - + if(!$db->db_query($qry)) echo 'public.vw_msg_vars_user: '.$db->db_last_error().'
'; else echo '
Granted privileges to web on public.vw_msg_vars_user'; - + $qry = 'GRANT SELECT ON TABLE public.vw_msg_vars_user TO vilesci;'; - + if(!$db->db_query($qry)) echo 'public.vw_msg_vars_user: '.$db->db_last_error().'
'; else @@ -4482,8 +4482,8 @@ if(!$result = @$db->db_query("SELECT dms_id FROM lehre.tbl_anrechnung")) ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN begruendung_id DROP NOT NULL; ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN insertamum SET DEFAULT NOW(); "; - - + + if(!$db->db_query($qry)) echo 'lehre.tbl_anrechnung: '.$db->db_last_error().'
'; else @@ -4558,58 +4558,17 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnungstatus LIMIT 1;" INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('inProgressLektor', '{\"Empfehlung angefordert\",\"recommendation requested\"}'); INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('approved', '{\"genehmigt\",\"approved\"}'); INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('rejected', '{\"abgelehnt\",\"rejected\"}'); - + GRANT SELECT ON lehre.tbl_anrechnungstatus TO web; GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnungstatus TO vilesci; "; - + if(!$db->db_query($qry)) echo 'lehre.tbl_anrechnungstatus: '.$db->db_last_error().'
'; else echo ' lehre.tbl_anrechnungstatus: Tabelle hinzugefuegt
'; } -// GRANT INSERT, UPDATE, DELETE ON TABLE lehre.tbl_anrechnungstatus TO web; (SELECT was granted while adding table anrechnungstatus) -if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_anrechnungstatus' AND table_schema='lehre' AND grantee='web' AND privilege_type='INSERT'")) -{ - if($db->db_num_rows($result) == 0) - { - $qry = 'GRANT INSERT, UPDATE, DELETE ON TABLE lehre.tbl_anrechnungstatus TO web;'; - if (!$db->db_query($qry)) - echo 'lehre.tbl_anrechnungstatus '.$db->db_last_error().'
'; - else - echo '
Granted privileges to web on lehre.tbl_anrechnungstatus'; - } -} - -// SEQUENCE seq_anrechnungstatus_status_kurzbz -if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'seq_anrechnungstatus_status_kurzbz'")) -{ - if ($db->db_num_rows($result) == 0) - { - $qry = ' - CREATE SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - '; - - if(!$db->db_query($qry)) - echo 'lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'
'; - else - echo '
Created sequence: lehre.seq_anrechnungstatus_status_kurzbz'; - - // GRANT SELECT, UPDATE ON SEQUENCE lehre.tbl_anrechnungstatus_status_kurzbz_seq to web; - $qry = 'GRANT SELECT, UPDATE ON SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz TO web;'; - if (!$db->db_query($qry)) - echo 'lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'
'; - else - echo '
Granted privileges to vilesci on lehre.seq_anrechnungstatus_status_kurzbz'; - } -} - // Add table anrechnung_anrechnungstatus // Für bestehende genehmigte Anrechnungsanträge wird ein Eintrag mit dem Status 'approved' angelegt if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatus LIMIT 1;")) @@ -4628,7 +4587,7 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatu ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT pk_anrechnung_anrechnungstatus PRIMARY KEY (anrechnungstatus_id); ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT fk_anrechnung_anrechnungstatus_anrechnung FOREIGN KEY (anrechnung_id) REFERENCES lehre.tbl_anrechnung(anrechnung_id) ON DELETE RESTRICT ON UPDATE CASCADE; ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT fk_anrechnung_anrechnungstatus_anrechnungstatus FOREIGN KEY (status_kurzbz) REFERENCES lehre.tbl_anrechnungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE; - + CREATE SEQUENCE lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id START WITH 1 INCREMENT BY 1 @@ -4636,14 +4595,15 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatu NO MINVALUE CACHE 1; ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ALTER COLUMN anrechnungstatus_id SET DEFAULT nextval('lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id'); - + INSERT INTO lehre.tbl_anrechnung_anrechnungstatus(anrechnung_id, status_kurzbz) SELECT anrechnung_id, 'approved' as status_kurzbz FROM lehre.tbl_anrechnung WHERE genehmigt_von is not null; - - GRANT SELECT ON lehre.tbl_anrechnung_anrechnungstatus TO web; + + GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnung_anrechnungstatus TO web; GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnung_anrechnungstatus TO vilesci; GRANT SELECT, UPDATE ON lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id TO vilesci; + GRANT SELECT, UPDATE ON lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id TO web; "; - + if(!$db->db_query($qry)) echo 'lehre.tbl_anrechnung_anrechnungstatus: '.$db->db_last_error().'
'; else @@ -4669,7 +4629,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht if($db->db_num_rows($result) == 0) { $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('student/anrechnung_beantragen', 'Anrechnung beantragen');"; - + if(!$db->db_query($qry)) echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; else @@ -4683,7 +4643,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht if($db->db_num_rows($result) == 0) { $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_genehmigen', 'Anrechnung genehmigen');"; - + if(!$db->db_query($qry)) echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; else @@ -4697,7 +4657,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht if($db->db_num_rows($result) == 0) { $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_empfehlen', 'Anrechnung empfehlen');"; - + if(!$db->db_query($qry)) echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; else From ee7d51d2b361acccbdfdd3bb060fa20b31b78794 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 15 Mar 2021 23:27:28 +0100 Subject: [PATCH 017/301] =?UTF-8?q?Pruefung=5Fmodel.php:=20method=20for=20?= =?UTF-8?q?retrieving=20Pr=C3=BCfung=20by=20person=20and=20studiensemester?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/education/Pruefung_model.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/application/models/education/Pruefung_model.php b/application/models/education/Pruefung_model.php index d10364979..e3776c4ad 100644 --- a/application/models/education/Pruefung_model.php +++ b/application/models/education/Pruefung_model.php @@ -11,4 +11,29 @@ class Pruefung_model extends DB_Model $this->dbTable = 'campus.tbl_pruefung'; $this->pk = 'pruefung_id'; } + + /** + * Gets Pruefungen of a person for a Studiensemester. + * @param int $person_id + * @param string $studiensemester_kurzbz + * @return object + */ + public function getByPerson($person_id, $studiensemester_kurzbz) + { + $qry = ' + SELECT prfg.*, pers.matr_nr, lv.ects, stg.studiengang_kz, prst.prestudent_id, + UPPER(stg.typ||stg.kurzbz) AS studiengang, stg.bezeichnung AS studiengang_bezeichnung + FROM public.tbl_person pers + JOIN public.tbl_prestudent prst USING (person_id) + JOIN public.tbl_student USING (prestudent_id) + JOIN lehre.tbl_pruefung prfg USING (student_uid) + JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id) + JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id) + JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz + WHERE pers.person_id = ? + AND le.studiensemester_kurzbz = ? + ORDER BY prfg.datum, pruefung_id'; + + return $this->execQuery($qry, array($person_id, $studiensemester_kurzbz)); + } } From 7340564d1e71f4ca925dfcfa05ca595ac0a40798 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 16 Mar 2021 17:42:46 +0100 Subject: [PATCH 018/301] Added job to send mail to STGL with yesterdays new Anrechnungen . added AnrechnungJob sendMailToSTGL() . removed functions to send mail from CTRL Signed-off-by: cris-technikum --- .../controllers/jobs/AnrechnungJob.php | 142 ++++++++++++++++++ .../lehre/anrechnung/RequestAnrechnung.php | 93 +----------- .../models/organisation/Studiengang_model.php | 2 +- 3 files changed, 145 insertions(+), 92 deletions(-) diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php index 2868a8052..98c85d592 100644 --- a/application/controllers/jobs/AnrechnungJob.php +++ b/application/controllers/jobs/AnrechnungJob.php @@ -15,6 +15,7 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); class AnrechnungJob extends JOB_Controller { + const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht'; /** * Constructor @@ -23,6 +24,11 @@ class AnrechnungJob extends JOB_Controller { parent::__construct(); $this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel'); + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); + + $this->load->helper('url'); + $this->load->helper('hlp_sancho_helper'); } /** @@ -84,4 +90,140 @@ class AnrechnungJob extends JOB_Controller } $this->logInfo('End Anrechnung Grades Job', array('Number of Grades added'=>$cnt)); } + + // Send Sancho mail to STGL with yesterdays new Anrechnungen + public function sendMailToSTGL() + { + $this->logInfo('Start AnrechnungJob to send emails to STGL about yesterdays new Anrechnungen.'); + + // Get all yesterdays Anrechnungen + $this->AnrechnungModel->addSelect('anrechnung_id, studiensemester_kurzbz, lv.studiengang_kz, lv.bezeichnung, vorname, nachname'); + $this->AnrechnungModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id'); + $this->AnrechnungModel->addJoin('public.tbl_student student', 'prestudent_id'); + $this->AnrechnungModel->addJoin('public.tbl_benutzer benutzer', 'ON (benutzer.uid = student.student_uid)'); + $this->AnrechnungModel->addJoin('public.tbl_person person', 'person_id'); + $this->AnrechnungModel->addOrder('lv.studiengang_kz, lv.bezeichnung'); + + $result = $this->AnrechnungModel->loadWhere( + '(lehre.tbl_anrechnung.insertamum)::date = (NOW() - INTERVAL \'1 DAY\')::DATE' + ); + + // Exit if there are no Anrechnungen + if (!$anrechnungen = getData($result)) { + $this->logInfo('ABORTED: Sending emails to STGL about yesterdays new Anrechnungen aborted - No new Anrechnungen found.'); + exit; + } + + $unique_studiengang_kz_arr = array_unique(array_column($anrechnungen, 'studiengang_kz')); + + foreach ($unique_studiengang_kz_arr as $studiengang_kz) + { + // Get STG bezeichnung + $this->StudiengangModel->addSelect('UPPER( typ || kurzbz ) AS "stg_bezeichnung"'); + $studiengang_bezeichnung = $this->StudiengangModel->load($studiengang_kz)->retval[0]->stg_bezeichnung; + + // Get STGL mail address + list ($to, $vorname) = self::_getSTGLMailAddress($studiengang_kz); + + // Get HTML table with new Anrechnungen of that STG plus amount of them + list ($anrechnungen_amount, $anrechnungen_table) = self::_getSTGLMailDataTable($studiengang_kz, $anrechnungen); + + // Link to Antrag genehmigen dashboard + $url = + CIS_ROOT. 'cis/index.php?menu='. + CIS_ROOT. 'cis/menu.php?content_id=&content='. + CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI; + + // Prepare mail content + $body_fields = array( + 'vorname' => $vorname, + 'studiengang' => $studiengang_bezeichnung, + 'anzahl' => $anrechnungen_amount, + 'datentabelle' => $anrechnungen_table, + 'link' => anchor($url, 'Anrechnungsanträge Übersicht') + ); + + // Send mail + sendSanchoMail( + 'AnrechnungAntragStellen', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt' + ); + } + + $this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.'); + } + + // Get STGL mail address + private function _getSTGLMailAddress($studiengang_kz) + { + $result = $this->StudiengangModel->getLeitung($studiengang_kz); + + // Get STGL mail address + if (hasData($result)) + { + return array( + $result->retval[0]->uid. '@'. DOMAIN, + $result->retval[0]->vorname + ); + } + // If not available, get assistance mail address + else + { + $result = $this->StudiengangModel->load($studiengang_kz); + + if (hasData($result)) + { + return array( + $result->retval[0]->email, + '' + ); + } + } + } + + // Build HTML table with yesterdays new Anrechnungen of the given STG + private function _getSTGLMailDataTable($studiengang_kz, $anrechnungen) + { + $html = ''; + $lv_bezeichnung = ''; + + // Filter Anrechnungen of given STG + $anrechnungen = array_filter( + $anrechnungen, + function ($anrechnung) use (&$studiengang_kz) { + return $anrechnung->studiengang_kz == $studiengang_kz; + }); + + // Amount of Anrechnungen + $amount = count($anrechnungen); + + // HTML table body + $html .= ' + + + '; + + foreach ($anrechnungen as $anrechnung) + { + // Head line for each LV bezeichnung + if ($anrechnung->bezeichnung != $lv_bezeichnung) + { + $html .= ''; + } + + $lv_bezeichnung = $anrechnung->bezeichnung; + + // Row for each Anrechnung / student + $html .= ''; + } + + $html .= ' + +
' . $anrechnung->bezeichnung . '
'. $anrechnung->vorname. ' '. $anrechnung->nachname. '
+ '; + + return array($amount, $html); + } } diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index 4f589e5f5..dabedb641 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -200,21 +200,8 @@ class requestAnrechnung extends Auth_Controller $this->db->trans_rollback(); show_error($result->msg, EXIT_ERROR); } - - // Send mail to STGL - $mail_params = array( - 'studiengang_kz' => $prestudent->studiengang_kz, - 'lehrveranstaltung_id' => $lehrveranstaltung_id - ); - - if(!$this->_sendSanchoMail($mail_params)) - { - show_error('Failed sending mail'); - } - else - { - redirect(site_url(). self::REQUEST_ANRECHNUNG_URI. '?studiensemester='. $studiensemester_kurzbz. '&lv_id='. $lehrveranstaltung_id); - } + + redirect(site_url(). self::REQUEST_ANRECHNUNG_URI. '?studiensemester='. $studiensemester_kurzbz. '&lv_id='. $lehrveranstaltung_id); } /** @@ -330,80 +317,4 @@ class requestAnrechnung extends Auth_Controller return $result; } - - /** - * Send mail to STGL (if not available, send to STGL assistance) - * @param $mail_params - */ - private function _sendSanchoMail($mail_params) - { - // Get STGL mail address, if available, otherwise get assistance mail address - list ($to, $vorname) = $this->_getSTGLMailAddress($mail_params['studiengang_kz']); - - // Get full name of student - $this->load->model('person/Person_model', 'PersonModel'); - if (!$student_name = getData($this->PersonModel->getFullName($this->_uid))) - { - show_error ('Failed retrieving person'); - } - - // Get lehrveranstaltung bezeichnung - $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); - if (!$lehrveranstaltung = getData($this->LehrveranstaltungModel->load($mail_params['lehrveranstaltung_id']))[0]) - { - show_error ('Failed retrieving person'); - } - - // Link to Antrag genehmigen - $url = - CIS_ROOT. 'cis/index.php?menu='. - CIS_ROOT. 'cis/menu.php?content_id=&content='. - CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI; - - // Prepare mail content - $body_fields = array( - 'vorname' => $vorname, - 'student_name' => $student_name, - 'lehrveranstaltung_bezeichnung' => $lehrveranstaltung->bezeichnung, - 'link' => anchor($url, 'Anrechnungsanträge Übersicht') - ); - - sendSanchoMail( - 'AnrechnungAntragStellen', - $body_fields, - $to, - 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt' - ); - - return true; - } - - // Get STGL mail address, if available, otherwise get assistance mail address - private function _getSTGLMailAddress($stg_kz) - { - $this->load->model('organisation/Studiengang_model', 'StudiengangModel'); - $result = $this->StudiengangModel->getLeitung($stg_kz); - - // Get STGL mail address, if available - if (hasData($result)) - { - return array( - $result->retval[0]->uid. '@'. DOMAIN, - $result->retval[0]->vorname - ); - } - // ...otherwise get assistance mail address - else - { - $result = $this->StudiengangModel->load($stg_kz); - - if (hasData($result)) - { - return array( - $result->retval[0]->email, - '' - ); - } - } - } } diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php index 8b8be0366..c1e2b76a4 100644 --- a/application/models/organisation/Studiengang_model.php +++ b/application/models/organisation/Studiengang_model.php @@ -475,7 +475,7 @@ class Studiengang_model extends DB_Model funktion_kurzbz = \'Leitung\' AND ( datum_von <= NOW() OR datum_von IS NULL ) AND ( datum_bis >= NOW() OR datum_bis IS NULL ) - AND studiengang_kz = ' . $this->db->escape($studiengang_kz, FHC_INTEGER) + AND studiengang_kz = ' . $this->db->escape($studiengang_kz) ; } From d345cbb43bb0690177cb08876d81d742e17f6f79 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 18 Mar 2021 10:55:58 +0100 Subject: [PATCH 019/301] =?UTF-8?q?Added=20'Zur=C3=BCcknehmen'-button=20fo?= =?UTF-8?q?r=20recommendation=20in=20STGL=20Detail=20View?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Requested recommendations can now be withdrawn. Now a button 'Zurücknehmen' is displayed as long as the Anrechnung is processed by the lector and only as long the lector has not provided a recommendation. Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 53 ++++++++++++++- .../anrechnung/approveAnrechnungDetail.php | 7 ++ .../anrechnung/approveAnrechnungDetail.js | 65 ++++++++++++++++++- system/phrasesupdate.php | 20 ++++++ 4 files changed, 143 insertions(+), 2 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index a280d0da1..85fb2812f 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -26,7 +26,8 @@ class approveAnrechnungDetail extends Auth_Controller 'approve' => 'lehre/anrechnung_genehmigen:rw', 'reject' => 'lehre/anrechnung_genehmigen:rw', 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw', - 'withdraw' => 'lehre/anrechnung_genehmigen:rw' + 'withdraw' => 'lehre/anrechnung_genehmigen:rw', + 'withdrawRequestRecommendation' => 'lehre/anrechnung_genehmigen:rw' ) ); @@ -317,6 +318,56 @@ class approveAnrechnungDetail extends Auth_Controller 'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id)) ); } + + /** + * Withdraw request for reommendation and reset to 'inProgressDP'. + * This is only possible if the lector has not provided a recommendation yet. + */ + public function withdrawRequestRecommendation() + { + $anrechnung_id = $this->input->post('anrechnung_id'); + + if (!is_numeric($anrechnung_id)) + { + show_error('Wrong parameter.'); + } + + // Get boolean empfehlung of given Anrechnung + if (!$result = getData($this->AnrechnungModel->load($anrechnung_id))[0]) + { + show_error('Failed loading Anrechnung'); + } + + $empfehlung = $result->empfehlung_anrechnung; + + // Get last Anrechnungstatus + if (!$result = getData($this->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0]) + { + show_error('Failed loading last Anrechnungstatus'); + } + + $last_status = $result->status_kurzbz; + $anrechnungstatus_id = $result->anrechnungstatus_id; + + // Return if Anrechnung was not waiting for recommendation or if Anrechnung has already been recommended + if ($last_status != self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR && !is_null($empfehlung)) + { + return $this->outputJsonError('No recommendation to withdraw.'); + } + + // Reset status to 'inProgressDP' + $result = $this->AnrechnungModel->deleteAnrechnungstatus($anrechnungstatus_id); + + if (isError($result)) + { + return $this->outputJsonError('Could not withdraw this application.'); + } + + // Success output to AJAX + return $this->outputJsonSuccess(array( + 'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id)) + ); + } /** * Download and open uploaded document (Nachweisdokument). diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index f5ab892f0..773cb290f 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -39,6 +39,7 @@ $this->load->view( ), 'anrechnung' => array( 'genehmigungAblehnungWirklichZuruecknehmen', + 'empfehlungsanforderungWirklichZuruecknehmen', 'erfolgreichZurueckgenommen' ) ), @@ -199,6 +200,12 @@ $this->load->view(
+
- - 'requestAnrechnung-form'], - ['lv_id' => $antragData->lv_id, 'studiensemester' => $antragData->studiensemester_kurzbz] - ); ?>
@@ -68,149 +68,151 @@ $this->load->view(
- -
-
-
-
- p->t('anrechnung', 'antrag'); ?>  - - - - p->t('anrechnung', 'antragdatum'); ?>: anrechnung_id) ? $anrechnungData->insertamum : '-' ?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
p->t('person', 'student')); ?>vorname . ' ' . $antragData->nachname; ?>
p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
p->t('lehre', 'ects'); ?>ects ?>
p->t('lehre', 'lektor')); ?> - lektoren) - 1 ?> - lektoren as $key => $lektor): ?> - vorname . ' ' . $lektor->nachname; - echo $key === $len ? '' : ', ' ?> - -
-
-
-
- -
-
-
- p->t('anrechnung', 'antragStellenText'); ?>  -
- -
-
- -
-
-
-
- -
-
-
-
- p->t('anrechnung', 'nachweisdokumente'); ?>  - - - -
-
-
- > +
+ + + +
+
+
+
+ p->t('anrechnung', 'antrag'); ?>  + + + + p->t('anrechnung', 'antragdatum'); ?>: anrechnung_id) ? $anrechnungData->insertamum : '-' ?>
- - - - dms_id)): ?> - dokumentname) ?> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
p->t('person', 'student')); ?>vorname . ' ' . $antragData->nachname; ?>
p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
p->t('lehre', 'ects'); ?>ects ?>
p->t('lehre', 'lektor')); ?> + lektoren) - 1 ?> + lektoren as $key => $lektor): ?> + vorname . ' ' . $lektor->nachname; + echo $key === $len ? '' : ', ' ?> + +
-
- -
-
-
-
-
-
- p->t('anrechnung', 'herkunftDerKenntnisse'); ?>  - - - + +
+
+
+ p->t('anrechnung', 'antragStellenText'); ?>  +
+ +
+
+ +
+
+
+
+ +
+
+
+
+ p->t('anrechnung', 'nachweisdokumente'); ?>  + + + +
+
+
+
-
- + + + + dms_id)): ?> + dokumentname) ?> + +
+
+
+
+ +
+
+
+
+
+
+ p->t('anrechnung', 'herkunftDerKenntnisse'); ?>  + + + +
+
+ +
-
- -
- > -
+ +
+ +
+
@@ -234,7 +236,6 @@ $this->load->view( load->view('lehre/anrechnung/requestAnrechnungImportant'); ?>
-
diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js index 1f9f8b51b..6c4c5c9ca 100644 --- a/public/js/lehre/anrechnung/requestAnrechnung.js +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -5,10 +5,46 @@ $(function(){ // Set status alert color requestAnrechnung.setStatusAlertColor(); + // Disable Form fields if Anrechnung was already applied + requestAnrechnung.disableFormFieldsIfAntragIsApplied(); + // Init tooltips requestAnrechnung.initTooltips(); + $('#requestAnrechnung-apply-anrechnung').click(function(e){ + // Avoid form redirecting automatically + e.preventDefault(); + + // Get form data + let formdata = new FormData($('#requestAnrechnung-form')[0]); + + $.ajax({ + url : "RequestAnrechnung/apply", + type: "POST", + data : formdata, + processData: false, // needed to pass uploaded file with FormData + contentType: false, // needed to pass uploaded file with FormData + success:function(data, textStatus, jqXHR){ + if (data.error && data.retval != null) + { + FHC_DialogLib.alertWarning(data.retval); + } + + if (!data.error && data.retval != null) + { + requestAnrechnung.formatAnrechnungIsApplied( + data.retval.antragdatum + ); + + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("global", "antragWurdeGestellt")); + } + }, + error: function(jqXHR, textStatus, errorThrown){ + FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("ui", "systemfehler")); + } + }); + }); }) var requestAnrechnung = { @@ -24,9 +60,20 @@ var requestAnrechnung = { break; case '': $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-info'); + $('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "neu")); break; default: $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning'); + $('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "inBearbeitung")); + } + }, + disableFormFieldsIfAntragIsApplied: function(){ + let status_kurzbz = $('#requestAnrechnung-status_kurzbz').data('status_kurzbz'); + + if (status_kurzbz != '') + { + // Disable all form elements + $("#requestAnrechnung-form :input").prop("disabled", true); } }, initTooltips: function (){ @@ -35,5 +82,13 @@ var requestAnrechnung = { html: true } ); + }, + formatAnrechnungIsApplied: function (antragdatum){ + $('#requestAnrechnung-antragdatum').text(antragdatum); + $('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "inBearbeitung")); + $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning'); + + // Disable all form elements + $("#requestAnrechnung-form :input").prop("disabled", true); } } \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d88514ece..fce82a1d5 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10350,7 +10350,87 @@ array( ) ) ), - + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'neu', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Neu", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "New", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'inBearbeitung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "in Bearbeitung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "in process", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'antragWurdeGestellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Antrag wurde gestellt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Application was submitted successfully.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'antragBereitsGestellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Der Antrag wurde bereits gestellt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Application has already been submitted.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + ); From faf253c15933f9f376138e2cb7e1242d45c3b7ed Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 25 Mar 2021 16:41:41 +0100 Subject: [PATCH 029/301] Adapted to keep individual filters by opening views in new tabs When Detail Views were opened within the same browser window, individual filters of the overview site were lost when returning to the overview. Fixed by opening detail views in new tab. Signed-off-by: cris-technikum --- .../lehre/anrechnung/approveAnrechnungUebersichtData.php | 1 + public/js/lehre/anrechnung/approveAnrechnungUebersicht.js | 2 +- public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index af77358ef..d6bab0e82 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -83,6 +83,7 @@ $filterWidgetArray = array( layout: "fitColumns", // fit columns to width of table persistentLayout:true, persistentSort:true, + persistentFilter:true, autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated headerFilterPlaceholder: " ", index: "anrechnung_id", // assign specific column as unique id (important for row indexing) diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index 7f777178d..ffb2c2a41 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -63,7 +63,7 @@ function func_tableBuilt(table) { url:function(cell){ return BASE_URL + "/" + APPROVE_ANRECHNUNG_DETAIL_URI + "?anrechnung_id=" + cell.getData().anrechnung_id }, - // target:"_blank" + target:"_blank" } }, false, "status" // place column after status ); diff --git a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js index 379358eea..ddf7a55d3 100644 --- a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js @@ -62,8 +62,8 @@ function func_tableBuilt(table) { label:"Details", url:function(cell){ return BASE_URL + "/" + APPROVE_ANRECHNUNG_DETAIL_URI + "?anrechnung_id=" + cell.getData().anrechnung_id - } - // target:"_blank" + }, + target:"_blank" } }, false, "status" // place column after status ); From f9cbd9caf5686ee2703afaf4d1cf8f6f95c0d46f Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 25 Mar 2021 16:51:11 +0100 Subject: [PATCH 030/301] Refactored code Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 30 ++- .../lehre/anrechnung/RequestAnrechnung.php | 196 ++++++++---------- .../anrechnung/ReviewAnrechnungDetail.php | 23 +- application/libraries/AnrechnungLib.php | 27 ++- 4 files changed, 128 insertions(+), 148 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index bbaab393b..51d0617c9 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -82,29 +82,23 @@ class approveAnrechnungDetail extends Auth_Controller self::_checkIfEntitledToReadAnrechnung($anrechnung_id); // Get Anrechung data - if (!$anrechnungData = getData($this->anrechnunglib->getAnrechnungData($anrechnung_id))) - { - show_error('Missing data for Anrechnung.'); - } + $anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id); + + // Get Antrag data + $antragData = $this->anrechnunglib->getAntragData( + $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), + $anrechnungData->studiensemester_kurzbz, + $anrechnungData->lehrveranstaltung_id + ); // Get Empfehlung data - if(!$empfehlungData = getData($this->anrechnunglib->getEmpfehlungData($anrechnung_id))) - { - show_error('Missing data for recommendation'); - } + $empfehlungData = $this->anrechnunglib->getEmpfehlungData($anrechnung_id); // Get Genehmigung data - if(!$genehmigungData = getData($this->anrechnunglib->getGenehmigungData($anrechnung_id))) - { - show_error('Missing data for recommendation'); - } - + $genehmigungData = $this->anrechnunglib->getGenehmigungData($anrechnung_id); + $viewData = array( - 'antragData' => $this->anrechnunglib->getAntragData( - $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), - $anrechnungData->studiensemester_kurzbz, - $anrechnungData->lehrveranstaltung_id - ), + 'antragData' => $antragData, 'anrechnungData' => $anrechnungData, 'empfehlungData' => $empfehlungData, 'genehmigungData' => $genehmigungData diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index c4c3a145d..1b305d186 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -6,15 +6,15 @@ class requestAnrechnung extends Auth_Controller { const REQUEST_ANRECHNUNG_URI = '/lehre/anrechnung/RequestAnrechnung'; const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht'; - + const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP'; const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF'; const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor'; const ANRECHNUNGSTATUS_APPROVED = 'approved'; const ANRECHNUNGSTATUS_REJECTED = 'rejected'; - + const DEADLINE_INTERVAL_NACH_SEMESTERSTART = 'P1M'; // Deadline for application - + public function __construct() { // Set required permissions @@ -25,22 +25,22 @@ class requestAnrechnung extends Auth_Controller 'download' => 'student/anrechnung_beantragen:rw', ) ); - + // Load models $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); - + // Load libraries $this->load->library('WidgetLib'); $this->load->library('PermissionLib'); $this->load->library('AnrechnungLib'); $this->load->library('DmsLib'); - + // Load helpers $this->load->helper('form'); $this->load->helper('url'); $this->load->helper('hlp_sancho_helper'); - + // Load language phrases $this->loadPhrases( array( @@ -51,53 +51,52 @@ class requestAnrechnung extends Auth_Controller 'lehre' ) ); - + $this->_setAuthUID(); - + $this->setControllerId(); } - + public function index() { $studiensemester_kurzbz = $this->input->get('studiensemester'); $lehrveranstaltung_id = $this->input->get('lv_id'); - - if (!is_numeric($lehrveranstaltung_id) || !is_string($studiensemester_kurzbz)) + + if (isEmptyString($lehrveranstaltung_id) || isEmptyString($studiensemester_kurzbz)) { show_error('Missing correct parameter'); } - + + // Exit if user is not a student + $result = $this->StudentModel->load(array('student_uid' => $this->_uid)); + + if (!hasData($result)) + { + show_error('Cant load user'); + } + + // Get Prestudent ID + $prestudent_id = getData($result)[0]->prestudent_id; + // Check if application deadline is expired - // $is_expired = $this->_checkAntragDeadline($studiensemester_kurzbz); - $is_expired = false; // Set to false until Deadline is defined - - $student = $this->StudentModel->load(array('student_uid' => $this->_uid)); - if (isSuccess($student) && hasData($student)) - { - $prestudent_id = getData($student)[0]->prestudent_id; - } - else - show_error('Cant load User'); - + // $is_expired = self::_checkAntragDeadline($studiensemester_kurzbz); + $is_expired = false; + // Get Anrechung data - $result = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id); - if (!$anrechnungData = getData($result)) - { - show_error(getError($anrechnungData)); - } + $anrechnungData = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id); // Get Antrag data $antragData = $this->anrechnunglib->getAntragData($this->_uid, $studiensemester_kurzbz, $lehrveranstaltung_id); - + $viewData = array( 'antragData' => $antragData, 'anrechnungData' => $anrechnungData, 'is_expired' => $is_expired ); - + $this->load->view('lehre/anrechnung/requestAnrechnung.php', $viewData); } - + /** * Apply Anrechnungsantrag and send to STGL */ @@ -108,12 +107,13 @@ class requestAnrechnung extends Auth_Controller $lehrveranstaltung_id = $this->input->post('lv_id'); $studiensemester_kurzbz = $this->input->post('studiensemester'); + // Validate data if (empty($_FILES['uploadfile']['name'])) { show_error('Missing upload file'); } - if (!is_numeric($begruendung_id) || !is_numeric($lehrveranstaltung_id) || !is_string($studiensemester_kurzbz)) + if (isEmptyString($begruendung_id) || isEmptyString($lehrveranstaltung_id) || isEmptyString($studiensemester_kurzbz)) { show_error('Missing correct parameter'); } @@ -140,64 +140,34 @@ class requestAnrechnung extends Auth_Controller { return $this->outputJsonError($this->p->t('anrechnung', 'antragNurImAktSS')); } - + + // Upload document + $lastInsert_dms_id = self::_uploadFile(); + // Start DB transaction $this->db->trans_start(false); - - // Upload document - $dms = array( - 'kategorie_kurzbz' => 'anrechnung', - 'version' => 0, - 'name' => $_FILES['uploadfile']['name'], - 'mimetype' => $_FILES['uploadfile']['type'], - 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'), - 'insertvon' => $this->_uid - ); - - if(isError($uploaddata = $this->dmslib->upload($dms, array('pdf')))) - { - show_error(getError($uploaddata)); - } - - // Get PrestudentID - $result = $this->_loadPrestudent($this->_uid, $studiensemester_kurzbz); - - if (!$prestudent = getData($result)[0]) - { - show_error('Failed retrieving prestudent'); - } - + // Save Anrechnung $result = $this->AnrechnungModel->insert(array( - 'prestudent_id' => $prestudent->prestudent_id, + 'prestudent_id' => $prestudent_id, 'lehrveranstaltung_id' => $lehrveranstaltung_id, 'begruendung_id' => $begruendung_id, - 'dms_id' => $uploaddata->retval['dms_id'], + 'dms_id' => $lastInsert_dms_id, 'studiensemester_kurzbz' => $studiensemester_kurzbz, 'anmerkung_student' => $anmerkung, 'insertvon' => $this->_uid )); - - if (isError($result)) - { - show_error('Failed inserting Anrechnung'); - } - + // Save Anrechnungstatus 'inProgressSTGL' - $result = $this->AnrechnungModel->saveAnrechnungstatus($result->retval, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); - - if (isError($result)) - { - show_error('Failed saving Anrechnungstatus'); - } - - // Transaction complete! + $this->AnrechnungModel->saveAnrechnungstatus($result->retval, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + + // Transaction complete $this->db->trans_complete(); - if ($this->db->trans_status() === false || isError($result)) + if ($this->db->trans_status() === false) { $this->db->trans_rollback(); - show_error($result->msg, EXIT_ERROR); + show_error('Failed inserting Anrechnung', EXIT_ERROR); } // Output to AJAX @@ -230,31 +200,13 @@ class requestAnrechnung extends Auth_Controller private function _setAuthUID() { $this->_uid = getAuthUID(); - + if (!$this->_uid) show_error('User authentification failed'); } - /** - * Load Prestudent by uid and Studiensemester. - * @param $uid - * @param $studiensemester_kurzbz - * @return mixed - */ - private function _loadPrestudent($uid, $studiensemester_kurzbz) - { - $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); - $this->load->model('crm/Student_model', 'StudentModel'); - - $this->PrestudentstatusModel->addJoin('public.tbl_student', 'prestudent_id'); - return $this->PrestudentstatusModel->loadWhere(array( - 'student_uid' => $uid, - 'studiensemester_kurzbz' => $studiensemester_kurzbz - ) - ); - } - /** * Check if application deadline is expired. + * * @param $studiensemester_kurzbz * @return bool True if semester start is more then 1 week ago * @throws Exception @@ -270,13 +222,14 @@ class requestAnrechnung extends Auth_Controller $start = new DateTime($start[0]->start); $today = new DateTime('today midnight'); - + // True if today > application deadline return ($today > $start->add((new DateInterval(self::DEADLINE_INTERVAL_NACH_SEMESTERSTART)))); } - + /** - * Check if user is entitled to read dms doc + * Check if user is entitled to read dms doc. + * * @param $dms_id */ private function _checkIfEntitledToReadDMSDoc($dms_id) @@ -287,7 +240,7 @@ class requestAnrechnung extends Auth_Controller } $result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id)); - + if($result = getData($result)[0]) { if ($result->prestudent_id == $student->prestudent_id) @@ -295,14 +248,17 @@ class requestAnrechnung extends Auth_Controller return; } } - + show_error('You are not entitled to read this document'); } - + /** - * Get Anrechnung by Lehrveranstaltung + * Check if application already exists. + * * @param $lehrveranstaltung_id - * @return mixed + * @param $studiensemester_kurzbz + * @param $prestudent_id + * @return bool */ private function _applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id) { @@ -311,7 +267,7 @@ class requestAnrechnung extends Auth_Controller 'studiensemester_kurzbz' => $studiensemester_kurzbz, 'prestudent_id' => $prestudent_id )); - + if (isError($result)) { show_error(getError($result)); @@ -321,7 +277,8 @@ class requestAnrechnung extends Auth_Controller } /** - * Check, if applications' study semester is actual study semester + * Check if applications' study semester is actual study semester. + * * @param $studiensemester_kurzbz * @return bool */ @@ -333,4 +290,29 @@ class requestAnrechnung extends Auth_Controller return $studiensemester_kurzbz == $actual_ss; } -} + + private function _uploadFile(){ + + if (empty($_FILES['uploadfile']['name'])) + { + show_error('Missing upload file'); + } + + // Upload document + $dms = array( + 'kategorie_kurzbz' => 'anrechnung', + 'version' => 0, + 'name' => $_FILES['uploadfile']['name'], + 'mimetype' => $_FILES['uploadfile']['type'], + 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'), + 'insertvon' => $this->_uid + ); + + if (isError($uploaddata = $this->dmslib->upload($dms, array('pdf')))) + { + show_error(getError($uploaddata)); + } + + return $uploaddata->retval['dms_id']; + } +} \ No newline at end of file diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php index 156c17334..865a2b3ae 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -78,23 +78,20 @@ class reviewAnrechnungDetail extends Auth_Controller self::_checkIfEntitledToReadAnrechnung($anrechnung_id); // Get Anrechung data - if (!$anrechnungData = getData($this->anrechnunglib->getAnrechnungData($anrechnung_id))) - { - show_error('Missing data for Anrechnung.'); - } + $anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id); + + // Get Antrag data + $antragData = $this->anrechnunglib->getAntragData( + $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), + $anrechnungData->studiensemester_kurzbz, + $anrechnungData->lehrveranstaltung_id + ); // Get Empfehlung data - if(!$empfehlungData = getData($this->anrechnunglib->getEmpfehlungData($anrechnung_id))) - { - show_error('Missing data for recommendation'); - } + $empfehlungData = $this->anrechnunglib->getEmpfehlungData($anrechnung_id); $viewData = array( - 'antragData' => $this->anrechnunglib->getAntragData( - $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), - $anrechnungData->studiensemester_kurzbz, - $anrechnungData->lehrveranstaltung_id - ), + 'antragData' => $antragData, 'anrechnungData' => $anrechnungData, 'empfehlungData' => $empfehlungData ); diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 295426b86..93d128bb7 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -23,6 +23,8 @@ class AnrechnungLib $this->ci->load->model('organisation/Studiengang_model', 'StudiengangModel'); $this->ci->load->model('crm/Student_model', 'StudentModel'); $this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel'); + + $this->ci->load->library('DmsLib'); } /** @@ -109,8 +111,12 @@ class AnrechnungLib { $anrechnung_data = $this->_setAnrechnungDataObject($anrechnung); } + else + { + show_error('No Anrechnung with this anrechnung_id.'); + } - return success($anrechnung_data); + return $anrechnung_data; } @@ -155,7 +161,7 @@ class AnrechnungLib $anrechnung_data = $this->_setAnrechnungDataObject($anrechnung); } - return success($anrechnung_data); + return $anrechnung_data; } /** @@ -173,8 +179,8 @@ class AnrechnungLib $this->ci->AnrechnungModel->addSelect('tbl_benutzer.uid, tbl_prestudent.prestudent_id, tbl_person.person_id, tbl_anrechnung.studiensemester_kurzbz, vorname, nachname, geschlecht, tbl_lehrveranstaltung.bezeichnung AS "lv_bezeichnung"'); $this->ci->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id'); $this->ci->AnrechnungModel->addJoin('public.tbl_student', 'prestudent_id'); - $this->ci->AnrechnungModel->addJoin('public.tbl_benutzer', 'uid=student_uid'); - $this->ci->AnrechnungModel->addJoin('public.tbl_person', 'tbl_benutzer.person_id=tbl_person.person_id'); + $this->ci->AnrechnungModel->addJoin('public.tbl_benutzer', 'uid = student_uid'); + $this->ci->AnrechnungModel->addJoin('public.tbl_person', 'tbl_benutzer.person_id = tbl_person.person_id'); $this->ci->AnrechnungModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id'); $result = $this->ci->AnrechnungModel->load($anrechnung_id); @@ -230,7 +236,7 @@ class AnrechnungLib if (is_null($anrechnung->empfehlung_anrechnung)) { - return success($empfehlung_data); + return $empfehlung_data; } // If Empfehlung is true or false @@ -270,7 +276,7 @@ class AnrechnungLib } } - return success($empfehlung_data); + return $empfehlung_data; } @@ -302,9 +308,10 @@ class AnrechnungLib // Get date of approvement or rejection $result = $this->ci->AnrechnungModel->getApprovedOrRejected($anrechnung_id); + // If no approved or rejected Anrechnung exist, return basic genehmigung data object if (!$result = getData($result)[0]) { - return success($genehmigung_data); + return $genehmigung_data; } @@ -333,7 +340,7 @@ class AnrechnungLib } } - return success($genehmigung_data); + return $genehmigung_data; } @@ -564,7 +571,7 @@ class AnrechnungLib // Exit if already approved or rejected if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED) { - return success(false); // dont approve + return false; // dont approve } // Start DB transaction @@ -601,7 +608,7 @@ class AnrechnungLib return error($result->msg, EXIT_ERROR); } - return success(true); // recommended + return true; // recommended } /** From 279157b920a2130b7f8a851e136e4f9484ae8101 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 25 Mar 2021 17:12:38 +0100 Subject: [PATCH 031/301] Added button to copy Empfehlungstext into reason textarea when rejecting Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungDetail.php | 8 ++++++++ .../anrechnung/approveAnrechnungDetail.js | 13 ++++++++++-- system/phrasesupdate.php | 20 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index 773cb290f..39c1c47d8 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -286,6 +286,14 @@ $this->load->view( +
  • + p->t('anrechnung', 'genehmigungNegativEmpfehlungstextUebernehmen'); ?> + + + +
  • p->t('anrechnung', 'andereBegruendung'); ?>

  • diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js index 3fd469294..107bc6a31 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -351,8 +351,17 @@ var approveAnrechnungDetail = { // Find closest textarea let textarea = $(elem).closest('div').find('textarea'); - // Copy begruendung into textarea - textarea.val($.trim($(elem).parent().find('span:first').text())); + if (elem.id.length && elem.id == 'empfehlungstextUebernehmen') + { + // Copy Empfehlungstext into textarea + textarea.val($('#approveAnrechnungDetail-empfehlungDetail-begruendung').text()); + return; + } + else + { + // Copy begruendung into textarea + textarea.val($.trim($(elem).parent().find('span:first').text())); + } }, formatEmpfehlungIsRequested: function(empfehlungAngefordertAm, statusBezeichnung) { $('#approveAnrechnungDetail-empfehlungDetail').children().addClass('hidden'); diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index fce82a1d5..6d8651603 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10430,6 +10430,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'genehmigungNegativEmpfehlungstextUebernehmen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Empfehlungstext des Lektors als Begründung übernehmen.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Copy the lectors recommendation text as reason for the rejection.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 2c091cd405a67da72d0c9734a239aca974bccf6c Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 29 Mar 2021 13:05:27 +0200 Subject: [PATCH 032/301] Fixed: Recommendation button was not enabled correctly after withdrawing approvement Now, if approvment is withdrawn, the recommendation button is enabled again ONLY if no recommendation was submitted until yet. Signed-off-by: cris-technikum --- .../views/lehre/anrechnung/approveAnrechnungDetail.php | 3 ++- public/js/lehre/anrechnung/approveAnrechnungDetail.js | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index 39c1c47d8..1aa0ee672 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -145,7 +145,8 @@ $this->load->view(
    -
    +
    p->t('anrechnung', 'empfehlung'); ?>  diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js index 107bc6a31..f52a0006f 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -403,6 +403,8 @@ var approveAnrechnungDetail = { $('#approveAnrechnungDetail-withdraw-anrechnung-approvement').removeClass('hidden'); }, formatGenehmigungIsWithdrawed: function (statusBezeichnung){ + let empfehlung = $('#approveAnrechnungDetail-empfehlung').data('empfehlung'); // null / false / true + $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); $('#approveAnrechnungDetail-status_kurzbz').closest('div').removeClass('alert-danger').removeClass('alert-success'); $('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-warning'); @@ -414,7 +416,11 @@ var approveAnrechnungDetail = { $('#approveAnrechnungDetail-abgeschlossenAm').text('-'); $('#approveAnrechnungDetail-abgeschlossenVon').text('-'); - $('#approveAnrechnungDetail-request-recommendation').prop('disabled', false); + // Only enable recommendation button again if no recommendation was submitted until now + if (empfehlung === null) + { + $('#approveAnrechnungDetail-request-recommendation').prop('disabled', false); + } $('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', false); $('#approveAnrechnungDetail-reject-anrechnung-ask').prop('disabled', false); // Hide button to withdraw approval From c4557787313424095a0346aad7d3794f77a288c3 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 29 Mar 2021 17:50:19 +0200 Subject: [PATCH 033/301] Fixed: Added formatted download-document-link after application was done After refactoring the code and doing the application via AJAX call, the document-download-link must be created on ajax success. This was missing and is fixed now. Signed-off-by: cris-technikum --- .../lehre/anrechnung/RequestAnrechnung.php | 10 ++++++---- public/js/lehre/anrechnung/requestAnrechnung.js | 12 ++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index 1b305d186..cd2c995d3 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -110,12 +110,13 @@ class requestAnrechnung extends Auth_Controller // Validate data if (empty($_FILES['uploadfile']['name'])) { - show_error('Missing upload file'); + return $this->outputJsonError($this->p->t('ui', 'errorUploadFehlt')); } - if (isEmptyString($begruendung_id) || isEmptyString($lehrveranstaltung_id) || isEmptyString($studiensemester_kurzbz)) + if (isEmptyString($begruendung_id) || isEmptyString($anmerkung) || + isEmptyString($lehrveranstaltung_id) || isEmptyString($studiensemester_kurzbz)) { - show_error('Missing correct parameter'); + return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen')); } // Exit if user is not a student @@ -172,7 +173,8 @@ class requestAnrechnung extends Auth_Controller // Output to AJAX return $this->outputJsonSuccess(array( - 'antragdatum' => (new DateTime())->format('d.m.Y') + 'antragdatum' => (new DateTime())->format('d.m.Y'), + 'dms_id' => $lastInsert_dms_id )); } diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js index 6c4c5c9ca..b7b1229da 100644 --- a/public/js/lehre/anrechnung/requestAnrechnung.js +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -34,7 +34,9 @@ $(function(){ if (!data.error && data.retval != null) { requestAnrechnung.formatAnrechnungIsApplied( - data.retval.antragdatum + data.retval.antragdatum, + data.retval.dms_id, + formdata.get('uploadfile').name ); FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("global", "antragWurdeGestellt")); @@ -83,11 +85,17 @@ var requestAnrechnung = { } ); }, - formatAnrechnungIsApplied: function (antragdatum){ + formatAnrechnungIsApplied: function (antragdatum, dms_id, filename){ $('#requestAnrechnung-antragdatum').text(antragdatum); $('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "inBearbeitung")); $('#requestAnrechnung-status_kurzbz').closest('div').addClass('alert-warning'); + // Display File-Downloadlink + $('#requestAnrechnung-downloadDocLink') + .removeClass('hidden') + .attr('href', 'RequestAnrechnung/download?dms_id=' + dms_id) + .html(filename); + // Disable all form elements $("#requestAnrechnung-form :input").prop("disabled", true); } From 287b9616978af5f934ec76354a952fe1b5a2a8bf Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 29 Mar 2021 17:55:50 +0200 Subject: [PATCH 034/301] Fixed: Added serversite check on required form fields After refactoring code to apply via AJAX call, required fields have to be direclty validated in JS or on serversite. Now fixed by checking on serversite. Signed-off-by: cris-technikum --- .../lehre/anrechnung/requestAnrechnung.php | 14 +++---- system/phrasesupdate.php | 40 +++++++++++++++++++ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index af10ef891..749b0f1d5 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -133,10 +133,10 @@ $this->load->view(
    @@ -176,11 +176,11 @@ $this->load->view( title="p->t('ui', 'uploadTooltipText'); ?>"> - dms_id)): ?> - dokumentname) ?> - + dokumentname) ?> +
    diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 6d8651603..effc3127f 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10450,6 +10450,46 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'errorFelderFehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Daten fehlen.
    Bitte füllen Sie alle Formularfelder aus", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Missing data.
    Please fill in all form fields", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'errorUploadFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Dokument fehlt.
    Bitte laden Sie noch die entsprechenden Dokumente hoch.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Missing document.
    Please upload the required documents.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From d183dda815e3a7216f59b92772debf5fb7f9da2c Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 29 Mar 2021 18:48:26 +0200 Subject: [PATCH 035/301] Fixed: Anrechnunglib returning values, Adapted error messages Fixed: method getData in Controller was producing wrong returning message. Fixed by removing, as library is returning boolean value now. Adapted few error functions to be more generic and bilingual. Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 4 ++-- .../anrechnung/ReviewAnrechnungDetail.php | 16 +++++++-------- .../anrechnung/ReviewAnrechnungUebersicht.php | 9 ++++----- application/libraries/AnrechnungLib.php | 6 +++--- system/phrasesupdate.php | 20 +++++++++++++++++++ 5 files changed, 37 insertions(+), 18 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 51d0617c9..fc990cf6f 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -213,7 +213,7 @@ class approveAnrechnungDetail extends Auth_Controller } else { - return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.'); + return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } @@ -285,7 +285,7 @@ class approveAnrechnungDetail extends Auth_Controller ); } - return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); + return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } /** diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php index 865a2b3ae..b335b022c 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -120,13 +120,13 @@ class reviewAnrechnungDetail extends Auth_Controller if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { - show_error('Failed retrieving person data'); + return $this->outputJsonError('Failed retrieving person data'); } foreach ($data as $item) { // Approve Anrechnung - if(getData($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id']))) + if($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], @@ -148,14 +148,14 @@ class reviewAnrechnungDetail extends Auth_Controller * */ if (!$this->_sendSanchoMails($json, true)) { - show_error('Failed sending emails'); + return $this->outputJsonError('Failed sending emails'); } return $this->outputJsonSuccess($json); } else { - return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } @@ -180,13 +180,13 @@ class reviewAnrechnungDetail extends Auth_Controller if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { - show_error('Failed retrieving person data'); + return $this->outputJsonError('Failed retrieving person data'); } foreach ($data as $item) { // Approve Anrechnung - if(getData($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung']))) + if($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], @@ -205,14 +205,14 @@ class reviewAnrechnungDetail extends Auth_Controller // Send mails to STGL (if not present STGL, send to STGL assistance) if (!$this->_sendSanchoMails($json, false)) { - show_error('Failed sending emails'); + return $this->outputJsonError('Failed sending emails'); } return $this->outputJsonSuccess($json); } else { - return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php index 1d10a0bad..72a955897 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php @@ -100,7 +100,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller foreach ($data as $item) { // Approve Anrechnung - if(getData($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id']))) + if($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], @@ -127,7 +127,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller } else { - return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } @@ -153,8 +153,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller foreach ($data as $item) { // Approve Anrechnung - if(getData($this->anrechnunglib - ->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung']))) + if($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], @@ -178,7 +177,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller } else { - return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt'); + return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt')); } } diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 93d128bb7..7e3419bef 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -546,10 +546,10 @@ class AnrechnungLib if ($this->ci->db->trans_status() === false) { $this->ci->db->trans_rollback(); - return error($result->msg, EXIT_ERROR); + return false; } - return success(true); // recommended + return true; // recommended } /** @@ -605,7 +605,7 @@ class AnrechnungLib if ($this->ci->db->trans_status() === false) { $this->ci->db->trans_rollback(); - return error($result->msg, EXIT_ERROR); + return false; } return true; // recommended diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index effc3127f..7e306c974 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10490,6 +10490,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'errorNichtAusgefuehrt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Ihre Anfrage konnte nicht ausgefuehrt werden.
    Bitte wenden Sie sich an den IT-Support.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Your request could not be processed.
    Please contact the IT Support team.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 5b369f70206d7a6d9b0106c846a99a2347e1e5e0 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 29 Mar 2021 18:49:41 +0200 Subject: [PATCH 036/301] Zaugnisnote_model: added getByPerson method --- .../models/education/Zeugnisnote_model.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/application/models/education/Zeugnisnote_model.php b/application/models/education/Zeugnisnote_model.php index 7ed0e6456..08c4beca1 100644 --- a/application/models/education/Zeugnisnote_model.php +++ b/application/models/education/Zeugnisnote_model.php @@ -12,4 +12,28 @@ class Zeugnisnote_model extends DB_Model $this->pk = array('studiensemester_kurzbz', 'student_uid', 'lehrveranstaltung_id'); $this->hasSequence = false; } + + /** + * Gets Pruefungen of a person for a Studiensemester. + * @param int $person_id + * @param string $studiensemester_kurzbz + * @return object + */ + public function getByPerson($person_id, $studiensemester_kurzbz) + { + $qry = ' + SELECT note.*, pers.matr_nr, lv.ects, stg.studiengang_kz, prst.prestudent_id, + UPPER(stg.typ||stg.kurzbz) AS studiengang, stg.bezeichnung AS studiengang_bezeichnung + FROM public.tbl_person pers + JOIN public.tbl_prestudent prst USING (person_id) + JOIN public.tbl_student USING (prestudent_id) + JOIN lehre.tbl_zeugnisnote note USING (student_uid) + JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id) + JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz + WHERE pers.person_id = ? + AND note.studiensemester_kurzbz = ? + ORDER BY note.benotungsdatum'; + + return $this->execQuery($qry, array($person_id, $studiensemester_kurzbz)); + } } From 7690a122b8688c58535b63da23c8284f14b823d4 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 30 Mar 2021 13:57:43 +0200 Subject: [PATCH 037/301] Refactored: Moved getAnrechnungstatusbezeichnung to AnrechnungLib This method retrieves the Anrechnungstatusbezeichnung in the users language. It is used multiple times -> moved to library. Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 37 +++++-------------- .../ApproveAnrechnungUebersicht.php | 27 ++------------ .../anrechnung/ReviewAnrechnungDetail.php | 22 +++-------- .../anrechnung/ReviewAnrechnungUebersicht.php | 18 +-------- application/libraries/AnrechnungLib.php | 21 +++++++++++ 5 files changed, 40 insertions(+), 85 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index fc990cf6f..faad790ec 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -118,14 +118,8 @@ class approveAnrechnungDetail extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - - // Get statusbezeichnung for 'approved' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $approved = getData($this->AnrechnungstatusModel->load('approved'))[0]; - $approved = getUserLanguage() == 'German' - ? $approved->bezeichnung_mehrsprachig[0] - : $approved->bezeichnung_mehrsprachig[1]; - + + // Get STGLs person data if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { show_error('Failed retrieving person data'); @@ -139,9 +133,9 @@ class approveAnrechnungDetail extends Auth_Controller $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED, - 'status_bezeichnung' => $approved, - 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), - 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED), + 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), + 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname ); if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED)) @@ -173,14 +167,8 @@ class approveAnrechnungDetail extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - - // Get statusbezeichnung for 'rejected' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $rejected = getData($this->AnrechnungstatusModel->load('rejected'))[0]; - $rejected = getUserLanguage() == 'German' - ? $rejected->bezeichnung_mehrsprachig[0] - : $rejected->bezeichnung_mehrsprachig[1]; - + + // Get STGLs person data if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { show_error('Failed retrieving person data'); @@ -194,7 +182,7 @@ class approveAnrechnungDetail extends Auth_Controller $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED, - 'status_bezeichnung' => $rejected, + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_REJECTED), 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname ); @@ -228,13 +216,6 @@ class approveAnrechnungDetail extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - - // Get statusbezeichnung for 'inProgressLektor' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $inProgressLektor = getData($this->AnrechnungstatusModel->load('inProgressLektor'))[0]; - $inProgressLektor = getUserLanguage() == 'German' - ? $inProgressLektor->bezeichnung_mehrsprachig[0] - : $inProgressLektor->bezeichnung_mehrsprachig[1]; $retval = array(); $counter = 0; @@ -257,7 +238,7 @@ class approveAnrechnungDetail extends Auth_Controller $retval[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, - 'status_bezeichnung' => $inProgressLektor, + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR), 'empfehlung_anrechnung' => null, 'empfehlung_angefordert_am' => (new DateTime())->format('d.m.Y') ); diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index b45c998f4..32d1f7900 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -96,13 +96,6 @@ class approveAnrechnungUebersicht extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - - // Get statusbezeichnung for 'approved' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $approved = getData($this->AnrechnungstatusModel->load('approved'))[0]; - $approved = getUserLanguage() == 'German' - ? $approved->bezeichnung_mehrsprachig[0] - : $approved->bezeichnung_mehrsprachig[1]; foreach ($data as $item) { @@ -112,7 +105,7 @@ class approveAnrechnungUebersicht extends Auth_Controller $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED, - 'status_bezeichnung' => $approved + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED) ); if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED)) @@ -145,13 +138,6 @@ class approveAnrechnungUebersicht extends Auth_Controller return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - // Get statusbezeichnung for 'rejected' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $rejected = getData($this->AnrechnungstatusModel->load('rejected'))[0]; - $rejected = getUserLanguage() == 'German' - ? $rejected->bezeichnung_mehrsprachig[0] - : $rejected->bezeichnung_mehrsprachig[1]; - foreach ($data as $item) { // Reject Anrechnung @@ -160,7 +146,7 @@ class approveAnrechnungUebersicht extends Auth_Controller $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED, - 'status_bezeichnung' => $rejected + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_REJECTED) ); if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED)) @@ -193,13 +179,6 @@ class approveAnrechnungUebersicht extends Auth_Controller return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - // Get statusbezeichnung for 'inProgressLektor' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $inProgressLektor = getData($this->AnrechnungstatusModel->load('inProgressLektor'))[0]; - $inProgressLektor = getUserLanguage() == 'German' - ? $inProgressLektor->bezeichnung_mehrsprachig[0] - : $inProgressLektor->bezeichnung_mehrsprachig[1]; - $retval = array(); $counter = 0; @@ -221,7 +200,7 @@ class approveAnrechnungUebersicht extends Auth_Controller $retval[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, - 'status_bezeichnung' => $inProgressLektor, + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR), 'empfehlung_anrechnung' => null ); } diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php index b335b022c..0c6a1b8f7 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -110,14 +110,8 @@ class reviewAnrechnungDetail extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - - // Get statusbezeichnung for 'inProgressDP' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; - $inProgressDP = getUserLanguage() == 'German' - ? $inProgressDP->bezeichnung_mehrsprachig[0] - : $inProgressDP->bezeichnung_mehrsprachig[1]; - + + // Get lectors person data if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { return $this->outputJsonError('Failed retrieving person data'); @@ -132,7 +126,7 @@ class reviewAnrechnungDetail extends Auth_Controller 'anrechnung_id' => $item['anrechnung_id'], 'empfehlung_anrechnung' => 'true', 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, - 'status_bezeichnung' => $inProgressDP, + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL), 'empfehlung_am' => (new DateTime())->format('d.m.Y'), 'empfehlung_von' => $person->vorname. ' '. $person->nachname ); @@ -171,13 +165,7 @@ class reviewAnrechnungDetail extends Auth_Controller return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - // Get statusbezeichnung for 'inProgressDP' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; - $inProgressDP = getUserLanguage() == 'German' - ? $inProgressDP->bezeichnung_mehrsprachig[0] - : $inProgressDP->bezeichnung_mehrsprachig[1]; - + // Get lectors person data if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0]) { return $this->outputJsonError('Failed retrieving person data'); @@ -192,7 +180,7 @@ class reviewAnrechnungDetail extends Auth_Controller 'anrechnung_id' => $item['anrechnung_id'], 'empfehlung_anrechnung' => 'false', 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, - 'status_bezeichnung' => $inProgressDP, + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL), 'empfehlumg_am' => (new DateTime())->format('d.m.Y'), 'empfehlung_von' => $person->vorname. ' '. $person->nachname ); diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php index 72a955897..cd0b7afaf 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php @@ -89,13 +89,6 @@ class reviewAnrechnungUebersicht extends Auth_Controller { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - - // Get statusbezeichnung for 'inProgressDP' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; - $inProgressDP = getUserLanguage() == 'German' - ? $inProgressDP->bezeichnung_mehrsprachig[0] - : $inProgressDP->bezeichnung_mehrsprachig[1]; foreach ($data as $item) { @@ -106,7 +99,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller 'anrechnung_id' => $item['anrechnung_id'], 'empfehlung_anrechnung' => 'true', 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, - 'status_bezeichnung' => $inProgressDP + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL) ); } } @@ -143,13 +136,6 @@ class reviewAnrechnungUebersicht extends Auth_Controller return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - // Get statusbezeichnung for 'inProgressDP' - $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); - $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0]; - $inProgressDP = getUserLanguage() == 'German' - ? $inProgressDP->bezeichnung_mehrsprachig[0] - : $inProgressDP->bezeichnung_mehrsprachig[1]; - foreach ($data as $item) { // Approve Anrechnung @@ -159,7 +145,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller 'anrechnung_id' => $item['anrechnung_id'], 'empfehlung_anrechnung' => 'false', 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, - 'status_bezeichnung' => $inProgressDP + 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL) ); } } diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 7e3419bef..cecff2405 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -343,6 +343,27 @@ class AnrechnungLib return $genehmigung_data; } + + /** + * Get Anrechnungstatusbezeichnung of given status_kurzbz in users language. + * + * @param $status_kurzbz + * @return mixed + */ + public function getStatusbezeichnung ($status_kurzbz) + { + $this->ci->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig'); + $result = $this->ci->AnrechnungstatusModel->load($status_kurzbz); + + if (!hasData($result)) + { + show_error('Failed retrieving Anrechnungstatusbezeichung'); + } + + return getUserLanguage() == 'German' + ? $result->retval[0]->bezeichnung_mehrsprachig[0] + : $result->retval[0]->bezeichnung_mehrsprachig[1]; + } /** * Get last Anrechnungstatusbezeichnung in users language. From 9ee473d9bd37a7a2bc63a435fcd1d0b92cb782aa Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 30 Mar 2021 16:41:02 +0200 Subject: [PATCH 038/301] Usability: Added Link to Anrechnungen in CIS LV Menu (for lectors) Signed-off-by: cris-technikum --- include/tw/cis_menu_lv.inc.php | 16 +++++++++++++++- locale/de-AT/lehre.php | 1 + locale/en-US/lehre.php | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/tw/cis_menu_lv.inc.php b/include/tw/cis_menu_lv.inc.php index e91431a8e..4b3005c07 100644 --- a/include/tw/cis_menu_lv.inc.php +++ b/include/tw/cis_menu_lv.inc.php @@ -465,7 +465,7 @@ function checkZeilenUmbruch() } } - // Anerkennung nachgewiesener Kenntnisse (Anrechnung) + // Anerkennung nachgewiesener Kenntnisse (Anrechnung) - Anzeige fuer Studenten if((!defined('CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN) && $rechte->isBerechtigt('student/anrechnung_beantragen')) { @@ -479,6 +479,20 @@ function checkZeilenUmbruch() ); } +// Anerkennung nachgewiesener Kenntnisse (Anrechnung) - Anzeige fuer LektorInnen +if((!defined('CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN') || CIS_LEHRVERANSTALTUNG_ANRECHNUNG_ANZEIGEN) + && $rechte->isBerechtigt('lehre/anrechnung_empfehlen')) +{ + $menu[]=array + ( + 'id'=>'core_menu_anerkennungNachgewiesenerKenntnisse_empfehlen', + 'position'=>'128', + 'name'=>$p->t('lehre/anrechnungen'), + 'icon'=>'../../../skin/images/button_listen.png', + 'link' => APP_ROOT. 'index.ci.php/lehre/anrechnung/ReviewAnrechnungUebersicht?studiensemester='.urlencode($angezeigtes_stsem) + ); +} + //************* Menuepunkte anzeigen **************** diff --git a/locale/de-AT/lehre.php b/locale/de-AT/lehre.php index 3f44edcb9..fb938322f 100644 --- a/locale/de-AT/lehre.php +++ b/locale/de-AT/lehre.php @@ -42,4 +42,5 @@ $this->phrasen['lehre/studienplan']='Studienplan'; $this->phrasen['lehre/noteneingabedeaktiviert']='Noteneingabe deaktiviert'; $this->phrasen['lehre/anerkennungNachgewiesenerKenntnisse']='Anerkennung nachgewiesener Kenntnisse'; $this->phrasen['lehre/anrechnung']='Anrechnung'; +$this->phrasen['lehre/anrechnungen']='Anrechnungen'; ?> diff --git a/locale/en-US/lehre.php b/locale/en-US/lehre.php index 603492c84..1fd41700f 100644 --- a/locale/en-US/lehre.php +++ b/locale/en-US/lehre.php @@ -42,5 +42,6 @@ $this->phrasen['lehre/studienplan']='Studienplan'; $this->phrasen['lehre/noteneingabedeaktiviert']='Grading disabled'; $this->phrasen['lehre/anerkennungNachgewiesenerKenntnisse']='Crediting for proven knowledge'; $this->phrasen['lehre/anrechnung']='Exemption'; +$this->phrasen['lehre/anrechnungen']='Exemptions'; ?> From d53d91d7d14a535dba2268b5cc8e52d4ea3425fc Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 30 Mar 2021 17:02:15 +0200 Subject: [PATCH 039/301] Usability: Added filterbutton 'Alle anzeigen, die auf Empfehlung von LektorIn warten' The filterbutton was added to the STGLs Overview site. Signed-off-by: cris-technikum --- .../approveAnrechnungUebersicht.php | 5 +++++ .../anrechnung/approveAnrechnungUebersicht.js | 10 ++++++++++ system/phrasesupdate.php | 20 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 1c88fc643..8da2b5410 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -197,6 +197,11 @@ $this->load->view( title="p->t('ui', 'alleInBearbeitungSTGL'); ?>"> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('lehre', 'ects'); ?>ects ?>
    p->t('lehre', 'lektorInnen'); ?> + lektoren) - 1 ?> + lektoren as $key => $lektor): ?> + vorname . ' ' . $lektor->nachname; + echo $key === $len ? '' : ', ' ?> + +
    p->t('global', 'zgv')); ?>zgv ?>
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?>anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?> + dokumentname) ?> +
    @@ -167,7 +175,7 @@ $this->load->view(
    -
    +
    @@ -207,7 +215,7 @@ $this->load->view(
    -
    +
    diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index 1be013895..05445b7fe 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -83,59 +83,70 @@ $this->load->view( id="reviewAnrechnung-status">anrechnung_id) ? $anrechnungData->insertamum : '-' ?>
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    p->t('person', 'studentIn')); ?>vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
    p->t('lehre', 'ects'); ?>ects ?>
    p->t('lehre', 'lektorInnen'); ?> - lektoren) - 1 ?> - lektoren as $key => $lektor): ?> - vorname . ' ' . $lektor->nachname; - echo $key === $len ? '' : ', ' ?> - -
    p->t('global', 'zgv')); ?>zgv ?>
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?>anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?> - dokumentname) ?> -
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('person', 'studentIn')); ?>vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>lv_bezeichnung ?>
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('lehre', 'ects'); ?>ects ?>
    p->t('lehre', 'lektorInnen'); ?> + lektoren) - 1 ?> + lektoren as $key => $lektor): ?> + vorname . ' ' . $lektor->nachname; + echo $key === $len ? '' : ', ' ?> + +
    p->t('global', 'zgv')); ?>zgv ?>
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?>anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?> + dokumentname) ?> +
    + +
    +
    From 758b9991d539ebc7611a04d82a6c8c3ec675a0a9 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Wed, 19 May 2021 16:18:04 +0200 Subject: [PATCH 114/301] Added Antragssperre for Noten, when STGL wants to create Anrechnung Added check, if LV was already graded and if grades are defined in configs 'blocking grades array'. If so, Anrechnung is not allowed. Signed-off-by: cris-technikum --- .../lehre/anrechnung/CreateAnrechnung.php | 37 +++++++++++++++++++ system/phrasesupdate.php | 20 ++++++++++ 2 files changed, 57 insertions(+) diff --git a/application/controllers/lehre/anrechnung/CreateAnrechnung.php b/application/controllers/lehre/anrechnung/CreateAnrechnung.php index 1b52dddf5..bc594371d 100644 --- a/application/controllers/lehre/anrechnung/CreateAnrechnung.php +++ b/application/controllers/lehre/anrechnung/CreateAnrechnung.php @@ -47,6 +47,9 @@ class CreateAnrechnung extends Auth_Controller ) ); + // Load configs + $this->load->config('anrechnung'); + $this->_setAuthUID(); $this->setControllerId(); @@ -140,6 +143,12 @@ class CreateAnrechnung extends Auth_Controller $this->terminateWithJsonError($this->p->t('global', 'antragBereitsGestellt')); } + // Exit if Lehrveranstaltung was already graded with application blocking grades + if (self::_LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id, $prestudent_id)) + { + $this->terminateWithJsonError($this->p->t('anrechnung', 'antragBenotungBlockiert')); + } + // Upload document $result = self::_uploadFile(); @@ -231,4 +240,32 @@ class CreateAnrechnung extends Auth_Controller return $this->dmslib->upload($dms, 'uploadfile', array('pdf')); } + private function _LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id, $prestudent_id) + { + // Get Student UID + $student_uid = $this->StudentModel->getUID($prestudent_id); + + // Get Note of Lehrveranstaltung + $this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel'); + $result = $this->LvgesamtnoteModel->load(array( + 'student_uid' => $student_uid, + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'lehrveranstaltung_id' => $lehrveranstaltung_id + ) + ); + + // If Lehrveranstaltung has Note + if (hasData($result)) + { + $note = getData($result)[0]->note; + + // Check if Note is a blocking grade + if (in_array($note, $this->config->item('grades_blocking_application'))) + { + return true; + } + } + return false; + } + } \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index c1f96974c..3326f81f9 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -12232,6 +12232,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragBenotungBlockiert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Antrag kann aufgrund der vorhandenen Benotung nicht erstellt werden.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Application can not be created due to existing grade.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From a822f96e8831d4d1eb99fc612d11f9d6e0d1fe03 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Wed, 19 May 2021 16:21:55 +0200 Subject: [PATCH 115/301] Changed Create Anrechnung window to open in new tab Signed-off-by: cris-technikum --- .../views/lehre/anrechnung/approveAnrechnungUebersicht.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index e906c1015..0777e8198 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -226,7 +226,7 @@ $this->load->view( class='fa fa-times'>
    - ' target='_self'> + ' target='_blank'> p->t('global', 'antragAnlegen'); ?>
    From 8f93ab592789f1bc6a1b27bec331e1e07307672d Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Wed, 19 May 2021 17:08:26 +0200 Subject: [PATCH 116/301] =?UTF-8?q?Bugfixed=20TabelWidget:=20Ausgew=C3=A4h?= =?UTF-8?q?lte=20Zeilen=20now=20displaying=20amount=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added 'typeof' to correctly check against 'undefined'. Before it was checking against string. Also corrected all other occurences. Signed-off-by: cris-technikum --- public/js/TableWidget.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/public/js/TableWidget.js b/public/js/TableWidget.js index f3626eec2..6df20066e 100644 --- a/public/js/TableWidget.js +++ b/public/js/TableWidget.js @@ -544,7 +544,7 @@ var FHC_TableWidget = { options.columns = arrayTabulatorColumns; options.data = data.dataset; - if (options.tableWidgetHeader == 'undefined') + if (typeof options.tableWidgetHeader == 'undefined') { options.persistentLayout = true; // enables persistence (default store in localStorage if available, else in cookie) options.persistenceID = data.tableUniqueId; // TableWidget unique id to store persistence data seperately for multiple tables @@ -552,7 +552,8 @@ var FHC_TableWidget = { options.movableColumns = true; // allows changing column order options.tooltipsHeader = true; // set header tooltip with column title options.placeholder = _func_placeholder(); // display text when table is empty - if (options.rowSelectionChanged == 'undefined') + + if (typeof options.rowSelectionChanged == 'undefined') { options.rowSelectionChanged = function(data, rows){ _func_rowSelectionChanged(data, rows); @@ -572,8 +573,8 @@ var FHC_TableWidget = { // ------------------------------------------------------------------------------------------------------------- // Render tableWidgetHeader - if (options.tableWidgetHeader == 'undefined' || - (options.tableWidgetHeader != 'undefined' && options.tableWidgetHeader != false)) + if (typeof options.tableWidgetHeader == 'undefined' || + (typeof options.tableWidgetHeader != 'undefined' && options.tableWidgetHeader != false)) { var tabulatorHeaderHTML = _renderTabulatorHeaderHTML(tableWidgetDiv); tableWidgetDiv.find('#tableWidgetHeader').append(tabulatorHeaderHTML); @@ -591,7 +592,7 @@ var FHC_TableWidget = { * selectButtons: true // tableWidgetFooter properties are checked in _renderTabulatorFooterHTML function * } */ - if (options.tableWidgetFooter != 'undefined' && options.tableWidgetFooter != null) + if (typeof options.tableWidgetFooter != 'undefined' && options.tableWidgetFooter != null) { var tabulatorFooterHTML = _renderTabulatorFooterHTML(options.tableWidgetFooter); tableWidgetDiv.find('#tableWidgetFooter').append(tabulatorFooterHTML); @@ -863,7 +864,7 @@ function _renderTabulatorFooterHTML(tableWidgetFooterOptions){ var tabulatorFooterHTML = ''; // If property selectButtons is true, render 'Alle auswaehlen / Alle abwaehlen' buttons - if (tableWidgetFooterOptions.selectButtons != 'undefined' && tableWidgetFooterOptions.selectButtons == true) + if (typeof tableWidgetFooterOptions.selectButtons != 'undefined' && tableWidgetFooterOptions.selectButtons == true) { tabulatorFooterHTML += ' +
    + + +load->view('templates/FHC-Footer'); ?> diff --git a/public/js/codex/oehbeitrag.js b/public/js/codex/oehbeitrag.js new file mode 100644 index 000000000..6346c8ba0 --- /dev/null +++ b/public/js/codex/oehbeitrag.js @@ -0,0 +1,217 @@ +const BASE_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router; +const CALLED_PATH = FHC_JS_DATA_STORAGE_OBJECT.called_path; +const CONTROLLER_URL = BASE_URL + "/"+CALLED_PATH; + +/** + * javascript file for Öhbeitrag GUI + */ +$(document).ready(function () +{ + //initialise table sorter + //Tablesort.addTablesorter("oehbeitraegeTbl", [], ["zebra"]); + + $("#addNewOeh").click( + function() + { + let callback = function(data) + { + if (FHC_AjaxClient.hasData(data)) + { + let studiensemester = FHC_AjaxClient.getData(data); + let nextOehbeitragId = Oehbeitrag.newBeitragId; + + let newRowHtml = ""+ + ""; + newRowHtml += ""; + newRowHtml += ""; + newRowHtml += ""; + newRowHtml += ""; + newRowHtml += ""+ + ""+ + ""+ + ""; + +/* $("#saveHeading, .saveCell").show();*/ + $("#oehbeitraegeTbl tbody").prepend(newRowHtml); + $("#addOeh_"+Oehbeitrag.newBeitragId).click( + function() + { + // get form data into object + let oehbeitrag = { + "von_studiensemester_kurzbz": $("#von_studiensemester_kurzbz_"+nextOehbeitragId).val(), + "bis_studiensemester_kurzbz": $("#bis_studiensemester_kurzbz_"+nextOehbeitragId).val(), + "studierendenbeitrag": $("#studierendenbeitrag_"+nextOehbeitragId).val().replace(",", "."), + "versicherung": $("#versicherung_"+nextOehbeitragId).val().replace(",", ".") + } + + Oehbeitrag.addOehbeitrag(oehbeitrag, nextOehbeitragId); + } + ); + + // increase counter for newly added rows + Oehbeitrag.newBeitragId++; + } + else + FHC_DialogLib.alertInfo("ÖH-Beiträge für alle Studiensemester festgelegt"); + } + + Oehbeitrag.getValidStudiensemester(callback); + } + ) + + $(".deleteBtn").click( + function() + { + let oehbeitrag_id_prefixed = $(this).prop("id"); + let oehbeitrag_id = oehbeitrag_id_prefixed.substr(oehbeitrag_id_prefixed.indexOf('_')+1); + + Oehbeitrag.deleteOehbeitrag(oehbeitrag_id); + } + ) +}); + +var Oehbeitrag = { + newBeitragId: 0, + // ----------------------------------------------------------------------------------------------------------------- + // ajax calls + getValidStudiensemester: function(callback) + { + FHC_AjaxClient.ajaxCallGet( + CALLED_PATH + "/getValidStudiensemester", + null, + { + successCallback: callback, + errorCallback: function() + { + FHC_DialogLib.alertError('Fehler beim Holen der Semester'); + } + } + ); + }, + addOehbeitrag: function(oehbeitrag, nextOehbeitragId) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/addOehbeitrag', + oehbeitrag, + { + successCallback: function(data, textStatus, jqXHR) { + console.log(data); + if (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + } + else if (FHC_AjaxClient.hasData(data)) + { + console.log(data); + let inserted_id = FHC_AjaxClient.getData(data); + + // refresh table row in GUI + let bis_studiensemester_kurzbz = oehbeitrag.bis_studiensemester_kurzbz == 'null' ? 'unbeschränkt' : oehbeitrag.bis_studiensemester_kurzbz; + + $("#studierendenbeitrag_"+nextOehbeitragId).parent().html(Oehbeitrag._formatDecimalGerman(oehbeitrag.studierendenbeitrag)); + $("#versicherung_"+nextOehbeitragId).parent().html(Oehbeitrag._formatDecimalGerman(oehbeitrag.versicherung)); + $("#von_studiensemester_kurzbz_"+nextOehbeitragId).parent().html(oehbeitrag.von_studiensemester_kurzbz); + $("#bis_studiensemester_kurzbz_"+nextOehbeitragId).parent().html(bis_studiensemester_kurzbz); + + // add delete button instead of save btn + $("#addOeh_"+nextOehbeitragId).parent().html(""); + + $("#delete_"+inserted_id).click( + function() + { + let oehbeitrag_id_prefixed = $(this).prop("id"); + let oehbeitrag_id = oehbeitrag_id_prefixed.substr(oehbeitrag_id_prefixed.indexOf('_')+1); + + Oehbeitrag.deleteOehbeitrag(oehbeitrag_id); + } + ) + } + else + { + FHC_DialogLib.alertError('Fehler beim Hinzufügen des Öhbeitrags'); + } + }, + errorCallback: function() + { + FHC_DialogLib.alertError('Fehler beim Hinzufügen des Öhbeitrags'); + } + } + ); + }, + deleteOehbeitrag: function(oehbeitrag_id) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/deleteOehbeitrag', + {"oehbeitrag_id": oehbeitrag_id}, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + console.log(data); + $("#delete_"+oehbeitrag_id).closest("tr").remove(); + } + else + { + FHC_DialogLib.alertError('Fehler beim Löschen des Öhbeitrags'); + } + }, + errorCallback: function() + { + FHC_DialogLib.alertError('Fehler beim Löschen des Öhbeitrags'); + } + } + ); + }, + + // ----------------------------------------------------------------------------------------------------------------- + // (private) methods + _printStudiensemesterDropdown(name, studiensemester) + { + let rowHtml = ""; + let first = true; + for (let idx in studiensemester) + { + let selected = first ? ' selected' : ''; + let studiensemester_kurzbz = studiensemester[idx].studiensemester_kurzbz; + rowHtml += ""; + first = false; + } + + return rowHtml; + }, + /** + * Formats a numeric value as a float with two decimals + * @param sum + * @returns {string} + */ + _formatDecimalGerman: function(sum) + { + var dec = null; + + if(sum === null) + dec = parseFloat(0).toFixed(2).replace(".", ","); + else if(sum === '') + { + dec = '' + } + else + { + dec = parseFloat(sum).toFixed(2); + + dec = dec.split('.'); + var dec1 = dec[0]; + var dec2 = ',' + dec[1]; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(dec1)) { + dec1 = dec1.replace(rgx, '$1' + '.' + '$2'); + } + dec = dec1 + dec2; + } + return dec; + } +}; From fc3921ecadf453388bfffc35459f59e2d4c8b4ac Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Fri, 28 May 2021 02:15:26 +0200 Subject: [PATCH 129/301] dbupdate_3.3.php: removed "bezeichnung_mehrsprachig" field from bis.tbl_oehbeitrag table check --- 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 990fb0308..8ab352f08 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4856,7 +4856,7 @@ $tabellen=array( "bis.tbl_mobilitaetsprogramm" => array("mobilitaetsprogramm_code","kurzbz","beschreibung","sichtbar","sichtbar_outgoing"), "bis.tbl_nation" => array("nation_code","entwicklungsstand","eu","ewr","kontinent","kurztext","langtext","engltext","sperre","nationengruppe_kurzbz", "iso3166_1_a2","iso3166_1_a3"), "bis.tbl_nationengruppe" => array("nationengruppe_kurzbz","nationengruppe_bezeichnung","aktiv"), - "bis.tbl_oehbeitrag" => array("oehbeitrag_id","studierendenbeitrag","versicherung","von_studiensemester_kurzbz","bis_studiensemester_kurzbz","bezeichnung_mehrsprachig", "insertamum", "insertvon", "updateamum", "updatevon"), + "bis.tbl_oehbeitrag" => array("oehbeitrag_id","studierendenbeitrag","versicherung","von_studiensemester_kurzbz","bis_studiensemester_kurzbz","insertamum","insertvon","updateamum","updatevon"), "bis.tbl_orgform" => array("orgform_kurzbz","code","bezeichnung","rolle","bisorgform_kurzbz","bezeichnung_mehrsprachig"), "bis.tbl_verwendung" => array("verwendung_code","verwendungbez"), "bis.tbl_zgv" => array("zgv_code","zgv_bez","zgv_kurzbz","bezeichnung"), From efbdb02b2c135536f2c890033194546940ecbc7b Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 31 May 2021 12:59:59 +0200 Subject: [PATCH 130/301] beim vorruecken wird pre-wiederholer auf wiederholer gesetzt und wird ein semester zurueckgestuft --- content/student/studentrolledialog.js.php | 6 +++- include/statusgrund.class.php | 14 ++++++++ vilesci/personen/student_vorrueckung.php | 41 ++++++++++++----------- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/content/student/studentrolledialog.js.php b/content/student/studentrolledialog.js.php index ef0291fe4..6f058f526 100644 --- a/content/student/studentrolledialog.js.php +++ b/content/student/studentrolledialog.js.php @@ -118,7 +118,11 @@ function StudentRolleLoadStatusgrund(status_kurzbz, statusgrund_id) { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var menulistgrund = document.getElementById('student-rolle-menulist-statusgrund'); - url='rdf/statusgrund.rdf.php?status_kurzbz='+status_kurzbz+'&include_id='+statusgrund_id+'&ts'+gettimestamp(); + + if (typeof statusgrund_id !== 'undefined') + url='rdf/statusgrund.rdf.php?status_kurzbz='+status_kurzbz+'&include_id='+statusgrund_id+'&ts'+gettimestamp(); + else + url='rdf/statusgrund.rdf.php?status_kurzbz='+status_kurzbz+'&ts'+gettimestamp(); try { diff --git a/include/statusgrund.class.php b/include/statusgrund.class.php index aa084b8c6..c0a2aa3a0 100644 --- a/include/statusgrund.class.php +++ b/include/statusgrund.class.php @@ -179,5 +179,19 @@ class statusgrund extends basis_db return true; } + + public function getByBezeichnung($beschreibung) + { + $qry = " + SELECT + * + FROM + public.tbl_status_grund + WHERE beschreibung[1] = '" . $beschreibung . "' + + "; + $this->db_query($qry); + return $this->db_fetch_object(); + } } ?> diff --git a/vilesci/personen/student_vorrueckung.php b/vilesci/personen/student_vorrueckung.php index 960413c2a..25f1dcbb6 100644 --- a/vilesci/personen/student_vorrueckung.php +++ b/vilesci/personen/student_vorrueckung.php @@ -32,6 +32,7 @@ require_once('../../include/benutzerberechtigung.class.php'); require_once('../../include/lehrverband.class.php'); require_once('../../include/studienordnung.class.php'); require_once('../../include/studienplan.class.php'); +require_once('../../include/statusgrund.class.php'); if (!$db = new basis_db()) die('Es konnte keine Verbindung zum Server aufgebaut werden.'); @@ -301,6 +302,15 @@ if (isset($_POST['vorr'])) } } + $statusgrundObj = new statusgrund($row_status->statusgrund_id); + $newStatusgrund = null; + if ($statusgrundObj->bezeichnung_mehrsprachig[DEFAULT_LANGUAGE] === "Pre-Wiederholer" && $row_status->ausbildungssemester > 1) + { + $s = $row->semester_stlv - 1; + $ausbildungssemester = $row_status->ausbildungssemester - 1; + $newStatusgrund = $statusgrundObj->getByBezeichnung('Wiederholer')->statusgrund_id; + } + $lvb = new lehrverband(); //Lehrverbandgruppe anlegen, wenn noch nicht vorhanden @@ -364,14 +374,15 @@ if (isset($_POST['vorr'])) //Eintragen des neuen Status $sql .= "INSERT INTO public.tbl_prestudentstatus (prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester, datum, insertamum, - insertvon, updateamum, updatevon, ext_id, orgform_kurzbz, studienplan_id) + insertvon, updateamum, updatevon, ext_id, orgform_kurzbz, studienplan_id, statusgrund_id) VALUES (".$db->db_add_param($row->prestudent_id).", ". $db->db_add_param($row_status->status_kurzbz).", ". $db->db_add_param($next_ss).", ". $db->db_add_param($ausbildungssemester).", now(), now(), ". $db->db_add_param($user).", NULL, NULL, NULL, ". $db->db_add_param($row_status->orgform_kurzbz).", ". - $db->db_add_param($studienplan_id).");"; + $db->db_add_param($studienplan_id).", ". + $db->db_add_param($newStatusgrund).");"; } if ($sql != '') { @@ -408,7 +419,7 @@ $outp .= ' Studiengang: - '; //Auswahl Studiengang foreach ($studiengang as $stg) @@ -420,7 +431,7 @@ foreach ($studiengang as $stg) $url .= "&studiensemester_kurzbz_akt=$studiensemester_kurzbz_akt"; $url .= "&studiensemester_kurzbz_zk=$studiensemester_kurzbz_zk"; - $outp .= ""; if (!isset($s[$stg->studiengang_kz])) $s[$stg->studiengang_kz] = new stdClass(); @@ -435,17 +446,12 @@ $outp .= ' $outp .= " Angezeigtes Studiensemester: - \n"; if (isset($ss_arr) && is_array($ss_arr)) { foreach ($ss_arr as $sts) { - if ($studiensemester_kurzbz == $sts) - $sel = " selected "; - else - $sel = ''; - $url = $_SERVER['PHP_SELF']."?stg_kz=$stg_kz"; $url .= "&semester=$semester"; $url .= "&semesterv=$semesterv"; @@ -453,7 +459,7 @@ if (isset($ss_arr) && is_array($ss_arr)) $url .= "&studiensemester_kurzbz_akt=$studiensemester_kurzbz_akt"; $url .= "&studiensemester_kurzbz_zk=$studiensemester_kurzbz_zk"; - $outp .= ""; + $outp .= ""; } } $outp .= " @@ -493,17 +499,12 @@ $outp .= ' Ausgangs-Studiensemester: - '; if (isset($ss_arr) && is_array($ss_arr)) { foreach ($ss_arr as $sts2) { - if ($studiensemester_kurzbz_akt == $sts2) - $sel2 = " selected "; - else - $sel2 = ''; - $url = $_SERVER['PHP_SELF']."?stg_kz=$stg_kz"; $url .= "&semester=$semester"; $url .= "&semesterv=$semesterv"; @@ -511,7 +512,7 @@ if (isset($ss_arr) && is_array($ss_arr)) $url .= "&studiensemester_kurzbz_akt=$sts2"; $url .= "&studiensemester_kurzb_zk=$studiensemester_kurzbz_zk"; - $outp .= ""; + $outp .= ""; } } $outp .= " @@ -547,7 +548,7 @@ $outp .= 'alle -- $outp .= " Ziel-Studiensemester: - \n"; if (isset($ss_arr) && is_array($ss_arr)) { @@ -565,7 +566,7 @@ if (isset($ss_arr) && is_array($ss_arr)) $url .= "&studiensemester_kurzbz_akt=$studiensemester_kurzbz_akt"; $url .= "&studiensemester_kurzbz_zk=$sts3"; - $outp .= ""; + $outp .= ""; } } $outp .= " \n From df8c946bb2c575a9e873735e9fe71d6f13f62f88 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 31 May 2021 23:20:56 +0200 Subject: [PATCH 131/301] enabled updating of oehbeitrag values --- application/controllers/codex/Oehbeitrag.php | 92 ++++++- application/models/codex/Oehbeitrag_model.php | 34 ++- application/views/codex/oehbeitrag.php | 20 +- public/css/codex/oehbeitrag.css | 9 + public/js/codex/oehbeitrag.js | 258 +++++++++++++++--- 5 files changed, 349 insertions(+), 64 deletions(-) create mode 100644 public/css/codex/oehbeitrag.css diff --git a/application/controllers/codex/Oehbeitrag.php b/application/controllers/codex/Oehbeitrag.php index 818815e95..9aa5e4402 100644 --- a/application/controllers/codex/Oehbeitrag.php +++ b/application/controllers/codex/Oehbeitrag.php @@ -13,6 +13,7 @@ class Oehbeitrag extends Auth_Controller 'index' => 'admin:r',// TODO which Berechtigung? 'getValidStudiensemester' => 'admin:r', 'addOehbeitrag' => 'admin:rw', + 'updateOehbeitrag' => 'admin:rw', 'deleteOehbeitrag' => 'admin:rw' ) ); @@ -38,14 +39,16 @@ class Oehbeitrag extends Auth_Controller public function getValidStudiensemester() { + $oehbeitrag_id = $this->input->get('oehbeitrag_id'); + $oehbeitrag_id_arr = isset($oehbeitrag_id) ? array($oehbeitrag_id) : null; + $studiensemester = array(); - $studiensemesterres = $this->OehbeitragModel->getUnassignedStudiensemester(self::STUDIENSEMESTER_START); - + $studiensemesterres = $this->OehbeitragModel->getUnassignedStudiensemester(self::STUDIENSEMESTER_START, $oehbeitrag_id_arr); if (isError($studiensemesterres)) { $this->outputJsonError(getError($studiensemesterres)); - die(); + return; } if (hasData($studiensemesterres)) @@ -63,9 +66,9 @@ class Oehbeitrag extends Auth_Controller if ($bis_studiensemester_kurzbz == 'null') $bis_studiensemester_kurzbz = null; - if (!is_numeric($studierendenbeitrag)) + if (!$this->_checkAmount($studierendenbeitrag)) $this->outputJsonError('Ungültiger Studierendenbeitrag'); - elseif (!is_numeric($versicherung)) + elseif (!$this->_checkAmount($versicherung)) $this->outputJsonError('Ungültige Versicherung'); else { @@ -82,13 +85,65 @@ class Oehbeitrag extends Auth_Controller 'bis_studiensemester_kurzbz' => $bis_studiensemester_kurzbz ); - $insertRes = $this->OehbeitragModel->insert($data); - - $this->outputJson($insertRes); + $this->outputJson($this->OehbeitragModel->insert($data)); } } } + public function updateOehbeitrag() + { + $oehbeitrag_id = $this->input->post("oehbeitrag_id"); + $data = $this->input->post("data"); + + if (!is_numeric($oehbeitrag_id) || isEmptyArray($data)) + { + $this->outputJsonError("Ungültige Parameter"); + return; + } + + foreach ($data as $idx => $value) + { + if ($idx == 'studierendenbeitrag' || $idx == 'versicherung') + { + if (!$this->_checkAmount($value)) + { + $this->outputJsonError("Ungültiger $idx"); + return; + } + } + elseif ($idx == 'von_studiensemester_kurzbz' || $idx == 'bis_studiensemester_kurzbz') + { + $this->OehbeitragModel->addSelect('von_studiensemester_kurzbz, bis_studiensemester_kurzbz'); + $vonBisStudiensemesterRes = $this->OehbeitragModel->load($oehbeitrag_id); + + if (!hasData($vonBisStudiensemesterRes)) + { + $this->outputJsonError("Fehler beim Holen des Öhbeitrags"); + return; + } + + $vonBisStudiensemester = getData($vonBisStudiensemesterRes); + + $von_studiensemester_kurzbz = $idx == 'von_studiensemester_kurzbz' ? $value : $vonBisStudiensemester[0]->von_studiensemester_kurzbz; + + if ($idx == 'bis_studiensemester_kurzbz') + $bis_studiensemester_kurzbz = $data[$idx] = $value == 'null' ? null : $value; + else + $bis_studiensemester_kurzbz = $vonBisStudiensemester[0]->bis_studiensemester_kurzbz; + + $checkStudiensemester = $this->_checkVonBisStudiensemester($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz, $oehbeitrag_id); + + if (isError($checkStudiensemester)) + { + $this->outputJsonError(getError($checkStudiensemester)); + return; + } + } + } + + $this->outputJson($this->OehbeitragModel->update($oehbeitrag_id, $data)); + } + public function deleteOehbeitrag() { $oehbeitrag_id = $this->input->post("oehbeitrag_id"); @@ -98,12 +153,19 @@ class Oehbeitrag extends Auth_Controller private function _loadOehbeitraege() { - $this->OehbeitragModel->addJoin('public.tbl_studiensemester', 'tbl_oehbeitrag.von_studiensemester_kurzbz = tbl_studiensemester.studiensemester_kurzbz'); - $this->OehbeitragModel->addOrder('public.tbl_studiensemester.start', 'DESC'); + $this->OehbeitragModel->addSelect('oehbeitrag_id, von_studiensemester_kurzbz, bis_studiensemester_kurzbz, studierendenbeitrag, versicherung, sem_von.start as von_datum, sem_bis.ende as bis_datum'); + $this->OehbeitragModel->addJoin('public.tbl_studiensemester sem_von', 'tbl_oehbeitrag.von_studiensemester_kurzbz = sem_von.studiensemester_kurzbz'); + $this->OehbeitragModel->addJoin('public.tbl_studiensemester sem_bis', 'tbl_oehbeitrag.bis_studiensemester_kurzbz = sem_bis.studiensemester_kurzbz', 'LEFT'); + $this->OehbeitragModel->addOrder('sem_von.start', 'DESC'); return $this->OehbeitragModel->load(); } - private function _checkVonBisStudiensemester($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz) + private function _checkAmount($amount) + { + return is_numeric($amount) && $amount <= 99999.99; + } + + private function _checkVonBisStudiensemester($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz, $oehbeitrag_id = null) { $regex = "/^(WS|SS)\d{4}$/"; if (!preg_match($regex, $von_studiensemester_kurzbz)) @@ -130,7 +192,13 @@ class Oehbeitrag extends Auth_Controller if ($bis_studiensemester_kurzbz != null && new DateTime($vonStudiensemester) > new DateTime($bisStudiensemester)) return error("Von-Studiensemester größer als Bis-Studiensemester"); - $assignableRes = $this->OehbeitragModel->checkIfStudiensemesterAssignable($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz); + $oehbeitrag_id_arr = isset($oehbeitrag_id) ? array($oehbeitrag_id) : null; + + $assignableRes = $this->OehbeitragModel->checkIfStudiensemesterAssignable( + $von_studiensemester_kurzbz, + $bis_studiensemester_kurzbz, + $oehbeitrag_id_arr + ); if (isError($assignableRes)) return $assignableRes; diff --git a/application/models/codex/Oehbeitrag_model.php b/application/models/codex/Oehbeitrag_model.php index ace532908..abc35a663 100644 --- a/application/models/codex/Oehbeitrag_model.php +++ b/application/models/codex/Oehbeitrag_model.php @@ -34,30 +34,40 @@ class Oehbeitrag_model extends DB_Model } /** - * Gets all Studiensemester for which no Oehbeitrag value assignment. + * Gets all Studiensemester for which no Oehbeitrag value assignment exists. * @param string $start_studiensemester_kurzbz semester before the given semester are ignored * @return object */ - public function getUnassignedStudiensemester($start_studiensemester_kurzbz) + public function getUnassignedStudiensemester($start_studiensemester_kurzbz, $excluded_oehbeitrag_id = array()) { + $params = array($start_studiensemester_kurzbz); + $qry = "SELECT * FROM public.tbl_studiensemester sem WHERE sem.start >= (SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz = ?) AND NOT EXISTS (SELECT 1 FROM bis.tbl_oehbeitrag oeh JOIN public.tbl_studiensemester oeh_von ON oeh.von_studiensemester_kurzbz = oeh_von.studiensemester_kurzbz LEFT JOIN public.tbl_studiensemester oeh_bis ON oeh.bis_studiensemester_kurzbz = oeh_bis.studiensemester_kurzbz - WHERE sem.start::date >= oeh_von.start::date AND (sem.start::date <= oeh_bis.start::date OR oeh_bis.studiensemester_kurzbz IS NULL)) - ORDER BY sem.start"; + WHERE sem.start::date >= oeh_von.start::date AND (sem.start::date <= oeh_bis.start::date OR oeh_bis.studiensemester_kurzbz IS NULL)"; - return $this->execQuery($qry, array($start_studiensemester_kurzbz)); + if (!isEmptyArray($excluded_oehbeitrag_id)) + { + $qry .= " AND oehbeitrag_id NOT IN ?"; + $params[] = $excluded_oehbeitrag_id; + } + + $qry .= ") ORDER BY sem.start"; + + return $this->execQuery($qry, $params); } /** * Checks if a Öhbeitrag can be assigned for a Studiensemester range. * @param string $von_studiensemester_kurzbz * @param string $bis_studiensemester_kurzbz - * @return object + * @param array $excluded_oehbeitrag_id + * @return object array with true if assignable, with false if not */ - public function checkIfStudiensemesterAssignable($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz = null) + public function checkIfStudiensemesterAssignable($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz = null, $excluded_oehbeitrag_id = array()) { $params = array($von_studiensemester_kurzbz); @@ -73,7 +83,15 @@ class Oehbeitrag_model extends DB_Model $allStdSemSpanQry .= " AND EXISTS (SELECT 1 FROM bis.tbl_oehbeitrag JOIN public.tbl_studiensemester sem_von ON tbl_oehbeitrag.von_studiensemester_kurzbz = sem_von.studiensemester_kurzbz LEFT JOIN public.tbl_studiensemester sem_bis ON tbl_oehbeitrag.bis_studiensemester_kurzbz = sem_bis.studiensemester_kurzbz - WHERE sem.start >= sem_von.start AND (sem.start <= sem_bis.start OR sem_bis.studiensemester_kurzbz IS NULL))"; + WHERE sem.start >= sem_von.start AND (sem.start <= sem_bis.start OR sem_bis.studiensemester_kurzbz IS NULL)"; + + if (!isEmptyArray($excluded_oehbeitrag_id)) + { + $allStdSemSpanQry .= " AND oehbeitrag_id NOT IN ?"; + $params[] = $excluded_oehbeitrag_id; + } + + $allStdSemSpanQry .= ")"; $nrAssigned = $this->execQuery($allStdSemSpanQry, $params); diff --git a/application/views/codex/oehbeitrag.php b/application/views/codex/oehbeitrag.php index afb2170ff..47892527a 100644 --- a/application/views/codex/oehbeitrag.php +++ b/application/views/codex/oehbeitrag.php @@ -12,7 +12,7 @@ $this->load->view( 'dialoglib' => true, 'ajaxlib' => true, 'navigationwidget' => true, - 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css'/*, 'public/css/codex/oehbeitrag.css'*/), + 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/codex/oehbeitrag.css'), 'customJSs' => array('public/js/tablesort/tablesort.js', 'public/js/codex/oehbeitrag.js') ) ); @@ -41,7 +41,7 @@ $this->load->view( Gültig von - Gültig bis (inkl.) + Gültig bis Studierendenbetrag Versicherungsbetrag Aktion @@ -50,10 +50,18 @@ $this->load->view( - von_studiensemester_kurzbz ?> - bis_studiensemester_kurzbz == null ? 'unbeschränkt' : $oehbeitrag->bis_studiensemester_kurzbz ?> - studierendenbeitrag, 2, ',', '.') ?> - versicherung, 2, ',', '.') ?> + von_datum), 'd.m.Y') . '/' . $oehbeitrag->von_studiensemester_kurzbz ?> + + + bis_studiensemester_kurzbz == null ? 'unbeschränkt' : (date_format(date_create($oehbeitrag->bis_datum), 'd.m.Y') . '/' . $oehbeitrag->bis_studiensemester_kurzbz) ?> + + + studierendenbeitrag, 2, ',', '.') ?> + + + versicherung, 2, ',', '.') ?> + + diff --git a/public/css/codex/oehbeitrag.css b/public/css/codex/oehbeitrag.css new file mode 100644 index 000000000..335489a1b --- /dev/null +++ b/public/css/codex/oehbeitrag.css @@ -0,0 +1,9 @@ +.inline-inputfield { + width: auto; + display: inline; +} + +.fa-edit, .fa-check { + cursor: pointer; + font-size: 1.2em; +} \ No newline at end of file diff --git a/public/js/codex/oehbeitrag.js b/public/js/codex/oehbeitrag.js index 6346c8ba0..68d39a897 100644 --- a/public/js/codex/oehbeitrag.js +++ b/public/js/codex/oehbeitrag.js @@ -8,8 +8,9 @@ const CONTROLLER_URL = BASE_URL + "/"+CALLED_PATH; $(document).ready(function () { //initialise table sorter - //Tablesort.addTablesorter("oehbeitraegeTbl", [], ["zebra"]); + Oehbeitrag._addTablesorter(); + // set trigger for adding new Oehhbeitrag $("#addNewOeh").click( function() { @@ -22,18 +23,14 @@ $(document).ready(function () let newRowHtml = ""+ ""; - newRowHtml += ""; + newRowHtml += Oehbeitrag._getStudiensemesterDropdown(Oehbeitrag.newBeitragId, 'von_studiensemester_kurzbz', studiensemester); newRowHtml += ""; - newRowHtml += ""; + newRowHtml += Oehbeitrag._getStudiensemesterDropdown(Oehbeitrag.newBeitragId, 'bis_studiensemester_kurzbz', studiensemester); newRowHtml += ""; - newRowHtml += ""+ - ""+ - ""+ + newRowHtml += ""+ + ""+ + " " + + " "+ ""; /* $("#saveHeading, .saveCell").show();*/ @@ -43,13 +40,25 @@ $(document).ready(function () { // get form data into object let oehbeitrag = { - "von_studiensemester_kurzbz": $("#von_studiensemester_kurzbz_"+nextOehbeitragId).val(), - "bis_studiensemester_kurzbz": $("#bis_studiensemester_kurzbz_"+nextOehbeitragId).val(), - "studierendenbeitrag": $("#studierendenbeitrag_"+nextOehbeitragId).val().replace(",", "."), - "versicherung": $("#versicherung_"+nextOehbeitragId).val().replace(",", ".") + "von_studiensemester_kurzbz": $("#input_von_studiensemester_kurzbz_"+nextOehbeitragId).val(), + "bis_studiensemester_kurzbz": $("#input_bis_studiensemester_kurzbz_"+nextOehbeitragId).val(), + "studierendenbeitrag": $("#input_studierendenbeitrag_"+nextOehbeitragId).val().replace(",", "."), + "versicherung": $("#input_versicherung_"+nextOehbeitragId).val().replace(",", ".") } - Oehbeitrag.addOehbeitrag(oehbeitrag, nextOehbeitragId); + let studiensemester_von_bis = { + "von_semester_with_date": $("#input_von_studiensemester_kurzbz_"+nextOehbeitragId+" option:selected").text(), + "bis_semester_with_date": $("#input_bis_studiensemester_kurzbz_"+nextOehbeitragId+" option:selected").text() + } + + Oehbeitrag.addOehbeitrag(oehbeitrag, studiensemester_von_bis, nextOehbeitragId); + } + ); + + $("#delete_"+nextOehbeitragId).click( + function() + { + $(this).parent('td').parent('tr').remove(); } ); @@ -64,26 +73,32 @@ $(document).ready(function () } ) + // set trigger for deleting Oehhbeitrag $(".deleteBtn").click( function() { let oehbeitrag_id_prefixed = $(this).prop("id"); - let oehbeitrag_id = oehbeitrag_id_prefixed.substr(oehbeitrag_id_prefixed.indexOf('_')+1); + let oehbeitrag_id = oehbeitrag_id_prefixed.substr(oehbeitrag_id_prefixed.lastIndexOf('_')+1); Oehbeitrag.deleteOehbeitrag(oehbeitrag_id); } - ) + ); + + // set trigger for updating Oehhbeitrag + Oehbeitrag._setUpdateEvents(); }); var Oehbeitrag = { newBeitragId: 0, // ----------------------------------------------------------------------------------------------------------------- // ajax calls - getValidStudiensemester: function(callback) + getValidStudiensemester: function(callback, oehbeitrag_id) { + let params = oehbeitrag_id ? {"oehbeitrag_id": oehbeitrag_id} : null; + FHC_AjaxClient.ajaxCallGet( CALLED_PATH + "/getValidStudiensemester", - null, + params, { successCallback: callback, errorCallback: function() @@ -93,33 +108,42 @@ var Oehbeitrag = { } ); }, - addOehbeitrag: function(oehbeitrag, nextOehbeitragId) + addOehbeitrag: function(oehbeitrag, studiensemester_von_bis, nextOehbeitragId) { FHC_AjaxClient.ajaxCallPost( CALLED_PATH + '/addOehbeitrag', oehbeitrag, { successCallback: function(data, textStatus, jqXHR) { - console.log(data); if (FHC_AjaxClient.isError(data)) { FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); } else if (FHC_AjaxClient.hasData(data)) { - console.log(data); let inserted_id = FHC_AjaxClient.getData(data); // refresh table row in GUI - let bis_studiensemester_kurzbz = oehbeitrag.bis_studiensemester_kurzbz == 'null' ? 'unbeschränkt' : oehbeitrag.bis_studiensemester_kurzbz; + let bis_studiensemester_kurzbz = oehbeitrag.bis_studiensemester_kurzbz == 'null' ? 'unbeschränkt' : studiensemester_von_bis.bis_semester_with_date; - $("#studierendenbeitrag_"+nextOehbeitragId).parent().html(Oehbeitrag._formatDecimalGerman(oehbeitrag.studierendenbeitrag)); - $("#versicherung_"+nextOehbeitragId).parent().html(Oehbeitrag._formatDecimalGerman(oehbeitrag.versicherung)); - $("#von_studiensemester_kurzbz_"+nextOehbeitragId).parent().html(oehbeitrag.von_studiensemester_kurzbz); - $("#bis_studiensemester_kurzbz_"+nextOehbeitragId).parent().html(bis_studiensemester_kurzbz); + $("#input_studierendenbeitrag_"+nextOehbeitragId).parent('td').html( + Oehbeitrag._formatDecimalGerman(oehbeitrag.studierendenbeitrag)+" " + ); + $("#input_versicherung_"+nextOehbeitragId).parent('td').html( + Oehbeitrag._formatDecimalGerman(oehbeitrag.versicherung)+" " + ); + $("#input_von_studiensemester_kurzbz_"+nextOehbeitragId).parent('td').html( + studiensemester_von_bis.von_semester_with_date+" " + ); + $("#input_bis_studiensemester_kurzbz_"+nextOehbeitragId).parent('td').html( + bis_studiensemester_kurzbz+" " + ); // add delete button instead of save btn - $("#addOeh_"+nextOehbeitragId).parent().html(""); + $("#addOeh_"+nextOehbeitragId).parent('td').html(""); + + // add update and delete events + Oehbeitrag._setUpdateEvents(); $("#delete_"+inserted_id).click( function() @@ -143,6 +167,52 @@ var Oehbeitrag = { } ); }, + updateOehbeitrag(oehbeitrag_id, fieldname, fieldelement, inputtype) + { + let oehbeitragdata = {}; + let fieldvalue = fieldelement.val(); + oehbeitragdata[fieldname] = fieldvalue; + + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/updateOehbeitrag', + { + "oehbeitrag_id": oehbeitrag_id, + "data": oehbeitragdata + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + } + else if (FHC_AjaxClient.hasData(data)) + { + if (inputtype == 'semester') + fieldvalue = $(fieldelement).find("option:selected").text(); + else + fieldvalue = Oehbeitrag._formatDecimalGerman(fieldvalue); + $("#confirm_"+fieldname+"_"+oehbeitrag_id).parent('td').html( + fieldvalue+" " + ); + $("#edit_"+fieldname+"_"+oehbeitrag_id).click( + function() + { + Oehbeitrag._setUpdateEvent($(this).prop("id"), fieldname, inputtype); + } + ); + } + else + { + FHC_DialogLib.alertError('Fehler beim Hinzufügen des Öhbeitrags'); + } + }, + errorCallback: function() + { + FHC_DialogLib.alertError('Fehler beim Hinzufügen des Öhbeitrags'); + } + } + ); + }, deleteOehbeitrag: function(oehbeitrag_id) { FHC_AjaxClient.ajaxCallPost( @@ -152,8 +222,8 @@ var Oehbeitrag = { successCallback: function(data, textStatus, jqXHR) { if (FHC_AjaxClient.hasData(data)) { - console.log(data); $("#delete_"+oehbeitrag_id).closest("tr").remove(); + Oehbeitrag._addTablesorter(); } else { @@ -170,20 +240,128 @@ var Oehbeitrag = { // ----------------------------------------------------------------------------------------------------------------- // (private) methods - _printStudiensemesterDropdown(name, studiensemester) + _renderOehbeitragTable(oehbeitraege) { - let rowHtml = ""; - let first = true; - for (let idx in studiensemester) + for (let oehbeitragidx in oehbeitraege) { - let selected = first ? ' selected' : ''; - let studiensemester_kurzbz = studiensemester[idx].studiensemester_kurzbz; - rowHtml += ""; - first = false; + let oehbeitrag = oehbeitraege[oehbeitragidx]; + + + } + }, + _setUpdateEvents() + { + $(".editStudierendenbeitrag").off('click').click( + function() + { + Oehbeitrag._setUpdateEvent($(this).prop("id"), 'studierendenbeitrag'); + } + ); + + $(".editVersicherung").off('click').click( + function() + { + Oehbeitrag._setUpdateEvent($(this).prop("id"), 'versicherung'); + } + ); + + $(".editBisStudiensemester").off('click').click( + function() + { + Oehbeitrag._setUpdateEvent($(this).prop("id"), 'bis_studiensemester_kurzbz', 'semester'); + } + ); + + $(".editVonStudiensemester").off('click').click( + function() + { + Oehbeitrag._setUpdateEvent($(this).prop("id"), 'von_studiensemester_kurzbz', 'semester'); + } + ); + + }, + _setUpdateEvent(oehbeitrag_id_prefixed, fieldname, inputtype) + { + let initElement = $("#"+oehbeitrag_id_prefixed); // clicked element triggering event + let oehbeitrag_id = oehbeitrag_id_prefixed.substr(oehbeitrag_id_prefixed.lastIndexOf('_')+1); + let currFieldvalue = initElement.parent('td').text().trim(); + + let callback = function(validSemesterData) + { + let inputHtml = ""; + + // if semester dropdown, retrieve valid semester + if (inputtype === 'semester') + { + if (FHC_AjaxClient.hasData(validSemesterData)) + { + let studiensemester = FHC_AjaxClient.getData(validSemesterData); + + inputHtml = Oehbeitrag._getStudiensemesterDropdown(oehbeitrag_id, fieldname, studiensemester, currFieldvalue, 'inline-inputfield'); + } + } + else // otherwise display textfield + { + inputHtml = ""; + } + + inputHtml += " "; + + initElement.parent('td').html(inputHtml); + + // set the update event + $("#confirm_"+fieldname+"_"+oehbeitrag_id).click( + function() + { + Oehbeitrag.updateOehbeitrag(oehbeitrag_id, fieldname, $("#input_" + fieldname + "_" + oehbeitrag_id), inputtype); + } + ); } + if (inputtype == 'semester') + { + Oehbeitrag.getValidStudiensemester(callback, oehbeitrag_id); + } + else + callback(null); + }, + _getStudiensemesterDropdown(oehbeitrag_id, name, studiensemester, selectedDateSemester, formatclass) + { + let selectedDateSemesterArr = null; + if (selectedDateSemester) + { + selectedDateSemesterArr = selectedDateSemester.split('/'); + } + + let rowHtml = ""; + let inlineClass = formatclass != null ? ' '+formatclass : ''; + + rowHtml += ""; + return rowHtml; }, + _compareGermanDates: function(datea, dateb) + { + return datea.split(".").reverse().join("") < dateb.split(".").reverse().join(""); + }, + _addTablesorter: function() + { + let headers = {headers: { 0: { sorter: false}, 1: { sorter: false}, 4: { sorter: false}}}; + Tablesort.addTablesorter("oehbeitraegeTbl", [[0,0],[1,0]], ["zebra"], 8, headers); + }, /** * Formats a numeric value as a float with two decimals * @param sum @@ -213,5 +391,9 @@ var Oehbeitrag = { dec = dec1 + dec2; } return dec; + }, + _formatDateToGerman: function(date) + { + return date.substring(8, 10) + "." + date.substring(5, 7) + "." + date.substring(0, 4); } }; From 59449380527aad505a1937af3b97616add273b59 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 1 Jun 2021 15:18:54 +0200 Subject: [PATCH 132/301] Oehbeitraege GUI: correct table sorting and refreshing of tablesorter --- application/models/codex/Oehbeitrag_model.php | 3 ++- public/css/codex/oehbeitrag.css | 9 +++++-- public/js/codex/oehbeitrag.js | 26 +++++++++++++++++-- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/application/models/codex/Oehbeitrag_model.php b/application/models/codex/Oehbeitrag_model.php index abc35a663..0df016ba8 100644 --- a/application/models/codex/Oehbeitrag_model.php +++ b/application/models/codex/Oehbeitrag_model.php @@ -36,6 +36,7 @@ class Oehbeitrag_model extends DB_Model /** * Gets all Studiensemester for which no Oehbeitrag value assignment exists. * @param string $start_studiensemester_kurzbz semester before the given semester are ignored + * @param array $excluded_oehbeitrag_id oehbeitraege to be ignored, i.e. which are assigned * @return object */ public function getUnassignedStudiensemester($start_studiensemester_kurzbz, $excluded_oehbeitrag_id = array()) @@ -64,7 +65,7 @@ class Oehbeitrag_model extends DB_Model * Checks if a Öhbeitrag can be assigned for a Studiensemester range. * @param string $von_studiensemester_kurzbz * @param string $bis_studiensemester_kurzbz - * @param array $excluded_oehbeitrag_id + * @param array $excluded_oehbeitrag_id oehbeitraege to ignore, i.e. which are assignable * @return object array with true if assignable, with false if not */ public function checkIfStudiensemesterAssignable($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz = null, $excluded_oehbeitrag_id = array()) diff --git a/public/css/codex/oehbeitrag.css b/public/css/codex/oehbeitrag.css index 335489a1b..103c5d367 100644 --- a/public/css/codex/oehbeitrag.css +++ b/public/css/codex/oehbeitrag.css @@ -3,7 +3,12 @@ display: inline; } -.fa-edit, .fa-check { +.fa-edit { cursor: pointer; font-size: 1.2em; -} \ No newline at end of file +} + +.fa-check { + cursor: pointer; + font-size: 1.4em; +} diff --git a/public/js/codex/oehbeitrag.js b/public/js/codex/oehbeitrag.js index 68d39a897..9186c1bf0 100644 --- a/public/js/codex/oehbeitrag.js +++ b/public/js/codex/oehbeitrag.js @@ -154,6 +154,9 @@ var Oehbeitrag = { Oehbeitrag.deleteOehbeitrag(oehbeitrag_id); } ) + + // refresh tablesorter + Oehbeitrag._addTablesorter(); } else { @@ -200,6 +203,8 @@ var Oehbeitrag = { Oehbeitrag._setUpdateEvent($(this).prop("id"), fieldname, inputtype); } ); + + Oehbeitrag._addTablesorter(); } else { @@ -359,8 +364,25 @@ var Oehbeitrag = { }, _addTablesorter: function() { - let headers = {headers: { 0: { sorter: false}, 1: { sorter: false}, 4: { sorter: false}}}; - Tablesort.addTablesorter("oehbeitraegeTbl", [[0,0],[1,0]], ["zebra"], 8, headers); + // add parser through the tablesorter addParser method + $.tablesorter.addParser({ + // set a unique id + id: 'germandatesort', + is: function(s, table, cell, $cell) { + // return false so this parser is not auto detected + return false; + }, + format: function(s, table, cell, cellIndex) { + // format data, should sort by leading german date + return s.substring(0, 10).split(".").reverse().join(""); + }, + // set type, either numeric or text + type: 'numeric' + }); + + let headers = {headers: { 0: {sorter: "germandatesort"}, 1: {sorter: "germandatesort"}, 4: {sorter: false}}}; + + Tablesort.addTablesorter("oehbeitraegeTbl", [[0,1]], ["zebra"], 8, headers); }, /** * Formats a numeric value as a float with two decimals From b206c019dfcf1da013697e77f33c58fee5b6e8fd Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 9 Jun 2021 01:34:47 +0200 Subject: [PATCH 133/301] Oehbeitrag GUI: correct decimal format conversion before after update --- application/controllers/codex/Oehbeitrag.php | 4 +- public/js/codex/oehbeitrag.js | 58 +++++++++----------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/application/controllers/codex/Oehbeitrag.php b/application/controllers/codex/Oehbeitrag.php index 9aa5e4402..7fc8f381f 100644 --- a/application/controllers/codex/Oehbeitrag.php +++ b/application/controllers/codex/Oehbeitrag.php @@ -107,7 +107,7 @@ class Oehbeitrag extends Auth_Controller { if (!$this->_checkAmount($value)) { - $this->outputJsonError("Ungültiger $idx"); + $this->outputJsonError("Ungültige(r) $idx"); return; } } @@ -162,7 +162,7 @@ class Oehbeitrag extends Auth_Controller private function _checkAmount($amount) { - return is_numeric($amount) && $amount <= 99999.99; + return is_numeric($amount) && (float) $amount <= 99999.99; } private function _checkVonBisStudiensemester($von_studiensemester_kurzbz, $bis_studiensemester_kurzbz, $oehbeitrag_id = null) diff --git a/public/js/codex/oehbeitrag.js b/public/js/codex/oehbeitrag.js index 9186c1bf0..f8fc403f0 100644 --- a/public/js/codex/oehbeitrag.js +++ b/public/js/codex/oehbeitrag.js @@ -127,10 +127,10 @@ var Oehbeitrag = { let bis_studiensemester_kurzbz = oehbeitrag.bis_studiensemester_kurzbz == 'null' ? 'unbeschränkt' : studiensemester_von_bis.bis_semester_with_date; $("#input_studierendenbeitrag_"+nextOehbeitragId).parent('td').html( - Oehbeitrag._formatDecimalGerman(oehbeitrag.studierendenbeitrag)+" " + Oehbeitrag._formatDecimal(oehbeitrag.studierendenbeitrag)+" " ); $("#input_versicherung_"+nextOehbeitragId).parent('td').html( - Oehbeitrag._formatDecimalGerman(oehbeitrag.versicherung)+" " + Oehbeitrag._formatDecimal(oehbeitrag.versicherung)+" " ); $("#input_von_studiensemester_kurzbz_"+nextOehbeitragId).parent('td').html( studiensemester_von_bis.von_semester_with_date+" " @@ -174,6 +174,10 @@ var Oehbeitrag = { { let oehbeitragdata = {}; let fieldvalue = fieldelement.val(); + + if (inputtype != 'semester') // formal number as decimal with point separator + fieldvalue = Oehbeitrag._formatDecimal(fieldvalue, "."); + oehbeitragdata[fieldname] = fieldvalue; FHC_AjaxClient.ajaxCallPost( @@ -193,7 +197,7 @@ var Oehbeitrag = { if (inputtype == 'semester') fieldvalue = $(fieldelement).find("option:selected").text(); else - fieldvalue = Oehbeitrag._formatDecimalGerman(fieldvalue); + fieldvalue = Oehbeitrag._formatDecimal(fieldvalue); $("#confirm_"+fieldname+"_"+oehbeitrag_id).parent('td').html( fieldvalue+" " ); @@ -245,15 +249,6 @@ var Oehbeitrag = { // ----------------------------------------------------------------------------------------------------------------- // (private) methods - _renderOehbeitragTable(oehbeitraege) - { - for (let oehbeitragidx in oehbeitraege) - { - let oehbeitrag = oehbeitraege[oehbeitragidx]; - - - } - }, _setUpdateEvents() { $(".editStudierendenbeitrag").off('click').click( @@ -386,32 +381,31 @@ var Oehbeitrag = { }, /** * Formats a numeric value as a float with two decimals - * @param sum - * @returns {string} + * @param value + * @param decSeparator the new decimal separator + * @returns {string} formatted value */ - _formatDecimalGerman: function(sum) + _formatDecimal: function(value, decSeparator) { - var dec = null; + let dec = null; + let prevSeparator = "."; - if(sum === null) - dec = parseFloat(0).toFixed(2).replace(".", ","); - else if(sum === '') - { - dec = '' - } + if (decSeparator === ".") + prevSeparator = ","; else - { - dec = parseFloat(sum).toFixed(2); + decSeparator = ","; - dec = dec.split('.'); - var dec1 = dec[0]; - var dec2 = ',' + dec[1]; - var rgx = /(\d+)(\d{3})/; - while (rgx.test(dec1)) { - dec1 = dec1.replace(rgx, '$1' + '.' + '$2'); - } - dec = dec1 + dec2; + dec = value.split(prevSeparator); + if (dec.length === 2) + { + dec = parseFloat(dec[0] + '.' + dec[1]).toFixed(2); + dec = dec.replace(prevSeparator, decSeparator); } + else if (Math.floor(value) == value) // if integer, add zeros + dec = value + decSeparator + '00'; + else + dec = value; + return dec; }, _formatDateToGerman: function(date) From 5cc98562e30d35e0aba304fa21ff6ca1f51906a1 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Thu, 10 Jun 2021 09:37:16 +0200 Subject: [PATCH 134/301] Added focus on filterbutton, if table starts with stored filter Because tabulators persistentFilter = true, the table is initialized with the stored filter. Therfore probably less data was shown, but was not clear, because the corresponding filterbutton was not focused. Now the button is focused depending on the filter detected. Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungUebersicht.js | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index 7f00d20a6..60a890ce1 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -50,6 +50,7 @@ function hf_filterTrueFalse(headerValue, rowValue){ } // Adds column details +// Sets focus on filterbutton, if table starts with stored filter. function func_tableBuilt(table) { table.addColumn( { @@ -67,6 +68,12 @@ function func_tableBuilt(table) { } }, false, "status" // place column after status ); + + // Set focus on filterbutton + let filters = table.getFilters(); + if (filters.length > 0){ + approveAnrechnung.focusFilterbuttonIfTableStartsWithStoredFilter(filters); + } } // Formats the rows @@ -507,5 +514,40 @@ var approveAnrechnung = { // Copy begruendung into textarea textarea.val($.trim($(elem).parent().text())); + }, + focusFilterbuttonIfTableStartsWithStoredFilter(filters){ + switch (filters[0].value) { + case ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR: + $("#show-inProgressLektor").addClass('active'); + break; + case ANRECHNUNGSTATUS_APPROVED: + $("#show-approved").addClass('active'); + break; + case ANRECHNUNGSTATUS_REJECTED: + $("#show-rejected").addClass('active'); + break; + case ANRECHNUNGSTATUS_PROGRESSED_BY_STGL: + if (filters.length > 1) + { + if (filters[1].field == 'empfehlung_anrechnung') + { + if (filters[1].value === 'true') + { + $("#show-recommended").addClass('active'); + } + else + { + $("#show-not-recommended").addClass('active'); + } + } + } + else + { + $("#show-inProgressDP").addClass('active'); + } + + break; + + } } } \ No newline at end of file From 179299443b657e90dbeb2d0d67b7efe240d356aa Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Thu, 10 Jun 2021 10:39:18 +0200 Subject: [PATCH 135/301] Bugfixed: Genehmigungsbuttons now working directly after withdrawing Before buttons were not working, if genehmigungsbuttons were immidiately used twice. (e.g. approving - withdrawing - rejecting). This is fixed now. Signed-off-by: cris-technikum --- public/js/lehre/anrechnung/approveAnrechnungDetail.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js index 975939c19..c2c2899ee 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -38,6 +38,7 @@ $(function(){ if (genehmigung_panel.is(":hidden")) { // Show genehmigung panel if is hidden + genehmigung_panel.css('display', 'block'); genehmigung_panel.slideDown(400, function() { $('html, body').animate({ scrollTop: genehmigung_panel.offset().top // Move genehmigung panel bottom up to be visible within window screen @@ -104,6 +105,7 @@ $(function(){ if (begruendung_panel.is(":hidden")) { // Show begruendung panel if is hidden + begruendung_panel.css('display', 'block'); begruendung_panel.slideDown(400, function() { $('html, body').animate({ scrollTop: begruendung_panel.offset().top // Move begruendung panel bottom up to be visible within window screen @@ -442,7 +444,8 @@ var approveAnrechnungDetail = { $('#approveAnrechnungDetail-withdraw-request-recommedation').removeClass('hidden'); }, formatGenehmigungIsPositiv: function(abgeschlossenAm, abgeschlossenVon, statusBezeichnung){ - $('#approveAnrechnungDetail-genehmigungDetail').children().addClass('hidden'); + $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsNull').addClass('hidden'); + $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsNegativ').addClass('hidden'); $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsPositiv').removeClass('hidden'); $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); $('#approveAnrechnungDetail-status_kurzbz').closest('div').removeClass('alert-warning').addClass('alert-success'); @@ -456,7 +459,8 @@ var approveAnrechnungDetail = { $('#approveAnrechnungDetail-withdraw-anrechnung-approvement').removeClass('hidden'); }, formatGenehmigungIsNegativ: function(abgeschlossenAm, abgeschlossenVon, statusBezeichnung, begruendung){ - $('#approveAnrechnungDetail-genehmigungDetail').children().addClass('hidden'); + $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsNull').addClass('hidden'); + $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsPositiv').addClass('hidden'); $('#approveAnrechnungDetail-genehmigungDetail-genehmigungIsNegativ').removeClass('hidden'); $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); $('#approveAnrechnungDetail-status_kurzbz').closest('div').removeClass('alert-warning').addClass('alert-danger'); From 531174dcb593f0e3c94eb37f0627ba92bffa4af7 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 11 Jun 2021 09:17:26 +0200 Subject: [PATCH 136/301] #13533 Button Homeoffice: Haken beim Editieren --- cis/private/tools/zeitaufzeichnung.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 0dc621182..9aa978f8b 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -136,6 +136,7 @@ $pause_von = (isset($_POST['pause_von'])?$_POST['pause_von']:date('H:i')); $pause_bis = (isset($_POST['pause_bis'])?$_POST['pause_bis']:date('H:i')); $von_pause = $von_datum.' '.$pause_von; $bis_pause = $bis_datum.' '.$pause_bis; +$homeofficeChecked = ''; $beschreibung = (isset($_POST['beschreibung'])?$_POST['beschreibung']:''); $service_id = (isset($_POST['service_id'])?$_POST['service_id']:''); @@ -517,7 +518,7 @@ echo ' } return true; } - + function resetProjekt() { $("#projekt").val(""); @@ -809,7 +810,7 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import'])) $zeit->service_id = $data[8]; if (isset($data[9])) { - if(strtolower($data[9]=='true')) + if (strtolower($data[9] == 'true')) { $zeit->homeoffice = true; } @@ -1074,13 +1075,13 @@ else echo ' '; //Laden der Daten zum aendern -if(isset($_GET['type']) && $_GET['type']=='edit') +if (isset($_GET['type']) && $_GET['type']=='edit') { $zeit = new zeitaufzeichnung(); - if($zeit->load($zeitaufzeichnung_id)) + if ($zeit->load($zeitaufzeichnung_id)) { - if($zeit->uid==$user) + if ($zeit->uid == $user) { $uid = $zeit->uid; $aktivitaet_kurzbz = $zeit->aktivitaet_kurzbz; @@ -1092,9 +1093,11 @@ if(isset($_GET['type']) && $_GET['type']=='edit') $projekt_kurzbz = $zeit->projekt_kurzbz; $projektphase_id = $zeit->projektphase_id; $homeoffice = $zeit->homeoffice; + $homeoffice[0] == 't' ? $homeofficeChecked = 'checked' : $homeofficeChecked = ''; $service_id = $zeit->service_id; $kunde_uid = $zeit->kunde_uid; + $projektphase = new projektphase(); $projektphasen = array(); @@ -1470,7 +1473,7 @@ if($projekt->getProjekteMitarbeiter($user, true))   - Homeoffice + Homeoffice From fd4740e7e0d81c001507d464b3f9c58e9596f60c Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 14 Jun 2021 14:46:14 +0200 Subject: [PATCH 137/301] Added Note 'intern angerechnet' Signed-off-by: cris-technikum --- system/dbupdate_3.3.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index e658d7a97..fc5a6fd83 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -532,6 +532,26 @@ if($result = @$db->db_query("SELECT 1 FROM lehre.tbl_note WHERE anmerkung = 'ue' } } +// Note "intern angerechnet" hinzufügen +if($result = @$db->db_query("SELECT 1 FROM lehre.tbl_note WHERE anmerkung = 'iar' AND (bezeichnung = 'intern angerechnet' OR bezeichnung = 'Intern angerechnet');")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = " + INSERT INTO + lehre.tbl_note(note, bezeichnung, anmerkung, farbe, positiv, notenwert, aktiv, lehre, offiziell, bezeichnung_mehrsprachig, lkt_ueberschreibbar) + VALUES( + (SELECT max(note)+1 FROM lehre.tbl_note),'intern angerechnet', 'iar', NULL, TRUE, NULL, TRUE, FALSE, FALSE, '{\"intern angerechnet\",\"internally credited\"}', FALSE + ); + "; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_note: '.$db->db_last_error().'
    '; + else + echo '
    lehre.tbl_note: Note intern angerechnet hinzugefuegt!
    '; + } +} + // Spalte offiziell in lehre.tbl_note if(!$result = @$db->db_query("SELECT offiziell FROM lehre.tbl_note LIMIT 1;")) { From 5765be1ab89093e7886ca6a0a9c906aab3d368aa Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 14 Jun 2021 14:46:38 +0200 Subject: [PATCH 138/301] Added Note 'nicht zugelassen' Signed-off-by: cris-technikum --- system/dbupdate_3.3.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index fc5a6fd83..5a91e5e33 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -552,6 +552,26 @@ if($result = @$db->db_query("SELECT 1 FROM lehre.tbl_note WHERE anmerkung = 'iar } } +// Note "nicht zugelassen" hinzufügen +if($result = @$db->db_query("SELECT 1 FROM lehre.tbl_note WHERE anmerkung = 'nz' AND (bezeichnung = 'nicht zugelassen' OR bezeichnung = 'Nicht zugelassen');")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = " + INSERT INTO + lehre.tbl_note(note, bezeichnung, anmerkung, farbe, positiv, notenwert, aktiv, lehre, offiziell, bezeichnung_mehrsprachig, lkt_ueberschreibbar) + VALUES( + (SELECT max(note)+1 FROM lehre.tbl_note), 'nicht zugelassen', 'nz', NULL, TRUE, NULL, TRUE, FALSE, FALSE, '{\"nicht zugelassen\",\"not admitted\"}', FALSE + ); + "; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_note: '.$db->db_last_error().'
    '; + else + echo '
    lehre.tbl_note: Note nicht zugelassen hinzugefuegt!
    '; + } +} + // Spalte offiziell in lehre.tbl_note if(!$result = @$db->db_query("SELECT offiziell FROM lehre.tbl_note LIMIT 1;")) { From 31957b813fc27c51d2eb31caf668771c445c9246 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 14 Jun 2021 15:29:26 +0200 Subject: [PATCH 139/301] Anwesenheitsliste: Intern angerechnete als 'Angerechnet' markieren (ar) Signed-off-by: cris-technikum --- cis/private/lehre/anwesenheitsliste.pdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cis/private/lehre/anwesenheitsliste.pdf.php b/cis/private/lehre/anwesenheitsliste.pdf.php index eef40ff3f..b49ce83ac 100644 --- a/cis/private/lehre/anwesenheitsliste.pdf.php +++ b/cis/private/lehre/anwesenheitsliste.pdf.php @@ -213,7 +213,7 @@ if($result = $db->db_query($qry)) if($row->bisio_id!='' && $row->status!='Incoming' && ($row->bis > $stsemdatumvon || $row->bis=='') && $row->von < $stsemdatumbis) //Outgoing $zusatz.='(o)(ab '.$datum->formatDatum($row->von,'d.m.Y').')'; - if($row->note==6) //angerechnet + if($row->note==6 || $row->note == 19) //angerechnet oder intern angerechnet $zusatz.='(ar)'; if($row->mitarbeiter_uid!='') //mitarbeiter From 3d224123214aff06788b042c6a14f2d0e6c6626f Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 14 Jun 2021 18:39:29 +0200 Subject: [PATCH 140/301] added parameters aktiv, lehre, offiziell, positiv to getByPerson method of Zeugnisnote_model.php --- .../models/education/Zeugnisnote_model.php | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/application/models/education/Zeugnisnote_model.php b/application/models/education/Zeugnisnote_model.php index 1b2081148..306f56e8c 100644 --- a/application/models/education/Zeugnisnote_model.php +++ b/application/models/education/Zeugnisnote_model.php @@ -17,23 +17,55 @@ class Zeugnisnote_model extends DB_Model * Gets Pruefungen of a person for a Studiensemester. * @param int $person_id * @param string $studiensemester_kurzbz + * @param bool $aktiv + * @param bool $lehre + * @param bool $offiziell + * @param bool $positiv * @return object */ - public function getByPerson($person_id, $studiensemester_kurzbz) + public function getByPerson($person_id, $studiensemester_kurzbz, $aktiv = true, $lehre = null, $offiziell = null, $positiv = null) { + $params = array($person_id, $studiensemester_kurzbz); + $qry = ' - SELECT note.*, pers.matr_nr, lv.ects, stg.studiengang_kz, prst.prestudent_id, stg.erhalter_kz, + SELECT zgnisnote.*, pers.matr_nr, lv.ects, stg.studiengang_kz, prst.prestudent_id, stg.erhalter_kz, UPPER(stg.typ||stg.kurzbz) AS studiengang, stg.bezeichnung AS studiengang_bezeichnung FROM public.tbl_person pers JOIN public.tbl_prestudent prst USING (person_id) JOIN public.tbl_student USING (prestudent_id) - JOIN lehre.tbl_zeugnisnote note USING (student_uid) + JOIN lehre.tbl_zeugnisnote zgnisnote USING (student_uid) + JOIN lehre.tbl_note note ON zgnisnote.note = note.note JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id) JOIN public.tbl_studiengang stg ON prst.studiengang_kz = stg.studiengang_kz WHERE pers.person_id = ? - AND note.studiensemester_kurzbz = ? - ORDER BY note.benotungsdatum'; + AND zgnisnote.studiensemester_kurzbz = ?'; - return $this->execQuery($qry, array($person_id, $studiensemester_kurzbz)); + if (isset($aktiv)) + { + $qry .= ' AND note.aktiv = ?'; + $params[] = $aktiv; + } + + if (isset($lehre)) + { + $qry .= ' AND note.lehre = ?'; + $params[] = $lehre; + } + + if (isset($offiziell)) + { + $qry .= ' AND note.offiziell = ?'; + $params[] = $offiziell; + } + + if (isset($positiv)) + { + $qry .= ' AND note.positiv = ?'; + $params[] = $positiv; + } + + $qry .= ' ORDER BY zgnisnote.benotungsdatum'; + + return $this->execQuery($qry, $params); } } From 2682026fec25ad77594cc2a5daa92742aa8b2a51 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 14 Jun 2021 19:13:38 +0200 Subject: [PATCH 141/301] add column melderelevant to public.tbl_studiengang --- system/dbupdate_3.3.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 914877ca3..1437ddfe8 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4767,7 +4767,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht } } -//Spalte matr_aktiv in tbl_person zum Markieren von noch nicht scharfgeschaltenen Matrikelnummern vom Datenverbund +// Spalte matr_aktiv in tbl_person zum Markieren von noch nicht scharfgeschaltenen Matrikelnummern vom Datenverbund if(!$result = @$db->db_query("SELECT matr_aktiv FROM public.tbl_person LIMIT 1")) { $qry = "ALTER TABLE public.tbl_person ADD COLUMN matr_aktiv boolean NOT NULL DEFAULT false; @@ -4844,6 +4844,17 @@ if (!$result = @$db->db_query('SELECT 1 FROM bis.tbl_oehbeitrag LIMIT 1')) echo '
    Granted privileges to vilesci on bis.tbl_oehbeitrag'; } +// Add column melderelevant to public.tbl_studiengang +if(!$result = @$db->db_query("SELECT melderelevant FROM public.tbl_studiengang")) +{ + $qry = "ALTER TABLE public.tbl_studiengang ADD COLUMN melderelevant boolean NOT NULL DEFAULT FALSE;"; + + if(!$db->db_query($qry)) + echo 'public.tbl_studiengang: '.$db->db_last_error().'
    '; + else + echo '
    public.tbl_studiengang: Neue Spalte melderelevant hinzugefuegt.'; +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

    Pruefe Tabellen und Attribute!

    '; @@ -5075,7 +5086,7 @@ $tabellen=array( "public.tbl_statistik" => array("statistik_kurzbz","bezeichnung","url","gruppe","sql","content_id","insertamum","insertvon","updateamum","updatevon","berechtigung_kurzbz","publish","preferences"), "public.tbl_student" => array("student_uid","matrikelnr","prestudent_id","studiengang_kz","semester","verband","gruppe","updateamum","updatevon","insertamum","insertvon","ext_id"), "public.tbl_studentlehrverband" => array("student_uid","studiensemester_kurzbz","studiengang_kz","semester","verband","gruppe","updateamum","updatevon","insertamum","insertvon","ext_id"), - "public.tbl_studiengang" => array("studiengang_kz","kurzbz","kurzbzlang","typ","bezeichnung","english","farbe","email","telefon","max_semester","max_verband","max_gruppe","erhalter_kz","bescheid","bescheidbgbl1","bescheidbgbl2","bescheidgz","bescheidvom","orgform_kurzbz","titelbescheidvom","aktiv","ext_id","zusatzinfo_html","moodle","sprache","testtool_sprachwahl","studienplaetze","oe_kurzbz","lgartcode","mischform","projektarbeit_note_anzeige", "onlinebewerbung"), + "public.tbl_studiengang" => array("studiengang_kz","kurzbz","kurzbzlang","typ","bezeichnung","english","farbe","email","telefon","max_semester","max_verband","max_gruppe","erhalter_kz","bescheid","bescheidbgbl1","bescheidbgbl2","bescheidgz","bescheidvom","orgform_kurzbz","titelbescheidvom","aktiv","ext_id","zusatzinfo_html","moodle","sprache","testtool_sprachwahl","studienplaetze","oe_kurzbz","lgartcode","mischform","projektarbeit_note_anzeige", "onlinebewerbung","melderelevant"), "public.tbl_studiengangstyp" => array("typ","bezeichnung","beschreibung","bezeichnung_mehrsprachig"), "public.tbl_studienjahr" => array("studienjahr_kurzbz","bezeichnung"), "public.tbl_studiensemester" => array("studiensemester_kurzbz","bezeichnung","start","ende","studienjahr_kurzbz","ext_id","beschreibung","onlinebewerbung"), From 27b0679640baeeceb776a25cd5a875c917181fc3 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 15 Jun 2021 19:03:41 +0200 Subject: [PATCH 142/301] dbupdate_3.3.php: column melderelevant prefill with values, added comment --- system/dbupdate_3.3.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 1437ddfe8..b4d322590 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4844,10 +4844,12 @@ if (!$result = @$db->db_query('SELECT 1 FROM bis.tbl_oehbeitrag LIMIT 1')) echo '
    Granted privileges to vilesci on bis.tbl_oehbeitrag'; } -// Add column melderelevant to public.tbl_studiengang +// Add column melderelevant to public.tbl_studiengang and prefill values if(!$result = @$db->db_query("SELECT melderelevant FROM public.tbl_studiengang")) { - $qry = "ALTER TABLE public.tbl_studiengang ADD COLUMN melderelevant boolean NOT NULL DEFAULT FALSE;"; + $qry = "ALTER TABLE public.tbl_studiengang ADD COLUMN melderelevant boolean NOT NULL DEFAULT FALSE; + UPDATE public.tbl_studiengang SET melderelevant = TRUE WHERE tbl_studiengang.studiengang_kz < 10000 AND tbl_studiengang.studiengang_kz <> 0; + COMMENT ON COLUMN public.tbl_studiengang.melderelevant IS 'Zeigt an, ob Studenten aus Studiengang an Ministerien gemeldet werden müssen'"; if(!$db->db_query($qry)) echo 'public.tbl_studiengang: '.$db->db_last_error().'
    '; From 7aa32dff8314863ff890c2feb944731d3bbe59e4 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 16 Jun 2021 08:18:49 +0200 Subject: [PATCH 143/301] status zum studenten aendern auch mit menupopup --- content/student/studentenoverlay.xul.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/student/studentenoverlay.xul.php b/content/student/studentenoverlay.xul.php index 9865f2719..a41693240 100644 --- a/content/student/studentenoverlay.xul.php +++ b/content/student/studentenoverlay.xul.php @@ -126,6 +126,10 @@ else echo ' '; + + if ($id == 'student-toolbar-student') + echo ''; + foreach($gruende[$status_kurzbz] as $row) { $commandWithID = str_replace('STATUSGRUNDID',$row['statusgrund_id'],$command); From 584a8cf10005c8fc6dcb5948d00510356bd63184 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 16 Jun 2021 12:48:32 +0200 Subject: [PATCH 144/301] abfrage auf null beim objekt hinzugefuegt --- public/js/AjaxLib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/AjaxLib.js b/public/js/AjaxLib.js index 6da875384..fb98e4fb8 100644 --- a/public/js/AjaxLib.js +++ b/public/js/AjaxLib.js @@ -471,7 +471,7 @@ var FHC_AjaxClient = { if (typeof controllerParameters == "object") { // If controllerParameters contains uploaded file(s) as FileList - if (FHC_AjaxClient._hasFileList(controllerParameters)) + if (controllerParameters !== null && FHC_AjaxClient._hasFileList(controllerParameters)) { // Convert controllerParameters to FormData object to easily pass uploaded files via AJAX var data = FHC_AjaxClient._convertToFormDataObject(controllerParameters); // data is a FormData object now From aa94110791964d4c0b1950f68aa9c5b1e47133a4 Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 16 Jun 2021 13:34:31 +0200 Subject: [PATCH 145/301] 13623 Anzeige Projekt und Phasen in Editiersicht --- cis/private/tools/zeitaufzeichnung.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 9aa978f8b..277364a33 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -223,7 +223,7 @@ echo ' @@ -1503,6 +1535,8 @@ if ($projekt->getProjekteMitarbeiter($user, true)) $von_ts = $datum->mktime_fromtimestamp($datum->formatDatum($von, $format='Y-m-d H:i:s')); $bis_ts = $datum->mktime_fromtimestamp($datum->formatDatum($bis, $format='Y-m-d H:i:s')); $diff = $bis_ts - $von_ts; + + //outputTest Manu echo ' '.$p->t("global/von").' - '.$p->t("global/bis").' @@ -1548,8 +1582,26 @@ if ($projekt->getProjekteMitarbeiter($user, true)) //Homeoffice Checkbox $verwendung = new bisverwendung(); - $verwendung->getLastAktVerwendung($user); - $bvId = $verwendung->bisverwendung_id; + + //Ok: passt + //$verwendung->getLastAktVerwendung($user); + + //geht nicht...liefert keine bisverwendung_id, Format? + //sql-statement mit '2021-08-20' funktioniert einwandfrei.. + echo $vonForm = $datum->formatDatum($von, $format='Y-m-d'); + //echo $vonForm = '2021-08-20'; + echo $user; + // echo $von_ts; + $verwendung->getVerwendungDatum($user, $vonForm); + + //gleiches Problem: liefert keine bisverwendung_id + // $now = new DateTime('today'); + // var_dump($now); + // echo $now->format('Y-m-d'); + // $verwendung->getVerwendungDatum($user, $now->format('Y-m-d')); + + echo $bvId = $verwendung->bisverwendung_id; + if ($verwendung->homeoffice) { @@ -1566,6 +1618,7 @@ if ($projekt->getProjekteMitarbeiter($user, true)) bisId: ' . $bvId . ' + '; } @@ -1573,8 +1626,12 @@ if ($projekt->getProjekteMitarbeiter($user, true)) { echo "

    Homeoffice nicht erlaubt

    "; echo "BisId: $bvId "; + // echo "Datum: $vonForm "; } + echo ' + Manu + '; //Beschreibung diff --git a/cis/private/tools/zeitaufzeichnung_bisverwendung.php b/cis/private/tools/zeitaufzeichnung_bisverwendung.php new file mode 100644 index 000000000..93aa814c0 --- /dev/null +++ b/cis/private/tools/zeitaufzeichnung_bisverwendung.php @@ -0,0 +1,72 @@ + + */ +/** + * Checks, if there is the possibility for homeoffice for the given bisverwendung of + * a certain date. + */ + + +require_once('../../../config/cis.config.inc.php'); +require_once('../../../include/globals.inc.php'); +require_once('../../../include/phrasen.class.php'); +require_once('../../../include/datum.class.php'); +require_once('../../../include/Excel/excel.php'); +require_once('../../../include/benutzer.class.php'); +require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/mitarbeiter.class.php'); +require_once('../../../include/zeitaufzeichnung.class.php'); +require_once('../../../include/projekt.class.php'); +require_once('../../../include/bisverwendung.class.php'); + + +// if (isset($_GET['day'])) +// { +// $day = $_GET['day']; +// echo " es ist ein schöner Tag: " . $day; +// echo "
    bisid: "; +// +// +// } + +// if (isset($_GET['uid'])){ +// $uid = $_GET['uid']; +// $verwendung = new bisverwendung(); +// $verwendung->getLastAktVerwendung($uid); +// echo $bvId = $verwendung->bisverwendung_id; +// } + +if ((isset($_GET['uid'])) && (isset($_GET['day']))) { + + $uid = $_GET['uid']; + //$day = $_GET['day']; + + //$day = '2021-08-15'; + $day = "2021-08-15"; + + + $verwendung = new bisverwendung(); + $verwendung->getLastAktVerwendung($uid); //haut hin + //$verwendung->getVerwendungDatum($uid, $day); //hier kommt nix + //$verwendung ->getVerwendungDatumMonat($uid, $day); + // + echo $bvId = $verwendung->bisverwendung_id; + echo "check " . $uid . " on day " . $day; + +} From 437feb2fddffdd1bd1c6eb6658258f2d52ca857a Mon Sep 17 00:00:00 2001 From: ma0068 Date: Tue, 24 Aug 2021 18:01:15 +0200 Subject: [PATCH 194/301] =?UTF-8?q?dynamische=20Anzeige=20checkbox=20homeo?= =?UTF-8?q?ffice=20auch=20bei=20=C3=84ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/tools/zeitaufzeichnung.php | 113 ++++++++++-------- .../tools/zeitaufzeichnung_bisverwendung.php | 41 +++---- 2 files changed, 74 insertions(+), 80 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index a06b3fcca..141602e01 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -284,18 +284,19 @@ echo ' } ) - $("#von_datum").change( - function() - { - var uid = $("#uidpass").val(); - var Datum = $(this).val(); - Tag=Datum.substring(0,2); - Monat=Datum.substring(3,5); - Jahr=Datum.substring(6,10); - var day = Jahr + "-" + Monat + "-" + Tag; - checkBisverwendung(day,uid); + useCheckedDate(); - } + $("#von_datum").change( + function() + { + var uid = $("#uidpass").val(); + var Datum = $(this).val(); + Tag=Datum.substring(0,2); + Monat=Datum.substring(3,5); + Jahr=Datum.substring(6,10); + var day = Jahr + "-" + Monat + "-" + Tag; + checkBisverwendung(day,uid); + } ) function isVisible() @@ -734,6 +735,16 @@ echo ' $("#pause_bis").val(""); } + function useCheckedDate(){ + var uid = $("#uidpass").val(); + var Datum = $("#von_datum").val(); + Tag=Datum.substring(0,2); + Monat=Datum.substring(3,5); + Jahr=Datum.substring(6,10); + var checkedDay = Jahr + "-" + Monat + "-" + Tag; + checkBisverwendung(checkedDay, uid); + } + function checkBisverwendung(day, uid) { $.ajax({ @@ -742,12 +753,21 @@ echo ' day: day, uid: uid }, - success: function (daten) { - $("#outputTest").html(daten); + success: function (json) + { + if (json.length > 3) + { + $("#outputTest").html(json); + $("#homeofficeBlock").show(); + } + else + { + $("#outputTest").html(json); + $("#homeofficeBlock").hide(); + + } } }); - - } @@ -1536,7 +1556,6 @@ if ($projekt->getProjekteMitarbeiter($user, true)) $bis_ts = $datum->mktime_fromtimestamp($datum->formatDatum($bis, $format='Y-m-d H:i:s')); $diff = $bis_ts - $von_ts; - //outputTest Manu echo ' '.$p->t("global/von").' - '.$p->t("global/bis").' @@ -1580,32 +1599,28 @@ if ($projekt->getProjekteMitarbeiter($user, true)) '; - //Homeoffice Checkbox - $verwendung = new bisverwendung(); + //Homeoffice Checkbox manu + //$homeofficeErlaubt = false; - //Ok: passt - //$verwendung->getLastAktVerwendung($user); - - //geht nicht...liefert keine bisverwendung_id, Format? - //sql-statement mit '2021-08-20' funktioniert einwandfrei.. - echo $vonForm = $datum->formatDatum($von, $format='Y-m-d'); - //echo $vonForm = '2021-08-20'; - echo $user; - // echo $von_ts; - $verwendung->getVerwendungDatum($user, $vonForm); - - //gleiches Problem: liefert keine bisverwendung_id - // $now = new DateTime('today'); - // var_dump($now); - // echo $now->format('Y-m-d'); + // $verwendung = new bisverwendung(); + // + // // $now = document.getElementById("von_datum"); + // // echo $now; + // //$now = new DateTime('today'); + // $now = new DateTime('checkedDay'); // $verwendung->getVerwendungDatum($user, $now->format('Y-m-d')); - - echo $bvId = $verwendung->bisverwendung_id; - - - if ($verwendung->homeoffice) - { - $bvHo = "erlaubt"; + // $verwendungArr = array(); + // + // foreach ($verwendung->result as $v) + // if ($v->homeoffice) + // if (!in_array($v->bisverwendung_id, $verwendungArr)) + // { + // $homeofficeErlaubt = true; + // $verwendungArr[] = $v->bisverwendung_id; + // } + // + // if ($homeofficeErlaubt) + // { echo '   @@ -1614,24 +1629,16 @@ if ($projekt->getProjekteMitarbeiter($user, true)) Homeoffice - Homeoffice: ' . $bvHo . ' - bisId: ' . $bvId . ' - '; - } +// } - else - { - echo "

    Homeoffice nicht erlaubt

    "; - echo "BisId: $bvId "; - // echo "Datum: $vonForm "; - } - echo ' - Manu - '; + // echo ' + // Testausgaben + // bisId: ' . $verwendungArr[0] . ' + // '; //Beschreibung diff --git a/cis/private/tools/zeitaufzeichnung_bisverwendung.php b/cis/private/tools/zeitaufzeichnung_bisverwendung.php index 93aa814c0..210d63005 100644 --- a/cis/private/tools/zeitaufzeichnung_bisverwendung.php +++ b/cis/private/tools/zeitaufzeichnung_bisverwendung.php @@ -36,37 +36,24 @@ require_once('../../../include/projekt.class.php'); require_once('../../../include/bisverwendung.class.php'); -// if (isset($_GET['day'])) -// { -// $day = $_GET['day']; -// echo " es ist ein schöner Tag: " . $day; -// echo "
    bisid: "; -// -// -// } - -// if (isset($_GET['uid'])){ -// $uid = $_GET['uid']; -// $verwendung = new bisverwendung(); -// $verwendung->getLastAktVerwendung($uid); -// echo $bvId = $verwendung->bisverwendung_id; -// } - if ((isset($_GET['uid'])) && (isset($_GET['day']))) { $uid = $_GET['uid']; - //$day = $_GET['day']; - - //$day = '2021-08-15'; - $day = "2021-08-15"; - + $day = $_GET['day']; $verwendung = new bisverwendung(); - $verwendung->getLastAktVerwendung($uid); //haut hin - //$verwendung->getVerwendungDatum($uid, $day); //hier kommt nix - //$verwendung ->getVerwendungDatumMonat($uid, $day); - // - echo $bvId = $verwendung->bisverwendung_id; - echo "check " . $uid . " on day " . $day; + + $verwendung->getVerwendungDatum($uid, $day); + $verwendungArr = array(); + + foreach ($verwendung->result as $v) + if ($v->homeoffice) + if (!in_array($v->bisverwendung_id, $verwendungArr)) + { + $bvId = $v->bisverwendung_id; + $verwendungArr[] = $v->bisverwendung_id; + } + +echo json_encode($verwendungArr); } From 0a97a028ee0f1ad917e7f0aa0e034daa4af082ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Thu, 26 Aug 2021 20:22:13 +0200 Subject: [PATCH 195/301] =?UTF-8?q?Reihungstest=C3=BCbersicht=20zeigt=20nu?= =?UTF-8?q?n=20die=20Reihungstests=20der=20letzten=2012=20Monate=20an=20st?= =?UTF-8?q?att=20der=20letzten=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organisation/reihungstest/ReihungstestUebersichtData.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/organisation/reihungstest/ReihungstestUebersichtData.php b/application/views/organisation/reihungstest/ReihungstestUebersichtData.php index 931a09d80..be41e06c7 100644 --- a/application/views/organisation/reihungstest/ReihungstestUebersichtData.php +++ b/application/views/organisation/reihungstest/ReihungstestUebersichtData.php @@ -106,7 +106,7 @@ public.tbl_reihungstest LEFT JOIN public.tbl_studiengang using(studiengang_kz) WHERE - datum>now()-'5 months'::interval + datum>now()-'12 months'::interval ORDER BY datum desc ) data ", From b05fbe5978cf3c6853ae79c8c543619ea78a3676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Fri, 27 Aug 2021 19:05:00 +0200 Subject: [PATCH 196/301] Fixed PHP Version incompatibility issue --- include/person.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/person.class.php b/include/person.class.php index 328cc413c..a50417db0 100644 --- a/include/person.class.php +++ b/include/person.class.php @@ -276,7 +276,7 @@ class person extends basis_db $erg += $gewichtung[$i] * $this->svnr{$i}; } - if ($this->svnr{3} != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 + if ($this->svnr[3] != ($erg % 11)) //Vergleichen der Pruefziffer mit Quersumme Modulo 11 { $this->errormsg = 'SVNR ist ungueltig'; return false; From a36909763f18cf362e582bf63c8412b587bdb57f Mon Sep 17 00:00:00 2001 From: ma0068 Date: Mon, 30 Aug 2021 14:28:30 +0200 Subject: [PATCH 197/301] Delete comments --- cis/private/tools/zeitaufzeichnung.php | 33 +------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 141602e01..a5084e082 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -757,12 +757,10 @@ echo ' { if (json.length > 3) { - $("#outputTest").html(json); $("#homeofficeBlock").show(); } else { - $("#outputTest").html(json); $("#homeofficeBlock").hide(); } @@ -1599,28 +1597,7 @@ if ($projekt->getProjekteMitarbeiter($user, true)) '; - //Homeoffice Checkbox manu - //$homeofficeErlaubt = false; - - // $verwendung = new bisverwendung(); - // - // // $now = document.getElementById("von_datum"); - // // echo $now; - // //$now = new DateTime('today'); - // $now = new DateTime('checkedDay'); - // $verwendung->getVerwendungDatum($user, $now->format('Y-m-d')); - // $verwendungArr = array(); - // - // foreach ($verwendung->result as $v) - // if ($v->homeoffice) - // if (!in_array($v->bisverwendung_id, $verwendungArr)) - // { - // $homeofficeErlaubt = true; - // $verwendungArr[] = $v->bisverwendung_id; - // } - // - // if ($homeofficeErlaubt) - // { + //Homeoffice Checkbox echo '   @@ -1632,14 +1609,6 @@ if ($projekt->getProjekteMitarbeiter($user, true)) '; -// } - - - // echo ' - // Testausgaben - // bisId: ' . $verwendungArr[0] . ' - // '; - //Beschreibung echo ''.$p->t("global/beschreibung").''; From 64eb9eacf4c54d034007e4fb54b828fc3f12002b Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 30 Aug 2021 15:36:50 +0200 Subject: [PATCH 198/301] Added: Automatic Scrolling when Approving/Rejecting multiple Anrechnungen Also added Scrolling for Recommending/Not Recommending multiple Anrechnungen Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungUebersicht.js | 14 ++++++++++++-- .../lehre/anrechnung/reviewAnrechnungUebersicht.js | 12 ++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index 60a890ce1..ff3235e52 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -246,7 +246,12 @@ $(function(){ if (genehmigung_panel.is(":hidden")) { // Show begruendung panel if is hidden - genehmigung_panel.slideDown('slow'); + genehmigung_panel.slideDown(400, function() { + $('html, body').animate({ + scrollTop: genehmigung_panel.offset().top // Move genehmigung panel bottom up to be visible within window screen + }, 400); + }); + return; } }); @@ -318,7 +323,12 @@ $(function(){ if (begruendung_panel.is(":hidden")) { // Show begruendung panel if is hidden - begruendung_panel.slideDown('slow'); + begruendung_panel.slideDown(400, function() { + $('html, body').animate({ + scrollTop: begruendung_panel.offset().top // Move begruendung panel bottom up to be visible within window screen + }, 400); + }); + return; } }); diff --git a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js index ddf7a55d3..2cf7c1623 100644 --- a/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/reviewAnrechnungUebersicht.js @@ -227,7 +227,11 @@ $(function(){ if (empfehlung_panel.is(":hidden")) { // Show begruendung panel if is hidden - empfehlung_panel.slideDown('slow'); + empfehlung_panel.slideDown(400, function() { + $('html, body').animate({ + scrollTop: empfehlung_panel.offset().top // Move empfehlung panel bottom up to be visible within window screen + }, 400); + }); return; } }); @@ -300,7 +304,11 @@ $(function(){ if (begruendung_panel.is(":hidden")) { // Show begruendung panel if is hidden - begruendung_panel.slideDown('slow'); + begruendung_panel.slideDown(400, function() { + $('html, body').animate({ + scrollTop: begruendung_panel.offset().top // Move genehmigung panel bottom up to be visible within window screen + }, 400); + }); return; } }); From 25cc8c6d49e8eabfa70ead2192c7b5cfd7ddacb6 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 30 Aug 2021 18:11:08 +0200 Subject: [PATCH 199/301] matr_aktiv field in dbupdate_3.3.php: only set to true if not NULL --- 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 a216ef371..9600d241f 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4945,7 +4945,7 @@ if(!$result = @$db->db_query("SELECT matr_aktiv FROM public.tbl_person LIMIT 1") else echo '
    public.tbl_person: Spalte matr_aktiv hinzugefuegt'; - $qry = "UPDATE public.tbl_person SET matr_aktiv = true;"; + $qry = "UPDATE public.tbl_person SET matr_aktiv = TRUE WHERE matr_nr IS NOT NULL;"; if(!$db->db_query($qry)) echo 'public.tbl_person: '.$db->db_last_error().'
    '; From 64555c0ca13dc2afaf50327cacdeba35cb67438d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 30 Aug 2021 20:35:15 +0200 Subject: [PATCH 200/301] Mahnspanne kann auch leer sein --- include/konto.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/konto.class.php b/include/konto.class.php index 8d5129ec7..c23209a06 100644 --- a/include/konto.class.php +++ b/include/konto.class.php @@ -164,7 +164,7 @@ class konto extends basis_db return false; } - if(!is_numeric($this->mahnspanne)) + if($this->mahnspanne!='' && !is_numeric($this->mahnspanne)) { $this->errormsg = "Die Mahnspanne muss eine gueltige Zahl sein"; return false; From 6034da43d8325b4bd0c433ebdf3486b6a1bbd519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 31 Aug 2021 07:56:59 +0200 Subject: [PATCH 201/301] Fixed loading of current Geschaeftsjahr if it is the last day of the year --- application/models/organisation/Geschaeftsjahr_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/organisation/Geschaeftsjahr_model.php b/application/models/organisation/Geschaeftsjahr_model.php index 9c856f40e..4f0d03b73 100644 --- a/application/models/organisation/Geschaeftsjahr_model.php +++ b/application/models/organisation/Geschaeftsjahr_model.php @@ -20,8 +20,8 @@ class Geschaeftsjahr_model extends DB_Model { $query = 'SELECT * FROM public.tbl_geschaeftsjahr - WHERE start <= now() - AND ende >= now() + WHERE start <= CURRENT_DATE + AND ende >= CURRENT_DATE ORDER BY start DESC LIMIT 1'; From 62cfa27473582d615bdeb7d17eb79220bc4ca6e9 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 2 Sep 2021 09:55:14 +0200 Subject: [PATCH 202/301] 14774 Zeiterfassung: Homeoffice im CSV Import --- cis/private/tools/zeitaufzeichnung.php | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index a5084e082..cf3435059 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -90,7 +90,7 @@ $fieldheadings = array( 'oe1' => $p->t("zeitaufzeichnung/oe"), 'oe2' => $p->t("zeitaufzeichnung/oe").'2', 'aktivitaet' => $p->t("zeitaufzeichnung/aktivitaet"), 'service' => $p->t("zeitaufzeichnung/service"), 'start' => $p->t("zeitaufzeichnung/start"), 'ende' => $p->t("zeitaufzeichnung/ende"), 'dauer' => $p->t("zeitaufzeichnung/dauer"), 'kunde' => $p->t("zeitaufzeichnung/kunde"), 'beschreibung' => $p->t("global/beschreibung"), 'aktion' => $p->t("global/aktion"), - 'datum' => $p->t("global/datum") + 'datum' => $p->t("global/datum"),'homeoffice' => $p->t("zeitaufzeichnung/homeoffice") ); if ($rechte->isBerechtigt('basis/servicezeitaufzeichnung')) @@ -927,7 +927,25 @@ if(isset($_POST['save']) || isset($_POST['edit']) || isset($_POST['import'])) { if (strtolower($data[9] == 'true')) { - $zeit->homeoffice = true; + // check, ob homeoffice gemäß Bisverwendung + $verwendung = new bisverwendung(); + $verwendung->getVerwendungDatum($data[0],$vonCSV); + + foreach ($verwendung->result as $v) + // echo "homeoffice für Tag " . $vonCSV . " ". $v->homeoffice . " " . $v->bisverwendung_id . "
    "; + + if ($v->homeoffice) + { + + // echo "homeoffice erlaubt
    "; + $zeit->homeoffice = true; + } + else + { + echo ''.$p->t("global/fehlerBeimSpeichernDerDaten").': '.$p->t("zeitaufzeichnung/homeofficeNichtErlaubt", ($vonCSV)) .'
    '; + + $zeit->homeoffice = false; + } } else { @@ -2091,8 +2109,8 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false) $datum = new datum(); $csvData = array(); //headers schreiben - $csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung']) - : array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung']); + $csvData[] = ($za_simple) ? array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['aktivitaet'], $fieldheadings['beschreibung'], $fieldheadings['homeoffice']) + : array($fieldheadings['user'], $fieldheadings['datum'], $fieldheadings['start'], $fieldheadings['ende'], $fieldheadings['projekt'], $fieldheadings['ap'], $fieldheadings['oe1'], $fieldheadings['oe2'], $fieldheadings['aktivitaet'], $fieldheadings['service'], $fieldheadings['kunde'], $fieldheadings['beschreibung'], $fieldheadings['homeoffice']); foreach ($rawdata as $zeitauf) { //Newline characters bei Beschreibung ersetzen @@ -2105,13 +2123,13 @@ function getDataForCSV($rawdata, $fieldheadings, $za_simple = false) if($za_simple) { $csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'), - $bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung); + $bisdatum, $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->aktivitaet_kurzbz, $beschreibung, $zeitauf->homeoffice); } else { $servicebez = ($service->load($zeitauf->service_id))?$service->bezeichnung:""; $csvData[] = array($zeitauf->uid, $hauptdatum, $datum->formatDatum($zeitauf->start, 'H:i'), $bisdatum, - $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->oe_kurzbz_2, $zeitauf->aktivitaet_kurzbz, $servicebez, $zeitauf->kunde_uid, $beschreibung); + $zeitauf->projekt_kurzbz, $zeitauf->projektphase_id, $zeitauf->oe_kurzbz_1, $zeitauf->oe_kurzbz_2, $zeitauf->aktivitaet_kurzbz, $servicebez, $zeitauf->kunde_uid, $beschreibung, $zeitauf->homeoffice); } } return $csvData; From f0c5c3acb46195de0b39bdb9b79f73a9a08fc456 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 2 Sep 2021 11:24:38 +0200 Subject: [PATCH 203/301] 14774 Zeiterfassung: Homeoffice im CSV Import --- include/bisverwendung.class.php | 109 +++++++++++++++++++++++++++--- locale/de-AT/zeitaufzeichnung.php | 2 + locale/en-US/zeitaufzeichnung.php | 2 + 3 files changed, 103 insertions(+), 10 deletions(-) diff --git a/include/bisverwendung.class.php b/include/bisverwendung.class.php index 861684c98..ca15d03de 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 $homeoffice; public $ba1bez; @@ -123,6 +124,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); $this->homeoffice = $this->db_parse_bool($row->homeoffice); return true; } @@ -179,6 +181,24 @@ class bisverwendung extends basis_db } } + + /** + * Prueft das Datum + * @param $date = string + * @return true wenn ok, sonst false + */ + static public function verifyDate($date, $strict = true) + { + $dateTime = DateTime::createFromFormat('Y-m-d', $date); + if ($strict) { + $errors = DateTime::getLastErrors(); + if (!empty($errors['warning_count'])) { + return false; + } + } + return $dateTime !== false; + } + /** * Prueft die Daten vor dem Speichern * @@ -191,6 +211,17 @@ class bisverwendung extends basis_db $this->errormsg = 'Vertragsstunden sind ungueltig'; return false; } + elseif(!$this->verifyDate($this->beginn) && !empty($this->beginn)) + { + $this->errormsg = 'Start Datum ist kein Valides Datum: '.$this->beginn; + return false; + } + elseif(!$this->verifyDate($this->ende) && !empty($this->ende)) + { + $this->errormsg = 'End Datum ist kein Valides Datum: '.$this->ende; + return false; + } + return true; } @@ -220,13 +251,29 @@ 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(is_bool($this->homeoffice)) + { + $homeoffice = $this->db_add_param($this->homeoffice, FHC_BOOLEAN); + } + else + { + $homeoffice = '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 +291,9 @@ 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.','. + $homeoffice. ');'; } else @@ -268,7 +317,9 @@ 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.",". + " homeoffice =". $homeoffice. " WHERE bisverwendung_id=".$this->db_add_param($this->bisverwendung_id, FHC_INTEGER); } @@ -361,8 +412,8 @@ 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); $obj->homeoffice = $this->db_parse_bool($row->homeoffice); - $this->result[] = $obj; } return true; @@ -419,6 +470,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); $obj->homeoffice = $this->db_parse_bool($row->homeoffice); $this->result[] = $obj; @@ -478,9 +530,9 @@ 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); $obj->homeoffice = $this->db_parse_bool($row->homeoffice); - $this->result[] = $obj; } return true; @@ -499,14 +551,15 @@ class bisverwendung extends basis_db */ public function getLastVerwendung($uid) { - //laden des Datensatzes18.08.2021 + //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)) { @@ -520,6 +573,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; @@ -531,6 +585,8 @@ 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); + $this->homeoffice = $this->db_parse_bool($row->homeoffice); } return true; } @@ -559,7 +615,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)) { @@ -583,8 +639,9 @@ class bisverwendung extends basis_db $this->vertragsstunden = $row->vertragsstunden; $this->dv_art = $row->dv_art; $this->inkludierte_lehre = $row->inkludierte_lehre; - $this->homeoffice = $this->db_parse_bool($row->homeoffice); $this->zeitaufzeichnungspflichtig = $this->db_parse_bool($row->zeitaufzeichnungspflichtig); + $this->azgrelevant = $this->db_parse_bool($row->azgrelevant); + $this->homeoffice = $this->db_parse_bool($row->homeoffice); } return true; } @@ -647,6 +704,8 @@ 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); + $obj->homeoffice = $this->db_parse_bool($row->homeoffice); $this->result[] = $obj; } @@ -775,5 +834,35 @@ class bisverwendung extends basis_db return false; } } + + public function inZeitaufzeichnungspflichtigPeriod($PeriodStartDate, $PeriodEndDate) + { + $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 ( + (($PeriodStartDateISO >= $beginn) && (($PeriodStartDateISO <= $end) || is_null($this->ende))) + || + (($PeriodEndDateISO >= $beginn) && (($PeriodEndDateISO <= $end) || is_null($this->ende))) + ) + { + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } } ?> diff --git a/locale/de-AT/zeitaufzeichnung.php b/locale/de-AT/zeitaufzeichnung.php index e0b7047da..ad9a4de0c 100644 --- a/locale/de-AT/zeitaufzeichnung.php +++ b/locale/de-AT/zeitaufzeichnung.php @@ -7,6 +7,7 @@ $this->phrasen['zeitaufzeichnung/projekt']='Projekt'; $this->phrasen['zeitaufzeichnung/projektphase']='Projektphase'; $this->phrasen['zeitaufzeichnung/keineAuswahl']='keine Auswahl'; $this->phrasen['zeitaufzeichnung/aktivitaet']='Aktivität'; +$this->phrasen['zeitaufzeichnung/homeoffice']='Homeoffice'; $this->phrasen['zeitaufzeichnung/id']='ID'; $this->phrasen['zeitaufzeichnung/user']='User'; $this->phrasen['zeitaufzeichnung/start']='Start'; @@ -63,3 +64,4 @@ $this->phrasen['zeitaufzeichnung/projektphase']='AP'; $this->phrasen['zeitaufzeichnung/pauseEinfuegen']='Pause automatisch einfügen'; $this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Zeitraum zu kurz für automatische Pause'; $this->phrasen['zeitaufzeichnung/supportAnfragen']='


    Supportanfragen unter
    zeiterfassung@technikum-wien.at

    '; +$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice für den Tag %s nicht erlaubt'; diff --git a/locale/en-US/zeitaufzeichnung.php b/locale/en-US/zeitaufzeichnung.php index a67a35e4b..9e0b84ec1 100644 --- a/locale/en-US/zeitaufzeichnung.php +++ b/locale/en-US/zeitaufzeichnung.php @@ -7,6 +7,7 @@ $this->phrasen['zeitaufzeichnung/projekt']='Project'; $this->phrasen['zeitaufzeichnung/projektphase']='Projectphase'; $this->phrasen['zeitaufzeichnung/keineAuswahl']='no selection'; $this->phrasen['zeitaufzeichnung/aktivitaet']='Activity'; +$this->phrasen['zeitaufzeichnung/homeoffice']='Homeoffice'; $this->phrasen['zeitaufzeichnung/id']='ID'; $this->phrasen['zeitaufzeichnung/user']='User'; $this->phrasen['zeitaufzeichnung/start']='Start'; @@ -63,3 +64,4 @@ $this->phrasen['zeitaufzeichnung/projektphase']='WP'; $this->phrasen['zeitaufzeichnung/pauseEinfuegen']='insert break automatically'; $this->phrasen['zeitaufzeichnung/zeitraumZuKurz']='Timeslot too short for automatic break.'; $this->phrasen['zeitaufzeichnung/supportAnfragen']='


    Contact for support
    zeiterfassung@technikum-wien.at

    '; +$this->phrasen['zeitaufzeichnung/homeofficeNichtErlaubt']='Homeoffice for day %s not allowed'; From d3158b8ce09cca85b940b11aabebf94bf679e5d0 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 2 Sep 2021 11:31:58 +0200 Subject: [PATCH 204/301] merge dbupdate_3.3.php --- system/dbupdate_3.3.php | 155 +++++++++++++++++++++++++++++++++------- 1 file changed, 130 insertions(+), 25 deletions(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 0e0d4c9cb..02c6850be 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -212,21 +212,21 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.vw_msg_vars_user LIMIT 1")) JOIN public.tbl_mitarbeiter ma ON ma.mitarbeiter_uid = b.uid WHERE ma.personalnummer > 0 );'; - + if(!$db->db_query($qry)) echo 'public.vw_msg_vars_user: '.$db->db_last_error().'
    '; else echo '
    public.vw_msg_vars_user view created'; - + $qry = 'GRANT SELECT ON TABLE public.vw_msg_vars_user TO web;'; - + if(!$db->db_query($qry)) echo 'public.vw_msg_vars_user: '.$db->db_last_error().'
    '; else echo '
    Granted privileges to web on public.vw_msg_vars_user'; - + $qry = 'GRANT SELECT ON TABLE public.vw_msg_vars_user TO vilesci;'; - + if(!$db->db_query($qry)) echo 'public.vw_msg_vars_user: '.$db->db_last_error().'
    '; else @@ -4465,6 +4465,88 @@ 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 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 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 new funktion type kstzuordnung for cost center assignment in public.tbl_funktion +if ($result = @$db->db_query("SELECT 1 FROM public.tbl_funktion WHERE funktion_kurzbz = 'kstzuordnung';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO public.tbl_funktion(funktion_kurzbz, beschreibung, aktiv, fachbereich, semester) VALUES('kstzuordnung','Standardkostenstelle Zuordnung',true,false,false);"; + + if (!$db->db_query($qry)) + echo 'public.tbl_funktion '.$db->db_last_error().'
    '; + else + echo '
    public.tbl_funktion: Added funktion kstzuordnung
    '; + } +} + +// Add column zugangstoken to tbl_projektbetreuer +if(!$result = @$db->db_query("SELECT zugangstoken FROM lehre.tbl_projektbetreuer LIMIT 1")) +{ + $qry = "ALTER TABLE lehre.tbl_projektbetreuer ADD COLUMN zugangstoken VARCHAR(32); + COMMENT ON COLUMN lehre.tbl_projektbetreuer.zugangstoken IS 'Zugangstoken zur Projektarbeitsbewertung fuer externe Betreuer'; + ALTER TABLE lehre.tbl_projektbetreuer ADD CONSTRAINT uk_tbl_projektbetreuer_zugangstoken UNIQUE (zugangstoken);"; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_projektbetreuer: '.$db->db_last_error().'
    '; + else + echo '
    lehre.tbl_projektbetreuer: Spalte zugangstoken hinzugefuegt'; +} + +// Add column zugangstoken_gueltigbis to tbl_projektbetreuer +if(!$result = @$db->db_query("SELECT zugangstoken_gueltigbis FROM lehre.tbl_projektbetreuer LIMIT 1")) +{ + $qry = "ALTER table lehre.tbl_projektbetreuer ADD COLUMN zugangstoken_gueltigbis date; + COMMENT ON COLUMN lehre.tbl_projektbetreuer.zugangstoken_gueltigbis IS 'Gueligkeitsdatum fuer Zugangstoken zur Projektarbeitsbewertung fuer externe Betreuer';"; + + if(!$db->db_query($qry)) + echo 'lehre.tbl_projektbetreuer: '.$db->db_last_error().'
    '; + else + echo '
    lehre.tbl_projektbetreuer: Spalte zugangstoken_gueltigbis hinzugefuegt'; +} + +// App 'projektarbeitsbeurteilung' hinzufügen +if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='projektarbeitsbeurteilung'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "INSERT INTO system.tbl_app(app) VALUES('projektarbeitsbeurteilung');"; + + if(!$db->db_query($qry)) + echo 'App: '.$db->db_last_error().'
    '; + else + echo '
    Neue App projektarbeitsbeurteilung in system.tbl_app hinzugefügt'; + } +} + +// UPDATE Berechtigung für lehre.tbl_projektbetreuer für web user hinzufügen +if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_projektbetreuer' AND table_schema='lehre' AND grantee='web' AND privilege_type='UPDATE'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "GRANT UPDATE ON lehre.tbl_projektbetreuer TO web;"; + + if(!$db->db_query($qry)) + echo 'Projektbetreuer Berechtigungen: '.$db->db_last_error().'
    '; + else + echo '
    Web User: update fuer lehre.tbl_projektbetreuer berechtigt'; + } +} + // 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")) @@ -4482,8 +4564,8 @@ if(!$result = @$db->db_query("SELECT dms_id FROM lehre.tbl_anrechnung")) ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN begruendung_id DROP NOT NULL; ALTER TABLE lehre.tbl_anrechnung ALTER COLUMN insertamum SET DEFAULT NOW(); "; - - + + if(!$db->db_query($qry)) echo 'lehre.tbl_anrechnung: '.$db->db_last_error().'
    '; else @@ -4558,11 +4640,11 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnungstatus LIMIT 1;" INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('inProgressLektor', '{\"Empfehlung angefordert\",\"recommendation requested\"}'); INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('approved', '{\"genehmigt\",\"approved\"}'); INSERT INTO lehre.tbl_anrechnungstatus(status_kurzbz, bezeichnung_mehrsprachig) VALUES('rejected', '{\"abgelehnt\",\"rejected\"}'); - + GRANT SELECT ON lehre.tbl_anrechnungstatus TO web; GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnungstatus TO vilesci; "; - + if(!$db->db_query($qry)) echo 'lehre.tbl_anrechnungstatus: '.$db->db_last_error().'
    '; else @@ -4590,12 +4672,12 @@ if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'seq_anrechn NO MINVALUE CACHE 1; '; - + if(!$db->db_query($qry)) echo 'lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'
    '; else echo '
    Created sequence: lehre.seq_anrechnungstatus_status_kurzbz'; - + // GRANT SELECT, UPDATE ON SEQUENCE lehre.tbl_anrechnungstatus_status_kurzbz_seq to web; $qry = 'GRANT SELECT, UPDATE ON SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz TO web;'; if (!$db->db_query($qry)) @@ -4623,7 +4705,7 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatu ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT pk_anrechnung_anrechnungstatus PRIMARY KEY (anrechnungstatus_id); ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT fk_anrechnung_anrechnungstatus_anrechnung FOREIGN KEY (anrechnung_id) REFERENCES lehre.tbl_anrechnung(anrechnung_id) ON DELETE RESTRICT ON UPDATE CASCADE; ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ADD CONSTRAINT fk_anrechnung_anrechnungstatus_anrechnungstatus FOREIGN KEY (status_kurzbz) REFERENCES lehre.tbl_anrechnungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE; - + CREATE SEQUENCE lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id START WITH 1 INCREMENT BY 1 @@ -4631,14 +4713,14 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatu NO MINVALUE CACHE 1; ALTER TABLE lehre.tbl_anrechnung_anrechnungstatus ALTER COLUMN anrechnungstatus_id SET DEFAULT nextval('lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id'); - + INSERT INTO lehre.tbl_anrechnung_anrechnungstatus(anrechnung_id, status_kurzbz) SELECT anrechnung_id, 'approved' as status_kurzbz FROM lehre.tbl_anrechnung WHERE genehmigt_von is not null; - + GRANT SELECT ON lehre.tbl_anrechnung_anrechnungstatus TO web; GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_anrechnung_anrechnungstatus TO vilesci; GRANT SELECT, UPDATE ON lehre.seq_anrechnung_anrechnungstatus_anrechnungstatus_id TO vilesci; "; - + if(!$db->db_query($qry)) echo 'lehre.tbl_anrechnung_anrechnungstatus: '.$db->db_last_error().'
    '; else @@ -4664,7 +4746,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht if($db->db_num_rows($result) == 0) { $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('student/anrechnung_beantragen', 'Anrechnung beantragen');"; - + if(!$db->db_query($qry)) echo 'system.tbl_berechtigung '.$db->db_last_error().'
    '; else @@ -4678,7 +4760,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht if($db->db_num_rows($result) == 0) { $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_genehmigen', 'Anrechnung genehmigen');"; - + if(!$db->db_query($qry)) echo 'system.tbl_berechtigung '.$db->db_last_error().'
    '; else @@ -4692,7 +4774,7 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht if($db->db_num_rows($result) == 0) { $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_empfehlen', 'Anrechnung empfehlen');"; - + if(!$db->db_query($qry)) echo 'system.tbl_berechtigung '.$db->db_last_error().'
    '; else @@ -4700,7 +4782,32 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht } } -// ADD COLUMN homeoffice in campus.tbl_zeitaufzeichnung +// Add index to system.tbl_log +if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_pruefung_student_uid'")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "CREATE INDEX idx_tbl_pruefung_student_uid ON lehre.tbl_pruefung USING btree (student_uid)"; + + if (! $db->db_query($qry)) + echo 'Indizes: ' . $db->db_last_error() . '
    '; + else + echo 'Index fuer lehre.pruefung.student_uid hinzugefuegt
    '; + } +} + +// Add column homeoffice to bis.tbl_bisverwendung +if (!$result = @$db->db_query("SELECT homeoffice FROM bis.tbl_bisverwendung LIMIT 1")) +{ + $qry = "ALTER TABLE bis.tbl_bisverwendung ADD COLUMN homeoffice boolean NOT NULL DEFAULT FALSE"; + + if(!$db->db_query($qry)) + echo 'bis.tbl_bisverwendung: '.$db->db_last_error().'
    '; + else + echo '
    bis.tbl_bisverwendung: Spalte homeoffice hinzugefuegt'; +} + +// ADD COLUMN homeoffice to campus.tbl_zeitaufzeichnung if(!$result = @$db->db_query("SELECT homeoffice FROM campus.tbl_zeitaufzeichnung 1")) { $qry = " @@ -4730,7 +4837,7 @@ $tabellen=array( "bis.tbl_bisfunktion" => array("bisverwendung_id","studiengang_kz","sws","updateamum","updatevon","insertamum","insertvon","ext_id"), "bis.tbl_bisio" => array("bisio_id","mobilitaetsprogramm_code","nation_code","von","bis","zweck_code","student_uid","updateamum","updatevon","insertamum","insertvon","ext_id","ort","universitaet","lehreinheit_id","ects_erworben","ects_angerechnet"), "bis.tbl_bisio_zweck" => array("bisio_id","zweck_code"), - "bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig"), + "bis.tbl_bisverwendung" => array("bisverwendung_id","ba1code","ba2code","vertragsstunden","beschausmasscode","verwendung_code","mitarbeiter_uid","hauptberufcode","hauptberuflich","habilitation","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id","dv_art","inkludierte_lehre","zeitaufzeichnungspflichtig","azgrelevant", "homeoffice"), "bis.tbl_bundesland" => array("bundesland_code","kurzbz","bezeichnung"), "bis.tbl_entwicklungsteam" => array("mitarbeiter_uid","studiengang_kz","besqualcode","beginn","ende","updateamum","updatevon","insertamum","insertvon","ext_id"), "bis.tbl_gemeinde" => array("gemeinde_id","plz","name","ortschaftskennziffer","ortschaftsname","bulacode","bulabez","kennziffer"), @@ -4799,7 +4906,7 @@ $tabellen=array( "campus.tbl_uebung" => array("uebung_id","gewicht","punkte","angabedatei","freigabevon","freigabebis","abgabe","beispiele","statistik","bezeichnung","positiv","defaultbemerkung","lehreinheit_id","maxstd","maxbsp","liste_id","prozent","nummer","updateamum","updatevon","insertamum","insertvon"), "campus.tbl_veranstaltung" => array("veranstaltung_id","titel","beschreibung","veranstaltungskategorie_kurzbz","inhalt","start","ende","freigabevon","freigabeamum","updateamum","updatevon","insertamum","insertvon"), "campus.tbl_veranstaltungskategorie" => array("veranstaltungskategorie_kurzbz","bezeichnung","bild","farbe"), - "campus.tbl_zeitaufzeichnung" => array("zeitaufzeichnung_id","uid","aktivitaet_kurzbz","projekt_kurzbz","start","ende","beschreibung","oe_kurzbz_1","oe_kurzbz_2","insertamum","insertvon","updateamum","updatevon","ext_id","service_id","kunde_uid","projektphase_id"), + "campus.tbl_zeitaufzeichnung" => array("zeitaufzeichnung_id","uid","aktivitaet_kurzbz","projekt_kurzbz","start","ende","beschreibung","oe_kurzbz_1","oe_kurzbz_2","insertamum","insertvon","updateamum","updatevon","ext_id","service_id","kunde_uid","projektphase_id","homeoffice"), "campus.tbl_zeitaufzeichnung_gd" => array("zeitaufzeichnung_gd_id","uid","studiensemester_kurzbz","selbstverwaltete_pause","insertamum","insertvon","updateamum","updatevon"), "campus.tbl_zeitsperre" => array("zeitsperre_id","zeitsperretyp_kurzbz","mitarbeiter_uid","bezeichnung","vondatum","vonstunde","bisdatum","bisstunde","vertretung_uid","updateamum","updatevon","insertamum","insertvon","erreichbarkeit_kurzbz","freigabeamum","freigabevon"), "campus.tbl_zeitsperretyp" => array("zeitsperretyp_kurzbz","beschreibung","farbe"), @@ -4819,10 +4926,8 @@ $tabellen=array( "lehre.tbl_abschlusspruefung" => array("abschlusspruefung_id","student_uid","vorsitz","pruefer1","pruefer2","pruefer3","abschlussbeurteilung_kurzbz","akadgrad_id","pruefungstyp_kurzbz","datum","uhrzeit","sponsion","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","note","protokoll","endezeit","pruefungsantritt_kurzbz","freigabedatum"), "lehre.tbl_abschlusspruefung_antritt" => array("pruefungsantritt_kurzbz","bezeichnung","bezeichnung_english","sort"), "lehre.tbl_akadgrad" => array("akadgrad_id","akadgrad_kurzbz","studiengang_kz","titel","geschlecht"), - "lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id", "dms_id", "studiensemester_kurzbz", "anmerkung_student", "empfehlung_anrechnung"), - "lehre.tbl_anrechnung_anrechnungstatus" => array("anrechnungstatus_id", "anrechnung_id","status_kurzbz","datum", "insertamum","insertvon"), + "lehre.tbl_anrechnung" => array("anrechnung_id","prestudent_id","lehrveranstaltung_id","begruendung_id","lehrveranstaltung_id_kompatibel","genehmigt_von","insertamum","insertvon","updateamum","updatevon","ext_id"), "lehre.tbl_anrechnung_begruendung" => array("begruendung_id","bezeichnung"), - "lehre.tbl_anrechnungstatus" => array("status_kurzbz","bezeichnung_mehrsprachig"), "lehre.tbl_betreuerart" => array("betreuerart_kurzbz","beschreibung","aktiv"), "lehre.tbl_ferien" => array("bezeichnung","studiengang_kz","vondatum","bisdatum"), "lehre.tbl_lehreinheit" => array("lehreinheit_id","lehrveranstaltung_id","studiensemester_kurzbz","lehrfach_id","lehrform_kurzbz","stundenblockung","wochenrythmus","start_kw","raumtyp","raumtypalternativ","sprache","lehre","anmerkung","unr","lvnr","updateamum","updatevon","insertamum","insertvon","ext_id","lehrfach_id_old","gewicht"), @@ -4843,7 +4948,7 @@ $tabellen=array( "lehre.tbl_notenschluesselzuordnung" => array("notenschluesselzuordnung_id","notenschluessel_kurzbz","lehrveranstaltung_id","studienplan_id","oe_kurzbz","studiensemester_kurzbz"), "lehre.tbl_note" => array("note","bezeichnung","anmerkung","farbe","positiv","notenwert","aktiv","lehre","offiziell","bezeichnung_mehrsprachig","lkt_ueberschreibbar"), "lehre.tbl_projektarbeit" => array("projektarbeit_id","projekttyp_kurzbz","titel","lehreinheit_id","student_uid","firma_id","note","punkte","beginn","ende","faktor","freigegeben","gesperrtbis","stundensatz","gesamtstunden","themenbereich","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","titel_english","seitenanzahl","abgabedatum","kontrollschlagwoerter","schlagwoerter","schlagwoerter_en","abstract", "abstract_en", "sprache","final"), - "lehre.tbl_projektbetreuer" => array("person_id","projektarbeit_id","betreuerart_kurzbz","note","faktor","name","punkte","stunden","stundensatz","updateamum","updatevon","insertamum","insertvon","ext_id","vertrag_id"), + "lehre.tbl_projektbetreuer" => array("person_id","projektarbeit_id","betreuerart_kurzbz","note","faktor","name","punkte","stunden","stundensatz","updateamum","updatevon","insertamum","insertvon","ext_id","vertrag_id", "zugangstoken", "zugangstoken_gueltigbis"), "lehre.tbl_projekttyp" => array("projekttyp_kurzbz","bezeichnung","aktiv"), "lehre.tbl_pruefung" => array("pruefung_id","lehreinheit_id","student_uid","mitarbeiter_uid","note","pruefungstyp_kurzbz","datum","anmerkung","insertamum","insertvon","updateamum","updatevon","ext_id","pruefungsanmeldung_id","vertrag_id", "punkte"), "lehre.tbl_pruefungstyp" => array("pruefungstyp_kurzbz","beschreibung","abschluss","sort"), From 30c2705b99fac4eeeb04a9567b943fa235b2506f Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 2 Sep 2021 11:43:43 +0200 Subject: [PATCH 205/301] fix syntax error system/dbupdate_3.3.php --- 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 02c6850be..b781e22fc 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4808,7 +4808,7 @@ if (!$result = @$db->db_query("SELECT homeoffice FROM bis.tbl_bisverwendung LIMI } // ADD COLUMN homeoffice to campus.tbl_zeitaufzeichnung -if(!$result = @$db->db_query("SELECT homeoffice FROM campus.tbl_zeitaufzeichnung 1")) +if(!$result = @$db->db_query("SELECT homeoffice FROM campus.tbl_zeitaufzeichnung LIMIT 1")) { $qry = " ALTER TABLE campus.tbl_zeitaufzeichnung ADD COLUMN homeoffice boolean NOT NULL DEFAULT false ; From 3999098fd68b4e9ff05bbabfcc523f655564945d Mon Sep 17 00:00:00 2001 From: Manfred Date: Thu, 2 Sep 2021 14:08:21 +0200 Subject: [PATCH 206/301] =?UTF-8?q?Anzeige=20der=20abgelaufene=20Coodle-Um?= =?UTF-8?q?fragen=20verl=C3=A4ngert=20auf=2090=20Tage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/coodle.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/coodle.class.php b/include/coodle.class.php index 41394dcb5..9f23f88da 100644 --- a/include/coodle.class.php +++ b/include/coodle.class.php @@ -373,7 +373,7 @@ class coodle extends basis_db WHERE (uid =".$this->db_add_param($uid, FHC_STRING, false)." OR ersteller_uid =".$this->db_add_param($uid, FHC_STRING, false).") - AND endedatum >= CURRENT_DATE - interval '20 days';"; + AND endedatum >= CURRENT_DATE - interval '90 days';"; if(!$this->db_query($qry)) { From 3b89561736393b8d6fcff80ac5fd32ab176b70eb Mon Sep 17 00:00:00 2001 From: Manfred Date: Fri, 3 Sep 2021 15:14:54 +0200 Subject: [PATCH 207/301] =?UTF-8?q?Zutrittskarten=20l=C3=B6schen=20und=20s?= =?UTF-8?q?tatus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In kartenruecknahme.php werden nun Statusdetails zum Student oder Mitarbeiter angezeigt und man hat die Möglichkeit, Karten ganz aus dem System zu löschen. --- include/betriebsmittelperson.class.php | 13 ++- vilesci/fhausweis/kartenruecknahme.php | 152 +++++++++++++++++++++---- vilesci/fhausweis/kartezuweisen.php | 12 +- 3 files changed, 144 insertions(+), 33 deletions(-) diff --git a/include/betriebsmittelperson.class.php b/include/betriebsmittelperson.class.php index c105cc6da..fad950d76 100644 --- a/include/betriebsmittelperson.class.php +++ b/include/betriebsmittelperson.class.php @@ -509,10 +509,11 @@ class betriebsmittelperson extends basis_db /** * Sucht welche Person die uebergebene Kartennummer hat - * @param $nummer Kartennummer + * @param $nummer Kartennummer + * @param boolean $checkRetour Optional. Default true. Checkt, ob die Karte bereits retourniert wurde. Wenn false werden auch bereits retournierte Karten zurückgegeben * @return true wenn ok, false im Fehlerfall */ - public function getKartenzuordnung($nummer) + public function getKartenzuordnung($nummer, $checkRetour=true) { // fuehrende Nullen bei Kartennummern auch checken $qry=' @@ -536,8 +537,12 @@ class betriebsmittelperson extends basis_db OR tbl_betriebsmittel.nummer2='.$this->db_add_param('00000'.$nummer).' ) AND tbl_betriebsmittel.betriebsmitteltyp=\'Zutrittskarte\' - AND (ausgegebenam<=now() OR ausgegebenam is NULL) - AND (retouram>=now() OR retouram is NULL)'; + AND (ausgegebenam<=now() OR ausgegebenam is NULL)'; + + if ($checkRetour == true) + { + $qry .= ' AND (retouram>=now() OR retouram is NULL)'; + } if($this->db_query($qry)) { diff --git a/vilesci/fhausweis/kartenruecknahme.php b/vilesci/fhausweis/kartenruecknahme.php index 7e67da753..f51cb0347 100644 --- a/vilesci/fhausweis/kartenruecknahme.php +++ b/vilesci/fhausweis/kartenruecknahme.php @@ -26,15 +26,20 @@ require_once('../../include/functions.inc.php'); require_once('../../include/person.class.php'); require_once('../../include/benutzer.class.php'); require_once('../../include/student.class.php'); +require_once('../../include/prestudent.class.php'); +require_once('../../include/mitarbeiter.class.php'); require_once('../../include/studiengang.class.php'); require_once('../../include/betriebsmittel.class.php'); require_once('../../include/betriebsmittelperson.class.php'); require_once('../../include/benutzerberechtigung.class.php'); +require_once('../../include/datum.class.php'); +require_once('../../include/studiensemester.class.php'); $uid = get_uid(); $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($uid); +$datum_obj = new datum(); echo ' @@ -44,22 +49,61 @@ echo ' - Kartentausch + Kartenrücknahme -

    Zutrittskarte - Ruecknahme

    '; +

    Zutrittskarte - Rücknahme

    '; -if(!$rechte->isBerechtigt('basis/fhausweis', 'suid')) +if(!$rechte->isBerechtigt('basis/fhausweis', 's')) die('Sie haben keine Berechtigung für diese Seite'); $db = new basis_db(); $kartennummer = (isset($_POST['kartennummer'])?$_POST['kartennummer']:''); $action=(isset($_POST['action'])?$_POST['action']:''); -if ($action == 'kartenruecknahme') +if ($action == 'karte_loeschen') +{ + if(!$rechte->isBerechtigt('basis/fhausweis', 'suid')) + die('Sie haben keine Berechtigung zum löschen von Karten'); + + $bmp = new betriebsmittelperson(); + if ($bmp->getKartenzuordnung($kartennummer, false)) + { + if ($bmp->betriebsmittelperson_id != '') + { + if ($bmp->delete($bmp->betriebsmittelperson_id)) + { + if ($bmp->delete_betriebsmittel($bmp->betriebsmittel_id)) + { + echo 'Karte erfolgreich gelöscht'; + } + else + { + echo 'Fehler beim löschen der Betriebsmittel_id: '.$bmp->betriebsmittel_id.''; + } + } + else + { + echo 'Fehler beim löschen der Betriebsmittelperson_id: '.$bmp->betriebsmittelperson_id.''; + } + } + else + { + echo 'Diese Karte ist derzeit nicht zugewiesen'; + } + } + else + { + echo 'Diese Karte ist derzeit nicht zugewiesen'; + } + + echo '


    '; +} + +if ($action == 'kartenabfrage' || $action == 'kartenruecknahme') { $bmp = new betriebsmittelperson(); - if ($bmp->getKartenzuordnung($kartennummer)) + if ($bmp->getKartenzuordnung($kartennummer, false)) { if ($bmp->uid != '') { @@ -72,25 +116,28 @@ if ($action == 'kartenruecknahme') } else { - $error=false; - //Neue Karte aktivieren $bmp = new betriebsmittelperson(); if ($bmp->getKartenzuordnungPerson($benutzer->person_id, $kartennummer)) { - if ($bmp->ausgegebenam != '' && $bmp->retouram == '') + if ($action == 'kartenruecknahme') { - $bmp->retouram=date('Y-m-d'); + if(!$rechte->isBerechtigt('basis/fhausweis', 'su')) + die('Sie haben keine Berechtigung zum aktualisieren von Kartendaten'); + + $bmp->retouram = date('Y-m-d'); $bmp->updateamum = date('Y-m-d H:i:s'); $bmp->updatevon = $uid; if(!$bmp->save(false)) { - echo 'Fehler beim Tauschen: '.$bmp->errormsg.''; - $error=true; + echo 'Fehler beim austragen der Karte'; } else - echo 'Karte wurde erfolgreich ausgetragen.
    - + echo 'Karte wurde erfolgreich ausgetragen.'; + } + else + { + echo '
    + UID: '.$benutzer->uid.'
    + Karte augegeben am: '.($bmp->ausgegebenam != '' ? $datum_obj->formatDatum($bmp->ausgegebenam,'d.m.Y') : 'Karte nicht ausgegeben').'
    + Karte retour am: '.($bmp->retouram != '' ? $datum_obj->formatDatum($bmp->retouram,'d.m.Y') : 'Karte nicht retourniert').'
    '; + if ($bmp->beschreibung != '') + { + echo 'Beschreibung: '.$bmp->beschreibung.'
    '; + } + $student = new student(); + $mitarbeiter = new mitarbeiter(); + if ($student->load($bmp->uid)) + { + $prestudent = new prestudent(); + if ($prestudent->getLastStatus($student->prestudent_id)) + { + echo '
    Letzter Status: '; + $style = ''; + if ($prestudent->status_kurzbz == 'Abbrecher' || $prestudent->status_kurzbz == 'Absolvent') + { + $style = 'style="color: red; font-weight: bold"'; + } + echo ''.$prestudent->status_kurzbz.' im '; + $style = ''; + $studiensemester = new studiensemester(); + if ($prestudent->studiensemester_kurzbz != $studiensemester->getakt()) + { + $style = 'style="color: red; font-weight: bold"'; + } + echo ''.$prestudent->studiensemester_kurzbz.'
    '; + } + } + elseif ($mitarbeiter->load($bmp->uid)) + { + echo '
    Letzter Status: '.($benutzer->bnaktiv ? 'Mitarbeiter*in aktiv' : 'Mitarbeiter*in inaktiv').'
    '; + } + else + { + echo '
    Kein/e Mitarbeiter*in oder Student*in
    '; + } + echo '
    -
    Vorname: '.$benutzer->vorname.'
    Nachname: '.$benutzer->nachname.'
    - UID: '.$benutzer->uid.'
    -
    '; - } - else - { - echo 'Karte ist nicht ausgegeben oder wurde bereits retourniert'; +
    '; + + if ($bmp->retouram == '') + { + echo ' + + + +
    '; + } + + if(!$rechte->isBerechtigt('basis/fhausweis', 'suid')) + { + echo '
    + + + ausgegebenam != '' || $bmp->retouram != '') + { + echo ' onclick="return confirm(\'Die Karte wurde ausgegeben oder retourniert. Wollen Sie sie wirklich löschen?\')"'; + } + echo '/> +
    '; + } } } else @@ -116,7 +223,6 @@ if ($action == 'kartenruecknahme') Fehler beim Tauschen: Die Karte wurde dieser Person noch nicht zugeordnet ('.$benutzer->uid.' '.$kartennummer.') '; - $error = true; } } } @@ -144,10 +250,10 @@ Ziehen Sie die neue Karte über den Hitag Kartenleser um die Karte zu deaktivier

    - + Kartennummer: - +
    '; diff --git a/vilesci/fhausweis/kartezuweisen.php b/vilesci/fhausweis/kartezuweisen.php index 1a6ebfef6..1e2972d9e 100644 --- a/vilesci/fhausweis/kartezuweisen.php +++ b/vilesci/fhausweis/kartezuweisen.php @@ -44,13 +44,13 @@ echo ' - - - - - + + + + + - Kartentausch + Karte zuweisen - +

    Dokument Auswählen

    -
    - - + echo '

    Dokument Auswählen

    + + +
    '; - echo ' - + echo '
    + + echo ' - + echo ' + +
    '; // Link zu Admin-Oberfläche @@ -564,31 +575,31 @@ else echo '
      '; drawKategorieMenue($dms->result); echo '
    '; - echo ''; - echo '
    '; // Dokumente der Ausgewaehlten Kategorie laden und Anzeigen $dms = new dms(); @@ -714,7 +725,7 @@ else echo '&dpp='.$_GET['dpp']; } echo '&searching=true&searchstring='.$searchstring.'" method="POST" style="float:left">'; - echo '
    + echo ' - - + echo '"> + + Elemente pro Seite  + echo ' + Elemente pro Seite 
    '; } else @@ -898,7 +909,7 @@ else echo '&dpp='.$_GET['dpp']; } echo '" method="POST" style="float:left">'; - echo '
    + echo ' + echo '"> Elemente pro Seite  + echo ' + Elemente pro Seite 
    '; } else @@ -965,21 +976,21 @@ else } // drawFilesThumb($dms->result); - echo ' -
    '; if ($rechte->isberechtigt('basis/dms', $kategorie->kategorie_oe_kurzbz, 'sui')) { - echo ' -
    - Neue Datei hochladen -
    - -

    -
    -
    + echo ' +
    + Neue Datei hochladen +
    + +

    +
    +
    '; if (isset($_REQUEST['searching']) && $_REQUEST['searching'] == 'true') { @@ -989,13 +1000,13 @@ else { echo '
    '; } - echo ' - - - - - - + echo ' + + +
    Beschreibung
    + + + @@ -1003,17 +1014,17 @@ else - - - - - - -
    Beschreibung
    Schlagworte
    (Semikolon getrennt)
    CIS-Suche
    - - - -
    + + + + + + + + + + +
    '; $files = scandir(IMPORT_PATH); $files_count = count($files) - 2; // Minus zwei wegen "." und ".." @@ -1023,9 +1034,9 @@ else } if ($openupload) { - echo ''; } } @@ -1057,56 +1068,56 @@ function drawAllVersions($id) $dms = new dms(); $dms->getAllVersions($id); - echo ' - - - - - + echo ' +
    VersionName
    + + + + - + - - - - + + + + '; foreach ($dms->result as $dms_help) { - echo ' - - + echo ' + + - + - - - - + + + + echo ' + + + '; } echo '
    VersionName Beschreibung SchlagworteCIS-SucheCIS-Suche KategorieFilename internDatumUser
    Filename internDatumUser
    '.$dms_help->version.''.$dms_help->name.'
    '.$dms_help->version.''.$dms_help->name.' '.$dms_help->beschreibung.' '.$dms_help->schlagworte.''.($dms_help->cis_suche == 'true'?'Ja':'Nein').''.($dms_help->cis_suche == 'true'?'Ja':'Nein').' '.$dms_help->kategorie_kurzbz.''.$dms_help->filename.''.$dms_help->insertamum.''.$dms_help->insertvon.' - '.$dms_help->filename.''.$dms_help->insertamum.''.$dms_help->insertvon.' +
      +
    • Erweitert +
      • Herunterladen
      • '; if ($rechte->isberechtigt('basis/dms', $kategorie->kategorie_oe_kurzbz, 'su')) echo '
      • Datei umbenennen
      • '; if ($rechte->isberechtigt('basis/dms', $kategorie->kategorie_oe_kurzbz, 'suid')) echo '
      • Löschen
      • '; - echo '
      -
    • -
    -
    '; @@ -1121,41 +1132,41 @@ function drawFilesFromImport() if ($handle = opendir(IMPORT_PATH)) { - echo ''; - echo '

    Files im Import Ordner

    - + echo '

    Files im Import Ordner

    +
    '; while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') { - echo ' - - - + echo ' + + + '; } } - echo ' - - - - - + echo ' + + + + +
    File
    - '.$file.' - - Upload -
    + '.$file.' + + Upload +
    '; closedir($handle); } @@ -1247,44 +1258,44 @@ function drawFilesList($rows) if (count($rows) > 0) { - echo ' - + echo ' + widgets: ["zebra"] + }); + }); + '; } - echo ' - - - - + echo ' +
    Titel
    + + + '; if ($suche == true) { echo ''; } - echo ' - - + echo ' + + - - - - + + + + '; $i = 0; foreach ($rows as $row) @@ -1295,8 +1306,8 @@ function drawFilesList($rows) else $i++; - echo ' - + echo ' + '; $datum = new datum(); @@ -1335,10 +1346,10 @@ function drawFilesList($rows) echo ''; echo ''; @@ -1540,15 +1554,15 @@ function drawRenameForm($dms_id, $version, $page = NULL, $dpp = NULL, $searching echo '&dpp='.$dpp; echo '" method="POST">'; } - echo ' -
    Titel VKategorie ID ID Beschreibung SchlagworteCIS-Suche
    CIS-Suche
    '; if (array_key_exists($row->mimetype, $mimetypes)) echo ''; @@ -1312,9 +1323,9 @@ function drawFilesList($rows) $newerVersionAlert = 'alert(\'Achtung!! Es gibt eine neuere Version dieses Dokuments. Es wird die aktuellste eingefügt.\');'; } - echo ' - - '.$newVersion.' '.$row->name.' + echo ' + + '.$newVersion.' '.$row->name.' '; // Upload einer neuen Version - echo '
      -
    • Erweitert -
        -
      • Auswählen
      • + echo '
          +
        • Erweitert +
            +
          • Auswählen
          • Herunterladen
          • '; if ($rechte->isberechtigt('basis/dms', $kategorie->kategorie_oe_kurzbz, 'sui')) { @@ -1348,7 +1359,10 @@ function drawFilesList($rows) $beschreibungstext = str_replace('"', "D4n7ührung", $beschreibungstext); $beschreibungstext = str_replace("\\", "6Sl4sh", $beschreibungstext); $beschreibungstext = str_replace("\r\n", "Ze1l3numxbr", $beschreibungstext); - echo $beschreibungstext.'\'); return upload(\''.$row->dms_id.'\',\''.$row->name.'\');" style="font-size:small">Neue Version hochladen'; + echo $beschreibungstext.'\'); + updateSchlagworte(\''.$row->schlagworte.'\'); + updateCisSuche(\''.$row->cis_suche.'\'); + return upload(\''.$row->dms_id.'\',\''.$row->name.'\');" style="font-size:small">Neue Version hochladen'; } if (isset($_REQUEST['searching']) && $_REQUEST['searching'] == 'true') { @@ -1490,9 +1504,9 @@ function drawFilesList($rows) if ($rechte->isberechtigt('basis/dms', $kategorie->kategorie_oe_kurzbz, 'suid')) echo '
          • Löschen
          • '; } - echo ' -
          -
        • + echo ' +
        +
      '; echo '
    '.$row->dms_id.'
    - - - - - - - + echo ' +
    Dateiname:
    Beschreibung:
    + + + + + + + @@ -1557,12 +1571,12 @@ function drawRenameForm($dms_id, $version, $page = NULL, $dpp = NULL, $searching - -
    Dateiname:
    Beschreibung:
    Schlagworte
    (Semikolon getrennt):
    CIS-Suche: cis_suche == 'true'?'checked="checked"':'').'>
    - - + + + + '; - echo ' + echo ' '; } else @@ -1603,8 +1617,8 @@ function drawChangeKategorie($dms_id, $page = NULL, $dpp = NULL) echo '&dpp='.$dpp; echo '" method="POST">'; } - echo ' - '; foreach ($allKategorien->result as $kategorienResult) @@ -1619,8 +1633,8 @@ function drawChangeKategorie($dms_id, $page = NULL, $dpp = NULL) echo ''; } - echo ' - + echo ' + '; if (! is_null($page)) echo ''; @@ -1629,6 +1643,6 @@ function drawChangeKategorie($dms_id, $page = NULL, $dpp = NULL) echo ''; } -?> - - +?> + + From 89209a0c27e06fd139ab443f35198b59fdcba59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 6 Sep 2021 09:25:38 +0200 Subject: [PATCH 210/301] Problem behoben wodurch Messages im FAS nicht korrekt geladen werden konnten --- public/js/AjaxLib.js | 24 ++++++++++++++++++++---- rdf/anrechnung.rdf.php | 23 +++++++++++++---------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/public/js/AjaxLib.js b/public/js/AjaxLib.js index fb98e4fb8..283061dad 100644 --- a/public/js/AjaxLib.js +++ b/public/js/AjaxLib.js @@ -391,9 +391,21 @@ var FHC_AjaxClient = { * @returns {boolean} * @private */ - _hasFileList(controllerParameters){ + _hasFileList: function(controllerParameters) + { + // Loop through controllerParameters + for (key in controllerParameters) + { + // When FileList is found ( parameter with uploaded file(s)) + if (controllerParameters[key] instanceof FileList) + { + return true; + } + } + /* return Object.values(controllerParameters) .some((value) => value instanceof FileList === true); + */ }, /** @@ -409,14 +421,18 @@ var FHC_AjaxClient = { const formData = new FormData(); // Loop through controllerParameters - for (const [key, value] of Object.entries(controllerParameters)) { - + for (key in controllerParameters) + { + var value = controllerParameters[key]; // When FileList is found ( parameter with uploaded file(s)) if (value instanceof FileList) { // Loop through uploaded files - for (let file of value) + //for (let file of value) + //for (var file of value) + for (var filekey in value) { + var file = value[filekey]; // Append file to FormData object (if more than 1 file, append as array) formData.append(value.length == 1 ? key : key + '[]', file); } diff --git a/rdf/anrechnung.rdf.php b/rdf/anrechnung.rdf.php index 2df9df156..14fc1fd1a 100644 --- a/rdf/anrechnung.rdf.php +++ b/rdf/anrechnung.rdf.php @@ -28,24 +28,27 @@ $anrechnung = new anrechnung(); if(is_numeric($anrechnung_id)) { $anrechnung->getAnrechnung($anrechnung_id); - + // Add last Anrechnungstatus $anrechnungstatus = new Anrechnung(); $anrechnungstatus->getLastAnrechnungstatus($anrechnung_id); - + $anrechnung->result[0]->status = $anrechnungstatus->result[0]->bezeichnung_mehrsprachig[DEFAULT_LANGUAGE]; } elseif(is_numeric($prestudent_id)) { $anrechnung->getAnrechnungPrestudent($prestudent_id); - + // Add last Anrechnungstatus to each Anrechnung of Prestudent - foreach ($anrechnung->result as $row) - { - $anrechnungstatus = new Anrechnung(); - $status = $anrechnungstatus->getLastAnrechnungstatus($row->anrechnung_id); - $row->status = $anrechnungstatus->result[0]->bezeichnung_mehrsprachig[DEFAULT_LANGUAGE]; - } + if(is_array($anrechnung->result)) + { + foreach ($anrechnung->result as $row) + { + $anrechnungstatus = new Anrechnung(); + $status = $anrechnungstatus->getLastAnrechnungstatus($row->anrechnung_id); + $row->status = $anrechnungstatus->result[0]->bezeichnung_mehrsprachig[DEFAULT_LANGUAGE]; + } + } } else { @@ -103,4 +106,4 @@ if(is_array($anrechnung->result)) ?> - \ No newline at end of file + From 9c84558f5fcbfce7cd0321226c01f0f03e7bbee1 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 7 Sep 2021 12:13:59 +0200 Subject: [PATCH 211/301] - Added requiredPermissions to the application/config/udfmasterschema.json and set them as mandatory - Removed the private method _isAllowed from application/controllers/widgets/UDF.php - Removed required permissions from views application/views/system/fas_udf.php and application/views/system/infocenter/zgvpruefungen.php - Widget views application/views/widgets/checkbox, dropdown, textarea and textfield now they print the attribute disabled - Added constant DISABLED to application/widgets/html/HTMLWidget.php - Removed private property _requiredPermissions from application/widgets/udf/UDFWidget.php - application/widgets/udf/UDFWidget.php does not check permissions anymore and does not store them anymore - Added constants PERMISSION_TYPE_READ and PERMISSION_TYPE_WRITE to application/libraries/UDFLib.php - Removed constant PERMISSION_TYPE from application/libraries/UDFLib.php - Removed public method isAllowed from application/libraries/UDFLib.php - Added private methods _readAllowed, _writeAllowed, _setRequiredPermissions and _setReadOnly to application/libraries/UDFLib.php - UDFLib->displayUDFWidget now checks if permissions are declared in the UDF JSON and if the user is allowed to read and write such UDF - UDFLib->saveUDFs now checks if the user has the permissions to write such UDF - Now the UDFs are even displayed in read only mode --- application/config/udfmasterschema.json | 16 +- application/controllers/widgets/UDF.php | 15 +- application/libraries/UDFLib.php | 267 ++++++++++++------ application/views/system/fas_udf.php | 3 +- .../views/system/infocenter/zgvpruefungen.php | 2 +- application/views/widgets/checkbox.php | 4 +- application/views/widgets/dropdown.php | 2 + application/views/widgets/textarea.php | 4 +- application/views/widgets/textfield.php | 4 +- application/widgets/html/HTMLWidget.php | 46 +-- application/widgets/udf/UDFWidget.php | 34 +-- 11 files changed, 235 insertions(+), 162 deletions(-) diff --git a/application/config/udfmasterschema.json b/application/config/udfmasterschema.json index fa06dc80d..ab3faa8c9 100644 --- a/application/config/udfmasterschema.json +++ b/application/config/udfmasterschema.json @@ -9,6 +9,13 @@ "name": { "type": "string" }, + "type": { + "type": "string", + "enum": ["checkbox", "textfield", "textarea", "date", "dropdown", "multipledropdown"] + }, + "requiredPermissions": { + "type": "array" + }, "description": { "type": "array", }, @@ -18,10 +25,6 @@ "title": { "type": "array", }, - "type": { - "type": "string", - "enum": ["checkbox", "textfield", "textarea", "date", "dropdown", "multipledropdown"] - }, "sort": { "type": "integer" }, @@ -67,5 +70,6 @@ } } }, - "required": ["type", "name"] -} \ No newline at end of file + "required": ["type", "name", "requiredPermissions"] +} + diff --git a/application/controllers/widgets/UDF.php b/application/controllers/widgets/UDF.php index 5b4c45776..3ba745a10 100644 --- a/application/controllers/widgets/UDF.php +++ b/application/controllers/widgets/UDF.php @@ -26,9 +26,6 @@ class UDF extends FHC_Controller // Loads the UDFLib with HTTP GET/POST parameters $this->_loadUDFLib(); - - // Checks if the caller is allow to use this UDF widget - $this->_isAllowed(); } //------------------------------------------------------------------------------------------------------------------ @@ -63,17 +60,6 @@ class UDF extends FHC_Controller //------------------------------------------------------------------------------------------------------------------ // Private methods - /** - * Checks if the user is allowed to use this UDFWidget - */ - private function _isAllowed() - { - if (!$this->udflib->isAllowed()) - { - $this->terminateWithJsonError('You are not allowed to access to this content'); - } - } - /** * Loads the UDFLib with the UDF_UNIQUE_ID parameter * If the parameter UDF_UNIQUE_ID is not given then the execution of the controller is terminated and @@ -105,3 +91,4 @@ class UDF extends FHC_Controller } } } + diff --git a/application/libraries/UDFLib.php b/application/libraries/UDFLib.php index f9ad7d20d..756c382dd 100644 --- a/application/libraries/UDFLib.php +++ b/application/libraries/UDFLib.php @@ -30,13 +30,14 @@ class UDFLib // ...to specify permissions that are needed to use this TableWidget const REQUIRED_PERMISSIONS_PARAMETER = 'requiredPermissions'; + const PERMISSION_TABLE_METHOD = 'UDFWidget'; // Name for fake method to be checked by the PermissionLib + const PERMISSION_TYPE_READ = 'r'; + const PERMISSION_TYPE_WRITE = 'w'; + // ...to specify the primary key name and value const PRIMARY_KEY_NAME = 'primaryKeyName'; const PRIMARY_KEY_VALUE = 'primaryKeyValue'; - const PERMISSION_TABLE_METHOD = 'UDFWidget'; // Name for fake method to be checked by the PermissionLib - const PERMISSION_TYPE = 'rw'; - // HTML components const LABEL = 'title'; const TITLE = 'description'; @@ -76,10 +77,10 @@ class UDFLib // Public methods /** - * UDFWidget - */ - public function UDFWidget($args, $htmlArgs = array()) - { + * UDFWidget + */ + public function UDFWidget($args, $htmlArgs = array()) + { if ((isset($args[self::SCHEMA_ARG_NAME]) && !isEmptyString($args[self::SCHEMA_ARG_NAME])) && (isset($args[self::TABLE_ARG_NAME]) && !isEmptyString($args[self::TABLE_ARG_NAME]))) { @@ -112,16 +113,17 @@ class UDFLib show_error(self::TABLE_ARG_NAME.' parameter is missing!'); } } - } + } - /** + /** * It renders the HTML of the UDF * * NOTE: When this method is called $widgetData contains different data from * parameter $args in the constructor */ - public function displayUDFWidget(&$widgetData) + public function displayUDFWidget(&$widgetData) { + $field = null; $schema = $widgetData[self::SCHEMA_ARG_NAME]; // schema attribute $table = $widgetData[self::TABLE_ARG_NAME]; // table attribute @@ -155,7 +157,7 @@ class UDFLib $found = false; // used to check if the field is found or not in the json schema $this->_sortJsonSchemas($jsonSchemasArray); // Sort the list of UDF by sort property - + // Loops through json schemas foreach ($jsonSchemasArray as $jsonSchema) { @@ -169,21 +171,37 @@ class UDFLib { show_error(sprintf('%s.%s: Attribute "name" not present in the json schema', $schema, $table)); } + // If the requiredPermissions property is not present then show an error + if (!isset($jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER})) + { + show_error(sprintf('%s.%s: Attribute "requiredPermissions" not present in the json schema', $schema, $table)); + } + + // Set the required permissions for this UDF + $this->_setRequiredPermissions($jsonSchema->{self::NAME}, $jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER}); // If a UDF is specified and is present in the json schemas list or no UDF is specified if ((isset($field) && $field == $jsonSchema->{self::NAME}) || !isset($field)) { - // Set attributes using phrases - $this->_setAttributesWithPhrases($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); + // If the user has the permissions to read this field + if ($this->_readAllowed($jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER})) + { + // Set attributes using phrases + $this->_setAttributesWithPhrases($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); - // Set validation attributes - $this->_setValidationAttributes($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); + // Set validation attributes + $this->_setValidationAttributes($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); - // Set name and id attributes - $this->_setNameAndId($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); + // Set name and id attributes + $this->_setNameAndId($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); - // Render the HTML for this UDF - $this->_render($jsonSchema, $widgetData); + // Set if the field is in read only mode + $this->_setReadOnly($jsonSchema, $widgetData[HTMLWidget::HTML_ARG_NAME]); + + // Render the HTML for this UDF + $this->_render($jsonSchema, $widgetData); + } + // otherwise the UDF is not displayed // If a UDf is specified and it was found then stop looking through this list if (isset($field) && $field == $jsonSchema->{self::NAME}) @@ -213,7 +231,7 @@ class UDFLib show_error(sprintf('%s.%s: Does not contain "jsons" field', $schema, $table)); } } - } + } /** * Manage UDFs @@ -249,6 +267,22 @@ class UDFLib { $decodedUDFDefinition = $decodedUDFDefinitions[$i]; // Definition of a single UDF + // Checks if the requiredPermissions is available and it is a valid array or a valid string + if (isset($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}) + && (!isEmptyArray($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}) + || !isEmptyString($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER}))) + { + // Then check if the user has the permissions to write such UDF + if (!$this->_writeAllowed($decodedUDFDefinition->{self::REQUIRED_PERMISSIONS_PARAMETER})) + { + $notValidUDFsArray[] = error('Writing not allowed for UDF: '.$decodedUDFDefinition->{self::NAME}); + } + } + else + { + $notValidUDFsArray[] = error('Writing permissions not defined for UDF: '.$decodedUDFDefinition->{self::NAME}); + } + // Loops through the UDFs values that should be stored foreach ($udfsParameters as $key => $val) { @@ -468,12 +502,32 @@ class UDFLib */ public function saveUDFs($udfUniqueId, $udfs) { + $udfToBewritten = array(); // UDFs to be written into database + // Read the all session for this udf widget $session = $this->getSession(); // If session is empty then return an error if ($session == null) return error('No UDFWidget loaded'); + // Get the required permission from the session + $requiredPermissions = $session[self::REQUIRED_PERMISSIONS_PARAMETER]; + + // For each UDF that is trying to save + foreach ($udfs as $udfName => $udfValue) + { + // If the UDFs exists in the requiredPermissions array + if (array_key_exists($udfName, $requiredPermissions)) + { + // Then check if the user has the permissions to write such UDF + if ($this->_writeAllowed($requiredPermissions[$udfName])) + { + // If allowed then save the UDF name and value to be stored later into the database + $udfToBewritten[$udfName] = $udfValue; + } + } + } + // Workaround to load CI $this->_ci->load->model('system/UDF_model', 'UDFModel'); @@ -490,30 +544,56 @@ class UDFLib // Returns the result of the database update operation to save UDFs return $dbModel->update( array($session[self::PRIMARY_KEY_NAME] => $session[self::PRIMARY_KEY_VALUE]), - (array)$udfs + $udfToBewritten ); } - /** - * Checks if at least one of the permissions given as parameter (requiredPermissions) belongs - * to the authenticated user, if confirmed then is allowed to use this UDFWidget. - * If the parameter requiredPermissions is NOT given or is not present in the session, - * then NO one is allow to use this UDFWidget - * Wrapper method to permissionlib->hasAtLeastOne - */ - public function isAllowed($requiredPermissions = null) - { - $this->_ci->load->library('PermissionLib'); // Load permission library - - // Gets the required permissions from the session if they are not provided as parameter - $rq = $requiredPermissions; - if ($rq == null) $rq = $this->getSessionElement(self::REQUIRED_PERMISSIONS_PARAMETER); - - return $this->_ci->permissionlib->hasAtLeastOne($rq, self::PERMISSION_TABLE_METHOD, self::PERMISSION_TYPE); - } - // ------------------------------------------------------------------------------------------------- // Private methods + // + + /** + * Checks if at least one of the permissions given as parameter belongs to the authenticated user in read mode + * Wrapper method to permissionlib->hasAtLeastOne + */ + private function _readAllowed($requiredPermissions) + { + $this->_ci->load->library('PermissionLib'); // Load permission library + + return $this->_ci->permissionlib->hasAtLeastOne($requiredPermissions, self::PERMISSION_TABLE_METHOD, self::PERMISSION_TYPE_READ); + } + + /** + * Checks if at least one of the permissions given as parameter belongs to the authenticated user in write mode + * Wrapper method to permissionlib->hasAtLeastOne + */ + private function _writeAllowed($requiredPermissions) + { + $this->_ci->load->library('PermissionLib'); // Load permission library + + return $this->_ci->permissionlib->hasAtLeastOne($requiredPermissions, self::PERMISSION_TABLE_METHOD, self::PERMISSION_TYPE_WRITE); + } + + /** + * Set an array of required permissions for a UDF into the session + */ + private function _setRequiredPermissions($udfName, $permissions) + { + // Get the session for this UDFWidget + $session = $this->getSession(); + + // If does _not_ exist yet in the session + if (!isset($session[self::REQUIRED_PERMISSIONS_PARAMETER])) + { + $session[self::REQUIRED_PERMISSIONS_PARAMETER] = array(); + } + + // Set the required permission in the session for this UDFWidget + $session[self::REQUIRED_PERMISSIONS_PARAMETER][$udfName] = $permissions; + + // Write into the session + $this->setSession($session); + } /** * Print the block for UDFs @@ -654,20 +734,36 @@ class UDFLib return $returnArrayValidation; } - /** - * Set the name and id attribute of the HTML element - */ - private function _setNameAndId($jsonSchema, &$htmlParameters) - { + /** + * Disable the HTML element if in read only mode + */ + private function _setReadOnly($jsonSchema, &$htmlParameters) + { + // If write permissions _not_ exist then set the field as disabled + if (!$this->_writeAllowed($jsonSchema->{self::REQUIRED_PERMISSIONS_PARAMETER})) + { + $htmlParameters[HTMLWidget::DISABLED] = HTMLWidget::DISABLED; // any values is fine + } + else // otherwise restore to default + { + if (isset($htmlParameters[HTMLWidget::DISABLED])) unset($htmlParameters[HTMLWidget::DISABLED]); + } + } + + /** + * Set the name and id attribute of the HTML element + */ + private function _setNameAndId($jsonSchema, &$htmlParameters) + { $htmlParameters[HTMLWidget::HTML_ID] = $jsonSchema->{self::NAME}; $htmlParameters[HTMLWidget::HTML_NAME] = $jsonSchema->{self::NAME}; - } - - /** - * Sort the list of UDF by sort property - */ - private function _sortJsonSchemas(&$jsonSchemasArray) - { + } + + /** + * Sort the list of UDF by sort property + */ + private function _sortJsonSchemas(&$jsonSchemasArray) + { usort($jsonSchemasArray, function ($a, $b) { if (!isset($a->{self::SORT})) { @@ -684,13 +780,13 @@ class UDFLib return ($a->{self::SORT} < $b->{self::SORT}) ? -1 : 1; }); - } - - /** - * Loads the UDF description by the given schema and table - */ - private function _loadUDF($schema, $table) - { + } + + /** + * Loads the UDF description by the given schema and table + */ + private function _loadUDF($schema, $table) + { // Loads UDF model $this->_ci->load->model('system/UDF_model', 'UDFModel'); @@ -722,13 +818,13 @@ class UDFLib } return $udfResults; - } + } - /** - * Render the HTML for the UDF - */ - private function _render($jsonSchema, &$widgetData) - { + /** + * Render the HTML for the UDF + */ + private function _render($jsonSchema, &$widgetData) + { // Checkbox if ($jsonSchema->{self::TYPE} == 'checkbox') { @@ -759,11 +855,11 @@ class UDFLib { $this->_renderDropdown($jsonSchema, $widgetData, true); } - } + } - /** - * Renders a dropdown element - */ + /** + * Renders a dropdown element + */ private function _renderDropdown($jsonSchema, &$widgetData, $multiple = false) { // Selected element/s @@ -805,8 +901,8 @@ class UDFLib } /** - * Renders a textarea element - */ + * Renders a textarea element + */ private function _renderTextarea($jsonSchema, &$widgetData) { $text = null; // text value @@ -823,8 +919,8 @@ class UDFLib } /** - * Renders an input text element - */ + * Renders an input text element + */ private function _renderTextfield($jsonSchema, &$widgetData) { $text = null; // text value @@ -841,8 +937,8 @@ class UDFLib } /** - * Renders a checkbox element - */ + * Renders a checkbox element + */ private function _renderCheckbox($jsonSchema, &$widgetData) { // Set checkbox value if present in the DB @@ -861,11 +957,11 @@ class UDFLib $checkboxWidgetUDF->render(); } - /** - * Sets the attributes of the HTML element using the phrases system - */ - private function _setAttributesWithPhrases($jsonSchema, &$htmlParameters) - { + /** + * Sets the attributes of the HTML element using the phrases system + */ + private function _setAttributesWithPhrases($jsonSchema, &$htmlParameters) + { // By default set to null all the attributes $htmlParameters[HTMLWidget::LABEL] = null; $htmlParameters[HTMLWidget::TITLE] = null; @@ -933,13 +1029,13 @@ class UDFLib } } } - } + } - /** - * Sets the validation attributes of the HTML element using the configuration inside the json schema - */ - private function _setValidationAttributes($jsonSchema, &$htmlParameters) - { + /** + * Sets the validation attributes of the HTML element using the configuration inside the json schema + */ + private function _setValidationAttributes($jsonSchema, &$htmlParameters) + { // Validation attributes set by default to null $htmlParameters[HTMLWidget::REGEX] = null; $htmlParameters[HTMLWidget::REQUIRED] = null; @@ -998,3 +1094,4 @@ class UDFLib } } } + diff --git a/application/views/system/fas_udf.php b/application/views/system/fas_udf.php index 8a1200b6a..e6fa396cf 100644 --- a/application/views/system/fas_udf.php +++ b/application/views/system/fas_udf.php @@ -45,7 +45,6 @@ echo $this->udflib->UDFWidget( array( UDFLib::UDF_UNIQUE_ID => 'fasPersonUDFs', - UDFLib::REQUIRED_PERMISSIONS_PARAMETER => 'basis/person', UDFLib::SCHEMA_ARG_NAME => 'public', UDFLib::TABLE_ARG_NAME => 'tbl_person', UDFLib::PRIMARY_KEY_NAME => 'person_id', @@ -70,7 +69,6 @@ echo $this->udflib->UDFWidget( array( UDFLib::UDF_UNIQUE_ID => 'fasPrestudentUDFs', - UDFLib::REQUIRED_PERMISSIONS_PARAMETER => 'basis/person', UDFLib::SCHEMA_ARG_NAME => 'public', UDFLib::TABLE_ARG_NAME => 'tbl_prestudent', UDFLib::PRIMARY_KEY_NAME => 'prestudent_id', @@ -109,3 +107,4 @@ load->view("templates/footer"); ?> + diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 05c94c384..2b08dada3 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -341,7 +341,6 @@ echo $this->udflib->UDFWidget( array( UDFLib::UDF_UNIQUE_ID => 'infocenterPrestudentUDFs_'.$zgvpruefung->prestudent_id, - UDFLib::REQUIRED_PERMISSIONS_PARAMETER => 'infocenter', UDFLib::SCHEMA_ARG_NAME => 'public', UDFLib::TABLE_ARG_NAME => 'tbl_prestudent', UDFLib::PRIMARY_KEY_NAME => 'prestudent_id', @@ -553,3 +552,4 @@ endforeach; // end foreach zgvpruefungen ?>
    + diff --git a/application/views/widgets/checkbox.php b/application/views/widgets/checkbox.php index 6debb2afd..811e3c682 100644 --- a/application/views/widgets/checkbox.php +++ b/application/views/widgets/checkbox.php @@ -24,6 +24,7 @@ +
    - \ No newline at end of file + + diff --git a/application/views/widgets/dropdown.php b/application/views/widgets/dropdown.php index d9faf1978..51db6d536 100644 --- a/application/views/widgets/dropdown.php +++ b/application/views/widgets/dropdown.php @@ -33,6 +33,7 @@ + > + diff --git a/application/views/widgets/textarea.php b/application/views/widgets/textarea.php index c72b52658..5346fefa8 100644 --- a/application/views/widgets/textarea.php +++ b/application/views/widgets/textarea.php @@ -29,9 +29,11 @@ + >
    - \ No newline at end of file + + diff --git a/application/views/widgets/textfield.php b/application/views/widgets/textfield.php index 73b1daa1b..c5ba81710 100644 --- a/application/views/widgets/textfield.php +++ b/application/views/widgets/textfield.php @@ -31,10 +31,12 @@ + value="" > - \ No newline at end of file + + diff --git a/application/widgets/html/HTMLWidget.php b/application/widgets/html/HTMLWidget.php index 9639890ea..0034edfd9 100644 --- a/application/widgets/html/HTMLWidget.php +++ b/application/widgets/html/HTMLWidget.php @@ -6,18 +6,18 @@ class HTMLWidget extends Widget { // The name of the array present in the data array given to the view that will render this widget - const HTML_ARG_NAME = 'HTML'; + const HTML_ARG_NAME = 'HTML'; const HTML_DEFAULT_VALUE = ''; // Default value of the html element - const HTML_NAME = 'name'; // HTML name attribute - const HTML_ID = 'id'; // HTML id attribute - - // External block definition - const EXTERNAL_BLOCK = 'externalBlock'; // External block name - const EXTERNAL_START_BLOCK_HTML_TAG = '
    '; // External block start tag - const EXTERNAL_END_BLOCK_HTML_TAG = '
    '; // External block end tag - - // HTML attributes - const LABEL = 'title'; + const HTML_NAME = 'name'; // HTML name attribute + const HTML_ID = 'id'; // HTML id attribute + + // External block definition + const EXTERNAL_BLOCK = 'externalBlock'; // External block name + const EXTERNAL_START_BLOCK_HTML_TAG = '
    '; // External block start tag + const EXTERNAL_END_BLOCK_HTML_TAG = '
    '; // External block end tag + + // HTML attributes + const LABEL = 'title'; const REGEX = 'regex'; const TITLE = 'description'; const REQUIRED = 'required-field'; @@ -26,11 +26,12 @@ class HTMLWidget extends Widget const MAX_LENGTH = 'max-length'; const MIN_LENGTH = 'min-length'; const PLACEHOLDER = 'placeholder'; + const DISABLED = 'disabled'; - /** - * It gets also the htmlArgs array as parameter, it will be used to set the HTML properties - */ - public function __construct($name, $args = array(), $htmlArgs = array()) + /** + * It gets also the htmlArgs array as parameter, it will be used to set the HTML properties + */ + public function __construct($name, $args = array(), $htmlArgs = array()) { parent::__construct($name, $args); @@ -38,11 +39,11 @@ class HTMLWidget extends Widget $this->_setHtmlProperties($htmlArgs); } - /** - * Initialising html properties, such as the id and name attributes of the HTML element - */ - private function _setHtmlProperties($htmlArgs) - { + /** + * Initialising html properties, such as the id and name attributes of the HTML element + */ + private function _setHtmlProperties($htmlArgs) + { // If $htmlArgs wasn't already stored in $this->_args if (!isset($this->_args[HTMLWidget::HTML_ARG_NAME])) { @@ -58,9 +59,9 @@ class HTMLWidget extends Widget $this->_args[HTMLWidget::HTML_ARG_NAME][$argName] = $argValue; } } - } + } - /** + /** * Prints an attribute name and eventually also the value extracted from $htmlArgs * Set $isValuePresent to false the value should not be displayed */ @@ -113,3 +114,4 @@ class HTMLWidget extends Widget } } } + diff --git a/application/widgets/udf/UDFWidget.php b/application/widgets/udf/UDFWidget.php index 7af3dd926..abbbab022 100644 --- a/application/widgets/udf/UDFWidget.php +++ b/application/widgets/udf/UDFWidget.php @@ -6,8 +6,6 @@ */ class UDFWidget extends HTMLWidget { - private $_requiredPermissions; // The required permissions to use this UDF widget - private $_schema; // Schema name private $_table; // Table name private $_primaryKeyName; // Primary key name @@ -26,26 +24,16 @@ class UDFWidget extends HTMLWidget $this->_initUDFWidget($args); // checks parameters and initialize properties - // Let's start if it's allowed - // NOTE: If it is NOT allowed then no data are loaded - if ($this->udflib->isAllowed($this->_requiredPermissions)) - { - $this->_startUDFWidget($args[UDFLib::UDF_UNIQUE_ID]); - } + $this->_startUDFWidget($args[UDFLib::UDF_UNIQUE_ID]); } /** * Called by the WidgetLib, it renders the HTML of the UDF */ - public function display($widgetData) + public function display($widgetData) { - // Let's start if it's allowed - // NOTE: If it is NOT allowed then no data are loaded - if ($this->_ci->udflib->isAllowed($this->_requiredPermissions)) - { - $this->_ci->udflib->displayUDFWidget($widgetData); - } - } + $this->_ci->udflib->displayUDFWidget($widgetData); + } //------------------------------------------------------------------------------------------------------------------ // Private methods @@ -60,18 +48,11 @@ class UDFWidget extends HTMLWidget // If here then everything is ok // Initialize class properties - $this->_requiredPermissions = null; $this->_schema = null; $this->_table = null; $this->_primaryKeyName = null; $this->_primaryKeyValue = null; - // Retrieved the required permissions parameter if present - if (isset($args[UDFLib::REQUIRED_PERMISSIONS_PARAMETER])) - { - $this->_requiredPermissions = $args[UDFLib::REQUIRED_PERMISSIONS_PARAMETER]; - } - // Retrieved the if (isset($args[UDFLib::SCHEMA_ARG_NAME])) { @@ -113,11 +94,6 @@ class UDFWidget extends HTMLWidget show_error('The parameter "'.UDFLib::UDF_UNIQUE_ID.'" must be specified'); } - if (!isset($args[UDFLib::REQUIRED_PERMISSIONS_PARAMETER])) - { - show_error('The parameter "'.UDFLib::REQUIRED_PERMISSIONS_PARAMETER.'" must be specified'); - } - if (!isset($args[UDFLib::SCHEMA_ARG_NAME])) { show_error('The parameter "'.UDFLib::SCHEMA_ARG_NAME.'" must be specified'); @@ -149,7 +125,6 @@ class UDFWidget extends HTMLWidget $this->udflib->setSession( array( UDFLib::UDF_UNIQUE_ID => $udfUniqueId, // table unique id - UDFLib::REQUIRED_PERMISSIONS_PARAMETER => $this->_requiredPermissions, // UDFLib::SCHEMA_ARG_NAME => $this->_schema, // UDFLib::TABLE_ARG_NAME => $this->_table, // UDFLib::PRIMARY_KEY_NAME => $this->_primaryKeyName, // @@ -158,3 +133,4 @@ class UDFWidget extends HTMLWidget ); } } + From 9f5a8e4eb9709640e56fd6ba1d5f995544df66c6 Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 7 Sep 2021 15:01:12 +0200 Subject: [PATCH 212/301] =?UTF-8?q?Updateaktiv-Datum=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/fhausweis/kartenruecknahme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vilesci/fhausweis/kartenruecknahme.php b/vilesci/fhausweis/kartenruecknahme.php index f51cb0347..00518a293 100644 --- a/vilesci/fhausweis/kartenruecknahme.php +++ b/vilesci/fhausweis/kartenruecknahme.php @@ -178,7 +178,7 @@ if ($action == 'kartenabfrage' || $action == 'kartenruecknahme') } elseif ($mitarbeiter->load($bmp->uid)) { - echo '
    Letzter Status: '.($benutzer->bnaktiv ? 'Mitarbeiter*in aktiv' : 'Mitarbeiter*in inaktiv').'
    '; + echo '
    Letzter Status: '.($benutzer->bnaktiv ? 'Mitarbeiter*in aktiv' : 'Mitarbeiter*in inaktiv seit '.$datum_obj->formatDatum($benutzer->updateaktivam,'d.m.Y').'').'
    '; } else { @@ -197,7 +197,7 @@ if ($action == 'kartenabfrage' || $action == 'kartenruecknahme')
    '; } - if(!$rechte->isBerechtigt('basis/fhausweis', 'suid')) + if($rechte->isBerechtigt('basis/fhausweis', 'suid')) { echo '
    From 261e4066c80cfa8da1a65ad498c5f83c0c64d32f Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 7 Sep 2021 15:05:35 +0200 Subject: [PATCH 213/301] Beginn- und Enddatum bei der Funktion Rektor beruecksichtigen --- rdf/abschlusspruefung.rdf.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rdf/abschlusspruefung.rdf.php b/rdf/abschlusspruefung.rdf.php index f28319599..8c2764d86 100644 --- a/rdf/abschlusspruefung.rdf.php +++ b/rdf/abschlusspruefung.rdf.php @@ -129,7 +129,19 @@ function draw_content_xml($row) if($person->load($row->pruefer3)) $pruefer3 = trim($person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$person->titelpost); - $qry = "SELECT * FROM public.tbl_benutzerfunktion JOIN campus.vw_mitarbeiter USING(uid) WHERE funktion_kurzbz='rek'"; + $qry = "SELECT * + FROM PUBLIC.tbl_benutzerfunktion + JOIN campus.vw_mitarbeiter USING (uid) + WHERE funktion_kurzbz = 'rek' + AND ( + tbl_benutzerfunktion.datum_von <= now() + OR tbl_benutzerfunktion.datum_von IS NULL + ) + AND ( + tbl_benutzerfunktion.datum_bis >= now() + OR tbl_benutzerfunktion.datum_bis IS NULL + ) + ORDER BY tbl_benutzerfunktion.insertamum DESC LIMIT 1"; $rektor = ''; $db = new basis_db(); $db2 = new basis_db(); From ebb7af1e59ec8f365c75093883a39b4fed1c0117 Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 7 Sep 2021 15:11:12 +0200 Subject: [PATCH 214/301] Bei Abgewiesenen 0 als Prio anzeigen --- vilesci/stammdaten/auswertung_fhtw.php | 1 + 1 file changed, 1 insertion(+) diff --git a/vilesci/stammdaten/auswertung_fhtw.php b/vilesci/stammdaten/auswertung_fhtw.php index 752467913..1acfe1a55 100644 --- a/vilesci/stammdaten/auswertung_fhtw.php +++ b/vilesci/stammdaten/auswertung_fhtw.php @@ -3002,6 +3002,7 @@ else if ($erg->letzter_status == 'Abgewiesener') { $inaktiv = 'text-muted'; + $erg->prioritaet = 0; } echo " From d4a05c91e3ba0a7ef0e18754d915884a830c554e Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Wed, 8 Sep 2021 09:23:33 +0200 Subject: [PATCH 215/301] =?UTF-8?q?Vorr=C3=BCckung=20der=20Studienpl=C3=A4?= =?UTF-8?q?ne=20auch=20f=C3=BCrs=20SS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vilesci/lehre/studienplan_vorrueckung.php | 130 +++++++++++++--------- 1 file changed, 76 insertions(+), 54 deletions(-) diff --git a/vilesci/lehre/studienplan_vorrueckung.php b/vilesci/lehre/studienplan_vorrueckung.php index 940ac8d45..871656331 100644 --- a/vilesci/lehre/studienplan_vorrueckung.php +++ b/vilesci/lehre/studienplan_vorrueckung.php @@ -67,6 +67,13 @@ echo ' }); $("#t1").checkboxes("range", true); + + $("#select_studiensemester_kurzbz_from").change(function() + { + var index = $(this).prop("selectedIndex"); + index = index+3; + $("#select_studiensemester_kurzbz_to :nth-child("+index+")").prop("selected", true); + }); }); Studienplan Semester Vorrückung @@ -96,10 +103,10 @@ if($studiensemester_kurzbz_to == '') echo ''; -echo ' Quelle: '; $stsem = new studiensemester(); -$stsem->getAll(); +$stsem->getPlusMinus(null,10,'ende ASC'); foreach($stsem->studiensemester as $row) { @@ -113,10 +120,7 @@ foreach($stsem->studiensemester as $row) } echo ''; -echo ' Ziel:'; foreach($stsem->studiensemester as $row) { @@ -168,7 +172,7 @@ if(isset($_POST['show']) && $studiensemester_kurzbz_from != '' && $studiensemest studienplan.sprache FROM lehre.tbl_studienplan studienplan JOIN lehre.tbl_studienplan_semester USING (studienplan_id) - JOIN lehre.tbl_studienordnung USING (studienordnung_id) + JOIN lehre.tbl_studienordnung sto USING (studienordnung_id) JOIN PUBLIC.tbl_studiengang USING (studiengang_kz) WHERE tbl_studienplan_semester.studiensemester_kurzbz = ".$db->db_add_param($studiensemester_kurzbz_from, FHC_STRING)." AND NOT EXISTS ( @@ -179,60 +183,78 @@ if(isset($_POST['show']) && $studiensemester_kurzbz_from != '' && $studiensemest AND orgform_kurzbz = studienplan.orgform_kurzbz AND studiensemester_kurzbz = ".$db->db_add_param($studiensemester_kurzbz_to, FHC_STRING)." ) + AND NOT EXISTS ( + SELECT 1 + FROM lehre.tbl_studienplan_semester + JOIN lehre.tbl_studienplan USING (studienplan_id) + JOIN lehre.tbl_studienordnung USING (studienordnung_id) + WHERE orgform_kurzbz = studienplan.orgform_kurzbz + AND studiensemester_kurzbz = ".$db->db_add_param($studiensemester_kurzbz_to, FHC_STRING)." + AND studiengang_kz = sto.studiengang_kz + ) AND tbl_studiengang.typ IN ('b', 'm', 'l') - AND studienplan.onlinebewerbung_studienplan = true - AND tbl_studienplan_semester.semester = 1 - ORDER BY studiengang"; + AND studienplan.onlinebewerbung_studienplan = true"; + if (substr($studiensemester_kurzbz_from,0,2) == 'SS') + { + $qry .= " AND tbl_studienplan_semester.semester = 2"; + } + else + { + $qry .= " AND tbl_studienplan_semester.semester = 1"; + } + $qry .= " ORDER BY studiengang"; if($result = $db->db_query($qry)) { echo '
    Anzahl: '.$db->db_num_rows($result); - //$pruefling = new pruefling(); - - echo ''; - echo ''; - echo ''; - echo ''; - echo ' - - - - - - - - - - - '; - while($row = $db->db_fetch_object($result)) + + if ($db->db_num_rows($result) > 0) { - echo ' - - - - - - - - '; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
    - - - - - StudiengangOrganisationsformBezeichnungSpracheStudienplan ID
    '.$row->studiengang.''.$row->orgform_kurzbz.''.$row->bezeichnung.''.$row->sprache.''.$row->studienplan_id.'
    + + + + + + + + + + + '; + while ($row = $db->db_fetch_object($result)) + { + echo ' + + + + + + + + '; + } + echo "
    + + + + + StudiengangOrganisationsformBezeichnungSpracheStudienplan ID
    '.$row->studiengang.''.$row->orgform_kurzbz.''.$row->bezeichnung.''.$row->sprache.''.$row->studienplan_id.'
    "; + if ($rechte->isBerechtigt('lehre/studienordnung', null, 'suid')) + { + echo ''; + } + else + { + echo ' Keine Berechtigung zum Vorrücken von Studienplänen'; + } + + echo ''; } - echo ""; - if($rechte->isBerechtigt('lehre/studienordnung', null, 'suid')) - { - echo ''; - } - else - { - echo ' Keine Berechtigung zum Vorrücken von Studienplänen'; - } - - echo ''; } } From 4e7da23bf5dfe09e88271c98497f05c15a1ac729 Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Wed, 8 Sep 2021 09:24:18 +0200 Subject: [PATCH 216/301] =?UTF-8?q?Option=20auch=20Pr=C3=BCfling=20zu=20l?= =?UTF-8?q?=C3=B6schen=20in=20RT-Administration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reihungstest_administration.php | 53 ++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/vilesci/stammdaten/reihungstest_administration.php b/vilesci/stammdaten/reihungstest_administration.php index b1db58e5e..658f01b31 100644 --- a/vilesci/stammdaten/reihungstest_administration.php +++ b/vilesci/stammdaten/reihungstest_administration.php @@ -330,7 +330,7 @@ if($result = $db->db_query($qry)) } echo ''; } - +echo '   Auch Prüfling löschen  '; echo '        '; if(isset($_POST['deleteteilgebiet'])) { @@ -526,6 +526,57 @@ if(isset($_POST['delete_all'])) $db->errormsg = 'Fehler beim Loeschen der Daten'; $db->db_query('ROLLBACK'); } + + // Wenn Option angeklickt ist, auch den Prüfling löschen + if (isset($_POST['deletePruefling']) && $_POST['deletePruefling'] == 'on') + { + $qry = "SELECT * FROM testtool.tbl_pruefling WHERE prestudent_id=".$db->db_add_param($_POST['prestudent'])."; + "; + + if($db->db_query($qry)) + { + while($row = $db->db_fetch_object()) + { + $undo=" INSERT INTO testtool.tbl_pruefling(pruefling_id, studiengang_kz, idnachweis, registriert, prestudent_id, semester) VALUES (". + $db->db_add_param($row->pruefling_id, FHC_INTEGER).', '. + $db->db_add_param($row->studiengang_kz, FHC_INTEGER).', '. + $db->db_add_param($row->idnachweis).', '. + $db->db_add_param($row->registriert).', '. + $db->db_add_param($row->prestudent_id, FHC_INTEGER).', '. + $db->db_add_param($row->semester, FHC_INTEGER).');'; + } + } + else + { + $db->errormsg = 'Fehler beim Erstellen des UNDO Befehls fuer testtool.tbl_pruefling'; + $db->db_query('ROLLBACK'); + return false; + } + $qry = "DELETE FROM testtool.tbl_pruefling WHERE prestudent_id=".$db->db_add_param($_POST['prestudent']).";"; + + if($result = $db->db_query($qry)) + { + //Log schreiben + $log = new log(); + + $log->new = true; + $log->sql = $qry; + $log->sqlundo = $undo; + $log->executetime = date('Y-m-d H:i:s'); + $log->mitarbeiter_uid = $user; + $log->beschreibung = "Prüfling von Prestudent ".$_POST['prestudent']." geloescht"; + + if(!$log->save()) + { + $db->errormsg = 'Fehler beim Schreiben des Log-Eintrages'; + $db->db_query('ROLLBACK'); + return false; + } + + $db->db_query('COMMIT;'); + echo '
    Prüfling wurde gelöscht'; + } + } } else echo 'Um alle Antworten eines Prüflings zu löschen, wählen Sie im DropDown bitte "Alle Gebiete" aus'; From 6cd81ac96e7be3b635d698b2b7fc20c45f1ae878 Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Wed, 8 Sep 2021 09:27:32 +0200 Subject: [PATCH 217/301] Warnung im FAS, wenn inaktive BenutzerInnen gespeichert werden --- content/lvplanung/lehrveranstaltungDBDML.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/lvplanung/lehrveranstaltungDBDML.php b/content/lvplanung/lehrveranstaltungDBDML.php index 9d9461c70..f764545a6 100644 --- a/content/lvplanung/lehrveranstaltungDBDML.php +++ b/content/lvplanung/lehrveranstaltungDBDML.php @@ -402,6 +402,20 @@ if(!$error) } } } + + //Pruefen, ob Benutzer inaktiv ist. Wenn ja, eine Warnung ausgeben + $benutzerAktiv = false; + if(!$error) + { + $benutzer = new benutzer($lem->mitarbeiter_uid); + $benutzerAktiv = $benutzer->bnaktiv; + if (!$benutzerAktiv) + { + $return = true; + $warnung = true; + $errormsg = "Achtung: Der/Die Benutzer*in ist inaktiv!\nBitte informieren Sie die Personalbteilung.\n\nDaten wurden gespeichert.\n\n"; + } + } } if(!$error) From b6ae992c3c560a0e13204d833d3580ec4d3abef4 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 8 Sep 2021 11:41:45 +0200 Subject: [PATCH 218/301] getrennte msg bei freigabe qualikurs und einstieg anderes semester --- .../views/system/infocenter/zgvpruefungen.php | 2 +- public/js/infocenter/infocenterDetails.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 05c94c384..a2b2f8da8 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -414,7 +414,7 @@ selected="selected">p->t('ui', 'freigabeart')) . '...' ?> - + diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 70f5ed982..79129f3e2 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -10,6 +10,7 @@ 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"; +const STGFREIGABE_MESSAGE_VORLAGE_ANDERES_SEMESTER = "InfocenterSTGfreigegebenSemester"; //Statusgründe for which no Studiengang Freigabe Message should be sent const FIT_PROGRAMM_STUDIENGAENGE = [10021, 10027]; @@ -653,7 +654,7 @@ var InfocenterDetails = { } else { - if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) + if (receiverPrestudent.studiengangtyp === 'm' && freigabedata.statuskurzbz === 'ergPruefung') { msgvars = { 'studiengangbezeichnung': studiengangbezeichnung, @@ -671,7 +672,11 @@ var InfocenterDetails = { //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); + if (receiverPrestudent.studiengangtyp === 'b' && freigabedata.statuskurzbz === 'anderesSemester') + vorlage = STGFREIGABE_MESSAGE_VORLAGE_ANDERES_SEMESTER + else + vorlage = STGFREIGABE_MESSAGE_VORLAGE + InfocenterDetails.sendFreigabeMessage(prestudent_id, vorlage, msgvars); } } }; @@ -847,7 +852,8 @@ var InfocenterDetails = { var statusgrundel = $("#frgstatusgrselect_" + prestudent_id + " select[name=frgstatusgrund]"); var statusgrund_id = statusgrundel.val(); var statusgrundbezeichnung = statusgrundel.find("option[value="+statusgrund_id+"]").text(); - var data = {"prestudent_id": prestudent_id, "statusgrund_id": statusgrund_id, "statusgrundbezeichnung": statusgrundbezeichnung}; + var statuskurzbz = statusgrundel.find(':selected').data('kurzbz'); + var data = {"prestudent_id": prestudent_id, "statusgrund_id": statusgrund_id, "statusgrundbezeichnung": statusgrundbezeichnung, "statuskurzbz" : statuskurzbz}; InfocenterDetails.saveFreigabe(data);//Studiengangfreigabe } ); From 602eb5873a69a969e7879c5649cb27d9b3d26c9c Mon Sep 17 00:00:00 2001 From: Manfred Date: Wed, 8 Sep 2021 19:16:39 +0200 Subject: [PATCH 219/301] =?UTF-8?q?Kopierbutton=20f=C3=BCr=20Funktionen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/funktionen.js.php | 6 +++++- content/funktionen.xul.php | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/content/funktionen.js.php b/content/funktionen.js.php index e77c47548..ae9edd2af 100644 --- a/content/funktionen.js.php +++ b/content/funktionen.js.php @@ -270,7 +270,7 @@ function FunktionDelete() // **** // * Speichert die Daten // **** -function FunktionDetailSpeichern() +function FunktionDetailSpeichern(kopie) { var funktion_kurzbz = document.getElementById('funktion-menulist-funktion').value; var oe_kurzbz = document.getElementById('funktion-menulist-oe_kurzbz').value; @@ -283,6 +283,9 @@ function FunktionDetailSpeichern() var bezeichnung = document.getElementById('funktion-textbox-bezeichnung').value; var wochenstunden = document.getElementById('funktion-textbox-wochenstunden').value; + if(kopie == true) + var neu = true; + //Bei Mitarbeitern wird kein Studiengang mitgeschickt if(window.parent.document.getElementById('main-content-tabs').selectedItem==window.parent.document.getElementById('tab-mitarbeiter')) studiengang_kz_berecht=''; @@ -412,6 +415,7 @@ function FunktionDetailDisableFields(val) document.getElementById('funktion-menulist-semester').disabled=val; document.getElementById('funktion-menulist-funktion').disabled=val; document.getElementById('funktion-button-speichern').disabled=val; + document.getElementById('funktion-button-kopiespeichern').disabled=val; document.getElementById('funktion-box-datum_von').disabled=val; document.getElementById('funktion-box-datum_bis').disabled=val; document.getElementById('funktion-textbox-bezeichnung').disabled=val; diff --git a/content/funktionen.xul.php b/content/funktionen.xul.php index 9bbe10686..b80cdd455 100644 --- a/content/funktionen.xul.php +++ b/content/funktionen.xul.php @@ -289,7 +289,8 @@ else -