From 0239246ab09c6c3ef8f6001f0c956b7451af5128 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 7 Feb 2020 15:11:00 +0100 Subject: [PATCH 001/187] - 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/187] 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 935b37016673dae276c0f0382a986502259aac8d Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 17 Feb 2021 15:07:09 +0100 Subject: [PATCH 003/187] added filter for bachelor and master --- application/config/infocenter.php | 5 ++ application/controllers/system/Variables.php | 16 +++- application/libraries/VariableLib.php | 12 +++ .../models/system/Variablenname_model.php | 3 +- .../system/infocenter/infocenterData.php | 10 +-- .../infocenter/infocenterFreigegebenData.php | 9 +- .../infocenterReihungstestAbsolviertData.php | 9 +- .../js/infocenter/infocenterPersonDataset.js | 90 +++++++++++++++++-- system/dbupdate_3.3.php | 1 + 9 files changed, 126 insertions(+), 29 deletions(-) create mode 100644 application/config/infocenter.php diff --git a/application/config/infocenter.php b/application/config/infocenter.php new file mode 100644 index 000000000..555c30996 --- /dev/null +++ b/application/config/infocenter.php @@ -0,0 +1,5 @@ + 'basis/variable:rw', 'getVar' => 'basis/variable:rw', - 'changeStudiensemesterVar' => 'basis/variable:rw' + 'changeStudiensemesterVar' => 'basis/variable:rw', + 'changeStudengangsTypVar' => 'basis/variable:rw' ) ); @@ -50,7 +51,9 @@ class Variables extends Auth_Controller public function getVar() { $name = $this->input->get('name'); - $this->outputJson($this->VariableModel->getVariables($this->_uid, array($name))); + $typ = $this->input->get('typ'); + + $this->outputJson($this->VariableModel->getVariables($this->_uid, array($name, $typ))); } /** @@ -66,6 +69,15 @@ class Variables extends Auth_Controller $this->outputJson($result); } + public function changeStudengangsTypVar() + { + $name = $this->input->post('name'); + $change = $this->input->post('change'); + + $result = $this->variablelib->changeStudengangsTypVar($this->_uid, $name, $change); + $this->outputJson($result); + } + /** * Retrieve the UID of the logged user and checks if it is valid */ diff --git a/application/libraries/VariableLib.php b/application/libraries/VariableLib.php index 2f038531b..a503eb999 100644 --- a/application/libraries/VariableLib.php +++ b/application/libraries/VariableLib.php @@ -100,6 +100,18 @@ class VariableLib return $result; } + public function changeStudengangsTypVar($uid, $name, $change) + { + $result = error('error when setting variable!'); + + if (isEmptyString($uid) || isEmptyString($name) || isEmptyString($change)) + return $result; + + $result = $this->_ci->VariableModel->setVariable($uid, $name, $change); + $this->_setVariable($uid, $name); + return $result; + } + /** * "Refreshes" variable value with given name by retrieving current value from db and saving it. * @param $uid diff --git a/application/models/system/Variablenname_model.php b/application/models/system/Variablenname_model.php index 7b2a2cf88..005834f67 100644 --- a/application/models/system/Variablenname_model.php +++ b/application/models/system/Variablenname_model.php @@ -11,7 +11,8 @@ class Variablenname_model extends DB_Model ORDER BY studienjahr_kurzbz, start ) sem WHERE start > now() - LIMIT 1;' + LIMIT 1;', + 'infocenter_studiensgangtyp' => 'SELECT infocenter_studiensgangtyp FROM public.tbl_variablename LIMIT 1' ); /** diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 0c7030059..d9f12eb56 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -1,16 +1,17 @@ config->load('infocenter'); $APP = '\'infocenter\''; $REJECTED_STATUS = '\'Abgewiesener\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\', \'Interessent rejected\''; $LOGDATA_NAME_PARKED = '\'Parked\''; $LOGDATA_NAME_ONHOLD = '\'Onhold\''; $LOGTYPE_KURZBZ = '\'Processstate\''; $STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\''; - $ADDITIONAL_STG = '10021,10027'; + $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $AKTE_TYP = '\'identity\', \'zgv_bakk\''; $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; @@ -142,10 +143,7 @@ AND pss.bewerbung_abgeschicktamum IS NOT NULL -- AND pss.bestaetigtam IS NULL AND ps.person_id = p.person_id - AND (sg.typ IN ('.$STUDIENGANG_TYP.') - OR - sg.studiengang_kz in('.$ADDITIONAL_STG.') - ) + AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' AND NOT EXISTS ( SELECT 1 diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index aab69b651..3b7ff1dbe 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -1,12 +1,13 @@ config->load('infocenter'); $APP = '\'infocenter\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\''; $REJECTED_STATUS = '\'Abgewiesener\''; - $ADDITIONAL_STG = '10021,10027,10002'; + $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\''; $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; @@ -109,10 +110,6 @@ WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id - AND (sg.typ IN ('.$STUDIENGANG_TYP.') - OR - sg.studiengang_kz in('.$ADDITIONAL_STG.') - ) AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' LIMIT 1 ) AS "StgAbgeschickt", diff --git a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php index 22b122bb0..6b0918174 100644 --- a/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php +++ b/application/views/system/infocenter/infocenterReihungstestAbsolviertData.php @@ -1,11 +1,12 @@ config->load('infocenter'); $APP = '\'infocenter\''; $INTERESSENT_STATUS = '\'Interessent\''; - $STUDIENGANG_TYP = '\'b\''; + $STUDIENGANG_TYP = '\''.$this->variablelib->getVar('infocenter_studiensgangtyp').'\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\''; - $ADDITIONAL_STG = '10021,10027'; + $ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz'); $STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\''; $query = ' @@ -90,10 +91,6 @@ WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.' AND pss.bewerbung_abgeschicktamum IS NOT NULL AND ps.person_id = p.person_id - AND (sg.typ IN ('.$STUDIENGANG_TYP.') - OR - sg.studiengang_kz in('.$ADDITIONAL_STG.') - ) AND pss.studiensemester_kurzbz = '.$STUDIENSEMESTER.' LIMIT 1 ) AS "StgAbgeschickt", diff --git a/public/js/infocenter/infocenterPersonDataset.js b/public/js/infocenter/infocenterPersonDataset.js index 87a40c0f1..03d1d13a1 100644 --- a/public/js/infocenter/infocenterPersonDataset.js +++ b/public/js/infocenter/infocenterPersonDataset.js @@ -20,22 +20,30 @@ if (FHC_JS_DATA_STORAGE_OBJECT.called_method == 'index') */ var InfocenterPersonDataset = { infocenter_studiensemester_variablename: 'infocenter_studiensemester', + infocenter_studienganstyp_variablename: 'infocenter_studiensgangtyp', /** * adds person table additional actions html (above and beneath it) */ - appendTableActionsHtml: function(infocenter_studiensemester) + appendTableActionsHtml: function(infocenter_studiensemester, infocenter_studiengangstyp) { var url = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/system/messages/Messages/writeTemplate"; var formHtml = '
'; $("#datasetActionsTop").before(formHtml); - var studienSemesterHtml = ' ' + infocenter_studiensemester + - ' '; @@ -56,9 +64,19 @@ var InfocenterPersonDataset = { // userdefined Semestervariable shown independently of personcount, // it is possible to change the semester $("#datasetActionsTop, #datasetActionsBottom").append( - "
"+ - "
"+studienSemesterHtml+"
"+ - "

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

" + ); + + InfocenterPersonDataset.selectStudiengangTyp(infocenter_studiengangstyp) + + $('.auswahlStudienArt').change(function() + { + InfocenterPersonDataset.changeStudengangsTyp($(this).find('option:selected').attr('data-id')); + }); $("button.incStudiensemester").click(function() { InfocenterPersonDataset.changeStudiensemesterUservar(1); @@ -115,6 +133,22 @@ var InfocenterPersonDataset = { ); }, + selectStudiengangTyp: function(typ) + { + switch (typ) + { + case 'b, m' : + $('.auswahlStudienArt [data-id="all"]').attr('selected', 'selected'); + break; + case 'b' : + $('.auswahlStudienArt [data-id="bachelor"]').attr('selected', 'selected'); + break; + case 'm' : + $('.auswahlStudienArt [data-id="master"]').attr('selected', 'selected'); + break; + } + }, + /** * sets functionality for the actions above and beneath the person table */ @@ -173,6 +207,45 @@ var InfocenterPersonDataset = { }); }, + changeStudengangsTyp: function($typ) + { + switch ($typ) + { + case 'all' : + var change = 'b\', \'m'; + break; + case 'bachelor' : + var change = 'b'; + break; + case 'master' : + var change = 'm'; + break; + } + + FHC_AjaxClient.showVeil(); + + FHC_AjaxClient.ajaxCallPost( + 'system/Variables/changeStudengangsTypVar', + { + 'name': InfocenterPersonDataset.infocenter_studienganstyp_variablename, + 'change': change, + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + // refresh filterwidget with page reload + FHC_FilterWidget.reloadDataset(); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown) { + FHC_AjaxClient.hideVeil(); + alert(textStatus); + } + } + ); + }, + /** * initializes change of the uservariable infocenter_studiensemesster, either * to next semester (change > 0) or previous semester (change < 0) @@ -211,7 +284,8 @@ var InfocenterPersonDataset = { FHC_AjaxClient.ajaxCallGet( 'system/Variables/getVar', { - 'name': InfocenterPersonDataset.infocenter_studiensemester_variablename + 'name' : InfocenterPersonDataset.infocenter_studiensemester_variablename, + 'typ' : InfocenterPersonDataset.infocenter_studienganstyp_variablename }, { successCallback: function(data, textStatus, jqXHR) { @@ -220,7 +294,7 @@ var InfocenterPersonDataset = { if (typeof callback === "function") { var infocenter_studiensemester = FHC_AjaxClient.getData(data); - callback(infocenter_studiensemester[InfocenterPersonDataset.infocenter_studiensemester_variablename]); + callback(infocenter_studiensemester[InfocenterPersonDataset.infocenter_studiensemester_variablename], infocenter_studiensemester[InfocenterPersonDataset.infocenter_studienganstyp_variablename]); } } }, diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 2336ebad4..4ed52c321 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -3232,6 +3232,7 @@ if(!@$db->db_query("SELECT 0 FROM public.tbl_variablenname WHERE 0 = 1")) INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'kontofilterstg\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'kollision_student\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'infocenter_studiensemester\', null); + INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'infocenter_studiensgangtyp\', \'b\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_zeitsperre\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_reservierung\', \'false\'); INSERT INTO public.tbl_variablenname (name, defaultwert) VALUES (\'ignore_kollision\', \'false\'); From d9d71c42ce26b92735ec420c54964f1822ddbd36 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 17 Feb 2021 18:54:53 +0100 Subject: [PATCH 004/187] 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 013/187] 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 014/187] - 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 7340564d1e71f4ca925dfcfa05ca595ac0a40798 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 16 Mar 2021 17:42:46 +0100 Subject: [PATCH 015/187] 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 016/187] =?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(
+ + + + p->t('infocenter', 'zgvInPruefung'); + break; + case 'accepted' : + echo $this->p->t('infocenter', 'zgvAkzeptiert'); + break; + case 'rejected' : + echo $this->p->t('infocenter', 'zgvAbgelehnt'); + break; + } + ?> + + +
+ + + + + +
+
+
+
+
+ +

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

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

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

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

Pruefe Tabellen und Attribute!

'; @@ -4940,6 +5036,9 @@ $tabellen=array( "public.tbl_vorlage" => array("vorlage_kurzbz","bezeichnung","anmerkung","mimetype","attribute","archivierbar","signierbar","stud_selfservice","dokument_kurzbz","insertamum","insertvon","updateamum","updatevon"), "public.tbl_vorlagedokument" => array("vorlagedokument_id","sort","vorlagestudiengang_id","dokument_kurzbz"), "public.tbl_vorlagestudiengang" => array("vorlagestudiengang_id","vorlage_kurzbz","studiengang_kz","version","text","oe_kurzbz","style","berechtigung","anmerkung_vorlagestudiengang","aktiv","sprache","subject","orgform_kurzbz","insertamum","insertvon","updateamum","updatevon"), + "public.tbl_zgvpruefungstatus" => array("status_kurzbz","bezeichnung"), + "public.tbl_zgvpruefung" => array("zgvpruefung_id","prestudent_id","insertamum","insertvon","updateamum","updatevon"), + "public.tbl_zgvpruefungstatus_status" => array("zgv_pruefung_status_id","zgvpruefung_id","status","datum"), "testtool.tbl_ablauf" => array("ablauf_id","gebiet_id","studiengang_kz","reihung","gewicht","semester", "insertamum","insertvon","updateamum", "updatevon","ablauf_vorgaben_id","studienplan_id"), "testtool.tbl_ablauf_vorgaben" => array("ablauf_vorgaben_id","studiengang_kz","sprache","sprachwahl","content_id","insertamum","insertvon","updateamum", "updatevon"), "testtool.tbl_antwort" => array("antwort_id","pruefling_id","vorschlag_id"), diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 2d8daed4d..180e43cc4 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -401,6 +401,14 @@ $filters = array( ', 'oe_kurzbz' => null, ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'zgvUeberpruefung', + 'filter_kurzbz' => 'zgvUeberpruefung', + 'description' => '{ZGV Übersicht}', + 'sort' => 4, + ), + array( 'app' => 'budget', 'dataset_name' => 'budgetoverview', diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index cbfbdcdc9..a151a723b 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3006,6 +3006,126 @@ $phrases = array( ) ) ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvRueckfragen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Prüfung beantragen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'apply for a ZGV examination', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAkzeptieren', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente akzeptieren', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'accept documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAblehnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente ablehnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'reject documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvInPruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV noch in Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV still in review', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAkzeptiert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente akzeptiert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'accepted documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvAbgelehnt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumente abgelehnt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'rejected documents', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'infocenter', 'category' => 'infocenter', From 683e9ffdda664009476485445990fee19ce4e84d Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 24 Mar 2021 16:22:56 +0100 Subject: [PATCH 023/187] Modified to request recommendation (+send mails) ONLY if LV has lectors Modifications done for STGL Overview and Detailview Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 64 ++++++++++++------- .../ApproveAnrechnungUebersicht.php | 45 ++++++++----- application/libraries/AnrechnungLib.php | 22 ++++++- .../approveAnrechnungUebersicht.php | 1 + .../anrechnung/approveAnrechnungUebersicht.js | 21 ++++-- system/phrasesupdate.php | 20 ++++++ 6 files changed, 125 insertions(+), 48 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 8fed40f48..bbaab393b 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -241,13 +241,26 @@ class approveAnrechnungDetail extends Auth_Controller $inProgressLektor = getUserLanguage() == 'German' ? $inProgressLektor->bezeichnung_mehrsprachig[0] : $inProgressLektor->bezeichnung_mehrsprachig[1]; - + + $retval = array(); + $counter = 0; + foreach ($data as $item) { - // Approve Anrechnung - if(getData($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))) + // Check if Anrechnungs-LV has lector + if (!$this->anrechnunglib->LVhasLector($item['anrechnung_id'])) { - $json[]= array( + // Count up LV with no lector + $counter++; + + // Break, if LV has no lector + break; + } + + // Request Recommendation + if($this->anrechnunglib->requestRecommendation($item['anrechnung_id'])) + { + $retval[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, 'status_bezeichnung' => $inProgressLektor, @@ -256,26 +269,29 @@ class approveAnrechnungDetail extends Auth_Controller ); } } - + + /** + * Send mails to lectors + * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector + * even if they are required for more recommendations + * */ + if (!isEmptyArray($retval)) + { + self::_sendSanchoMailToLectors($retval); + + // Output json to ajax + return $this->outputJsonSuccess($retval); + } + // Output json to ajax - if (isset($json) && !isEmptyArray($json)) + if (isEmptyArray($retval) && $counter > 0) { - /** - * Send mails to lectors - * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector - * even if they are required for more recommendations - * */ - if (!$this->_sendSanchoMailToLectors($json)) - { - show_error('Failed sending emails'); - } - - return $this->outputJsonSuccess($json); - } - else - { - return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); + return $this->outputJsonError( + "Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt." + ); } + + return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); } /** @@ -575,8 +591,8 @@ class approveAnrechnungDetail extends Auth_Controller } /** - * Get lectors (prio for LV-Leitung, if not present to all lectors of LV. - * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector. + * Get unique array of LV lectors. + * Only get LV Leitung if present, otherwise all lectors of LV. * @param $anrechnung_arr * @return array */ @@ -620,7 +636,7 @@ class approveAnrechnungDetail extends Auth_Controller unset($lector->lvleiter); } - // Now make the lector array aka mail receivers unique + // Make the lector array unique $lector_arr = array_unique($lector_arr, SORT_REGULAR); return $lector_arr; diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index 21da93df8..1321c2c19 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -206,12 +206,25 @@ class approveAnrechnungUebersicht extends Auth_Controller ? $inProgressLektor->bezeichnung_mehrsprachig[0] : $inProgressLektor->bezeichnung_mehrsprachig[1]; + $retval = array(); + $counter = 0; + foreach ($data as $item) { - // Approve Anrechnung - if(getData($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))) + // Check if Anrechnungs-LV has lector + if (!$this->anrechnunglib->LVhasLector($item['anrechnung_id'])) { - $json[]= array( + // Count up LV with no lector + $counter++; + + // Continue loop, if LV has no lector + continue; + } + + // Request Recommendation + if($this->anrechnunglib->requestRecommendation($item['anrechnung_id'])) + { + $retval[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, 'status_bezeichnung' => $inProgressLektor, @@ -220,25 +233,23 @@ class approveAnrechnungUebersicht extends Auth_Controller } } - // Output json to ajax - if (isset($json) && !isEmptyArray($json)) + /** + * Send mails to lectors + * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector + * even if they are required for more recommendations + * */ + if (!isEmptyArray($retval)) { - /** - * Send mails to lectors - * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector - * even if they are required for more recommendations - * */ - if (!$this->_sendSanchoMailToLectors($json)) - { - show_error('Failed sending emails'); - } - - return $this->outputJsonSuccess($json); + self::_sendSanchoMailToLectors($retval); } - else + + // Output json to ajax + if (isEmptyArray($retval) && $counter == 0) { return $this->outputJsonError('Es wurden keine Empfehlungen angefordert'); } + + return $this->outputJsonSuccess($retval); } /** diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index d873d7828..295426b86 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -464,7 +464,7 @@ class AnrechnungLib || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED || $status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) { - return success(false); // dont ask for recommendation + return false; // dont ask for recommendation } // Start DB transaction @@ -494,7 +494,7 @@ class AnrechnungLib return error($result->msg, EXIT_ERROR); } - return success(true); // recommended + return true; // recommended } /** @@ -639,6 +639,24 @@ class AnrechnungLib // Return filename return 'Anrechnungsantrag'. $orgform_kurzbz .'_LV-'. $lehrveranstaltung_id. '_'. $fullname; } + + public function LVhasLector($anrechnung_id) + { + $result = $this->ci->AnrechnungModel->load($anrechnung_id); + if (!hasData($result)) + { + showError('Anrechnung existiert nicht'); + } + + // Get lectors of lehrveranstaltung + $result = $this->ci->LehrveranstaltungModel->getLecturersByLv( + $result->retval[0]->studiensemester_kurzbz, + $result->retval[0]->lehrveranstaltung_id + ); + + // Continue, if LV has no lector (there is no one to ask for recommendation) + return hasData($result) ? true : false; + } // Return an object with Anrechnungdata private function _setAnrechnungDataObject($anrechnung) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 7ec175384..1c88fc643 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -43,6 +43,7 @@ $this->load->view( 'bitteMindEinenAntragWaehlen', 'bitteBegruendungAngeben', 'empfehlungWurdeAngefordert', + 'empfehlungWurdeAngefordertAusnahmeWoKeineLektoren', 'anrechnungenWurdenGenehmigt', 'anrechnungenWurdenAbgelehnt' ), diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index 6e4474026..7f777178d 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -426,12 +426,23 @@ $(function(){ if (!data.error && data.retval != null) { - // Update status 'genehmigt' - $('#tableWidgetTabulator').tabulator('updateData', data.retval); - - // Print success message - FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "empfehlungWurdeAngefordert")); + // Print info message, if not all selected recommendations were requested + if (data.retval.length < selected_data.length){ + FHC_DialogLib.alertInfo( + FHC_PhrasesLib.t( + "ui", "empfehlungWurdeAngefordertAusnahmeWoKeineLektoren", + [selected_data.length, data.retval.length, selected_data.length - data.retval.length]) + ); + } + else + { + // Print success message + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "empfehlungWurdeAngefordert")); + } } + + //Update status 'genehmigt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); }, errorCallback: function (jqXHR, textStatus, errorThrown) { diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 89c31cfaa..589e4ac7e 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10210,6 +10210,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'empfehlungWurdeAngefordertAusnahmeWoKeineLektoren', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Empfehlungsanfragen: {0}
Abgeschickt: {1}
Nicht abgeschickt: {2}
Grund: Keine Lektoren zu LV zugeteilt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Requests for recommendation: {0}
Sent: {1}
Not sent: {2}
Reason: No lectors assigned to the course yet.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'ui', From 997f6f406be60fa4af0b6815875b54acfb77666f Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 24 Mar 2021 17:16:17 +0100 Subject: [PATCH 024/187] Fixed: Now application can only be done for actual study semester Before student could apply for past study semester, which should not be possible. Fixed now. Signed-off-by: cris-technikum --- .../lehre/anrechnung/RequestAnrechnung.php | 21 +++++++++++++++++++ system/phrasesupdate.php | 20 ++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index dabedb641..c5134e7d9 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -141,6 +141,13 @@ class requestAnrechnung extends Auth_Controller { show_error('Der Antrag wurde bereits gestellt'); } + + // Exit, if application is not for actual studysemester + if (!self::_applicationIsForActualSS($studiensemester_kurzbz)) + { + show_error ($this->p->t('anrechnung', 'antragNurImAktSS')); + + } // Start DB transaction $this->db->trans_start(false); @@ -317,4 +324,18 @@ class requestAnrechnung extends Auth_Controller return $result; } + + /** + * Check, if applications' study semester is actual study semester + * @param $studiensemester_kurzbz + * @return bool + */ + private function _applicationIsForActualSS($studiensemester_kurzbz) + { + $this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel'); + $result = $this->StudiensemesterModel->getNearest(); + $actual_ss = getData($result)[0]->studiensemester_kurzbz; + + return $studiensemester_kurzbz == $actual_ss; + } } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 589e4ac7e..d88514ece 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10330,6 +10330,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'antragNurImAktSS', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Der Antrag kann nur für das aktuelle Semester gestellt werden", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "You only can apply for the actual study semester", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 23e502f02e0cad6f46ae43dce3a59589d713de54 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 25 Mar 2021 10:44:11 +0100 Subject: [PATCH 025/187] mail vorlage hinzugefuegt --- .../system/infocenter/InfoCenter.php | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 46fe09c10..41be8c6e0 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -496,10 +496,10 @@ class InfoCenter extends Auth_Controller * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang */ private function sendZgvMail($mail){ - $data = array( - 'DataTest' => 'getestet.' - ); + $data = array(); + $this->load->helper('hlp_sancho'); + sendSanchoMail( self::ZGVPRUEFUNG_MAIL_VORLAGE, $data, @@ -508,8 +508,6 @@ class InfoCenter extends Auth_Controller 'sancho_header_min_bw.jpg', 'sancho_footer_min_bw.jpg' ); - - return true; } /** @@ -624,7 +622,7 @@ class InfoCenter extends Auth_Controller ); if (isSuccess($insert) && isSuccess($update)) - $mailStatus = $this->sendZgvMail($mail); + $this->sendZgvMail($mail); elseif (isError($insert) && isError($update)) return $this->outputJsonError('Fehler beim Speichern'); @@ -649,21 +647,19 @@ class InfoCenter extends Auth_Controller ); if (isSuccess($result)) - $mailStatus = $this->sendZgvMail($mail); + $this->sendZgvMail($mail); elseif (isError($result)) return $this->outputJsonError('Fehler beim Speichern'); } } - if ($mailStatus) - { - $this->outputJsonSuccess( - array - ( - 'msg' => 'Erfolgreich gespeichert', - 'person_id' => $sg['person_id'] - ) - ); - } + + $this->outputJsonSuccess( + array + ( + 'msg' => 'Erfolgreich gespeichert', + 'person_id' => $sg['person_id'] + ) + ); } /** From 4450f5a47350027217e8aec22d8333663df02174 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 25 Mar 2021 11:07:45 +0100 Subject: [PATCH 026/187] Removed unnessessary code Signed-off-by: cris-technikum --- .../ApproveAnrechnungUebersicht.php | 22 +++++++------------ .../anrechnung/ReviewAnrechnungUebersicht.php | 14 ++++-------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index 1321c2c19..b45c998f4 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -62,27 +62,21 @@ class approveAnrechnungUebersicht extends Auth_Controller public function index() { + // Get study semester $studiensemester_kurzbz = $this->input->get('studiensemester'); - // Retrieve studiengaenge the user is entitled for + if (isEmptyString($studiensemester_kurzbz)) + { + $result = $this->StudiensemesterModel->getNearest(); + $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; + } + + // Get studiengaenge the user is entitled for if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN)) { show_error(getError($studiengang_kz_arr)); } - if (!is_string($studiensemester_kurzbz)) - { - $studiensemester = $this->StudiensemesterModel->getNearest(); - if (hasData($studiensemester)) - { - $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz; - } - elseif (isError($studiensemester)) - { - show_error(getError($studiensemester)); - } - } - $viewData = array( 'studiensemester_selected' => $studiensemester_kurzbz, 'studiengaenge_entitled' => $studiengang_kz_arr diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php index e7b7cb56d..1d10a0bad 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php @@ -62,19 +62,13 @@ class reviewAnrechnungUebersicht extends Auth_Controller public function index() { + // Get study semester $studiensemester_kurzbz = $this->input->get('studiensemester'); - if (!is_string($studiensemester_kurzbz)) + if (isEmptyString($studiensemester_kurzbz)) { - $studiensemester = $this->StudiensemesterModel->getNearest(); - if (hasData($studiensemester)) - { - $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz; - } - elseif (isError($studiensemester)) - { - show_error(getError($studiensemester)); - } + $result = $this->StudiensemesterModel->getNearest(); + $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; } $viewData = array( From 3ba4229eed30cd5c972f80187c225d533829ae8b Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 25 Mar 2021 15:06:47 +0100 Subject: [PATCH 027/187] Refactored Students View + Controller . Now application is done via AJAX call. . Now messages are returned to user instead of hard exits. . Now formatting status on client side, not on serverside. Signed-off-by: cris-technikum --- .../lehre/anrechnung/RequestAnrechnung.php | 57 ++-- .../lehre/anrechnung/requestAnrechnung.php | 283 +++++++++--------- .../js/lehre/anrechnung/requestAnrechnung.js | 55 ++++ system/phrasesupdate.php | 82 ++++- 4 files changed, 304 insertions(+), 173 deletions(-) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index c5134e7d9..c4c3a145d 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -86,23 +86,13 @@ class requestAnrechnung extends Auth_Controller show_error(getError($anrechnungData)); } - // Dont show who is progressing the application to the student - if ($anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL || - $anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR || - $anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_KF) - { - $anrechnungData->status = getUserLanguage() == 'German' ? 'in Bearbeitung' : 'in process'; - } - + // Get Antrag data $antragData = $this->anrechnunglib->getAntragData($this->_uid, $studiensemester_kurzbz, $lehrveranstaltung_id); $viewData = array( 'antragData' => $antragData, 'anrechnungData' => $anrechnungData, - 'is_expired' => $is_expired, - 'disabled' => $is_expired && empty($anrechnungData->anrechnung_id) || !empty($anrechnungData->anrechnung_id) - ? 'disabled' - : '' + 'is_expired' => $is_expired ); $this->load->view('lehre/anrechnung/requestAnrechnung.php', $viewData); @@ -127,26 +117,28 @@ class requestAnrechnung extends Auth_Controller { show_error('Missing correct parameter'); } - - $student = $this->StudentModel->load(array('student_uid' => $this->_uid)); - if (isSuccess($student) && hasData($student)) + + // Exit if user is not a student + $result = $this->StudentModel->load(array('student_uid' => $this->_uid)); + + if (!hasData($result)) { - $prestudent_id = getData($student)[0]->prestudent_id; - } - else - show_error('Cant load User'); - - $result = $this->_getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id); - if (hasData($result)) - { - show_error('Der Antrag wurde bereits gestellt'); + return $this->outputJsonError('Cant load user'); } - // Exit, if application is not for actual studysemester + // Get Prestudent ID + $prestudent_id = getData($result)[0]->prestudent_id; + + // Exit if application already exists + if (self::_applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)) + { + return $this->outputJsonError($this->p->t('anrechnung', 'antragBereitsGestellt')); + } + + // Exit if application is not for actual studysemester if (!self::_applicationIsForActualSS($studiensemester_kurzbz)) { - show_error ($this->p->t('anrechnung', 'antragNurImAktSS')); - + return $this->outputJsonError($this->p->t('anrechnung', 'antragNurImAktSS')); } // Start DB transaction @@ -208,7 +200,10 @@ class requestAnrechnung extends Auth_Controller show_error($result->msg, EXIT_ERROR); } - redirect(site_url(). self::REQUEST_ANRECHNUNG_URI. '?studiensemester='. $studiensemester_kurzbz. '&lv_id='. $lehrveranstaltung_id); + // Output to AJAX + return $this->outputJsonSuccess(array( + 'antragdatum' => (new DateTime())->format('d.m.Y') + )); } /** @@ -309,7 +304,7 @@ class requestAnrechnung extends Auth_Controller * @param $lehrveranstaltung_id * @return mixed */ - private function _getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id) + private function _applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id) { $result = $this->AnrechnungModel->loadWhere(array( 'lehrveranstaltung_id' => $lehrveranstaltung_id, @@ -321,8 +316,8 @@ class requestAnrechnung extends Auth_Controller { show_error(getError($result)); } - - return $result; + + return hasData($result); } /** diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index 5d6fa9a16..af10ef891 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -4,6 +4,7 @@ $this->load->view( array( 'title' => $this->p->t('anrechnung', 'antragStellen'), 'jquery' => true, + 'jqueryui' => true, 'bootstrap' => true, 'fontawesome' => true, 'ajaxlib' => true, @@ -11,11 +12,15 @@ $this->load->view( 'phrases' => array( 'global' => array( 'anerkennungNachgewiesenerKenntnisse', - 'antragStellen' + 'antragStellen', + 'antragWurdeGestellt', + 'antragBereitsGestellt' ), 'ui' => array( 'hilfeZuDieserSeite', - 'hochladen' + 'hochladen', + 'inBearbeitung', + 'neu' ), 'person' => array( 'student', @@ -56,11 +61,6 @@ $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 e791e3267f5c3c2bbf2323ab75641bcee28ae855 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Thu, 25 Mar 2021 15:52:14 +0100 Subject: [PATCH 028/187] link zur mail vorlage hinzugefuegt --- application/controllers/system/infocenter/InfoCenter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 41be8c6e0..a441a43d9 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -496,7 +496,9 @@ class InfoCenter extends Auth_Controller * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang */ private function sendZgvMail($mail){ - $data = array(); + $data = array( + 'link' => site_url('system/infocenter/ZGVUeberpruefung') + ); $this->load->helper('hlp_sancho'); From faf253c15933f9f376138e2cb7e1242d45c3b7ed Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 25 Mar 2021 16:41:41 +0100 Subject: [PATCH 029/187] 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/187] 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/187] 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/187] 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/187] 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/187] 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/187] 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 7690a122b8688c58535b63da23c8284f14b823d4 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 30 Mar 2021 13:57:43 +0200 Subject: [PATCH 036/187] 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 037/187] 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 038/187] 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'); ?>"> +
    @@ -272,7 +272,8 @@ ?> + name="zgvmaort" + id="zgvmaort_prestudent_id ?>">
    @@ -288,7 +289,8 @@ + name="zgvmadatum" + id="zgvmadatum_prestudent_id ?>">
    @@ -301,7 +303,7 @@ echo $this->widgetlib->widget( 'Nation_widget', array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmanation_code), - array('name' => 'zgvmanation', 'id' => 'zgvmanation') + array('name' => 'zgvmanation', 'id' => 'zgvmanation_'.$zgvpruefung->prestudent_id) ); ?>
    @@ -413,7 +415,7 @@ $disabledTxt = $disabledStgTxt = $this->p->t('infocenter', 'bewerbungMussAbgeschickt'); } - if ($studiengangtyp !== 'b') + /*if ($studiengangtyp !== 'b') { $disabled = 'disabled'; $disabledTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); @@ -424,7 +426,7 @@ $disabledStg = 'disabled'; $disabledStgTxt = $this->p->t('infocenter', 'nurBachelorFreigeben'); } - } + }*/ ?>
    diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 7023af277..91531c02a 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -207,6 +207,22 @@ var InfocenterDetails = { $("#zgvort_" + prestudentid).val(zgvort); $("#zgvdatum_" + prestudentid).val(gerzgvdatum); $("#zgvnation_" + prestudentid).val(zgvnation); + + var zgvmas_code = prestudent.zgvmas_code !== null ? prestudent.zgvmas_code : "null"; + var zgvmaort = prestudent.zgvmaort !== null ? prestudent.zgvmaort : ""; + var zgvmadatum = prestudent.zgvmadatum; + var gerzgvmadatum = ""; + if (zgvmadatum !== null) + { + zgvmadatum = $.datepicker.parseDate("yy-mm-dd", prestudent.zgvmadatum); + gerzgvmadatum = $.datepicker.formatDate("dd.mm.yy", zgvmadatum); + } + var zgvmanation = prestudent.zgvmanation !== null ? prestudent.zgvmanation : "null"; + + $("#zgvmas_" + prestudentid).val(zgvmas_code); + $("#zgvmaort_" + prestudentid).val(zgvmaort); + $("#zgvmadatum_" + prestudentid).val(gerzgvmadatum); + $("#zgvmanation_" + prestudentid).val(zgvmanation); } else { From 132b5097ee0236d4dc6ab99e35ee22be90b4df2e Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 30 Mar 2021 18:24:46 +0200 Subject: [PATCH 040/187] Usability: Added column 'ZGV' to STGL and lectors Overview site Signed-off-by: cris-technikum --- .../approveAnrechnungUebersicht.php | 3 ++- .../approveAnrechnungUebersichtData.php | 11 ++++++++++ .../anrechnung/reviewAnrechnungUebersicht.php | 3 ++- .../reviewAnrechnungUebersichtData.php | 11 ++++++++++ system/phrasesupdate.php | 20 +++++++++++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 8da2b5410..089846d55 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -13,7 +13,8 @@ $this->load->view( 'tablewidget' => true, 'phrases' => array( 'global' => array( - 'begruendung' + 'begruendung', + 'zgv' ), 'anrechnung' => array( 'nachweisdokumente', diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index d6bab0e82..ce95cc0c0 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -25,6 +25,15 @@ $query = ' begruendung.bezeichnung AS "begruendung", dmsversion.name AS "dokument_bezeichnung", anrechnung.anmerkung_student, + (SELECT COALESCE( + array_to_json(zgvmaster.bezeichnung::varchar[])->>' . $LANGUAGE_INDEX . ', + array_to_json(zgv.bezeichnung::varchar[])->>' . $LANGUAGE_INDEX . ' + ) AS zgv + FROM public.tbl_prestudent + LEFT JOIN bis.tbl_zgv zgv USING (zgv_code) + LEFT JOIN bis.tbl_zgvmaster zgvmaster USING (zgvmas_code) + WHERE prestudent_id = anrechnung.prestudent_id + ) AS zgv, anrechnung.insertamum::date AS "antragsdatum", empfehlung_anrechnung, (SELECT status_kurzbz @@ -73,6 +82,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('global', 'zgv')), ucfirst($this->p->t('anrechnung', 'antragdatum')), ucfirst($this->p->t('anrechnung', 'empfehlung')), 'status_kurzbz', @@ -123,6 +133,7 @@ $filterWidgetArray = array( ects: {headerFilter:"input", align:"center"}, student: {headerFilter:"input"}, begruendung: {headerFilter:"input"}, + zgv: {visible: false, headerFilter:"input"}, dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{ labelField:"dokument_bezeichnung", url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id}, diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php index c3ca0754a..54d0b49d1 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersicht.php @@ -13,7 +13,8 @@ $this->load->view( 'tablewidget' => true, 'phrases' => array( 'global' => array( - 'begruendung' + 'begruendung', + 'zgv' ), 'anrechnung' => array( 'nachweisdokumente', diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php index 5f8e2b9d0..f83851183 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php @@ -20,6 +20,15 @@ $query = ' begruendung.bezeichnung AS "begruendung", dmsversion.name AS "dokument_bezeichnung", anrechnung.anmerkung_student, + (SELECT COALESCE( + array_to_json(zgvmaster.bezeichnung::varchar[])->>' . $LANGUAGE_INDEX . ', + array_to_json(zgv.bezeichnung::varchar[])->>' . $LANGUAGE_INDEX . ' + ) AS zgv + FROM public.tbl_prestudent + LEFT JOIN bis.tbl_zgv zgv USING (zgv_code) + LEFT JOIN bis.tbl_zgvmaster zgvmaster USING (zgvmas_code) + WHERE prestudent_id = anrechnung.prestudent_id + ) AS zgv, anrechnung.insertamum::date AS "antragsdatum", empfehlung_anrechnung, (SELECT status_kurzbz @@ -76,6 +85,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('global', 'zgv')), ucfirst($this->p->t('anrechnung', 'antragdatum')), ucfirst($this->p->t('anrechnung', 'empfehlung')), 'status_kurzbz', @@ -123,6 +133,7 @@ $filterWidgetArray = array( ects: {headerFilter:"input", align:"center"}, student: {headerFilter:"input"}, begruendung: {headerFilter:"input"}, + zgv: {visible: false, headerFilter:"input"}, dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{ labelField:"dokument_bezeichnung", url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id}, diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 8b45d86e8..243ed971f 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -9569,6 +9569,26 @@ Any unusual occurrences ) ) ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'zgv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', From 68a0e454721c96e6cfd29484019b397d7445caa5 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 31 Mar 2021 18:13:31 +0200 Subject: [PATCH 041/187] Usability: Added column 'Empfehlungsanfrage_am', 'Empfehlungsanfrage_an' ...to STGL and lectors Overview site Signed-off-by: cris-technikum --- .../ApproveAnrechnungUebersicht.php | 74 ++++++++++++++++++- .../approveAnrechnungUebersicht.php | 2 + .../approveAnrechnungUebersichtData.php | 47 +++++++++++- system/phrasesupdate.php | 40 ++++++++++ 4 files changed, 158 insertions(+), 5 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index 32d1f7900..c163ee6cf 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -193,15 +193,24 @@ class approveAnrechnungUebersicht extends Auth_Controller // Continue loop, if LV has no lector continue; } - + // Request Recommendation if($this->anrechnunglib->requestRecommendation($item['anrechnung_id'])) { + // Get full name of LV Leitung. + // If LV Leitung is not present, get full name of LV lectors. + $lector_arr = self::_getLVLectors($item['anrechnung_id']); + $empfehlungsanfrage_an = !isEmptyArray($lector_arr) + ? implode(', ', array_column($lector_arr, 'fullname')) + : ''; + $retval[]= array( 'anrechnung_id' => $item['anrechnung_id'], 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR), - 'empfehlung_anrechnung' => null + 'empfehlung_anrechnung' => null, + 'empfehlungsanfrage_am' => (new DateTime())->format('Y-m-d H:i:s'), + 'empfehlungsanfrage_an' => $empfehlungsanfrage_an ); } } @@ -446,4 +455,65 @@ class approveAnrechnungUebersicht extends Auth_Controller return $lector_arr; } + + /** + * Get LV Leitung. If not present, get all LV lectors. + * + * @param $anrechnung_id + * @return array|bool + */ + private function _getLVLectors($anrechnung_id) + { + $this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz'); + $result = $this->AnrechnungModel->load($anrechnung_id); + + if (!hasData($result)) + { + return false; + } + + $lehrveranstaltung_id = getData($result)[0]->lehrveranstaltung_id; + $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; + + // Get lectors + $lector_arr = array(); + + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $result = $this->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lehrveranstaltung_id); + + if (!$result = getData($result)) + { + return false; + } + + // Check if lv has LV-Leitung + $key = array_search(true, array_column($result, 'lvleiter')); + + // If lv has LV-Leitung, keep only the one + if ($key !== false) + { + $lector_arr[]= $result[$key]; + } + // ...otherwise keep all lectors + else + { + $lector_arr = array_merge($lector_arr, $result); + } + + /** + * NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step + * (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both. + * But we wish to send only one email by to that one person) + * **/ + foreach ($lector_arr as $lector) + { + unset($lector->lvleiter); + $lector->fullname = $lector->vorname. ' '. $lector->nachname; + } + + // Now make the lector array aka mail receivers unique + $lector_arr = array_unique($lector_arr, SORT_REGULAR); + + return $lector_arr; + } } \ No newline at end of file diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 089846d55..9e221b94f 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -19,6 +19,8 @@ $this->load->view( 'anrechnung' => array( 'nachweisdokumente', 'empfehlung', + 'empfehlungsanfrageAn', + 'empfehlungsanfrageAm', 'confirmTextAntragHatBereitsEmpfehlung', 'herkunft' ), diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index ce95cc0c0..b2a519dab 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -1,4 +1,7 @@ >' . $LANGUAGE_INDEX . ' AS "status_bezeichnung" + array_to_json(anrechnungstatus.bezeichnung_mehrsprachig::varchar[])->>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung", + CASE + WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL + ELSE + (SELECT insertamum::date + FROM lehre.tbl_anrechnungstatus + JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz) + WHERE anrechnung_id = anrechnungen.anrechnung_id + AND status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR . '\' + ORDER BY insertamum DESC + LIMIT 1) + END empfehlungsanfrage_am, + CASE + WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL + ELSE + (SELECT COALESCE( + STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = TRUE), + STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = FALSE) + ) empfehlungsanfrage_an + FROM ( + SELECT DISTINCT ON (benutzer.uid) uid, vorname, nachname, + CASE WHEN lehrfunktion_kurzbz = \'LV-Leitung\' THEN TRUE ELSE FALSE END AS lvleiter + FROM lehre.tbl_lehreinheit + JOIN lehre.tbl_lehreinheitmitarbeiter lema USING (lehreinheit_id) + JOIN public.tbl_benutzer benutzer ON lema.mitarbeiter_uid = benutzer.uid + JOIN public.tbl_person USING (person_id) + WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' + AND lehrveranstaltung_id = anrechnungen.lehrveranstaltung_id + AND lema.mitarbeiter_uid NOT like \'_Dummy%\' + AND benutzer.aktiv = TRUE + AND tbl_person.aktiv = TRUE + ORDER BY benutzer.uid, lvleiter DESC, nachname, vorname + ) as tmp_lvlektoren + ) + END empfehlungsanfrage_an FROM anrechnungen JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz) WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' @@ -86,7 +123,9 @@ $filterWidgetArray = array( ucfirst($this->p->t('anrechnung', 'antragdatum')), ucfirst($this->p->t('anrechnung', 'empfehlung')), 'status_kurzbz', - 'Status' + 'Status', + ucfirst($this->p->t('anrechnung', 'empfehlungsanfrageAm')), + ucfirst($this->p->t('anrechnung', 'empfehlungsanfrageAn')) ), 'datasetRepOptions' => '{ height: func_height(this), @@ -143,7 +182,9 @@ $filterWidgetArray = array( 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"} + status_bezeichnung: {headerFilter:"input"}, + empfehlungsanfrage_am: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate}, + empfehlungsanfrage_an: {visible: false, headerFilter:"input"} }', // col properties ); diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 243ed971f..c2c916ac9 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10550,6 +10550,46 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungsanfrageAn', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Empfehlungsanfrage an", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Request Recommend. to", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungsanfrageAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Empfehlungsanfrage am", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Request Recommend. on", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From fdf53ea3eb5bd28f32552bf705abd0cd8e1ec099 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 1 Apr 2021 13:57:18 +0200 Subject: [PATCH 042/187] Modified: Now user gets back error message if upload failes ...instead of hard program exit Signed-off-by: cris-technikum --- .../lehre/anrechnung/RequestAnrechnung.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index cd2c995d3..84594eb78 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -113,8 +113,10 @@ class requestAnrechnung extends Auth_Controller return $this->outputJsonError($this->p->t('ui', 'errorUploadFehlt')); } - if (isEmptyString($begruendung_id) || isEmptyString($anmerkung) || - isEmptyString($lehrveranstaltung_id) || isEmptyString($studiensemester_kurzbz)) + if (isEmptyString($begruendung_id) || + isEmptyString($anmerkung) || + isEmptyString($lehrveranstaltung_id) || + isEmptyString($studiensemester_kurzbz)) { return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen')); } @@ -143,7 +145,15 @@ class requestAnrechnung extends Auth_Controller } // Upload document - $lastInsert_dms_id = self::_uploadFile(); + $result = self::_uploadFile(); + + if (isError($result)) + { + return $this->outputJsonError($result->retval); + } + + // Store just inserted DMS ID + $lastInsert_dms_id = $result->retval['dms_id']; // Start DB transaction $this->db->trans_start(false); @@ -159,7 +169,7 @@ class requestAnrechnung extends Auth_Controller 'insertvon' => $this->_uid )); - // Save Anrechnungstatus 'inProgressSTGL' + // Save Anrechnungstatus $this->AnrechnungModel->saveAnrechnungstatus($result->retval, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); // Transaction complete @@ -293,14 +303,8 @@ 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 + private function _uploadFile() + { $dms = array( 'kategorie_kurzbz' => 'anrechnung', 'version' => 0, @@ -310,11 +314,7 @@ class requestAnrechnung extends Auth_Controller 'insertvon' => $this->_uid ); - if (isError($uploaddata = $this->dmslib->upload($dms, array('pdf')))) - { - show_error(getError($uploaddata)); - } - - return $uploaddata->retval['dms_id']; + // Upload document + return $this->dmslib->upload($dms, array('pdf')); } } \ No newline at end of file From 5dafb3447b4983aab42b3771665a141b61011c44 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 1 Apr 2021 14:19:47 +0200 Subject: [PATCH 043/187] Usability: Added column 'Empfehlungsanfrage_am', 'Empfehlungsanfrage_an' ...to STGL and lectors Overview site Signed-off-by: cris-technikum --- .../lehre/anrechnung/RequestAnrechnung.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index 84594eb78..8a7fd158c 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -169,8 +169,11 @@ class requestAnrechnung extends Auth_Controller 'insertvon' => $this->_uid )); + // Store just inserted Anrechnung ID + $lastInsert_anrechnung_id = $result->retval; + // Save Anrechnungstatus - $this->AnrechnungModel->saveAnrechnungstatus($result->retval, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + $this->AnrechnungModel->saveAnrechnungstatus($lastInsert_anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); // Transaction complete $this->db->trans_complete(); @@ -303,6 +306,12 @@ class requestAnrechnung extends Auth_Controller return $studiensemester_kurzbz == $actual_ss; } + /** + * Upload file via DMS library. + * + * @return mixed + * @throws Exception + */ private function _uploadFile() { $dms = array( From acdfdc028bd60e470fd7ccc3eb478db9756b946f Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 6 Apr 2021 12:31:46 +0200 Subject: [PATCH 044/187] zgv beim master nur updaten wenn es sich um einen master handelt --- .../system/infocenter/InfoCenter.php | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 43de8bb60..508b65e15 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -374,12 +374,18 @@ class InfoCenter extends Auth_Controller $zgvdatum = isEmptyString($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d'); $zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation'); - // zgvmasterdata - $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); - $zgvmaort = $this->input->post('zgvmaort'); - $zgvmadatum = $this->input->post('zgvmadatum'); - $zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); - $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); + $prestudent = $this->PrestudentModel->getPrestudentWithZgv($prestudent_id); + $prestudentdata = getData($prestudent); + + if ($prestudentdata->studiengangtyp === 'm') + { + // zgvmasterdata + $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); + $zgvmaort = $this->input->post('zgvmaort'); + $zgvmadatum = $this->input->post('zgvmadatum'); + $zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); + $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); + } $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id, '', self::INTERESSENTSTATUS); @@ -395,19 +401,29 @@ class InfoCenter extends Auth_Controller ); } - $prestresult = $this->PrestudentModel->update( - $prestudent_id, - array( - 'zgv_code' => $zgv_code, - 'zgvort' => $zgvort, - 'zgvdatum' => $zgvdatum, - 'zgvnation' => $zgvnation_code, + $updateArray = array( + 'zgv_code' => $zgv_code, + 'zgvort' => $zgvort, + 'zgvdatum' => $zgvdatum, + 'zgvnation' => $zgvnation_code, + 'updateamum' => date('Y-m-d H:i:s') + ); + + if ($prestudentdata->studiengangtyp === 'm') + { + $updateMasterArray = array( 'zgvmas_code' => $zgvmas_code, 'zgvmaort' => $zgvmaort, 'zgvmadatum' => $zgvmadatum, - 'zgvmanation' => $zgvmanation_code, - 'updateamum' => date('Y-m-d H:i:s') - ) + 'zgvmanation' => $zgvmanation_code + ); + + $updateArray = array_merge($updateArray, $updateMasterArray); + } + + $prestresult = $this->PrestudentModel->update( + $prestudent_id, + $updateArray ); if (isError($prestresult)) From 42d2f455613c1501364fa3457bf43f70ff2ac3eb Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 6 Apr 2021 13:51:27 +0200 Subject: [PATCH 045/187] bei den anmerkungen studiengang hinzugefuegt --- application/models/person/Notiz_model.php | 6 ++++-- .../views/system/infocenter/anmerkungenZurBewerbung.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index 2e09875d8..fd08cc384 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -154,9 +154,11 @@ class Notiz_model extends DB_Model { // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - $this->addOrder('insertamum', 'DESC'); + $this->addJoin('public.tbl_prestudent', 'prestudent_id', 'LEFT'); + $this->addJoin('public.tbl_studiengang', 'studiengang_kz', 'LEFT'); + $this->addOrder('public.tbl_notiz.insertamum', 'DESC'); - return $this->loadWhere(array('person_id' => $person_id, 'titel LIKE' => $titel)); + return $this->loadWhere(array('public.tbl_notizzuordnung.person_id' => $person_id, 'titel LIKE' => $titel)); } /** diff --git a/application/views/system/infocenter/anmerkungenZurBewerbung.php b/application/views/system/infocenter/anmerkungenZurBewerbung.php index 85682d2a4..508f041de 100644 --- a/application/views/system/infocenter/anmerkungenZurBewerbung.php +++ b/application/views/system/infocenter/anmerkungenZurBewerbung.php @@ -15,6 +15,7 @@ insertamum), 'd.m.Y H:i:s') ?> + kurzbzlang)) ?: print_r('(' . nl2br($notiz->kurzbzlang) . ') - ') ?> text) ?> From 7c875d5f8080733c6c68302a7527f2e1626e8faa Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 6 Apr 2021 14:48:08 +0200 Subject: [PATCH 046/187] Usability: Added 'ZGV' to STGL and lectors Detail site Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 2 +- .../lehre/anrechnung/RequestAnrechnung.php | 2 +- .../anrechnung/ReviewAnrechnungDetail.php | 2 +- application/libraries/AnrechnungLib.php | 15 ++++++++-- application/models/crm/Prestudent_model.php | 29 +++++++++++++++++++ .../anrechnung/approveAnrechnungDetail.php | 4 +++ .../anrechnung/reviewAnrechnungDetail.php | 6 +++- 7 files changed, 53 insertions(+), 7 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index faad790ec..6df89e30b 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -86,7 +86,7 @@ class approveAnrechnungDetail extends Auth_Controller // Get Antrag data $antragData = $this->anrechnunglib->getAntragData( - $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), + $anrechnungData->prestudent_id, $anrechnungData->studiensemester_kurzbz, $anrechnungData->lehrveranstaltung_id ); diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index 8a7fd158c..f9ed03007 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -86,7 +86,7 @@ class requestAnrechnung extends Auth_Controller $anrechnungData = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id); // Get Antrag data - $antragData = $this->anrechnunglib->getAntragData($this->_uid, $studiensemester_kurzbz, $lehrveranstaltung_id); + $antragData = $this->anrechnunglib->getAntragData($prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id); $viewData = array( 'antragData' => $antragData, diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php index 0c6a1b8f7..69a60510f 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -82,7 +82,7 @@ class reviewAnrechnungDetail extends Auth_Controller // Get Antrag data $antragData = $this->anrechnunglib->getAntragData( - $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id), + $anrechnungData->prestudent_id, $anrechnungData->studiensemester_kurzbz, $anrechnungData->lehrveranstaltung_id ); diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index cecff2405..69a729d3a 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -23,6 +23,7 @@ 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->model('crm/Prestudent_model', 'PrestudentModel'); $this->ci->load->library('DmsLib'); } @@ -34,16 +35,19 @@ class AnrechnungLib * @param $lv_id * @return StdClass */ - public function getAntragData($uid, $studiensemester_kurzbz, $lv_id) + public function getAntragData($prestudent_id, $studiensemester_kurzbz, $lv_id) { $antrag_data = new StdClass(); - + + // Get students UID. + $uid = $this->ci->StudentModel->getUID($prestudent_id); + // Get lehrveranstaltung data. Break, if course is not assigned to student. if(!$lv = getData($this->ci->LehrveranstaltungModel->getLvByStudent($uid, $studiensemester_kurzbz, $lv_id))[0]) { show_error('You are not assigned to this course yet.'); } - + // Get the students personal data if (!$person = getData($this->ci->PersonModel->getByUid($uid))[0]) { @@ -71,6 +75,10 @@ class AnrechnungLib $lv_lektoren_arr = hasData($result) ? getData($result) : array(); + // Get latest ZGV + $result = $this->ci->PrestudentModel->getLatestZGVBezeichnung($prestudent_id); + $latest_zgv_bezeichnung = hasData($result) ? getData($result)[0]->bezeichnung : ''; + // Set the given studiensemester $antrag_data->lv_id = $lv_id; $antrag_data->lv_bezeichnung = $lv->bezeichnung; @@ -81,6 +89,7 @@ class AnrechnungLib $antrag_data->matrikelnr = $student->matrikelnr; $antrag_data->stg_bezeichnung = $studiengang->bezeichnung; $antrag_data->lektoren = $lv_lektoren_arr; + $antrag_data->zgv = $latest_zgv_bezeichnung; return $antrag_data; } diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 2e014800c..5911434b8 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -581,4 +581,33 @@ class Prestudent_model extends DB_Model return $this->execQuery($query, array($person_id)); } + + /** + * Get latest ZGV Bezeichnung of Prestudent. + * + * @param $prestudent_id + */ + public function getLatestZGVBezeichnung($prestudent_id) + { + if (!is_numeric($prestudent_id)) + { + show_error('Prestudent_id is not numeric.'); + } + + $language_index = getUserLanguage() == 'German' ? 0 : 1; + + $this->addSelect(' + COALESCE( + array_to_json(zgvmaster.bezeichnung::varchar[])->>' . $language_index . ', + array_to_json(zgv.bezeichnung::varchar[])->>' . $language_index . ' + ) AS bezeichnung' + ); + + $this->addJoin('bis.tbl_zgv zgv', 'zgv_code', 'LEFT'); + $this->addJoin('bis.tbl_zgvmaster zgvmaster', 'zgvmas_code', 'LEFT'); + + return $this->loadWhere(array( + 'prestudent_id' => $prestudent_id + )); + } } diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index 1aa0ee672..b11f62d18 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -123,6 +123,10 @@ $this->load->view( + + p->t('global', 'zgv')); ?> + zgv ?> + p->t('anrechnung', 'herkunftDerKenntnisse'); ?> anmerkung ?> diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index 8e0fc4b46..e518b41b0 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -118,7 +118,11 @@ $this->load->view( - p->t('anrechnung', 'herkunftDerKenntnisse'); ?> + p->t('global', 'zgv')); ?> + zgv ?> + + + p->t('anrechnung', 'herkunftDerKenntnisse'); ?> anmerkung ?> From b5ba81b26e7fd3fa9164fd85b97b7a1f2a83a4b1 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 7 Apr 2021 11:49:42 +0200 Subject: [PATCH 047/187] Added fixed column width to tables Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungDetail.php | 18 +++++++++--------- .../anrechnung/reviewAnrechnungDetail.php | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index b11f62d18..add07fb71 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -90,31 +90,31 @@ $this->load->view( - + - + - + - + - + - + - + - + - +
    p->t('person', 'student')); ?>p->t('person', 'student')); ?> vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>p->t('person', 'personenkennzeichen'); ?> matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>p->t('lehre', 'studiensemester')); ?> studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>p->t('lehre', 'studiengang')); ?> stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>p->t('lehre', 'lehrveranstaltung'); ?> lv_bezeichnung ?>
    p->t('lehre', 'ects'); ?>p->t('lehre', 'ects'); ?> ects ?>
    p->t('lehre', 'lektorInnen'); ?>p->t('lehre', 'lektorInnen'); ?> lektoren) - 1 ?> lektoren as $key => $lektor): ?> @@ -128,11 +128,11 @@ $this->load->view( zgv ?>
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?>p->t('anrechnung', 'herkunftDerKenntnisse'); ?> anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?>p->t('anrechnung', 'nachweisdokumente'); ?> dokumentname) ?> diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index e518b41b0..fc2ab3a88 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -84,31 +84,31 @@ $this->load->view( - + - + - + - + - + - + - + - + diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index a448e95ce..dbfff7d08 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -26,7 +26,8 @@ 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', 'public/js/infocenter/infocenterDetails.js', - 'public/js/infocenter/zgvUeberpruefung.js' + 'public/js/infocenter/zgvUeberpruefung.js', + 'public/js/infocenter/docUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( diff --git a/public/css/infocenter/infocenterDetails.css b/public/css/infocenter/infocenterDetails.css index 38a7824fa..2f2debc00 100644 --- a/public/css/infocenter/infocenterDetails.css +++ b/public/css/infocenter/infocenterDetails.css @@ -76,6 +76,17 @@ font-weight: normal; } +.nachreichungInfos +{ + float: right; + margin: 5px 15px 0 0; +} + +.nachreichungInputs .row +{ + margin-top: 5px; +} + @media screen and (max-width: 1510px) { #postponing{ diff --git a/public/js/infocenter/docUeberpruefung.js b/public/js/infocenter/docUeberpruefung.js new file mode 100644 index 000000000..495257f41 --- /dev/null +++ b/public/js/infocenter/docUeberpruefung.js @@ -0,0 +1,145 @@ +$(document).ready(function () +{ + var personid = $("#hiddenpersonid").val(); + + DocUeberpruefung.checkNachreichungButtons(); + + $('select.aktenid').change(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + var typ = $(this).val(); + DocUeberpruefung.saveDocTyp(personid, akteid, typ); + }); + + $('.nachreichungInfos').click(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + DocUeberpruefung.checkNachreichungInputs(akteid); + }); + + $('.nachreichungAbbrechen').click(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + DocUeberpruefung.checkNachreichungInputs(akteid); + }); + + $('.nachreichungSpeichern').click(function() + { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + var typ = $('#aktenid_' + akteid).val(); + + var nachreichungAm = $('#nachreichungAm_' + akteid).val(); + var nachreichungAnmerkung = $('#nachreichungAnmerkung_' + akteid).val(); + + if(nachreichungAm === '') + { + FHC_DialogLib.alertError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + return false; + } + + var regEx = /^\d{2}\.\d{2}\.(\d{2}|\d{4})$/; + if(nachreichungAm.match(regEx) === null) + { + FHC_DialogLib.alertError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj') + return false; + } + + DocUeberpruefung.saveNachreichung(personid, nachreichungAm, nachreichungAnmerkung, typ); + }) +}); + +var DocUeberpruefung = { + + saveDocTyp: function(personid, akteid, typ) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), + { + "akte_id": akteid, + "typ" : typ + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + InfocenterDetails._refreshLog(); + DocUeberpruefung.checkNachreichungButton(akteid); + } + else + { + FHC_DialogLib.alertError(data); + } + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Fehler beim Speichern!"); + } + } + ); + }, + + saveNachreichung: function (personid, nachreichungAm, nachreichungAnmerkung, typ) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + "/saveNachreichung/"+encodeURIComponent(personid), + { + "nachreichungAm": nachreichungAm, + "nachreichungAnmerkung" : nachreichungAnmerkung, + "typ" : typ + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.isSuccess(data)) + { + FHC_DialogLib.alertSuccess("Done!"); + InfocenterDetails._refreshLog(); + } + else + { + FHC_DialogLib.alertError(data); + } + }, + errorCallback: function() { + FHC_DialogLib.alertWarning("Fehler beim Speichern!"); + } + } + ); + }, + + checkNachreichungInputs: function(akteid) + { + var inputs = $('#nachreichungInputs_' + akteid); + + if (inputs.hasClass('hidden')) + { + inputs.removeClass('hidden'); + } + else + { + inputs.addClass('hidden'); + $('#nachreichungAnmerkung_' + akteid).val(""); + $('#nachreichungAm_' + akteid).val(""); + } + }, + + checkNachreichungButtons: function() + { + $('select.aktenid').each(function () { + var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + DocUeberpruefung.checkNachreichungButton(akteid); + }); + }, + + checkNachreichungButton: function(akteid) + { + var allowedTyps = ['VorlSpB2', 'ZgvBaPre', 'ZgvMaPre']; + var typ = $('#aktenid_' + akteid).val(); + var infos = $('#nachreichungInfos_' + akteid); + + if ($.inArray(typ, allowedTyps) === -1) + infos.addClass('hidden'); + else + infos.removeClass('hidden'); + } + +} \ No newline at end of file diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index de2ba0064..1e393fc28 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -119,11 +119,6 @@ $(document).ready(function () } ); - $('.aktenid').change(function(){ - var akteid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - var typ = $(this).val(); - InfocenterDetails.saveDocTyp(personid, akteid, typ); - }); }); var InfocenterDetails = { @@ -751,33 +746,6 @@ var InfocenterDetails = { ); }, - saveDocTyp: function(personid, akteid, typ) - { - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), - { - "akte_id": akteid, - "typ" : typ - }, - { - successCallback: function(data, textStatus, jqXHR) { - if (FHC_AjaxClient.isSuccess(data)) - { - FHC_DialogLib.alertSuccess("Done!"); - InfocenterDetails._refreshLog(); - } - else - { - FHC_DialogLib.alertError("Fehler beim Speichern des Dokumententypes!"); - } - }, - errorCallback: function() { - FHC_DialogLib.alertWarning("Document type could not be updated"); - } - } - ); - }, - // ----------------------------------------------------------------------------------------------------------------- // (private) methods executed after ajax (refreshers) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index b977e28a8..9559cb0c2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3486,6 +3486,26 @@ $phrases = array( ) ) ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'dokumentWirdNachgereicht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokument wird nachgereicht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Document will be submitted later', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', From 67aa88798116444c3eb4d70c30639523830c333d Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 29 Jun 2021 14:47:57 +0200 Subject: [PATCH 143/187] anzeige des errors --- public/js/infocenter/docUeberpruefung.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/infocenter/docUeberpruefung.js b/public/js/infocenter/docUeberpruefung.js index 495257f41..ba45b8986 100644 --- a/public/js/infocenter/docUeberpruefung.js +++ b/public/js/infocenter/docUeberpruefung.js @@ -68,7 +68,7 @@ var DocUeberpruefung = { } else { - FHC_DialogLib.alertError(data); + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); } }, errorCallback: function() { @@ -96,7 +96,7 @@ var DocUeberpruefung = { } else { - FHC_DialogLib.alertError(data); + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); } }, errorCallback: function() { From 36507959acd1be8c9c21b333ec0d591603d50ca4 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 30 Jun 2021 13:09:56 +0200 Subject: [PATCH 144/187] dokumentenpruefung im infocenter in eigenes js ausgelagert, reloaden der anzeige beim nachreichen eines doks --- .../system/infocenter/InfoCenter.php | 42 +++++++-- .../system/infocenter/dokNachzureichend.php | 32 +++++++ .../views/system/infocenter/dokpruefung.php | 34 +------ .../system/infocenter/infocenterDetails.php | 7 +- .../infocenter/infocenterZgvDetails.php | 3 + public/js/infocenter/docUeberpruefung.js | 91 +++++++++++++++++-- public/js/infocenter/infocenterDetails.js | 49 ---------- system/phrasesupdate.php | 60 ++++++++++++ 8 files changed, 218 insertions(+), 100 deletions(-) create mode 100644 application/views/system/infocenter/dokNachzureichend.php diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 7dceb954c..deb388add 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -127,6 +127,7 @@ class InfoCenter extends Auth_Controller 'updateNotiz' => 'infocenter:rw', 'reloadZgvPruefungen' => 'infocenter:r', 'reloadMessages' => 'infocenter:r', + 'reloadDoks' => 'infocenter:r', 'reloadNotizen' => 'infocenter:r', 'reloadLogs' => 'infocenter:r', 'outputAkteContent' => 'infocenter:r', @@ -1023,6 +1024,13 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/logs.php', array('logs' => $logs)); } + public function reloadDoks($person_id) + { + $dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true); + + $this->load->view('system/infocenter/dokNachzureichend.php', array('dokumente_nachgereicht' => $dokumente_nachgereicht->retval)); + } + /** * Outputs content of an Akte, sends appropriate headers (so the document can be downloaded) * @param $akte_id @@ -1225,13 +1233,31 @@ class InfoCenter extends Auth_Controller ]; if (!in_array($typ, array_keys($allowedTypes))) - $this->terminateWithJsonError('Bei dem Dokument ist keine Nachreichung möglich'); + $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern')); if (empty($nachreichungAm)) - $this->terminateWithJsonError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); if (!preg_match('/^\d{2}\.\d{2}\.(\d{2}|\d{4})$/ ', $nachreichungAm)) - $this->terminateWithJsonError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj'); + { + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); + } + else + { + $ds = explode('.', $nachreichungAm); + if (! checkdate($ds[1], $ds[0], $ds[2])) + { + $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig')); + } + } + + $nachreichungAm = (date_format(date_create($nachreichungAm), 'Y-m-d')); + + $today = date('Y-m-d H:i:s'); + + if($nachreichungAm < $today) + $this->terminateWithJsonError($this->p->t('infocenter', 'nachreichDatumNichtVergangenheit')); + $akte = $this->AkteModel->loadWhere(array('person_id' => $person_id, 'dokument_kurzbz' => $allowedTypes[$typ])); @@ -1241,10 +1267,10 @@ class InfoCenter extends Auth_Controller $akte->akte_id, array( 'anmerkung' => $nachreichungAnmerkung, - 'updateamum' => date('Y-m-d H:i:s'), + 'updateamum' => $today, 'updatevon' => get_uid(), 'nachgereicht' => true, - 'nachgereicht_am' => date_format(date_create($nachreichungAm), 'Y-m-d') + 'nachgereicht_am' => $nachreichungAm ) ); } @@ -1257,13 +1283,13 @@ class InfoCenter extends Auth_Controller 'erstelltam' => NULL, 'gedruckt' => false, 'anmerkung' => $nachreichungAnmerkung, - 'updateamum' => date('Y-m-d H:i:s'), + 'updateamum' => $today, 'updatevon' => get_uid(), - 'insertamum' => date('Y-m-d H:i:s'), + 'insertamum' => $today, 'insertvon' => get_uid(), 'uid' => NULL, 'nachgereicht' => true, - 'nachgereicht_am' => date_format(date_create($nachreichungAm), 'Y-m-d') + 'nachgereicht_am' => $nachreichungAm ) ); } diff --git a/application/views/system/infocenter/dokNachzureichend.php b/application/views/system/infocenter/dokNachzureichend.php new file mode 100644 index 000000000..7a3b3aa03 --- /dev/null +++ b/application/views/system/infocenter/dokNachzureichend.php @@ -0,0 +1,32 @@ + 0): ?> +
    +

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

    +
    p->t('person', 'student')); ?>p->t('person', 'student')); ?> vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>p->t('person', 'personenkennzeichen'); ?> matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>p->t('lehre', 'studiensemester')); ?> studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>p->t('lehre', 'studiengang')); ?> stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>p->t('lehre', 'lehrveranstaltung'); ?> lv_bezeichnung ?>
    p->t('lehre', 'ects'); ?>p->t('lehre', 'ects'); ?> ects ?>
    p->t('lehre', 'lektorInnen'); ?>p->t('lehre', 'lektorInnen'); ?> lektoren) - 1 ?> lektoren as $key => $lektor): ?> @@ -126,7 +126,7 @@ $this->load->view( anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?>p->t('anrechnung', 'nachweisdokumente'); ?> dokumentname) ?> From 343b7a308748a8fcb9108a120a6bc67cc1b5278e Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 7 Apr 2021 11:54:04 +0200 Subject: [PATCH 048/187] Adapted Controller to use library method getLectors() ...instead of redundant private method. Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 7 ++ .../ApproveAnrechnungUebersicht.php | 64 +------------------ application/libraries/AnrechnungLib.php | 61 ++++++++++++++++++ 3 files changed, 69 insertions(+), 63 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 6df89e30b..90c105abf 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -232,6 +232,13 @@ class approveAnrechnungDetail extends Auth_Controller break; } + // Get full name of LV Leitung. + // If LV Leitung is not present, get full name of LV lectors. + $lector_arr = $this->anrechnunglib->getLectors($item['anrechnung_id']); + $empfehlungsanfrage_an = !isEmptyArray($lector_arr) + ? implode(', ', array_column($lector_arr, 'fullname')) + : ''; + // Request Recommendation if($this->anrechnunglib->requestRecommendation($item['anrechnung_id'])) { diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index c163ee6cf..f613c65b0 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -199,7 +199,7 @@ class approveAnrechnungUebersicht extends Auth_Controller { // Get full name of LV Leitung. // If LV Leitung is not present, get full name of LV lectors. - $lector_arr = self::_getLVLectors($item['anrechnung_id']); + $lector_arr = $this->anrechnunglib->getLectors($item['anrechnung_id']); $empfehlungsanfrage_an = !isEmptyArray($lector_arr) ? implode(', ', array_column($lector_arr, 'fullname')) : ''; @@ -452,68 +452,6 @@ class approveAnrechnungUebersicht extends Auth_Controller // Now make the lector array aka mail receivers unique $lector_arr = array_unique($lector_arr, SORT_REGULAR); - return $lector_arr; - - } - - /** - * Get LV Leitung. If not present, get all LV lectors. - * - * @param $anrechnung_id - * @return array|bool - */ - private function _getLVLectors($anrechnung_id) - { - $this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz'); - $result = $this->AnrechnungModel->load($anrechnung_id); - - if (!hasData($result)) - { - return false; - } - - $lehrveranstaltung_id = getData($result)[0]->lehrveranstaltung_id; - $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; - - // Get lectors - $lector_arr = array(); - - $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); - $result = $this->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lehrveranstaltung_id); - - if (!$result = getData($result)) - { - return false; - } - - // Check if lv has LV-Leitung - $key = array_search(true, array_column($result, 'lvleiter')); - - // If lv has LV-Leitung, keep only the one - if ($key !== false) - { - $lector_arr[]= $result[$key]; - } - // ...otherwise keep all lectors - else - { - $lector_arr = array_merge($lector_arr, $result); - } - - /** - * NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step - * (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both. - * But we wish to send only one email by to that one person) - * **/ - foreach ($lector_arr as $lector) - { - unset($lector->lvleiter); - $lector->fullname = $lector->vorname. ' '. $lector->nachname; - } - - // Now make the lector array aka mail receivers unique - $lector_arr = array_unique($lector_arr, SORT_REGULAR); - return $lector_arr; } } \ No newline at end of file diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index 69a729d3a..cfed6c776 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -694,6 +694,67 @@ class AnrechnungLib // Continue, if LV has no lector (there is no one to ask for recommendation) return hasData($result) ? true : false; } + + /** + * Get LV Leitung. If not present, get all LV lectors. + * + * @param $anrechnung_id + * @return array|bool + */ + public function getLectors($anrechnung_id) + { + $this->ci->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz'); + $result = $this->ci->AnrechnungModel->load($anrechnung_id); + + if (!hasData($result)) + { + return false; + } + + $lehrveranstaltung_id = getData($result)[0]->lehrveranstaltung_id; + $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; + + // Get lectors + $lector_arr = array(); + + $this->ci->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + $result = $this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lehrveranstaltung_id); + + if (!$result = getData($result)) + { + return false; + } + + // Check if lv has LV-Leitung + $key = array_search(true, array_column($result, 'lvleiter')); + + // If lv has LV-Leitung, keep only the one + if ($key !== false) + { + $lector_arr[]= $result[$key]; + } + // ...otherwise keep all lectors + else + { + $lector_arr = array_merge($lector_arr, $result); + } + + /** + * NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step + * (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both. + * But we wish to send only one email by to that one person) + * **/ + foreach ($lector_arr as $lector) + { + unset($lector->lvleiter); + $lector->fullname = $lector->vorname. ' '. $lector->nachname; + } + + // Now make the lector array aka mail receivers unique + $lector_arr = array_unique($lector_arr, SORT_REGULAR); + + return $lector_arr; + } // Return an object with Anrechnungdata private function _setAnrechnungDataObject($anrechnung) From bd2727fa0247baecf5add60081978b19e04f33c0 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 7 Apr 2021 11:59:32 +0200 Subject: [PATCH 049/187] Fixed: Now trimming text when copying lectors reason to STGLs reason for rejection Signed-off-by: cris-technikum --- public/js/lehre/anrechnung/approveAnrechnungDetail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js index f52a0006f..ed00ddca8 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -354,7 +354,7 @@ var approveAnrechnungDetail = { if (elem.id.length && elem.id == 'empfehlungstextUebernehmen') { // Copy Empfehlungstext into textarea - textarea.val($('#approveAnrechnungDetail-empfehlungDetail-begruendung').text()); + textarea.val($.trim($('#approveAnrechnungDetail-empfehlungDetail-begruendung').text())); return; } else From fe4b70ba19f501cee0fac8661996e5390d6579a5 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 7 Apr 2021 12:05:36 +0200 Subject: [PATCH 050/187] Usability: Added 'Empfehlungsanforderung an/am' to STGL + lectors Detail view . Now more "Empfehlungs"-data shown in a table. . Better separation of PHP / JS. . Adapted Controller, View, JS and library to provide data about WHEN and TO WHOME the requests for recommendation had been sent. Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 3 +- .../ApproveAnrechnungUebersicht.php | 4 +- .../anrechnung/ReviewAnrechnungDetail.php | 2 +- application/libraries/AnrechnungLib.php | 19 ++++- .../anrechnung/approveAnrechnungDetail.php | 82 +++++++++---------- .../approveAnrechnungUebersichtData.php | 10 +-- .../anrechnung/reviewAnrechnungDetail.php | 70 ++++++++++------ .../anrechnung/reviewAnrechnungDetail.js | 35 +++++++- system/phrasesupdate.php | 48 ++++++++++- 9 files changed, 185 insertions(+), 88 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 90c105abf..90753b072 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -247,7 +247,8 @@ class approveAnrechnungDetail extends Auth_Controller 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR), 'empfehlung_anrechnung' => null, - 'empfehlung_angefordert_am' => (new DateTime())->format('d.m.Y') + 'empfehlungsanfrageAm' => (new DateTime())->format('d.m.Y'), + 'empfehlungsanfrageAn' => $empfehlungsanfrage_an ); } } diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index f613c65b0..cf19bef4d 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -209,8 +209,8 @@ class approveAnrechnungUebersicht extends Auth_Controller 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR, 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR), 'empfehlung_anrechnung' => null, - 'empfehlungsanfrage_am' => (new DateTime())->format('Y-m-d H:i:s'), - 'empfehlungsanfrage_an' => $empfehlungsanfrage_an + 'empfehlungsanfrageAm' => (new DateTime())->format('Y-m-d H:i:s'), + 'empfehlungsanfrageAn' => $empfehlungsanfrage_an ); } } diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php index 69a60510f..78175f4e6 100644 --- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php @@ -181,7 +181,7 @@ class reviewAnrechnungDetail extends Auth_Controller 'empfehlung_anrechnung' => 'false', 'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL, 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL), - 'empfehlumg_am' => (new DateTime())->format('d.m.Y'), + 'empfehlung_am' => (new DateTime())->format('d.m.Y'), 'empfehlung_von' => $person->vorname. ' '. $person->nachname ); } diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index cfed6c776..a4fd8690d 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -224,8 +224,9 @@ class AnrechnungLib $empfehlung_data->empfehlung = null; $empfehlung_data->empfehlung_von = '-'; $empfehlung_data->empfehlung_am = '-'; - $empfehlung_data->empfehlung_angefordert_am = '-'; - $empfehlung_data->notiz = ''; // Begruendung, if not recommended + $empfehlung_data->empfehlungsanfrageAm = '-'; + $empfehlung_data->empfehlungsanfrageAn = '-'; + $empfehlung_data->notiz = '-'; // Begruendung, if not recommended if(!$anrechnung = getData($this->ci->AnrechnungModel->load($anrechnung_id))[0]) @@ -238,9 +239,19 @@ class AnrechnungLib $anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR // when STLG asks for recommendation, status is set to in progress lektor ); - if ($result = getData($result)[0]) + + // If request for recommendation exists + if (hasData($result)) { - $empfehlung_data->empfehlung_angefordert_am = (new DateTime($result->insertamum))->format('d.m.Y'); + $empfehlung_data->empfehlungsanfrageAm = (new DateTime($result->retval[0]->insertamum))->format('d.m.Y'); + + // Get lectors who received request for recommendation + $lector_arr = self::getLectors($anrechnung_id); + + if (!isEmptyArray($lector_arr)) + { + $empfehlung_data->empfehlungsanfrageAn = implode(', ', array_column($lector_arr, 'fullname')); + } } if (is_null($anrechnung->empfehlung_anrechnung)) diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index add07fb71..ac86efd16 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -12,7 +12,8 @@ $this->load->view( 'phrases' => array( 'global' => array( 'anerkennungNachgewiesenerKenntnisse', - 'antragStellen' + 'antragStellen', + 'begruendung' ), 'ui' => array( 'hilfeZuDieserSeite', @@ -40,7 +41,9 @@ $this->load->view( 'anrechnung' => array( 'genehmigungAblehnungWirklichZuruecknehmen', 'empfehlungsanforderungWirklichZuruecknehmen', - 'erfolgreichZurueckgenommen' + 'erfolgreichZurueckgenommen', + 'empfehlungPositivConfirmed', + 'empfehlungNegativConfirmed' ) ), 'customCSSs' => array( @@ -151,14 +154,8 @@ $this->load->view( value="anrechnung_id ?>">
    -
    p->t('anrechnung', 'empfehlung'); ?>  - - -p->t('anrechnung', 'empfehlungInfoTooltipText'); ?> - -
    p->t('anrechnung', 'empfehlungVon'); ?>: empfehlung_von ?> @@ -167,41 +164,40 @@ $this->load->view( empfehlung_am ?>
    - -
    - -
    - p->t('anrechnung', 'keineEmpfehlungAngefordert'); ?> -
    - -
    - p->t('anrechnung', 'empfehlungAngefordertNochKeineEmpfehlung'); ?> - - empfehlung_angefordert_am ?> - . -
    - -
    - p->t('anrechnung', 'empfehlungPositivConfirmed'); ?> -
    - -
    -
    - p->t('anrechnung', 'empfehlungNegativConfirmed'); ?> -
    -
    p->t('global', 'begruendung'); ?> - : - notiz) ?> -
    -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('anrechnung', 'empfehlungsanfrageAm')); ?> + empfehlungsanfrageAm; ?> +
    p->t('anrechnung', 'empfehlungsanfrageAn'); ?> + empfehlungsanfrageAn; ?> +
    p->t('anrechnung', 'empfehlungdatum')); ?>empfehlung_am ?>
    p->t('anrechnung', 'empfehlungVon')); ?>empfehlung_von ?>
    p->t('anrechnung', 'empfehlung'); ?>
    p->t('global', 'begruendung'); ?> + notiz) ?> +
    diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index b2a519dab..40805a4a1 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -68,14 +68,14 @@ $query = ' AND status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR . '\' ORDER BY insertamum DESC LIMIT 1) - END empfehlungsanfrage_am, + END "empfehlungsanfrageAm", CASE WHEN (anrechnungen.empfehlung_anrechnung IS NULL AND anrechnungen.status_kurzbz = \'' . ANRECHNUNGSTATUS_PROGRESSED_BY_STGL . '\') THEN NULL ELSE (SELECT COALESCE( STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = TRUE), STRING_AGG(CONCAT_WS(\' \', vorname, nachname), \', \') FILTER (WHERE lvleiter = FALSE) - ) empfehlungsanfrage_an + ) empfehlungsanfrageAn FROM ( SELECT DISTINCT ON (benutzer.uid) uid, vorname, nachname, CASE WHEN lehrfunktion_kurzbz = \'LV-Leitung\' THEN TRUE ELSE FALSE END AS lvleiter @@ -91,7 +91,7 @@ $query = ' ORDER BY benutzer.uid, lvleiter DESC, nachname, vorname ) as tmp_lvlektoren ) - END empfehlungsanfrage_an + END "empfehlungsanfrageAn" FROM anrechnungen JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz) WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' @@ -183,8 +183,8 @@ $filterWidgetArray = array( empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung, headerFilterFunc: hf_filterTrueFalse}, status_kurzbz: {visible: false}, status_bezeichnung: {headerFilter:"input"}, - empfehlungsanfrage_am: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate}, - empfehlungsanfrage_an: {visible: false, headerFilter:"input"} + empfehlungsanfrageAm: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate}, + empfehlungsanfrageAn: {visible: false, headerFilter:"input"} }', // col properties ); diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index fc2ab3a88..4d0f22823 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -34,7 +34,11 @@ $this->load->view( 'lehrveranstaltung', 'ects', 'lektor', - ) + ), + 'anrechnung' => array( + 'empfehlungPositivConfirmed', + 'empfehlungNegativConfirmed' + ) ), 'customCSSs' => array( 'public/css/Tabulator.css' @@ -140,7 +144,8 @@ $this->load->view(
    -
    +
    p->t('anrechnung', 'empfehlung'); ?>
    @@ -152,29 +157,46 @@ $this->load->view(
    -
    + + -
    - p->t('anrechnung', 'nochKeineEmpfehlung'); ?> -
    - -
    - p->t('anrechnung', 'empfehlungPositivConfirmed'); ?> -
    - -
    -
    - p->t('anrechnung', 'empfehlungNegativConfirmed'); ?> -
    -
    p->t('global', 'begruendung'); ?> - : - notiz) ?> -
    -
    - + + + + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('anrechnung', 'empfehlungsanfrageAm')); ?> + empfehlungsanfrageAm; ?> +
    p->t('anrechnung', 'empfehlungsanfrageAn'); ?> + empfehlungsanfrageAn; ?> +
    p->t('anrechnung', 'empfehlungdatum')); ?> + empfehlung_am ?> +
    p->t('anrechnung', 'empfehlungVon')); ?> + empfehlung_von ?> +
    p->t('anrechnung', 'empfehlung'); ?>
    p->t('global', 'begruendung'); ?> + notiz) ?> +
    'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => ' Empfehlung am', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Recommended on', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'anrechnung', @@ -10558,13 +10578,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => "Empfehlungsanfrage an", + 'text' => "Empfehlung angefragt an", 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => "Request Recommend. to", + 'text' => "Requested to", 'description' => '', 'insertvon' => 'system' ) @@ -10578,13 +10598,33 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => "Empfehlungsanfrage am", + 'text' => "Empfehlung angefragt am", 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => "Request Recommend. on", + 'text' => "Requested on", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'empfehlungsanfrageAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Empfehlung angefragt am", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Requested on", 'description' => '', 'insertvon' => 'system' ) From 587796e374c17d3faa7e54b6ccc59894a1c03cea Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 7 Apr 2021 15:52:06 +0200 Subject: [PATCH 051/187] Usability: Gendered StudentIn; Changed first table column to bold text Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungDetail.php | 32 +++++++++---------- .../anrechnung/reviewAnrechnungDetail.php | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungDetail.php b/application/views/lehre/anrechnung/approveAnrechnungDetail.php index ac86efd16..0364aa57e 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/approveAnrechnungDetail.php @@ -93,31 +93,31 @@ $this->load->view( - + - + - + - + - + - + - + - + - + - +
    p->t('person', 'student')); ?>p->t('person', 'studentIn')); ?> vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>p->t('person', 'personenkennzeichen'); ?> matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>p->t('lehre', 'studiensemester')); ?> studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>p->t('lehre', 'studiengang')); ?> stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>p->t('lehre', 'lehrveranstaltung'); ?> lv_bezeichnung ?>
    p->t('lehre', 'ects'); ?>p->t('lehre', 'ects'); ?> ects ?>
    p->t('lehre', 'lektorInnen'); ?>p->t('lehre', 'lektorInnen'); ?> lektoren) - 1 ?> lektoren as $key => $lektor): ?> @@ -127,15 +127,15 @@ $this->load->view(
    p->t('global', 'zgv')); ?>p->t('global', 'zgv')); ?> zgv ?>
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?>p->t('anrechnung', 'herkunftDerKenntnisse'); ?> anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?>p->t('anrechnung', 'nachweisdokumente'); ?> dokumentname) ?> @@ -167,31 +167,31 @@ $this->load->view( - + - + - + - + - + - + diff --git a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php index 4d0f22823..6d3dd913e 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungDetail.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungDetail.php @@ -88,31 +88,31 @@ $this->load->view(
    p->t('anrechnung', 'empfehlungsanfrageAm')); ?>p->t('anrechnung', 'empfehlungsanfrageAm')); ?> empfehlungsanfrageAm; ?>
    p->t('anrechnung', 'empfehlungsanfrageAn'); ?>p->t('anrechnung', 'empfehlungsanfrageAn'); ?> empfehlungsanfrageAn; ?>
    p->t('anrechnung', 'empfehlungdatum')); ?>p->t('anrechnung', 'empfehlungAm')); ?> empfehlung_am ?>
    p->t('anrechnung', 'empfehlungVon')); ?>p->t('anrechnung', 'empfehlungVon')); ?> empfehlung_von ?>
    p->t('anrechnung', 'empfehlung'); ?>p->t('anrechnung', 'empfehlung'); ?>
    p->t('global', 'begruendung'); ?>p->t('global', 'begruendung'); ?> notiz) ?>
    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + From 094b502862af38d0d2c40e4bc7a28875738bf020 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 7 Apr 2021 17:17:53 +0200 Subject: [PATCH 052/187] Usability: Limited chars-length for 'Herkunft der Kenntnisse' / Added chars counter Signed-off-by: cris-technikum --- .../lehre/anrechnung/requestAnrechnung.php | 10 +++++++--- .../js/lehre/anrechnung/requestAnrechnung.js | 12 +++++++++++ system/phrasesupdate.php | 20 +++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index 749b0f1d5..c726471cb 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -1,4 +1,6 @@ load->view( 'templates/FHC-Header', array( @@ -20,7 +22,8 @@ $this->load->view( 'hilfeZuDieserSeite', 'hochladen', 'inBearbeitung', - 'neu' + 'neu', + 'maxZeichen' ), 'person' => array( 'student', @@ -199,8 +202,9 @@ $this->load->view(
    - + + Max. Zeichen:
    diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js index b7b1229da..a1544c76b 100644 --- a/public/js/lehre/anrechnung/requestAnrechnung.js +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -1,5 +1,6 @@ const ANRECHNUNGSTATUS_APPROVED = 'approved'; const ANRECHNUNGSTATUS_REJECTED = 'rejected'; +const HERKUNFT_DER_KENNTNISSE_MAX_LENGTH = 125; $(function(){ // Set status alert color @@ -11,6 +12,9 @@ $(function(){ // Init tooltips requestAnrechnung.initTooltips(); + // Set chars counter for textarea 'Herkunft der Kenntnisse' + requestAnrechnung.setCharsCounter(); + $('#requestAnrechnung-apply-anrechnung').click(function(e){ // Avoid form redirecting automatically @@ -85,6 +89,14 @@ var requestAnrechnung = { } ); }, + setCharsCounter: function(){ + $('#requestAnrechnung-herkunftDerKenntnisse').keyup(function() { + + let length = HERKUNFT_DER_KENNTNISSE_MAX_LENGTH - $(this).val().length; + + $('#requestAnrechnung-herkunftDerKenntnisse-charCounter').text(length); + }); + }, formatAnrechnungIsApplied: function (antragdatum, dms_id, filename){ $('#requestAnrechnung-antragdatum').text(antragdatum); $('#requestAnrechnung-status_kurzbz').text(FHC_PhrasesLib.t("ui", "inBearbeitung")); diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index c154211a5..02f00689a 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10630,6 +10630,26 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'maxZeichen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Max. Zeichen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Max. Characters", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From cbf4cd14e5bee3904f27fb4bb25bf797dd98a6e3 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 8 Apr 2021 09:50:43 +0200 Subject: [PATCH 053/187] Added column 'Status' (last Anrechnungstatus) in FAS Anrechnung tab Signed-off-by: cris-technikum --- .../studentanrechnungenoverlay.xul.php | 5 +++ content/student/studentoverlay.js.php | 1 + include/anrechnung.class.php | 42 ++++++++++++++++++- rdf/anrechnung.rdf.php | 15 +++++++ 4 files changed, 62 insertions(+), 1 deletion(-) diff --git a/content/student/studentanrechnungenoverlay.xul.php b/content/student/studentanrechnungenoverlay.xul.php index db62917cd..089f70aec 100644 --- a/content/student/studentanrechnungenoverlay.xul.php +++ b/content/student/studentanrechnungenoverlay.xul.php @@ -79,6 +79,10 @@ echo ''; class="sortDirectionIndicator" sort="rdf:http://www.technikum-wien.at/anrechnung/rdf#lehrveranstaltung_bez_kompatibel"/> +
    p->t('person', 'student')); ?>p->t('person', 'studentIn')); ?> vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>p->t('person', 'personenkennzeichen'); ?> matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>p->t('lehre', 'studiensemester')); ?> studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>p->t('lehre', 'studiengang')); ?> stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>p->t('lehre', 'lehrveranstaltung'); ?> lv_bezeichnung ?>
    p->t('lehre', 'ects'); ?>p->t('lehre', 'ects'); ?> ects ?>
    p->t('lehre', 'lektorInnen'); ?>p->t('lehre', 'lektorInnen'); ?> lektoren) - 1 ?> lektoren as $key => $lektor): ?> @@ -122,15 +122,15 @@ $this->load->view(
    p->t('global', 'zgv')); ?>p->t('global', 'zgv')); ?> zgv ?>
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?>p->t('anrechnung', 'herkunftDerKenntnisse'); ?> anmerkung ?>
    p->t('anrechnung', 'nachweisdokumente'); ?>p->t('anrechnung', 'nachweisdokumente'); ?> dokumentname) ?> @@ -162,35 +162,35 @@ $this->load->view(
    p->t('anrechnung', 'empfehlungsanfrageAm')); ?>p->t('anrechnung', 'empfehlungsanfrageAm')); ?> empfehlungsanfrageAm; ?>
    p->t('anrechnung', 'empfehlungsanfrageAn'); ?>p->t('anrechnung', 'empfehlungsanfrageAn'); ?> empfehlungsanfrageAn; ?>
    p->t('anrechnung', 'empfehlungdatum')); ?>p->t('anrechnung', 'empfehlungAm')); ?> empfehlung_am ?>
    p->t('anrechnung', 'empfehlungVon')); ?>p->t('anrechnung', 'empfehlungVon')); ?> empfehlung_von ?>
    p->t('anrechnung', 'empfehlung'); ?>p->t('anrechnung', 'empfehlung'); ?>
    p->t('global', 'begruendung'); ?>p->t('global', 'begruendung'); ?> notiz) ?>
    - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('person', 'student')); ?>p->t('person', 'studentIn')); ?> vorname . ' ' . $antragData->nachname; ?>
    p->t('person', 'personenkennzeichen'); ?>p->t('person', 'personenkennzeichen'); ?> matrikelnr ?>
    p->t('lehre', 'studiensemester')); ?>p->t('lehre', 'studiensemester')); ?> studiensemester_kurzbz ?>
    p->t('lehre', 'studiengang')); ?>p->t('lehre', 'studiengang')); ?> stg_bezeichnung ?>
    p->t('lehre', 'lehrveranstaltung'); ?>p->t('lehre', 'lehrveranstaltung'); ?> lv_bezeichnung ?>
    p->t('lehre', 'ects'); ?>p->t('lehre', 'ects'); ?> ects ?>
    p->t('lehre', 'lektor')); ?>p->t('lehre', 'lektorInnen')); ?> lektoren) - 1 ?> lektoren as $key => $lektor): ?> From a70082f0e55923646142fe8d2db568870e30bd44 Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 12 Apr 2021 17:00:03 +0200 Subject: [PATCH 056/187] Usability: Added Pflichtfeld "Lesebestaetigung" to students VIEW Signed-off-by: cris-technikum --- .../lehre/anrechnung/RequestAnrechnung.php | 6 +++ .../lehre/anrechnung/requestAnrechnung.php | 17 +++++++- .../js/lehre/anrechnung/requestAnrechnung.js | 6 +++ system/phrasesupdate.php | 40 +++++++++++++++++++ 4 files changed, 67 insertions(+), 2 deletions(-) diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index f9ed03007..024e080d7 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -106,6 +106,7 @@ class requestAnrechnung extends Auth_Controller $begruendung_id = $this->input->post('begruendung'); $lehrveranstaltung_id = $this->input->post('lv_id'); $studiensemester_kurzbz = $this->input->post('studiensemester'); + $bestaetigung = $this->input->post('bestaetigung'); // Validate data if (empty($_FILES['uploadfile']['name'])) @@ -121,6 +122,11 @@ class requestAnrechnung extends Auth_Controller return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen')); } + if (isEmptyString($bestaetigung)) + { + return $this->outputJsonError($this->p->t('ui', 'errorBestaetigungFehlt')); + } + // Exit if user is not a student $result = $this->StudentModel->load(array('student_uid' => $this->_uid)); diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index d0557977f..94a856736 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -23,7 +23,8 @@ $this->load->view( 'hochladen', 'inBearbeitung', 'neu', - 'maxZeichen' + 'maxZeichen', + 'errorBestaetigungFehlt' ), 'person' => array( 'student', @@ -202,7 +203,7 @@ $this->load->view(
    - Max. Zeichen:
    @@ -211,6 +212,18 @@ $this->load->view( +
    +
    +
    +
    + +
    +
    +
    +
    'core', + 'category' => 'anrechnung', + 'phrase' => 'bestaetigungstext', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Hiermit bestätige ich, dass ich die relevanten Prozess-Informationen gelesen habe und bestätige hiermit auch die Vollständigkeit und Richtigkeit meiner Angaben.
    Ich nehme zur Kenntnis, dass der Antrag nur einmal hochgeladen werden kann und dass Unterlagen nicht nachgereicht werden können.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "I hereby confirm that I have read the relevant process information and hereby also confirm the accuracy and completeness of the information I have provided above.
    I acknowledge that the application can only be uploaded once and that documents cannot be submitted later.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'errorBestaetigungFehlt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Ihre Bestaetigung fehlt.
    Bitte aktivieren Sie das entsprechende Feld.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Your confirmation is missing.
    Please confirm the corresponding field.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From cb5037626bcae87e5ba2ed533f537bc9b43d0b97 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 13 Apr 2021 09:45:23 +0200 Subject: [PATCH 057/187] Minor change: Now using language phrase for 'maxZeichen' Signed-off-by: cris-technikum --- application/views/lehre/anrechnung/requestAnrechnung.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/lehre/anrechnung/requestAnrechnung.php b/application/views/lehre/anrechnung/requestAnrechnung.php index 94a856736..c6aab70d0 100644 --- a/application/views/lehre/anrechnung/requestAnrechnung.php +++ b/application/views/lehre/anrechnung/requestAnrechnung.php @@ -205,7 +205,7 @@ $this->load->view(
    - Max. Zeichen: + p->t('ui', 'maxZeichen'); ?> :
    From b92260c1d5f73c09b6f22351ea14e633427016e4 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 13 Apr 2021 11:47:13 +0200 Subject: [PATCH 058/187] Added Moodle-link to Anrechnungen-Prozessinformation Signed-off-by: cris-technikum --- system/phrasesupdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index f700d6628..80a9c799f 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10658,13 +10658,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => "Hiermit bestätige ich, dass ich die relevanten Prozess-Informationen gelesen habe und bestätige hiermit auch die Vollständigkeit und Richtigkeit meiner Angaben.
    Ich nehme zur Kenntnis, dass der Antrag nur einmal hochgeladen werden kann und dass Unterlagen nicht nachgereicht werden können.", + 'text' => "Hiermit bestätige ich, dass ich die relevanten Prozess-Informationen gelesen habe und bestätige hiermit auch die Vollständigkeit und Richtigkeit meiner Angaben.
    Ich nehme zur Kenntnis, dass der Antrag nur einmal hochgeladen werden kann und dass Unterlagen nicht nachgereicht werden können.", 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => "I hereby confirm that I have read the relevant process information and hereby also confirm the accuracy and completeness of the information I have provided above.
    I acknowledge that the application can only be uploaded once and that documents cannot be submitted later.", + 'text' => "I hereby confirm that I have read the relevant process information and hereby also confirm the accuracy and completeness of the information I have provided above.
    I acknowledge that the application can only be uploaded once and that documents cannot be submitted later.", 'description' => '', 'insertvon' => 'system' ) From 7317623fbf1d11197d2740482282765f52d1ffb0 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 13 Apr 2021 16:09:11 +0200 Subject: [PATCH 059/187] Added jobs to send mails to students once per day (info approved/rejected) . The jobs will send mails to students, whose Anrechnungen were approved/rejected the last day. . Removed former sendMailToStudent functions from Controllers. Signed-off-by: cris-technikum --- .../controllers/jobs/AnrechnungJob.php | 118 ++++++++++++++++++ .../anrechnung/ApproveAnrechnungDetail.php | 47 +------ .../ApproveAnrechnungUebersicht.php | 45 ------- 3 files changed, 119 insertions(+), 91 deletions(-) diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php index 98c85d592..9a2b79e6e 100644 --- a/application/controllers/jobs/AnrechnungJob.php +++ b/application/controllers/jobs/AnrechnungJob.php @@ -16,6 +16,10 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); class AnrechnungJob extends JOB_Controller { const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht'; + + const ANRECHNUNGSTATUS_APPROVED = 'approved'; + const ANRECHNUNGSTATUS_REJECTED = 'rejected'; + const ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL = 'AnrechnungNotizSTGL'; /** * Constructor @@ -155,6 +159,120 @@ class AnrechnungJob extends JOB_Controller $this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.'); } + /** + * Send Sancho mail to students, whose Anrechnungen were approved 24 hours ago. + */ + public function sendMailApproved(){ + + $this->logInfo('Start AnrechnungJob to send emails to students, whose Anrechnungen were approved.'); + + // Get all yesterdays approvements + $this->AnrechnungModel->addSelect('student.student_uid, vorname, nachname, geschlecht, lv.bezeichnung'); + $this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus status', 'anrechnung_id'); + $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'); + + $result = $this->AnrechnungModel->loadWhere( + '(status.insertamum)::date = (NOW() - INTERVAL \'24 HOURS\')::DATE AND + status.status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_APPROVED) + ); + + // Exit if there are no approved Anrechnungen + if (!hasData($result)) + { + $this->logInfo('ABORTED sending emails to students, whose Anrechnungen were approved. No new approvements found.'); + exit; + } + + // Loop through students + foreach ($result->retval as $student) + { + $to = $student->student_uid. '@'. DOMAIN; + + $anrede = $student->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr '; + + $text = 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'. + $student->bezeichnung. '" wurde stattgegeben.'; + + // Prepare mail content + $body_fields = array( + 'anrede_name' => $anrede. $student->vorname. ' '. $student->nachname, + 'text' => $text + ); + + // Send mail + sendSanchoMail( + 'AnrechnungGenehmigen', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen' + ); + } + } + + /** + * Send Sancho mail to students, whose Anrechnungen were rejected 24 hours ago. + */ + public function sendMailRejected(){ + + $this->logInfo('Start AnrechnungJob to send emails to students, whose Anrechnungen were rejected.'); + + // Get all yesterdays rejections + $this->AnrechnungModel->addSelect('student.student_uid, vorname, nachname, geschlecht, lv.bezeichnung, notiz.text'); + $this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus status', 'anrechnung_id'); + $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->addJoin('public.tbl_notizzuordnung', 'anrechnung_id'); + $this->AnrechnungModel->addJoin('public.tbl_notiz notiz', 'notiz_id'); + + + $result = $this->AnrechnungModel->loadWhere( + '(status.insertamum)::date = (NOW() - INTERVAL \'24 HOURS\')::DATE AND + status.status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_REJECTED). ' AND + notiz.titel = '. $this->db->escape(self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL) + ); + + // Exit if there are no rejected Anrechnungen + if (!hasData($result)) + { + $this->logInfo('ABORTED sending emails to students, whose Anrechnungen were rejected. No new rejectments found.'); + exit; + } + + // Loop through students + foreach ($result->retval as $student) + { + $to = $student->student_uid. '@'. DOMAIN; + + $anrede = $student->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr '; + + $text = <<bezeichnung" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.

    + Begründung: $student->text +html; + + // Prepare mail content + $body_fields = array( + 'anrede_name' => $anrede. $student->vorname. ' '. $student->nachname, + 'text' => $text + ); + + // Send mail + sendSanchoMail( + 'AnrechnungGenehmigen', + $body_fields, + $to, + 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen' + ); + } + + } + // Get STGL mail address private function _getSTGLMailAddress($studiengang_kz) { diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 90753b072..62b01f371 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -137,11 +137,6 @@ class approveAnrechnungDetail extends Auth_Controller 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname ); - - if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED)) - { - show_error('Failed sending mail'); - } } } @@ -186,11 +181,6 @@ class approveAnrechnungDetail extends Auth_Controller 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'), 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname ); - - if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED)) - { - show_error('Failed sending mail'); - } } } @@ -471,42 +461,7 @@ class approveAnrechnungDetail extends Auth_Controller show_error('You are not entitled to read this document'); } - - /** - * Send mail to student to inform if Anrechnung was approved or rejected - * @param $mail_params - */ - private function _sendSanchoMailToStudent($anrechnung_id, $status_kurzbz) - { - $result = getData($this->anrechnunglib->getStudentData($anrechnung_id))[0]; - - // Get student name and mail address - $to = $result->uid. '@'. DOMAIN; - - $anrede = $result->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr '; - - $text = $status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED - ? 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'. - $result->lv_bezeichnung. '" wurde stattgegeben.' - : 'wir haben Ihren Antrag auf Anerkennung nachgewiesener Kenntnisse geprüft und können die Lehrveranstaltung "'. - $result->lv_bezeichnung. '" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.'; - - // Prepare mail content - $body_fields = array( - 'anrede_name' => $anrede. $result->vorname. ' '. $result->nachname, - 'text' => $text - ); - - sendSanchoMail( - 'AnrechnungGenehmigen', - $body_fields, - $to, - 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen' - ); - - return true; - } - + /** * Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv) * @param $mail_params diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index cf19bef4d..3b5f8e8b3 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -107,11 +107,6 @@ class approveAnrechnungUebersicht extends Auth_Controller 'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED, 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED) ); - - if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED)) - { - show_error('Failed sending mail'); - } } } @@ -148,11 +143,6 @@ class approveAnrechnungUebersicht extends Auth_Controller 'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED, 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_REJECTED) ); - - if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED)) - { - show_error('Failed sending mail'); - } } } @@ -304,41 +294,6 @@ class approveAnrechnungUebersicht extends Auth_Controller show_error('You are not entitled to read this document'); } - /** - * Send mail to student to inform if Anrechnung was approved or rejected - * @param $mail_params - */ - private function _sendSanchoMailToStudent($anrechnung_id, $status_kurzbz) - { - $result = getData($this->anrechnunglib->getStudentData($anrechnung_id))[0]; - - // Get student name and mail address - $to = $result->uid. '@'. DOMAIN; - - $anrede = $result->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr '; - - $text = $status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED - ? 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'. - $result->lv_bezeichnung. '" wurde stattgegeben.' - : 'wir haben Ihren Antrag auf Anerkennung nachgewiesener Kenntnisse geprüft und können die Lehrveranstaltung "'. - $result->lv_bezeichnung. '" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.'; - - // Prepare mail content - $body_fields = array( - 'anrede_name' => $anrede. $result->vorname. ' '. $result->nachname, - 'text' => $text - ); - - sendSanchoMail( - 'AnrechnungGenehmigen', - $body_fields, - $to, - 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen' - ); - - return true; - } - /** * Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv) * @param $mail_params From b9955c14a6620e2845561fae340ae531a34857f3 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 13 Apr 2021 16:33:53 +0200 Subject: [PATCH 060/187] Minor code changes for better maintainance Signed-off-by: cris-technikum --- .../anrechnung/ApproveAnrechnungDetail.php | 18 +++++++----- .../ApproveAnrechnungUebersicht.php | 16 +++++----- application/libraries/AnrechnungLib.php | 29 ++++++++++++------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php index 62b01f371..ae685f301 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php @@ -114,7 +114,8 @@ class approveAnrechnungDetail extends Auth_Controller { $data = $this->input->post('data'); - if(isEmptyArray($data)) + // Validate data + if (isEmptyArray($data)) { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } @@ -124,11 +125,11 @@ class approveAnrechnungDetail extends Auth_Controller { show_error('Failed retrieving person data'); } - + + // Approve Anrechnung foreach ($data as $item) { - // Approve Anrechnung - if(getData($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))) + if ($this->anrechnunglib->approveAnrechnung($item['anrechnung_id'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], @@ -158,7 +159,8 @@ class approveAnrechnungDetail extends Auth_Controller { $data = $this->input->post('data'); - if(isEmptyArray($data)) + // Validate data + if (isEmptyArray($data)) { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } @@ -168,11 +170,11 @@ class approveAnrechnungDetail extends Auth_Controller { show_error('Failed retrieving person data'); } - + + // Reject Anrechnung foreach ($data as $item) { - // Reject Anrechnung - if(getData($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung']))) + if ($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php index 3b5f8e8b3..d59d97514 100644 --- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php +++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php @@ -92,15 +92,16 @@ class approveAnrechnungUebersicht extends Auth_Controller { $data = $this->input->post('data'); - if(isEmptyArray($data)) + // Validate data + if (isEmptyArray($data)) { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } - + + // Approve Anrechnung foreach ($data as $item) { - // Approve Anrechnung - if(getData($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))) + if ($this->anrechnunglib->approveAnrechnung($item['anrechnung_id'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], @@ -128,15 +129,16 @@ class approveAnrechnungUebersicht extends Auth_Controller { $data = $this->input->post('data'); - if(isEmptyArray($data)) + // Validate data + if (isEmptyArray($data)) { return $this->outputJsonError('Fehler beim Übertragen der Daten.'); } + // Reject Anrechnung foreach ($data as $item) { - // Reject Anrechnung - if(getData($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung']))) + if ($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung'])) { $json[]= array( 'anrechnung_id' => $item['anrechnung_id'], diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php index a4fd8690d..edc3d5ea2 100644 --- a/application/libraries/AnrechnungLib.php +++ b/application/libraries/AnrechnungLib.php @@ -420,7 +420,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 @@ -445,10 +445,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); // approved + return true; // approved } /** @@ -469,16 +469,14 @@ class AnrechnungLib // Exit if already approved or rejected if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED) { - return success(false); // dont reject + return false; // dont reject } + + // Start DB transaction + $this->ci->db->trans_start(false); // Insert new status rejected - $result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED); - - if (isError($result)) - { - show_error(getError($result)); - } + $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED); // Add begruendung as notiz $this->ci->load->model('person/Notiz_model', 'NotizModel'); @@ -488,8 +486,17 @@ class AnrechnungLib $begruendung, getAuthUID() ); + + // Transaction complete + $this->ci->db->trans_complete(); + + if ($this->ci->db->trans_status() === false) + { + $this->ci->db->trans_rollback(); + return false; + } - return success(true); // rejected + return true; // rejected } /** From ca378ef13b70bb40150adc5f079e89bd8cf5db15 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 13 Apr 2021 17:35:55 +0200 Subject: [PATCH 061/187] Added header filter to all hidden table columns Signed-off-by: cris-technikum --- .../anrechnung/approveAnrechnungUebersichtData.php | 14 +++++++------- .../anrechnung/reviewAnrechnungUebersichtData.php | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index 34bc22c29..2dd785023 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -160,12 +160,12 @@ $filterWidgetArray = array( } }', // tabulator properties 'datasetRepFieldsDefs' => '{ - anrechnung_id: {visible: false}, - lehrveranstaltung_id: {visible: false}, - begruendung_id: {visible: false}, - dms_id: {visible: false}, - studiensemester_kurzbz: {visible: false}, - studiengang_kz: {visible: false}, + anrechnung_id: {visible: false, headerFilter:"input"}, + lehrveranstaltung_id: {visible: false, headerFilter:"input"}, + begruendung_id: {visible: false, headerFilter:"input"}, + dms_id: {visible: false, headerFilter:"input"}, + studiensemester_kurzbz: {visible: false, headerFilter:"input"}, + studiengang_kz: {visible: false, headerFilter:"input"}, stg_bezeichnung: {headerFilter:"input"}, orgform_kurzbz: {headerFilter:"input"}, ausbildungssemester: {headerFilter:"input"}, @@ -182,7 +182,7 @@ $filterWidgetArray = array( 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_kurzbz: {visible: false, headerFilter:"input"}, status_bezeichnung: {headerFilter:"input"}, empfehlungsanfrageAm: {visible: false, align:"center", headerFilter:"input", mutator: mut_formatStringDate}, empfehlungsanfrageAn: {visible: false, headerFilter:"input"} diff --git a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php index f83851183..e5899f437 100644 --- a/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/reviewAnrechnungUebersichtData.php @@ -122,12 +122,12 @@ $filterWidgetArray = array( } }', // tabulator properties 'datasetRepFieldsDefs' => '{ - anrechnung_id: {visible: false}, - lehrveranstaltung_id: {visible: false}, - begruendung_id: {visible: false}, - dms_id: {visible: false}, - studiensemester_kurzbz: {visible: false}, - studiengang_kz: {visible: false}, + anrechnung_id: {visible: false, headerFilter:"input"}, + lehrveranstaltung_id: {visible: false, headerFilter:"input"}, + begruendung_id: {visible: false, headerFilter:"input"}, + dms_id: {visible: false, headerFilter:"input"}, + studiensemester_kurzbz: {visible: false, headerFilter:"input"}, + studiengang_kz: {visible: false, headerFilter:"input"}, stg_bezeichnung: {headerFilter:"input"}, lv_bezeichnung: {headerFilter:"input"}, ects: {headerFilter:"input", align:"center"}, @@ -142,7 +142,7 @@ $filterWidgetArray = array( 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_kurzbz: {visible: false, headerFilter:"input"}, status_bezeichnung: {headerFilter:"input"} }', // col properties ); From 3d574c30b7f30023c860add8734a95e2f30e8634 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 14 Apr 2021 11:07:20 +0200 Subject: [PATCH 062/187] Adapted job sendMailtoSTGL: interval '24 hours' instead of '1 day' Signed-off-by: cris-technikum --- application/controllers/jobs/AnrechnungJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php index 9a2b79e6e..39a22943e 100644 --- a/application/controllers/jobs/AnrechnungJob.php +++ b/application/controllers/jobs/AnrechnungJob.php @@ -109,7 +109,7 @@ class AnrechnungJob extends JOB_Controller $this->AnrechnungModel->addOrder('lv.studiengang_kz, lv.bezeichnung'); $result = $this->AnrechnungModel->loadWhere( - '(lehre.tbl_anrechnung.insertamum)::date = (NOW() - INTERVAL \'1 DAY\')::DATE' + '(lehre.tbl_anrechnung.insertamum)::date = (NOW() - INTERVAL \'24 HOURS\')::DATE' ); // Exit if there are no Anrechnungen From bc7e3c5cc5a93aaeb764cfd2d4c53c5c9db69056 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 20 Apr 2021 13:51:41 +0200 Subject: [PATCH 063/187] zgv ueberpruefung hinzugefuegt --- .../system/infocenter/InfoCenter.php | 154 +++++++------- .../system/infocenter/ZGVUeberpruefung.php | 40 +++- .../models/crm/ZGVPruefungStatus_model.php | 33 +++ .../system/infocenter/infocenterData.php | 31 ++- .../system/infocenter/infocenterDetails.php | 9 +- .../infocenter/infocenterZgvDetails.php | 78 +++++-- .../infocenterZgvUeberpruefungData.php | 22 +- .../views/system/infocenter/zgvpruefungen.php | 23 +- public/js/infocenter/infocenterDetails.js | 103 +-------- public/js/infocenter/zgvUeberpruefung.js | 189 +++++++++++++++++ system/dbupdate_3.3.php | 1 + system/filtersupdate.php | 55 ++++- system/phrasesupdate.php | 196 +++++++++--------- 13 files changed, 602 insertions(+), 332 deletions(-) create mode 100644 public/js/infocenter/zgvUeberpruefung.js diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index a441a43d9..f0183c981 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -15,10 +15,13 @@ class InfoCenter extends Auth_Controller const ZGVPRUEFUNG_MAIL_VORLAGE = 'InfocenterMailZgvUeberpruefung'; const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller + const ZGV_UEBERPRUEFUNG_URI = 'system/infocenter/ZGVUeberpruefung'; const INDEX_PAGE = 'index'; const FREIGEGEBEN_PAGE = 'freigegeben'; const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert'; const SHOW_DETAILS_PAGE = 'showDetails'; + const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails'; + const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung'; const NAVIGATION_PAGE = 'navigation_page'; const ORIGIN_PAGE = 'origin_page'; @@ -64,6 +67,18 @@ class InfoCenter extends Auth_Controller 'name' => 'Note updated', 'message' => 'Note with title %s was updated', 'success' => null + ), + 'updatezgv' => array( + 'logtype' => 'Action', + 'name' => 'ZGV pruefung updated', + 'message' => 'ZGV with the ID %s was updated to %s', + 'success' => null + ), + 'newzgv' => array( + 'logtype' => 'Action', + 'name' => 'ZGV pruefung added', + 'message' => 'ZGV with the ID %s was added', + 'success' => null ) ); @@ -86,7 +101,7 @@ class InfoCenter extends Auth_Controller 'freigegeben' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', - 'showZGVDetails' => 'infocenter:r', + 'showZGVDetails' => 'lehre/zgvpruefung:r', 'unlockPerson' => 'infocenter:rw', 'saveFormalGeprueft' => 'infocenter:rw', 'getPrestudentData' => 'infocenter:r', @@ -95,7 +110,7 @@ class InfoCenter extends Auth_Controller 'saveBewPriorisierung' => 'infocenter:rw', 'saveZgvPruefung' => 'infocenter:rw', 'zgvRueckfragen' => 'infocenter:rw', - 'zgvStatusUpdate' => 'infocenter:rw', + 'zgvStatusUpdate' => 'lehre/zgvpruefung:rw', 'saveAbsage' => 'infocenter:rw', 'saveFreigabe' => 'infocenter:rw', 'getNotiz' => 'infocenter:r', @@ -190,6 +205,8 @@ class InfoCenter extends Auth_Controller */ public function showZGVDetails() { + $this->_setNavigationMenuShowDetails(self::SHOW_ZGV_DETAILS_PAGE); + $prestudent_id = $this->input->get('prestudent_id'); if (!is_numeric($prestudent_id)) @@ -203,38 +220,26 @@ class InfoCenter extends Auth_Controller if (!hasData($prestudentexists)) show_error('Prestudent does not exist!'); - $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); - if (isError($zgvExist)) - show_error(getError($zgvExist)); + if (isError($zgv)) + show_error(getError($zgv)); - if (!hasData($zgvExist)) - show_error('ZGV does not exist!'); - - $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); - $this->ZGVPruefungStatusModel->addLimit(1); - - $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id)); - - if (isError($statusZGV)) - show_error(getError($statusZGV)); - - if (!hasData($statusZGV)) + if (!hasData($zgv)) show_error('ZGV has no status.'); - $statusZGV = array('status' => $statusZGV->retval[0]->status); - $origin_page = $this->input->get(self::ORIGIN_PAGE); - - - $persondata = $this->_loadPersonData($prestudentexists->retval[0]->person_id); - + $persondata = $this->_loadPersonData(getData($prestudentexists)[0]->person_id); $prestudent_id = array('prestudent_id' => $prestudent_id); + $status = array('status' => getData($zgv)[0]->status); + $data = array_merge( $persondata, $prestudent_id, - $statusZGV + $status ); + $origin_page = $this->input->get(self::ORIGIN_PAGE); + $data[self::FHC_CONTROLLER_ID] = $this->getControllerId(); $data[self::ORIGIN_PAGE] = $origin_page; $data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID); @@ -521,30 +526,27 @@ class InfoCenter extends Auth_Controller $person_id = $this->input->post('person_id'); $status = $this->input->post('status'); - if (isEmptyString($prestudent_id) && isEmptyString($person_id) && isEmptyString($status)) - return $this->outputJsonError('Some data is missing'); + if (isEmptyString($prestudent_id) || isEmptyString($person_id) || isEmptyString($status)) + $this->terminateWithJsonError('Some data is missing'); - $zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + $personInfos = $this->PrestudentModel->getPrestudentWithZgv($prestudent_id); + + if (!hasData($personInfos)) + $this->terminateWithJsonError('Person id nicht gefunden'); + + $personInfos = getData($personInfos); + + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); if (!hasData($zgv)) - return $this->outputJsonError('ZGV nicht gefunden'); + $this->terminateWithJsonError('ZGV-Status nicht gefunden'); $zgv = getData($zgv); - $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); - $this->ZGVPruefungStatusModel->addLimit(1); - $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id)); - - if (!hasData($statusZGV)) - return $this->outputJsonError('ZGV-Status nicht gefunden'); - - $statusZGV = getData($statusZGV); - - if ($statusZGV[0]->status === 'rejected' && $status === 'rejected') - return $this->outputJsonError('Bereits abgelehnt worden'); - elseif ($statusZGV[0]->status === 'accepted' && $status === 'accepted') - return $this->outputJsonError('Bereits akzeptiert worden'); - + if ($zgv[0]->status === 'rejected' && $status === 'rejected') + $this->terminateWithJsonError('Bereits abgelehnt worden'); + elseif ($zgv[0]->status === 'accepted' && $status === 'accepted') + $this->terminateWithJsonError('Bereits akzeptiert worden'); $insert = $this->ZGVPruefungStatusModel->insert( array( @@ -561,16 +563,23 @@ class InfoCenter extends Auth_Controller ) ); - if (isError($insert) && isError($update)) - return $this->outputJsonError('Fehler beim Speichern'); + if (isError($insert) || isError($update)) + $this->terminateWithJsonError('Fehler beim Speichern'); - $personInfos = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + $allZgvs = $this->ZGVPruefungStatusModel->getOpenZgvByPerson($personInfos->person_id, array('pruefung_stg')); + $openZgv = false; + + if (hasData($allZgvs)) + $openZgv = true; + + $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, $status)); $this->outputJsonSuccess( array ( 'msg' => 'Erfolgreich gespeichert', - 'person_id' => $personInfos['person_id'] + 'person_id' => $personInfos->person_id, + 'openZgv' => $openZgv ) ); @@ -585,28 +594,19 @@ class InfoCenter extends Auth_Controller $prestudent_id = $this->input->post('prestudent_id'); $person_id = $this->input->post('person_id'); - if (isEmptyString($prestudent_id) && isEmptyString($person_id)) - return $this->outputJsonError('Prestudentid OR/AND Personid missing'); + if (isEmptyString($prestudent_id) || isEmptyString($person_id)) + $this->terminateWithJsonError('Prestudentid OR/AND Personid missing'); - $zgv = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); - $sg = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); - $mail = $sg['studiengang_mail']; + $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id); + $data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + $mail = $data['studiengang_mail']; if (hasData($zgv)) { $zgv = getData($zgv); - $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC'); - $this->ZGVPruefungStatusModel->addLimit(1); - $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgv[0]->zgvpruefung_id)); - - if (!hasData($statusZGV)) - return $this->outputJsonError('ZGV-Status nicht gefunden'); - - $statusZGV = getData($statusZGV); - - if ($statusZGV[0]->status === 'pruefung_stg') - return $this->outputJsonError('Bereits in Prüfung'); + if ($zgv[0]->status === 'pruefung_stg') + $this->terminateWithJsonError('Bereits in Prüfung'); $insert = $this->ZGVPruefungStatusModel->insert( array( @@ -615,7 +615,7 @@ class InfoCenter extends Auth_Controller ) ); - $update = $this->ZGVPruefungModel->update( + $this->ZGVPruefungModel->update( $zgv[0]->zgvpruefung_id, array( 'updateamum' => date('Y-m-d H:i:s'), @@ -623,11 +623,12 @@ class InfoCenter extends Auth_Controller ) ); - if (isSuccess($insert) && isSuccess($update)) - $this->sendZgvMail($mail); - elseif (isError($insert) && isError($update)) - return $this->outputJsonError('Fehler beim Speichern'); + $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg')); + if (isSuccess($insert)) + $this->sendZgvMail($mail); + elseif (isError($insert)) + $this->terminateWithJsonError('Fehler beim Speichern'); }else { $insert = $this->ZGVPruefungModel->insert( @@ -648,18 +649,25 @@ class InfoCenter extends Auth_Controller ) ); + $this->_log($person_id, 'newzgv', array($zgvpruefung_id)); + if (isSuccess($result)) $this->sendZgvMail($mail); elseif (isError($result)) - return $this->outputJsonError('Fehler beim Speichern'); + $this->terminateWithJsonError('Fehler beim Speichern'); } } + $hold = false; + if ($this->personloglib->getOnHoldDate($person_id) !== null) + $hold = true; + $this->outputJsonSuccess( array ( 'msg' => 'Erfolgreich gespeichert', - 'person_id' => $sg['person_id'] + 'person_id' => $data['person_id'], + 'hold' => $hold ) ); } @@ -1293,9 +1301,9 @@ class InfoCenter extends Auth_Controller /** * Define the navigation menu for the showDetails page */ - private function _setNavigationMenuShowDetails() + private function _setNavigationMenuShowDetails($page = self::SHOW_DETAILS_PAGE) { - $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::SHOW_DETAILS_PAGE)); + $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.$page)); $origin_page = $this->input->get(self::ORIGIN_PAGE); @@ -1308,6 +1316,8 @@ class InfoCenter extends Auth_Controller { $link = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); } + if ($origin_page === self::ZGV_UBERPRUEFUNG_PAGE) + $link = site_url(self::ZGV_UEBERPRUEFUNG_URI); $prevFilterId = $this->input->get(self::PREV_FILTER_ID); if (isset($prevFilterId)) @@ -1457,7 +1467,7 @@ class InfoCenter extends Auth_Controller * @param $person_id * @return array */ - private function _loadPersonData($person_id) + public function _loadPersonData($person_id) { $locked = $this->PersonLockModel->checkIfLocked($person_id, self::APP); diff --git a/application/controllers/system/infocenter/ZGVUeberpruefung.php b/application/controllers/system/infocenter/ZGVUeberpruefung.php index 21728ea99..bb0c36b66 100644 --- a/application/controllers/system/infocenter/ZGVUeberpruefung.php +++ b/application/controllers/system/infocenter/ZGVUeberpruefung.php @@ -1,9 +1,9 @@ 'lehre/zgvpruefung:r', + 'getZgvStatusByPrestudent' => 'lehre/zgvpruefung:r' ) ); + $this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel'); + $this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel'); $this->load->library('WidgetLib'); - $this->setControllerId(); // sets the controller id + + $this->setControllerId(); + $this->loadPhrases( + array( + 'infocenter' + ) + ); } public function index() { + $this->load->view('system/infocenter/infocenterZgvUeberpruefung.php'); + } - try{ - $this->load->view('system/infocenter/infocenterZgvUeberpruefung.php'); - }catch(Exception $e) - { - var_dump($e); - } + public function getZgvStatusByPrestudent() + { + $prestudent_id = $this->input->get('prestudent_id'); + + $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id)); + + if (!hasData($zgvExist)) + $this->terminateWithJsonError('no ZGV exist'); + + $status = $this->ZGVPruefungStatusModel->getZgvStatus(getData($zgvExist)[0]->zgvpruefung_id); + + if (!hasData($status)) + $this->terminateWithJsonError('No status'); + + $status = getData($status)[0]->status; + + $this->outputJsonSuccess($status); } } \ No newline at end of file diff --git a/application/models/crm/ZGVPruefungStatus_model.php b/application/models/crm/ZGVPruefungStatus_model.php index 75e57cb05..5c51e45d8 100644 --- a/application/models/crm/ZGVPruefungStatus_model.php +++ b/application/models/crm/ZGVPruefungStatus_model.php @@ -14,4 +14,37 @@ class ZGVPruefungStatus_model extends DB_Model $this->hasSequence = true; } + public function getZgvStatus($zgvpruefung_id) + { + $this->addOrder('datum', 'DESC'); + $this->addLimit(1); + + return $this->loadWhere(array('zgvpruefung_id' => $zgvpruefung_id)); + } + + public function getZgvStatusByPrestudent($prestudent_id) + { + $this->addJoin('public.tbl_zgvpruefung', 'zgvpruefung_id'); + $this->addOrder($this->dbTable . '.datum', 'DESC'); + $this->addLimit(1); + return $this->loadWhere(array('prestudent_id' => $prestudent_id)); + } + + public function getOpenZgvByPerson($person_id, $status) + { + $query = 'SELECT status.zgvpruefung_id, status.datum, status.status + FROM public.tbl_zgvpruefungstatus_status status + INNER JOIN + ( + SELECT zgvpruefung_id, max(datum) as MaxDate + FROM public.tbl_zgvpruefungstatus_status + GROUP BY zgvpruefung_id + ) sub ON status.zgvpruefung_id = sub.zgvpruefung_id AND status.datum = sub.MaxDate + JOIN public.tbl_zgvpruefung ON status.zgvpruefung_id = public.tbl_zgvpruefung.zgvpruefung_id + JOIN public.tbl_prestudent USING (prestudent_id) + WHERE person_id = ? + AND status.status IN ?'; + + return $this->execQuery($query, array($person_id, $status)); + } } \ No newline at end of file diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 0c7030059..8c8f23b15 100644 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -213,7 +213,24 @@ WHERE ps.person_id = p.person_id ORDER BY ps.zgvnation DESC NULLS LAST, ps.prestudent_id DESC LIMIT 1 - ) AS "ZGVNation" + ) AS "ZGVNation", + ( + SELECT tbl_organisationseinheit.bezeichnung + FROM public.tbl_benutzerfunktion + JOIN public.tbl_organisationseinheit USING(oe_kurzbz) + WHERE (tbl_benutzerfunktion.datum_von IS NULL OR tbl_benutzerfunktion.datum_von <= now()) + AND (tbl_benutzerfunktion.datum_bis IS NULL OR tbl_benutzerfunktion.datum_bis >= now()) + AND tbl_benutzerfunktion.uid = ( + SELECT l.insertvon + FROM system.tbl_log l + WHERE l.taetigkeit_kurzbz IN ('.$TAETIGKEIT_KURZBZ.') + AND l.logdata->>\'name\' NOT IN ('.$LOGDATA_NAME.') + AND l.person_id = p.person_id + ORDER BY l.zeitpunkt DESC + LIMIT 1 + ) + LIMIT 1 + ) AS "InfoCenterMitarbeiter" FROM public.tbl_person p LEFT JOIN ( SELECT tpl.person_id, @@ -298,7 +315,8 @@ ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')', ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')', - 'ZGV Nation' + 'ZGV Nation', + 'InfoCenter Mitarbeiter' ), 'formatRow' => function($datasetRaw) { @@ -380,6 +398,15 @@ $datasetRaw->{'ZGVNation'} = '-'; } + if ($datasetRaw->{'InfoCenterMitarbeiter'} === 'InfoCenter') + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Ja'; + } + else + { + $datasetRaw->{'InfoCenterMitarbeiter'} = 'Nein'; + } + return $datasetRaw; }, 'markRow' => function($datasetRaw) { diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index d8e7c21d2..a448e95ce 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -25,7 +25,8 @@ 'public/js/bootstrapper.js', 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', - 'public/js/infocenter/infocenterDetails.js' + 'public/js/infocenter/infocenterDetails.js', + 'public/js/infocenter/zgvUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( @@ -43,7 +44,11 @@ 'nichtsZumEntfernen', 'fehlerBeimEntfernen', 'rueckstelldatumUeberschritten', - 'parkenZurueckstellenInfo' + 'parkenZurueckstellenInfo', + 'zgvInPruefung', + 'zgvErfuellt', + 'zgvNichtErfuellt', + 'zgvErfuelltPruefung' ), 'ui' => array( 'gespeichert', diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index c6af4c436..20c573e34 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -25,7 +25,8 @@ 'public/js/bootstrapper.js', 'public/js/tablesort/tablesort.js', 'public/js/infocenter/messageList.js', - 'public/js/infocenter/infocenterDetails.js' + 'public/js/infocenter/infocenterDetails.js', + 'public/js/infocenter/zgvUeberpruefung.js' ), 'phrases' => array( 'infocenter' => array( @@ -34,8 +35,9 @@ 'nichtsZumEntfernen', 'fehlerBeimEntfernen', 'zgvInPruefung', - 'zgvAkzeptiert', - 'zgvAbgelehnt' + 'zgvErfuellt', + 'zgvNichtErfuellt', + 'zgvErfuelltPruefung' ), 'ui' => array( 'gespeichert', @@ -116,36 +118,66 @@ load->view('system/infocenter/dokpruefung.php', array('formalReadonly' => true)); ?> -
    +
    - - p->t('infocenter', 'zgvInPruefung'); - break; - case 'accepted' : - echo $this->p->t('infocenter', 'zgvAkzeptiert'); - break; - case 'rejected' : - echo $this->p->t('infocenter', 'zgvAbgelehnt'); - break; - } - ?> + + -
    - +
    + +
    diff --git a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php index ff1b85d9e..d2bf62dab 100644 --- a/application/views/system/infocenter/infocenterZgvUeberpruefungData.php +++ b/application/views/system/infocenter/infocenterZgvUeberpruefungData.php @@ -4,7 +4,6 @@ $APP = '\'infocenter\''; $INTERESSENT_STATUS = '\'Interessent\''; $TAETIGKEIT_KURZBZ = '\'bewerbung\', \'kommunikation\''; $LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'New application\''; -$STATUS = '\'pruefung_stg\''; $uid = get_uid(); $rechte = new benutzerberechtigung(); @@ -17,14 +16,14 @@ $query = ' ps.prestudent_id AS "PreStudentID", p.vorname AS "Vorname", p.nachname AS "Nachname", - sg.kurzbzlang AS "Studiengang" + sg.kurzbzlang AS "Studiengang", + zgvstatus.status as "Status" FROM public.tbl_zgvpruefungstatus_status zgvstatus JOIN public.tbl_zgvpruefung zgv USING (zgvpruefung_id) JOIN public.tbl_prestudent ps USING (prestudent_id) JOIN public.tbl_person p USING(person_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) - WHERE zgvstatus.status = ' . $STATUS . ' - AND oe_kurzbz IN ('. $oeKurz .') + WHERE oe_kurzbz IN ('. $oeKurz .') AND zgvstatus.datum IN ( SELECT MAX(zgvstatus.datum) FROM public.tbl_zgvpruefungstatus_status zgvstatus GROUP BY zgvstatus.zgvpruefung_id) @@ -50,11 +49,24 @@ $filterWidgetArray = array( 'Details', site_url('system/infocenter/InfoCenter/showZGVDetails'), $datasetRaw->{'PreStudentID'}, - 'zgvUeberpruefung', + 'ZGVUeberpruefung', (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') ); + switch ($datasetRaw->{'Status'}) + { + case 'accepted' : + $datasetRaw->{'Status'} = $this->p->t('infocenter', 'zgvErfuellt'); + break; + case 'rejected' : + $datasetRaw->{'Status'} = $this->p->t('infocenter', 'zgvNichtErfuellt'); + break; + case 'accepted_pruefung' : + $datasetRaw->{'Status'} = $this->p->t('infocenter', 'zgvErfuelltPruefung'); + break; + } + return $datasetRaw; }, ); diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index eccbbd4ee..6cc9f2f7a 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -311,31 +311,14 @@
    -
    +
    - - - statusZGV)) - { - switch ($zgvpruefung->statusZGV) - { - case 'pruefung_stg' : - echo $this->p->t('infocenter', 'zgvInPruefung'); - break; - case 'accepted' : - echo $this->p->t('infocenter', 'zgvAkzeptiert'); - break; - case 'rejected' : - echo $this->p->t('infocenter', 'zgvAbgelehnt'); - break; - } - } - ?> +
    diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index d0668bbbc..6c094f23f 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -221,70 +221,6 @@ var InfocenterDetails = { } ); }, - zgvRueckfragen: function(data) - { - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + '/zgvRueckfragen', - data, - { - successCallback: function(data, textStatus, jqXHR) - { - if (FHC_AjaxClient.hasData(data)) - { - var response = FHC_AjaxClient.getData(data); - - var date = new Date(); - date.setDate(date.getDate() + 14); - - var dd = date.getDate(); - var mm = date.getMonth() + 1; - var y = date.getFullYear(); - - var formatedDate = mm + '/'+ dd + '/'+ y; - InfocenterDetails.setPersonOnHold(response.person_id, formatedDate); - - $('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', 'zgvInPruefung')); - InfocenterDetails._refreshZgv(); - FHC_DialogLib.alertSuccess(response.msg); - } else if(FHC_AjaxClient.isError(data)) - FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); - }, - errorCallback: function(jqXHR, textStatus, errorThrown) - { - FHC_DialogLib.alertError((jqXHR.responseText)); - } - } - ); - }, - zgvStatusUpdate: function(data) - { - var status = data.status; - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + '/zgvStatusUpdate', - data, - { - successCallback: function(data, textStatus, jqXHR) - { - if (FHC_AjaxClient.hasData(data)) - { - var response = FHC_AjaxClient.getData(data) - FHC_DialogLib.alertSuccess(response.msg); - InfocenterDetails.removePersonOnHold(response.person_id); - if (status === 'rejected') - var p = 'zgvAbgelehnt' - else if (status === 'accepted') - var p = 'zgvAkzeptiert'; - $('#zgvStatusText').text(FHC_PhrasesLib.t('infocenter', p)); - } else if (FHC_AjaxClient.isError(data)) - FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); - }, - errorCallback: function(jqXHR, textStatus, errorThrown) - { - FHC_DialogLib.alertError((jqXHR.responseText)); - } - } - ); - }, saveZgv: function(data) { @@ -405,8 +341,9 @@ var InfocenterDetails = { } ); }, - saveNotiz: function(personid, data) + saveNotiz: function(personid, data, callback) { + var callbackValue = data; FHC_AjaxClient.ajaxCallPost( CALLED_PATH + '/saveNotiz/' + encodeURIComponent(personid), data, @@ -416,6 +353,8 @@ var InfocenterDetails = { { InfocenterDetails._refreshNotizen(); InfocenterDetails._refreshLog(); + if ($.isFunction(callback)) + callback(callbackValue); } else { @@ -811,38 +750,8 @@ var InfocenterDetails = { InfocenterDetails.zgvUebernehmen(personid, prestudentid, btn); }); - $('.zgvRueckfragen').click(function () - { - //var btn = $(this); - var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - //$('#zgvUebernehmenNotice').remove(); - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid - } - InfocenterDetails.zgvRueckfragen(data); - }); - - $('.zgvAkzeptieren').click(function (){ - var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid, - 'status' : 'accepted' - } - InfocenterDetails.zgvStatusUpdate(data); - }); - - $('.zgvAblehnen').click(function (){ - var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid, - 'status' : 'rejected' - } - InfocenterDetails.zgvStatusUpdate(data); + $('.notizModal').on('hidden.bs.modal', function () { + $(':input', this).val(''); }); //zgv speichern diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js new file mode 100644 index 000000000..e76dcee2e --- /dev/null +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -0,0 +1,189 @@ +$(document).ready(function () +{ + var personid = $("#hiddenpersonid").val(); + + if ($('#zgvpruefungen').length) + { + $('#zgvpruefungen .zgvRueckfragen').each(function() { + if($(this).is(':disabled')) { + zgvUeberpruefung.checkStatus(InfocenterDetails._getPrestudentIdFromElementId($(this).attr('id'))); + } + }); + } else + { + zgvUeberpruefung.checkStatus(); + } + + $('.zgvRueckfragen').click(function () + { + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid + } + zgvUeberpruefung.zgvRueckfragen(data); + }); + + $('.zgvAkzeptieren').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid, + 'status' : 'accepted' + } + zgvUeberpruefung.zgvStatusUpdate(data); + }); + + $('.zgvAblehnen').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + $('#inputStatus_' + prestudentid).val('rejected'); + $('#notizModal_' + prestudentid).modal('show'); + }); + + $('.zgvAkzeptierenPruefung').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + $('#inputStatus_' + prestudentid).val('accepted_pruefung'); + $('#notizModal_' + prestudentid).modal('show'); + }); + + $('.saveZgvNotiz').click(function (){ + var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); + + if ($('#inputNotizTitelModal').val() === '' || $('#inputNotizTextModal').val() === '') + return FHC_DialogLib.alertWarning('Please fill out all fields'); + + var data = { + 'person_id' : personid, + 'notiztitel' : $('#inputNotizTitelModal').val(), + 'notiz' : $('#inputNotizTextModal').val(), + 'prestudent_id' : prestudentid, + 'status' : $('#inputStatus_' + prestudentid).val() + } + + InfocenterDetails.saveNotiz(personid, data, zgvUeberpruefung.zgvStatusUpdate); + + $('#notizModal_' + prestudentid).modal('hide'); + }); +}); + +var zgvUeberpruefung = { + checkStatus: function(prestudent_id) + { + if (prestudent_id === undefined) + prestudent_id = zgvUeberpruefung.getPrestudentId(); + + FHC_AjaxClient.ajaxCallGet( + "system/infocenter/ZGVUeberpruefung/getZgvStatusByPrestudent", + { + prestudent_id : prestudent_id + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + $('#zgvBearbeitungButtons_' + prestudent_id +' button').each(function() { + $(this).attr('disabled', false); + }); + var status = FHC_AjaxClient.getData(data); + + switch (status) + { + case 'rejected' : + $('#zgvAblehnen_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvNichtErfuellt')); + break; + case 'accepted' : + $('#zgvAkzeptieren_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvErfuellt')); + break; + case 'accepted_pruefung' : + $('#zgvAkzeptierenPruefung_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvErfuelltPruefung')); + break; + case 'pruefung_stg' : + $('#zgvRueckfragen_' + prestudent_id).attr('disabled', true); + $('#zgvStatusText_' + prestudent_id).text(FHC_PhrasesLib.t('infocenter', 'zgvInPruefung')); + break; + } + } + }, + errorCallback: function(data, textStatus, errorThrown) + { + FHC_DialogLib.alertError(data); + }, + veilTimeout: 0 + } + ); + }, + + zgvRueckfragen: function(data) + { + var prestudent_id = data.prestudent_id; + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/zgvRueckfragen', + data, + { + successCallback: function(data, textStatus, jqXHR) + { + if (FHC_AjaxClient.hasData(data)) + { + zgvUeberpruefung.checkStatus(prestudent_id); + + var response = FHC_AjaxClient.getData(data); + + if (response.hold === false) + { + var datum = new Date(); + datum.setDate(datum.getDate() + 14); + var formatedDate = $.datepicker.formatDate("mm/dd/yy", datum); + InfocenterDetails.setPersonOnHold(response.person_id, formatedDate); + } + + FHC_DialogLib.alertSuccess(response.msg); + } else if(FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError((jqXHR.responseText)); + } + } + ); + }, + + zgvStatusUpdate: function(data) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/zgvStatusUpdate', + data, + { + successCallback: function(data, textStatus, jqXHR) + { + if (FHC_AjaxClient.hasData(data)) + { + zgvUeberpruefung.checkStatus(); + var response = FHC_AjaxClient.getData(data) + + if (response.openZgv === false) + InfocenterDetails.removePersonOnHold(response.person_id); + + FHC_DialogLib.alertSuccess(response.msg); + } else if (FHC_AjaxClient.isError(data)) + FHC_DialogLib.alertError(FHC_AjaxClient.getError(data)); + }, + errorCallback: function(jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError((jqXHR.responseText)); + } + } + ); + }, + + getPrestudentId: function() + { + var id = $('.zgvBearbeitungButtons .zgvAkzeptierenPruefung').attr('id'); + return InfocenterDetails._getPrestudentIdFromElementId(id); + } +} \ No newline at end of file diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index a20892fb4..6ccf5de37 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4715,6 +4715,7 @@ if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_zgvpruefungstatus LIMIT 1 INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('pruefung_stg', 'Wird vom Studiengang geprüft'); INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('rejected', 'Vom Studiengang abgelehnt'); INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted', 'Vom Studiengang akzeptiert'); + INSERT INTO public.tbl_zgvpruefungstatus(status_kurzbz, bezeichnung) VALUES('accepted_pruefung', 'Vom Studiengang akzeptiert mit Prüfung'); GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_zgvpruefungstatus TO vilesci; GRANT SELECT ON public.tbl_zgvpruefungstatus TO web; diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 180e43cc4..5a5b983a2 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -404,11 +404,58 @@ $filters = array( array( 'app' => 'infocenter', 'dataset_name' => 'zgvUeberpruefung', - 'filter_kurzbz' => 'zgvUeberpruefung', - 'description' => '{ZGV Übersicht}', - 'sort' => 4, + 'filter_kurzbz' => 'zgvOffen', + 'description' => '{ZGV Überprüfung}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Zgv Überprüfung", + "columns": [ + {"name": "PreStudentID"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Studiengang"} + ], + "filters": [ + { + "name": "Status", + "condition": "stg", + "operation": "contains" + } + ] + } + ', + 'oe_kurzbz' => null, + ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'zgvUeberpruefung', + 'filter_kurzbz' => 'zgvRest', + 'description' => '{ZGV abgeschlossen}', + 'sort' => 2, + 'default_filter' => true, + 'filter' => ' + { + "name": "Zgv abgeschlossen", + "columns": [ + {"name": "PreStudentID"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "Studiengang"}, + {"name": "Status"} + ], + "filters": [ + { + "name": "Status", + "condition": "stg", + "operation": "ncontains" + } + ] + } + ', + 'oe_kurzbz' => null, ), - array( 'app' => 'budget', 'dataset_name' => 'budgetoverview', diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index a151a723b..9f9c541d6 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -88,6 +88,26 @@ $phrases = array( ) ) ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'text', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Text', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'text', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', @@ -3006,66 +3026,86 @@ $phrases = array( ) ) ), - array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvRueckfragen', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'ZGV Prüfung beantragen', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'apply for a ZGV examination', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAkzeptieren', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente akzeptieren', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'accept documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvRueckfragen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Prüfung beantragen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'apply for a ZGV examination', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAblehnen', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente ablehnen', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'reject documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvErfuellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV erfüllt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV fulfilled', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvNichtErfuellt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV nicht erfüllt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV unfulfilled', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvErfuelltPruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV erfüllt mit Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'ZGV fulfilled with exam', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'infocenter', 'category' => 'infocenter', @@ -3086,46 +3126,6 @@ $phrases = array( ) ) ), - array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAkzeptiert', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente akzeptiert', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'accepted documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), - array( - 'app' => 'infocenter', - 'category' => 'infocenter', - 'phrase' => 'zgvAbgelehnt', - 'insertvon' => 'system', - 'phrases' => array( - array( - 'sprache' => 'German', - 'text' => 'Dokumente abgelehnt', - 'description' => '', - 'insertvon' => 'system' - ), - array( - 'sprache' => 'English', - 'text' => 'rejected documents', - 'description' => '', - 'insertvon' => 'system' - ) - ) - ), array( 'app' => 'infocenter', 'category' => 'infocenter', From f6f31f7efbb8f4ff93f44d7d5bfd7af3a86eabce Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Apr 2021 15:49:08 +0200 Subject: [PATCH 064/187] Added Berechtigung 'lehre/anrechnung_anlegen' to create Anrechnung Signed-off-by: cris-technikum --- system/dbupdate_3.3.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index d7467ae2c..f80c4b3e5 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4665,6 +4665,20 @@ if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berecht } } +// Add permission to create Anrechnung +if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'lehre/anrechnung_anlegen';")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('lehre/anrechnung_anlegen', 'Anrechnung anlegen');"; + + if(!$db->db_query($qry)) + echo 'system.tbl_berechtigung '.$db->db_last_error().'
    '; + else + echo ' system.tbl_berechtigung: Added permission for lehre/anrechnung_anlegen
    '; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

    Pruefe Tabellen und Attribute!

    '; From 5e77e252c7c8503b6906ef055d955fb165f0505c Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Apr 2021 15:54:16 +0200 Subject: [PATCH 065/187] Added GUI to create Anrechnungsantrag Signed-off-by: cris-technikum --- .../lehre/anrechnung/createAnrechnung.php | 171 ++++++++++++++++++ .../lehre/anrechnung/createAnrechnungData.php | 83 +++++++++ public/css/lehre/anrechnung.css | 7 + system/phrasesupdate.php | 60 ++++++ 4 files changed, 321 insertions(+) create mode 100644 application/views/lehre/anrechnung/createAnrechnung.php create mode 100644 application/views/lehre/anrechnung/createAnrechnungData.php create mode 100644 public/css/lehre/anrechnung.css diff --git a/application/views/lehre/anrechnung/createAnrechnung.php b/application/views/lehre/anrechnung/createAnrechnung.php new file mode 100644 index 000000000..67665e8de --- /dev/null +++ b/application/views/lehre/anrechnung/createAnrechnung.php @@ -0,0 +1,171 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => $this->p->t('anrechnung', 'neueAnrechnung'), + 'jquery' => true, + 'jqueryui' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'ajaxlib' => true, + 'dialoglib' => true, + 'tabulator' => true, + 'tablewidget' => true, + 'phrases' => array( + 'global' => array( + 'anerkennungNachgewiesenerKenntnisse', + 'antragWurdeGestellt', + 'antragBereitsGestellt' + ), + 'ui' => array( + 'hochladen' + ), + 'lehre' => array( + 'studiensemester', + 'studiengang', + 'lehrveranstaltung' + ) + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/lehre/anrechnung/createAnrechnung.js' + ), + 'customCSSs' => array( + 'public/css/lehre/anrechnung.css' + ) + ) +); +?> + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    + widgetlib->widget( + 'Studiensemester_widget', + array( + DropdownWidget::SELECTED_ELEMENT => $studiensemester_selected + ), + array( + 'name' => 'studiensemester', + 'id' => 'studiensemester' + ) + ); + ?> +
    + +
    +
    +
    + + +
    +
    + load->view('lehre/anrechnung/createAnrechnungData.php'); ?> +
    +
    +

    + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    p->t('lehre', 'lehrveranstaltung'); ?> * + +
    p->t('global', 'begruendung'); ?> * + +
    p->t('anrechnung', 'herkunftDerKenntnisse'); ?> + 'textarea-herkunftKenntnisse', + 'name' => 'herkunftKenntnisse', + 'rows' => 1 + )); ?> +
    p->t('anrechnung', 'nachweisdokumente'); ?> * +
    'upload-nachweisdokumente', + 'name' => 'uploadfile', + 'accept' => '.pdf', + 'size' => '50', + 'required' => 'required' + )); ?> +
    + +
    +
    +
    + + +
    +
    + +
    +
    + +
    + + +
    +
    + diff --git a/application/views/lehre/anrechnung/createAnrechnungData.php b/application/views/lehre/anrechnung/createAnrechnungData.php new file mode 100644 index 000000000..cfb453709 --- /dev/null +++ b/application/views/lehre/anrechnung/createAnrechnungData.php @@ -0,0 +1,83 @@ +>' . $LANGUAGE_INDEX . ', + array_to_json(zgv.bezeichnung::varchar[])->>' . $LANGUAGE_INDEX . ' + ) AS zgv + FROM public.tbl_prestudent + LEFT JOIN bis.tbl_zgv zgv USING (zgv_code) + LEFT JOIN bis.tbl_zgvmaster zgvmaster USING (zgvmas_code) + WHERE prestudent_id = pst.prestudent_id + ) AS zgv + FROM public.tbl_prestudent pst + JOIN public.tbl_prestudentstatus pststatus USING (prestudent_id) + JOIN public.tbl_person person USING (person_id) + JOIN public.tbl_student student USING (prestudent_id) + JOIN public.tbl_benutzer benutzer ON benutzer.uid = student.student_uid + JOIN public.tbl_studiengang stg ON stg.studiengang_kz = pst.studiengang_kz + WHERE pststatus.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' + AND pst.studiengang_kz IN (' . $STUDIENGAENGE_ENTITLED . ') + AND benutzer.aktiv = true + ORDER BY "stg_bezeichnung", ausbildungssemester, nachname +'; + +$filterWidgetArray = array( + 'query' => $query, + 'tableUniqueId' => 'createAnrechnung', + 'requiredPermissions' => 'lehre/anrechnung_genehmigen', + 'datasetRepresentation' => 'tabulator', + 'columnsAliases' => array( + 'prestudent_id', + 'person_id', + 'studienplan_id', + 'studiengang_kz', + ucfirst($this->p->t('lehre', 'studiengang')), + 'Semester', + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('person', 'vorname')), + ucfirst($this->p->t('global', 'zgv')) + ), + 'datasetRepOptions' => '{ + height: 300, + layout: "fitColumns", // fit columns to width of table + persistentLayout:true, + autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated + headerFilterPlaceholder: " ", + index: "prestudent_id", // assign specific column as unique id (important for row indexing) + selectable: 1, // allow row selection + selectablePersistence:false, // deselect previously selected rows when table is filtered, sorted or paginated + rowSelected: function(row) { + func_rowSelected(row); + }, + rowSelectionChanged:function(data, rows){ + func_rowSelectionChanged(data, rows); + }, + tableWidgetHeader: false + }', + 'datasetRepFieldsDefs' => '{ + prestudent_id: {visible: false, headerFilter:"input"}, + person_id: {visible: false, headerFilter:"input"}, + studienplan_id: {visible: false, headerFilter:"input"}, + studiengang_kz: {visible: false, headerFilter:"input"}, + stg_bezeichnung: {headerFilter:"input"}, + ausbildungssemester: {headerFilter:"input"}, + nachname: {headerFilter:"input"}, + vorname: {headerFilter:"input"}, + zgv: {headerFilter:"input"} + }' +); + +echo $this->widgetlib->widget('TableWidget', $filterWidgetArray); \ No newline at end of file diff --git a/public/css/lehre/anrechnung.css b/public/css/lehre/anrechnung.css new file mode 100644 index 000000000..36956d79c --- /dev/null +++ b/public/css/lehre/anrechnung.css @@ -0,0 +1,7 @@ +.select-w500 { + width: 500px; +} + +.pl-15 { + padding-left: 15px !important; +} \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 80a9c799f..d60cb8b4c 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10690,6 +10690,66 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'anrechnung', + 'phrase' => 'neueAnrechnung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Neue Anrechnung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "New Exemption", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'antragAnlegen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Antrag anlegen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Create Application", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'keineLVzugeteilt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Dem Studierenden sind keine Lehrveranstaltungen zugeteilt.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "No courses assigned to this student yet.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From b7a6cefa36d4b26b811d98ff4115dd87e55bcb7a Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Tue, 20 Apr 2021 15:56:29 +0200 Subject: [PATCH 066/187] Added Controller to create Anrechnungsantrag + Model Anrechnungbegruendung_model Signed-off-by: cris-technikum --- .../lehre/anrechnung/CreateAnrechnung.php | 243 ++++++++++++++++++ .../education/Anrechnungbegruendung_model.php | 15 ++ 2 files changed, 258 insertions(+) create mode 100644 application/controllers/lehre/anrechnung/CreateAnrechnung.php create mode 100644 application/models/education/Anrechnungbegruendung_model.php diff --git a/application/controllers/lehre/anrechnung/CreateAnrechnung.php b/application/controllers/lehre/anrechnung/CreateAnrechnung.php new file mode 100644 index 000000000..20bf10e2f --- /dev/null +++ b/application/controllers/lehre/anrechnung/CreateAnrechnung.php @@ -0,0 +1,243 @@ + 'lehre/anrechnung_anlegen:r', + 'getLVsByStudent' => 'lehre/anrechnung_anlegen:r', + 'create' => 'lehre/anrechnung_anlegen:rw' + ) + ); + + // Load models + $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); + $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel'); + $this->load->model('content/DmsVersion_model', 'DmsVersionModel'); + $this->load->model('crm/Student_model', 'StudentModel'); + $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel'); + + // 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'); + + // Load language phrases + $this->loadPhrases( + array( + 'global', + 'ui', + 'anrechnung', + 'person', + 'lehre' + ) + ); + + $this->_setAuthUID(); + + $this->setControllerId(); + } + + public function index() + { + // Get Studiensemester + $studiensemester_kurzbz = $this->input->get('studiensemester'); + + // If no Studiensemester is given + if (isEmptyString($studiensemester_kurzbz)) + { + //...use the nearest Studiensemester + $result = $this->StudiensemesterModel->getNearest(); + $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz; + } + + // Get Studiengaenge the user is entitled for + if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_ANLEGEN)) + { + show_error('Failed retrieving Studiengaenge'); + } + + // Get Anrechnungsbegruendungen + $this->load->model('education/Anrechnungbegruendung_model', 'AnrechnungbegruendungModel'); + $begruendung_arr = getData($this->AnrechnungbegruendungModel->load()); + + $viewData = array( + 'studiensemester_selected' => $studiensemester_kurzbz, + 'studiengaenge_entitled' => $studiengang_kz_arr, + 'begruendungen' => $begruendung_arr + ); + + $this->load->view('lehre/anrechnung/createAnrechnung.php', $viewData); + } + + /** + * Get Lehrveranstaltungen from Student. + */ + public function getLVsByStudent() + { + $prestudent_id = $this->input->post('prestudent_id'); + $studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz'); + + // Get Student UID + $student_uid = $this->StudentModel->getUID($prestudent_id); + + // Retrieve Lehrveranstaltungen from student + $result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid, $studiensemester_kurzbz); + + // Exit, if student has no Lehrveranstaltungen + if (!hasData($result)) + { + $this->terminateWithJsonError($this->p->t('ui', 'keineLVzugeteilt')); + } + + // Success response to AJAX + $this->outputJsonSuccess(getData($result)); + } + + /** + * Create Anrechnungsantrag. + * + * Saves Anrechnung and Anrechnungstatus. + * Also saves Nachweisdokument to DMS. + */ + public function create() + { + $prestudent_id = $this->input->post('prestudent_id'); + $studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz'); + $lehrveranstaltung_id = $this->input->post('lehrveranstaltung_id'); + $begruendung_id = $this->input->post('begruendung_id'); + $herkunftKenntnisse = $this->input->post('herkunftKenntnisse'); + + // Validate upload file + if (empty($_FILES['uploadfile']['name'])) + { + $this->terminateWithJsonError($this->p->t('ui', 'errorUploadFehlt')); + } + + // Validate required data + if (isEmptyString($begruendung_id) || isEmptyString($lehrveranstaltung_id)) + { + $this->terminateWithJsonError($this->p->t('ui', 'errorFelderFehlen')); + } + + // Exit if application already exists + if (self::_applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)) + { + $this->terminateWithJsonError($this->p->t('global', 'antragBereitsGestellt')); + } + + // Upload document + $result = self::_uploadFile(); + + if (isError($result)) + { + $this->terminateWithJsonError($result->retval); + } + + // Store just inserted DMS ID + $lastInsert_dms_id = $result->retval['dms_id']; + + // Start DB transaction + $this->db->trans_start(false); + + // Save Anrechnung + $result = $this->AnrechnungModel->insert(array( + 'prestudent_id' => $prestudent_id, + 'lehrveranstaltung_id' => $lehrveranstaltung_id, + 'begruendung_id' => $begruendung_id, + 'dms_id' => $lastInsert_dms_id, + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'anmerkung_student' => $herkunftKenntnisse, + 'insertvon' => $this->_uid + )); + + // Store just inserted Anrechnung ID + $lastInsert_anrechnung_id = $result->retval; + + // Save Anrechnungstatus + $this->AnrechnungModel->saveAnrechnungstatus($lastInsert_anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + + // Transaction complete + $this->db->trans_complete(); + + if ($this->db->trans_status() === false) + { + $this->db->trans_rollback(); + show_error('Failed inserting Anrechnung', EXIT_ERROR); + } + + // Success response to AJAX + $this->outputJsonSuccess($this->p->t('global', 'antragWurdeGestellt')); + } + + + /** + * Retrieve the UID of the logged user and checks if it is valid + */ + private function _setAuthUID() + { + $this->_uid = getAuthUID(); + + if (!$this->_uid) show_error('User authentification failed'); + } + + /** + * Check if application already exists. + * + * @param $lehrveranstaltung_id + * @param $studiensemester_kurzbz + * @param $prestudent_id + * @return bool + */ + private function _applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id) + { + $result = $this->AnrechnungModel->loadWhere(array( + 'lehrveranstaltung_id' => $lehrveranstaltung_id, + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'prestudent_id' => $prestudent_id + )); + + if (isError($result)) + { + show_error(getError($result)); + } + + return hasData($result); + } + + /** + * Upload file via DMS library. + * + * @return mixed + * @throws Exception + */ + private function _uploadFile() + { + $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 + ); + + // Upload document + return $this->dmslib->upload($dms, array('pdf')); + } + +} \ No newline at end of file diff --git a/application/models/education/Anrechnungbegruendung_model.php b/application/models/education/Anrechnungbegruendung_model.php new file mode 100644 index 000000000..81f1ef614 --- /dev/null +++ b/application/models/education/Anrechnungbegruendung_model.php @@ -0,0 +1,15 @@ +dbTable = 'lehre.tbl_anrechnung_begruendung'; + $this->pk = 'begruendung_id'; + } +} From 356435dbdd25c14d0134cd69dace5fba9f56f3e8 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Apr 2021 16:07:11 +0200 Subject: [PATCH 067/187] Added JS to create Anrechnungsantrag + Adapted TableWidget.js option Adapted TableWidgets option 'rowSelectionChanged' to be able to directly define rowSelectionChanged within particular JS file, if needed. Signed-off-by: cris-technikum --- public/js/TableWidget.js | 9 +- .../anrechnung/approveAnrechnungDetail.js | 36 ++++- .../js/lehre/anrechnung/createAnrechnung.js | 146 ++++++++++++++++++ 3 files changed, 181 insertions(+), 10 deletions(-) create mode 100644 public/js/lehre/anrechnung/createAnrechnung.js diff --git a/public/js/TableWidget.js b/public/js/TableWidget.js index c7eea73c3..f3626eec2 100644 --- a/public/js/TableWidget.js +++ b/public/js/TableWidget.js @@ -552,9 +552,12 @@ 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 - options.rowSelectionChanged = function(data, rows){ - _func_rowSelectionChanged(data, rows); - }; + if (options.rowSelectionChanged == 'undefined') + { + options.rowSelectionChanged = function(data, rows){ + _func_rowSelectionChanged(data, rows); + }; + } options.columnVisibilityChanged = function(column, visible) { _func_columnVisibilityChanged(column, visible); }; diff --git a/public/js/lehre/anrechnung/approveAnrechnungDetail.js b/public/js/lehre/anrechnung/approveAnrechnungDetail.js index ed00ddca8..963ccecf9 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungDetail.js +++ b/public/js/lehre/anrechnung/approveAnrechnungDetail.js @@ -24,6 +24,9 @@ $(function(){ // Set status alert color approveAnrechnungDetail.setStatusAlertColor(); + // Set Empfehlungstext + approveAnrechnungDetail.setEmpfehlungstext(); + // Init tooltips approveAnrechnungDetail.initTooltips(); @@ -189,8 +192,9 @@ $(function(){ if (!data.error && data.retval != null) { approveAnrechnungDetail.formatEmpfehlungIsRequested( - data.retval[0].empfehlung_angefordert_am, - data.retval[0].status_bezeichnung + data.retval[0].status_bezeichnung, + data.retval[0].empfehlungsanfrageAm, + data.retval[0].empfehlungsanfrageAn ); } }, @@ -339,6 +343,24 @@ var approveAnrechnungDetail = { $('#approveAnrechnungDetail-status_kurzbz').closest('div').addClass('alert-warning'); } }, + setEmpfehlungstext: function () { + let empfehlung = $('#approveAnrechnungDetail-empfehlung').data('empfehlung'); + + switch (empfehlung) { + case true: + $('#approveAnrechnungDetail-empfehlungDetail-empfehlung') + .addClass('text-success') + .html(FHC_PhrasesLib.t("anrechnung", "empfehlungPositivConfirmed")); + break; + case false: + $('#approveAnrechnungDetail-empfehlungDetail-empfehlung') + .addClass('text-danger') + .html(FHC_PhrasesLib.t("anrechnung", "empfehlungNegativConfirmed")); + break; + default: + $('#approveAnrechnungDetail-empfehlungDetail-empfehlung').html('-'); + } + }, initTooltips: function (){ $('[data-toggle="tooltip"]').tooltip({ delay: { "show": 200, "hide": 200 }, @@ -363,10 +385,9 @@ var approveAnrechnungDetail = { textarea.val($.trim($(elem).parent().find('span:first').text())); } }, - formatEmpfehlungIsRequested: function(empfehlungAngefordertAm, statusBezeichnung) { - $('#approveAnrechnungDetail-empfehlungDetail').children().addClass('hidden'); - $('#approveAnrechnungDetail-empfehlungDetail-empfehlungIsAngefordert').removeClass('hidden'); - $('#approveAnrechnungDetail-empfehlungDetail-empfehlungAngefordertAm').text(empfehlungAngefordertAm); + formatEmpfehlungIsRequested: function(statusBezeichnung, empfehlungsanfrageAm, empfehlungsanfrageAn) { + $('#approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAm').html(empfehlungsanfrageAm); + $('#approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAn').html(empfehlungsanfrageAn); $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); $('#approveAnrechnungDetail-request-recommendation').prop('disabled', true); $('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', true); @@ -429,8 +450,9 @@ var approveAnrechnungDetail = { formatEmpfehlungIsWithdrawed: function (statusBezeichnung){ $('#approveAnrechnungDetail-status_kurzbz').text(statusBezeichnung); - $('#approveAnrechnungDetail-empfehlungDetail-empfehlungIsAngefordert').addClass('hidden'); $('#approveAnrechnungDetail-empfehlungDetail-empfehlungIsNull').removeClass('hidden'); + $('#approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAm').html('-'); + $('#approveAnrechnungDetail-empfehlungDetail-empfehlungsanfrageAn').html('-'); $('#approveAnrechnungDetail-request-recommendation').prop('disabled', false); $('#approveAnrechnungDetail-approve-anrechnung-ask').prop('disabled', false); diff --git a/public/js/lehre/anrechnung/createAnrechnung.js b/public/js/lehre/anrechnung/createAnrechnung.js new file mode 100644 index 000000000..61ad9003a --- /dev/null +++ b/public/js/lehre/anrechnung/createAnrechnung.js @@ -0,0 +1,146 @@ +$(function () { + + // Disable all form fields by default + createAnrechnung.disableFormFields(); + + // Create Anrechnung on form submit + $('#createAnrechnung-submit').click(function(e){ + + // Avoid form redirecting automatically + e.preventDefault(); + + // Get form data + let formData = new FormData($('#createAnrechnung-form')[0]); + + $.ajax({ + url : "CreateAnrechnung/create", + 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 (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertWarning(FHC_AjaxClient.getError(data)); + } + + if (FHC_AjaxClient.hasData(data)) + { + FHC_DialogLib.alertSuccess(FHC_AjaxClient.getData(data)); + } + }, + error: function(jqXHR, textStatus, errorThrown){ + + FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("ui", "systemfehler")); + + } + }); + }); + +}) + +// TABULATOR FUNCTIONS +// --------------------------------------------------------------------------------------------------------------------- +/** + * Set form fields and populate selectmenu with LVs of student + * on row selection. + * + * @param row + */ +function func_rowSelected(row){ + let studiensemester_kurzbz = $('#studiensemester_kurzbz').val(); + let prestudent_id = row.getData().prestudent_id; + let vorname = row.getData().vorname; + let nachname = row.getData().nachname; + + // Set hidden form field Prestudent ID + $('#prestudent_id').val(prestudent_id); + + // Set field StudentIn + $('#student').text(vorname + ' ' + nachname); + + // Populate Select with LVs of student + createAnrechnung.populateSelectWithStudentLVs(prestudent_id, studiensemester_kurzbz); + + // Enable all form fields + createAnrechnung.enableFormFields(); +} + +/** + * Empty and disable form fields + * when none row selected. + * + * @param data + * @param rows + */ +function func_rowSelectionChanged(data, rows){ + + // If no student is selected in the table + if (rows.length == 0) + { + // ...empty form fields + createAnrechnung.emptyFormFields(); + + // ...disable form fields + createAnrechnung.disableFormFields(); + } +} + +// --------------------------------------------------------------------------------------------------------------------- + +var createAnrechnung = { + emptyFormFields: function(){ + + // Empty field StudentIn + $('#student').text(''); + + // Empty form fields (except hidden ones) + $('#createAnrechnung-form :input:not([type=hidden])').val(''); + }, + disableFormFields: function(){ + let prestudent_id = $('#prestudent_id').data('prestudent_id'); + + if (prestudent_id == '') + { + // Disable all form elements + $("#createAnrechnung-form :input").prop("disabled", true); + } + }, + enableFormFields: function(){ + $("#createAnrechnung-form :input").prop("disabled", false); + }, + populateSelectWithStudentLVs: function(prestudent_id, studiensemester_kurzbz){ + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/getLVsByStudent", + {'prestudent_id': prestudent_id, 'studiensemester_kurzbz': studiensemester_kurzbz}, + { + successCallback: function (data, textStatus, jqXHR) + { + if (FHC_AjaxClient.isError(data)) + { + // Print error message + FHC_DialogLib.alertWarning(FHC_AjaxClient.getError(data)); + } + + if (FHC_AjaxClient.hasData(data)) + { + let lehrveranstaltungen = FHC_AjaxClient.getData(data); + + // Remove previous Lehrveranstaltungen + $('#select-lehrveranstaltung option').slice(1).remove(); // Leave first option 'Bitte wählen' + + // Append Lehrveranstaltungen + for (let lv of lehrveranstaltungen){ + $('#select-lehrveranstaltung').append(''); + } + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); + } +} \ No newline at end of file From bb0776a80824b69a5de2d29d84fd55ee6314aac6 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Apr 2021 16:40:19 +0200 Subject: [PATCH 068/187] Added method createAnrechnungsantrag to Anrechnungsmodel + Refactored code Moved code from Controller to Anrechnungmodel. Signed-off-by: cris-technikum --- .../lehre/anrechnung/CreateAnrechnung.php | 38 +++++--------- .../lehre/anrechnung/RequestAnrechnung.php | 40 +++++--------- .../models/education/Anrechnung_model.php | 52 ++++++++++++++++++- 3 files changed, 76 insertions(+), 54 deletions(-) diff --git a/application/controllers/lehre/anrechnung/CreateAnrechnung.php b/application/controllers/lehre/anrechnung/CreateAnrechnung.php index 20bf10e2f..1102b7670 100644 --- a/application/controllers/lehre/anrechnung/CreateAnrechnung.php +++ b/application/controllers/lehre/anrechnung/CreateAnrechnung.php @@ -148,36 +148,22 @@ class CreateAnrechnung extends Auth_Controller $this->terminateWithJsonError($result->retval); } - // Store just inserted DMS ID + // Hold just inserted DMS ID $lastInsert_dms_id = $result->retval['dms_id']; - // Start DB transaction - $this->db->trans_start(false); + // Save Anrechnung and Anrechnungstatus + $result = $this->AnrechnungModel->createAnrechnungsantrag( + $prestudent_id, + $studiensemester_kurzbz, + $lehrveranstaltung_id, + $begruendung_id, + $lastInsert_dms_id, + $herkunftKenntnisse + ); - // Save Anrechnung - $result = $this->AnrechnungModel->insert(array( - 'prestudent_id' => $prestudent_id, - 'lehrveranstaltung_id' => $lehrveranstaltung_id, - 'begruendung_id' => $begruendung_id, - 'dms_id' => $lastInsert_dms_id, - 'studiensemester_kurzbz' => $studiensemester_kurzbz, - 'anmerkung_student' => $herkunftKenntnisse, - 'insertvon' => $this->_uid - )); - - // Store just inserted Anrechnung ID - $lastInsert_anrechnung_id = $result->retval; - - // Save Anrechnungstatus - $this->AnrechnungModel->saveAnrechnungstatus($lastInsert_anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); - - // Transaction complete - $this->db->trans_complete(); - - if ($this->db->trans_status() === false) + if (isError($result)) { - $this->db->trans_rollback(); - show_error('Failed inserting Anrechnung', EXIT_ERROR); + $this->terminateWithJsonError(getError($result)); } // Success response to AJAX diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php index 024e080d7..99d5f7161 100644 --- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php +++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php @@ -158,40 +158,26 @@ class requestAnrechnung extends Auth_Controller return $this->outputJsonError($result->retval); } - // Store just inserted DMS ID + // Hold just inserted DMS ID $lastInsert_dms_id = $result->retval['dms_id']; - // Start DB transaction - $this->db->trans_start(false); + // Save Anrechnung and Anrechnungstatus + $result = $this->AnrechnungModel->createAnrechnungsantrag( + $prestudent_id, + $studiensemester_kurzbz, + $lehrveranstaltung_id, + $begruendung_id, + $lastInsert_dms_id, + $anmerkung + ); - // Save Anrechnung - $result = $this->AnrechnungModel->insert(array( - 'prestudent_id' => $prestudent_id, - 'lehrveranstaltung_id' => $lehrveranstaltung_id, - 'begruendung_id' => $begruendung_id, - 'dms_id' => $lastInsert_dms_id, - 'studiensemester_kurzbz' => $studiensemester_kurzbz, - 'anmerkung_student' => $anmerkung, - 'insertvon' => $this->_uid - )); - - // Store just inserted Anrechnung ID - $lastInsert_anrechnung_id = $result->retval; - - // Save Anrechnungstatus - $this->AnrechnungModel->saveAnrechnungstatus($lastInsert_anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); - - // Transaction complete - $this->db->trans_complete(); - - if ($this->db->trans_status() === false) + if (isError($result)) { - $this->db->trans_rollback(); - show_error('Failed inserting Anrechnung', EXIT_ERROR); + $this->terminateWithJsonError(getError($result)); } // Output to AJAX - return $this->outputJsonSuccess(array( + $this->outputJsonSuccess(array( 'antragdatum' => (new DateTime())->format('d.m.Y'), 'dms_id' => $lastInsert_dms_id )); diff --git a/application/models/education/Anrechnung_model.php b/application/models/education/Anrechnung_model.php index ce0cfe8d8..d3d1561ba 100644 --- a/application/models/education/Anrechnung_model.php +++ b/application/models/education/Anrechnung_model.php @@ -1,7 +1,8 @@ pk = 'anrechnung_id'; } + /** + * Creates new Anrechnungsantrag. + * Saves new Anrechnung and sets Anrechnungstatus for the new Anrechnung. + * + * @param $prestudent_id + * @param $studiensemester_kurzbz + * @param $lehrveranstaltung_id + * @param $begruendung_id + * @param $dms_id DMS ID of uploaded Nachweisdokument + * @param null $anmerkung_student = Herkunft der Kenntnisse + * @return array + */ + public function createAnrechnungsantrag( + $prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id, + $begruendung_id, $dms_id, $anmerkung_student = null + ) + { + // Start DB transaction + $this->db->trans_start(false); + + // Save Anrechnung + $result = $this->AnrechnungModel->insert(array( + 'prestudent_id' => $prestudent_id, + 'lehrveranstaltung_id' => $lehrveranstaltung_id, + 'begruendung_id' => $begruendung_id, + 'dms_id' => $dms_id, + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'anmerkung_student' => $anmerkung_student, + 'insertvon' => $this->_uid + )); + + // Store just inserted Anrechnung ID + $lastInsert_anrechnung_id = $result->retval; + + // Save Anrechnungstatus + $this->AnrechnungModel->saveAnrechnungstatus($lastInsert_anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL); + + // Transaction complete + $this->db->trans_complete(); + + if ($this->db->trans_status() === false) + { + $this->db->trans_rollback(); + return error('Failed inserting Anrechnung', EXIT_ERROR); + } + + return success(); + } + /** * Save Anrechnungstatus. * @param $anrechnung_id From dca828650a939f6fce1b4df18d312020b2a347b5 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Apr 2021 16:51:18 +0200 Subject: [PATCH 069/187] Adapted Bestaetigung Moodle link to open in new tab Signed-off-by: cris-technikum --- system/phrasesupdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d60cb8b4c..542f11e07 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -10658,13 +10658,13 @@ array( 'phrases' => array( array( 'sprache' => 'German', - 'text' => "Hiermit bestätige ich, dass ich die relevanten Prozess-Informationen gelesen habe und bestätige hiermit auch die Vollständigkeit und Richtigkeit meiner Angaben.
    Ich nehme zur Kenntnis, dass der Antrag nur einmal hochgeladen werden kann und dass Unterlagen nicht nachgereicht werden können.", + 'text' => "Hiermit bestätige ich, dass ich die relevanten Prozess-Informationen gelesen habe und bestätige hiermit auch die Vollständigkeit und Richtigkeit meiner Angaben.
    Ich nehme zur Kenntnis, dass der Antrag nur einmal hochgeladen werden kann und dass Unterlagen nicht nachgereicht werden können.", 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', - 'text' => "I hereby confirm that I have read the relevant process information and hereby also confirm the accuracy and completeness of the information I have provided above.
    I acknowledge that the application can only be uploaded once and that documents cannot be submitted later.", + 'text' => "I hereby confirm that I have read the relevant process information and hereby also confirm the accuracy and completeness of the information I have provided above.
    I acknowledge that the application can only be uploaded once and that documents cannot be submitted later.", 'description' => '', 'insertvon' => 'system' ) From 6dca00e4e58c1e11960e787d4b2601d411898631 Mon Sep 17 00:00:00 2001 From: Cris Date: Tue, 20 Apr 2021 18:45:43 +0200 Subject: [PATCH 070/187] Corrected query to retrieve only prestudentstatus 'students' Signed-off-by: cris-technikum --- application/views/lehre/anrechnung/createAnrechnungData.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/views/lehre/anrechnung/createAnrechnungData.php b/application/views/lehre/anrechnung/createAnrechnungData.php index cfb453709..9e4a9ac5e 100644 --- a/application/views/lehre/anrechnung/createAnrechnungData.php +++ b/application/views/lehre/anrechnung/createAnrechnungData.php @@ -31,6 +31,7 @@ $query = ' WHERE pststatus.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\' AND pst.studiengang_kz IN (' . $STUDIENGAENGE_ENTITLED . ') AND benutzer.aktiv = true + AND pststatus.status_kurzbz = \'Student\' ORDER BY "stg_bezeichnung", ausbildungssemester, nachname '; From 731c5b9461685b9e8601f16c7aca0b7c903f4a73 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 21 Apr 2021 13:37:43 +0200 Subject: [PATCH 071/187] Added link 'Neuen Antrag anlegen' in STGL Overview Site Signed-off-by: cris-technikum --- .../lehre/anrechnung/approveAnrechnungUebersicht.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index 9e221b94f..0b979ea7e 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -226,10 +226,14 @@ $this->load->view( class='fa fa-times'>
    -
    + + ' target='_self'> + p->t('global', 'antragAnlegen'); ?> + +
    -
    +
    diff --git a/public/js/lehre/anrechnung/createAnrechnung.js b/public/js/lehre/anrechnung/createAnrechnung.js index 61ad9003a..20bc91d1a 100644 --- a/public/js/lehre/anrechnung/createAnrechnung.js +++ b/public/js/lehre/anrechnung/createAnrechnung.js @@ -4,38 +4,33 @@ $(function () { createAnrechnung.disableFormFields(); // Create Anrechnung on form submit - $('#createAnrechnung-submit').click(function(e){ + $('#createAnrechnung-form').submit(function(e){ + + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/create", + new FormData(this), + { + successCallback: function (data, textStatus, jqXHR) + { + if (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertWarning(FHC_AjaxClient.getError(data)); + } + + if (FHC_AjaxClient.hasData(data)) + { + FHC_DialogLib.alertSuccess(FHC_AjaxClient.getData(data)); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError(FHC_PhrasesLib.t("ui", "systemfehler")); + } + } + ); // Avoid form redirecting automatically - e.preventDefault(); - - // Get form data - let formData = new FormData($('#createAnrechnung-form')[0]); - - $.ajax({ - url : "CreateAnrechnung/create", - 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 (FHC_AjaxClient.isError(data)) - { - FHC_DialogLib.alertWarning(FHC_AjaxClient.getError(data)); - } - - if (FHC_AjaxClient.hasData(data)) - { - FHC_DialogLib.alertSuccess(FHC_AjaxClient.getData(data)); - } - }, - error: function(jqXHR, textStatus, errorThrown){ - - FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("ui", "systemfehler")); - - } - }); + return false; }); }) diff --git a/public/js/lehre/anrechnung/requestAnrechnung.js b/public/js/lehre/anrechnung/requestAnrechnung.js index e7999f0e9..df9f000b8 100644 --- a/public/js/lehre/anrechnung/requestAnrechnung.js +++ b/public/js/lehre/anrechnung/requestAnrechnung.js @@ -32,33 +32,32 @@ $(function(){ return FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("ui", "errorBestaetigungFehlt")); } - $.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); - } + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/apply", + formdata, + { + successCallback:function(data, textStatus, jqXHR){ + if (FHC_AjaxClient.isError(data)) + { + FHC_DialogLib.alertWarning(FHC_AjaxClient.getError(data)); + } - if (!data.error && data.retval != null) - { - requestAnrechnung.formatAnrechnungIsApplied( - data.retval.antragdatum, - data.retval.dms_id, - formdata.get('uploadfile').name - ); + if (FHC_AjaxClient.hasData(data)) + { + requestAnrechnung.formatAnrechnungIsApplied( + data.retval.antragdatum, + data.retval.dms_id, + formdata.get('uploadfile').name + ); - FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("global", "antragWurdeGestellt")); + FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("global", "antragWurdeGestellt")); + } + }, + errorCallback: function(jqXHR, textStatus, errorThrown){ + FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("ui", "systemfehler")); } - }, - error: function(jqXHR, textStatus, errorThrown){ - FHC_DialogLib.alertWarning(FHC_PhrasesLib.t("ui", "systemfehler")); } - }); + ); }); }) From 21ce118f0bad1c1ca5594119bf765968be808530 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 28 Apr 2021 15:54:54 +0200 Subject: [PATCH 078/187] Merged master into branch Signed-off-by: cris-technikum --- README.md | 2 +- .../controllers/lehre/Pruefungsprotokoll.php | 2 +- application/libraries/LDAPLib.php | 2 +- .../education/Projektbetreuer_model.php | 19 + application/models/person/Benutzer_model.php | 5 + cis/private/lehre/abgabe_lektor_details.php | 214 ++- cis/private/lehre/abgabe_student.php | 462 +++--- cis/private/lehre/abgabe_student_details.php | 96 +- cis/private/pdfExport.php | 43 +- cis/private/tools/projektabgabe.php | 663 ++++---- content/pdfExport.php | 2 +- content/student/studentDBDML.php | 16 + content/student/studentprojektarbeit.js.php | 14 +- .../studentprojektarbeitoverlay.xul.php | 4 +- include/bisverwendung.class.php | 29 + include/functions.inc.php | 53 + include/organisationsform.class.php | 4 +- include/projektbetreuer.class.php | 125 ++ include/sancho.inc.php | 16 +- locale/de-AT/abgabetool.php | 13 +- locale/de-AT/dms_link.php | 14 +- locale/en-US/abgabetool.php | 13 +- locale/en-US/dms_link.php | 12 +- locale/it-IT/abgabetool.php | 10 +- skin/images/repeat.png | Bin 0 -> 21827 bytes system/dbupdate_3.3.php | 55 +- system/phrasesupdate.php | 1423 +++++++++++++++++ 27 files changed, 2714 insertions(+), 597 deletions(-) create mode 100644 skin/images/repeat.png diff --git a/README.md b/README.md index d5620010a..c5212a353 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # FH-Complete * [FH-Complete Homepage](https://www.fhcomplete.org) -* [Wiki](https://wiki.fhcomplete.org/) +* [Wiki](https://wiki.fhcomplete.info/) * [Changelog](CHANGELOG.md) diff --git a/application/controllers/lehre/Pruefungsprotokoll.php b/application/controllers/lehre/Pruefungsprotokoll.php index 467a7dc71..21f50acca 100644 --- a/application/controllers/lehre/Pruefungsprotokoll.php +++ b/application/controllers/lehre/Pruefungsprotokoll.php @@ -220,7 +220,7 @@ class Pruefungsprotokoll extends Auth_Controller $nullfields = array('uhrzeit', 'endezeit', 'abschlussbeurteilung_kurzbz', 'protokoll'); foreach ($data as $idx => $item) { - if (in_array($idx, $nullfields) & $item === '') + if (in_array($idx, $nullfields) && $item === '') $data[$idx] = null; } diff --git a/application/libraries/LDAPLib.php b/application/libraries/LDAPLib.php index 57c8902b5..a119af51e 100644 --- a/application/libraries/LDAPLib.php +++ b/application/libraries/LDAPLib.php @@ -167,7 +167,7 @@ class LDAPLib } // LDAP connection - $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER], $ldapConfigs[self::PORT]); + $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]); if ($ldapConnection) // if success { // Sets the LDAP protocol version diff --git a/application/models/education/Projektbetreuer_model.php b/application/models/education/Projektbetreuer_model.php index 746e4c052..4da88e344 100644 --- a/application/models/education/Projektbetreuer_model.php +++ b/application/models/education/Projektbetreuer_model.php @@ -41,4 +41,23 @@ class Projektbetreuer_model extends DB_Model return error ('Incorrect parameter type'); } } + + /** + * Get Projektbetreuer data by authentification token + * @param $zugangstoken + * @return object + */ + public function getBetreuerByToken($zugangstoken) + { + $qry = ' + SELECT tbl_projektbetreuer.person_id, tbl_projektbetreuer.projektarbeit_id, student_uid + FROM lehre.tbl_projektbetreuer + JOIN lehre.tbl_projektarbeit USING (projektarbeit_id) + WHERE zugangstoken = ? AND zugangstoken_gueltigbis >= NOW() + ORDER BY tbl_projektbetreuer.insertamum DESC, projektarbeit_id DESC + LIMIT 1 + '; + + return $this->execQuery($qry, array($zugangstoken)); + } } diff --git a/application/models/person/Benutzer_model.php b/application/models/person/Benutzer_model.php index c1e76ce38..eff1329a6 100644 --- a/application/models/person/Benutzer_model.php +++ b/application/models/person/Benutzer_model.php @@ -13,6 +13,11 @@ class Benutzer_model extends DB_Model $this->hasSequence = false; } + /** + * Gets active Benutzer from person_id + * @param $person_id + * @return object + */ public function getFromPersonId($person_id) { return $this->loadWhere(array('person_id' => $person_id, 'aktiv' => true)); diff --git a/cis/private/lehre/abgabe_lektor_details.php b/cis/private/lehre/abgabe_lektor_details.php index 7022ead1f..6b6b5633b 100644 --- a/cis/private/lehre/abgabe_lektor_details.php +++ b/cis/private/lehre/abgabe_lektor_details.php @@ -35,6 +35,8 @@ require_once('../../../include/datum.class.php'); require_once('../../../include/mail.class.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/projektarbeit.class.php'); +require_once('../../../include/projektbetreuer.class.php'); +require_once('../../../include/sancho.inc.php'); if (!$db = new basis_db()) $db=false; @@ -116,6 +118,68 @@ if($projektarbeit_id==-1) if(!$projektarbeit_obj->load($projektarbeit_id)) die('Fehler beim Laden der Projektarbeit'); $titel = $projektarbeit_obj->titel; +$student_uid = $projektarbeit_obj->student_uid; + +// paarbeit sollte nur ab SS2021 online bewertet werden +$qry_sem="SELECT 1 + FROM lehre.tbl_projektarbeit + JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + JOIN public.tbl_studiensemester USING(studiensemester_kurzbz) + WHERE projektarbeit_id=".$db->db_add_param($projektarbeit_id, FHC_INTEGER)." + AND tbl_studiensemester.start::date >= (SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz = 'SS2021')::date + LIMIT 1"; +$result_sem=$db->db_query($qry_sem); +$num_rows_sem = $db->db_num_rows($result_sem); +if($num_rows_sem < 0) +{ + echo "".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."
     "; +} + +// Zweitbegutachter holen +if($betreuerart=="Erstbegutachter") +{ + $projektbetreuer = new projektbetreuer(); + $alleBegutachter = $projektbetreuer->getProjektbetreuer($projektarbeit_id); + + if ($alleBegutachter) + { + $alleBegutachterResults = $projektbetreuer->result; + + foreach ($alleBegutachterResults as $begutachter) + { + if ($begutachter->betreuerart_kurzbz == "Erstbegutachter") + { + $erstbetreuer_id = $begutachter->person_id; + $zweitbegutachter = $projektbetreuer->getZweitbegutachterWithToken($erstbetreuer_id, $projektarbeit_id, $student_uid); + break; + } + } + + // Mail mit Token an Zweitbegutachter senden + if ($zweitbegutachter && $num_rows_sem >= 1 && isset($_GET['zweitbegutachtertoken'])) + { + $qry_std="SELECT * FROM campus.vw_benutzer where uid=".$db->db_add_param($uid); + if(!$result_std=$db->db_query($qry_std)) + { + echo "Student konnte nicht gefunden werden!
     "; + } + else + { + $row_std=@$db->db_fetch_object($result_std); + $mailres = sendZweitbegutachterMail($zweitbegutachter, $erstbetreuer_id, $row_std); + + if ($mailres) + { + echo "
    ".$p->t('abgabetool/zweitbegutachterMailGesendet', $zweitbegutachter->email)."
     "; + } + else + { + echo "".$p->t('abgabetool/fehlerMailZweitBegutachter')." Mail: ".$zweitbegutachter->email."
     "; + } + } + } + } +} echo ' @@ -124,6 +188,39 @@ echo ' '.$p->t('abgabetool/abgabetool').' + - - - - - -'; - - echo '

    '.$p->t('abgabetool/ueberschrift'); - if(trim($uid)!='') - echo " ($uid $vorname $nachname)
    "; - echo '

    '; - echo $htmlstr; - echo ' -'; -?> + + + + + +'; + + echo '

    '.$p->t('abgabetool/ueberschrift'); + if(trim($uid)!='') + echo " ($uid $vorname $nachname)
    "; + echo '

    '; + echo $htmlstr; + echo ' +'; +?> diff --git a/cis/private/lehre/abgabe_student_details.php b/cis/private/lehre/abgabe_student_details.php index e12bb1fb8..a30250435 100644 --- a/cis/private/lehre/abgabe_student_details.php +++ b/cis/private/lehre/abgabe_student_details.php @@ -34,6 +34,8 @@ require_once('../../../include/mail.class.php'); require_once('../../../include/benutzerberechtigung.class.php'); require_once('../../../include/phrasen.class.php'); require_once('../../../include/projektarbeit.class.php'); +require_once('../../../include/projektbetreuer.class.php'); +require_once('../../../include/sancho.inc.php'); $anzeigesprache = getSprache(); $p = new phrasen($anzeigesprache); @@ -324,7 +326,6 @@ if($command=="update" && $error!=true) { if($row_zd=@$db->db_fetch_object($result_zd)) { - $htmlstr = "
    ".$p->t('abgabetool/betreuer').": ".$db->convert_html_chars($betreuer)."
    ".$p->t('abgabetool/titel').": ".$db->convert_html_chars($titel)."

    \n"; $htmlstr .= "\n"; $htmlstr .= "\n"; @@ -397,7 +398,7 @@ if($command=="update" && $error!=true) echo $p->t('global/dateiNichtErfolgreichHochgeladen'); } } - //E-Mail an 1.Begutachter + //E-Mail an 1.Begutachter und 2.Begutachter if($bid!='' && $bid!=NULL) { $qry_betr="SELECT distinct trim(COALESCE(titelpre,'')||' '||COALESCE(vorname,'')||' '||COALESCE(nachname,'')||' '||COALESCE(titelpost,'')) as first, @@ -422,15 +423,98 @@ if($command=="update" && $error!=true) } else { + // paarbeit sollte nur ab SS2021 online bewertet werden + $qry_sem="SELECT 1 + FROM lehre.tbl_projektarbeit + JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + JOIN public.tbl_studiensemester USING(studiensemester_kurzbz) + WHERE projektarbeit_id=".$db->db_add_param($projektarbeit_id, FHC_INTEGER)." + AND tbl_studiensemester.start::date >= (SELECT start FROM public.tbl_studiensemester WHERE studiensemester_kurzbz = 'SS2021')::date + LIMIT 1"; + + $result_sem=$db->db_query($qry_sem); + $num_rows_sem = $db->db_num_rows($result_sem); + if($num_rows_sem < 0) + { + echo "".$p->t('abgabetool/fehlerAktualitaetProjektarbeit')."
     "; + } + $row_std=$db->db_fetch_object($result_std); - $mail = new mail($row_betr->mitarbeiter_uid."@".DOMAIN, "no-reply@".DOMAIN, "Bachelor-/Masterarbeitsbetreuung", - "Sehr geehrte".($row_betr->anrede=="Herr"?"r":"")." ".$row_betr->anrede." ".$row_betr->first."!\n\n".($row_std->anrede)." ".trim($row_std->titelpre." ".$row_std->vorname." ".$row_std->nachname." ".$row_std->titelpost)." hat eine Abgabe vorgenommen.\n\n--------------------------------------------------------------------------\nDies ist ein vom Bachelor-/Masterarbeitsabgabesystem generiertes Info-Mail\nCis->Mein CIS->Projektarbeiten->Bachelor- und Masterarbeitsabgabe\n--------------------------------------------------------------------------"); - $mail->setReplyTo($user."@".DOMAIN); - if(!$mail->send()) + // 1. Begutachter mail ohne Token + $mail_baselink = APP_ROOT."index.ci.php/extensions/FHC-Core-Projektarbeitsbeurteilung/Projektarbeitsbeurteilung"; + $mail_fulllink = "$mail_baselink?projektarbeit_id=".$projektarbeit_id."&uid=".$row_std->uid; + $maildata = array(); + $maildata['geehrt'] = "geehrte".($row_betr->anrede=="Herr"?"r":""); + $maildata['anrede'] = $row_betr->anrede; + $maildata['betreuer_voller_name'] = $row_betr->first; + $maildata['student_anrede'] = $row_std->anrede; + $maildata['student_voller_name'] = trim($row_std->titelpre." ".$row_std->vorname." ".$row_std->nachname." ".$row_std->titelpost); + $maildata['parbeituebersichtlink'] = "

    Zur Projektarbeitsübersicht

    "; + $maildata['bewertunglink'] = $num_rows_sem >= 1 ? "

    Zur Beurteilung der Arbeit

    " : ""; + $maildata['token'] = ""; + + $mailres = sendSanchoMail( + 'ParbeitsbeurteilungEndupload', + $maildata, + $row_betr->mitarbeiter_uid."@".DOMAIN, + "Bachelor-/Masterarbeitsbetreuung", + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg', + $user."@".DOMAIN); + + if(!$mailres) { echo "".$p->t('abgabetool/fehlerMailBegutachter')."
     "; } + + // 2. Begutachter mail, wenn Endabgabe, mit Token wenn extern + if ($paabgabetyp_kurzbz == 'end') + { + $projektbetreuer = new projektbetreuer(); + $zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid); + + if ($zweitbetr) + { + $tokenGenRes = $projektbetreuer->generateZweitbegutachterToken($zweitbetr->person_id, $projektarbeit_id); + + if (!$tokenGenRes) + echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
     "; + + $zweitbetr = $projektbetreuer->getZweitbegutachterWithToken($bid, $projektarbeit_id, $row_std->uid); + + if (!$zweitbetr) + echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
     "; + + $intern = isset($zweitbetr->uid); + $mail_link = $intern ? $mail_fulllink : $mail_baselink; + + $zweitbetmaildata = array(); + $zweitbetmaildata['geehrt'] = "geehrte" . ($zweitbetr->anrede == "Herr" ? "r" : ""); + $zweitbetmaildata['anrede'] = $zweitbetr->anrede; + $zweitbetmaildata['betreuer_voller_name'] = $zweitbetr->voller_name; + $zweitbetmaildata['student_anrede'] = $maildata['student_anrede']; + $zweitbetmaildata['student_voller_name'] = $maildata['student_voller_name']; + $zweitbetmaildata['parbeituebersichtlink'] = $intern ? $maildata['parbeituebersichtlink'] : ""; + $zweitbetmaildata['bewertunglink'] = $num_rows_sem >= 1 ? "

    Zur Beurteilung der Arbeit

    " : ""; + $zweitbetmaildata['token'] = $num_rows_sem >= 1 && isset($zweitbetr->zugangstoken) && !$intern ? "

    Zugangstoken: " . $zweitbetr->zugangstoken . "

    " : ""; + + $mailres = sendSanchoMail( + 'ParbeitsbeurteilungEndupload', + $zweitbetmaildata, + $zweitbetr->email, + "Masterarbeitsbetreuung", + 'sancho_header_min_bw.jpg', + 'sancho_footer_min_bw.jpg', + $user . "@" . DOMAIN + ); + + if (!$mailres) + { + echo "" . $p->t('abgabetool/fehlerMailZweitBegutachter') . "
     "; + } + } + } } } else diff --git a/cis/private/pdfExport.php b/cis/private/pdfExport.php index ea1fbab66..99b5c94f0 100644 --- a/cis/private/pdfExport.php +++ b/cis/private/pdfExport.php @@ -39,6 +39,7 @@ require_once('../../include/prestudent.class.php'); require_once('../../include/dokument_export.class.php'); require_once('../../include/person.class.php'); require_once('../../include/webservicelog.class.php'); +require_once('../../include/projektarbeit.class.php'); if (!$db = new basis_db()) die('Fehler beim Oeffnen der Datenbankverbindung'); @@ -120,7 +121,7 @@ $params = 'xmlformat=xml'; //Admins duerfen Dokumente anderer Personen drucken if ($rechte->isBerechtigt('admin')) - $user = $_GET['uid']; + $user = isset($_GET['uid']) ? $_GET['uid'] : $user; $params .= '&uid='.$user; if (isset($_GET['person_id'])) @@ -139,6 +140,11 @@ if (isset($_GET['all'])) $params .= '&all=1'; if (isset($_GET['xsl_oe_kurzbz'])) $params .= '&xsl_oe_kurzbz='. $_GET['xsl_oe_kurzbz']; +if (isset($_GET['projektarbeit_id'])) + $params .= '&projektarbeit_id='. $_GET['projektarbeit_id']; +if (isset($_GET['betreuerart_kurzbz'])) + $params .= '&betreuerart_kurzbz='. $_GET['betreuerart_kurzbz']; + // Logeintrag bei Download von Zahlungsbestaetigungen if (isset($_GET['xsl']) && $_GET['xsl'] == 'Zahlung') @@ -150,7 +156,7 @@ if (isset($_GET['xsl']) && $_GET['xsl'] == 'Zahlung') $log->request_id = isset($_GET['buchungsnummern']) && !empty($_GET['buchungsnummern']) ? $_GET['buchungsnummern'] : NULL; $log->beschreibung = 'Zahlungsbestaetigungsdownload'; $log->request_data = $requestdata; - $log->execute_user = $user; + $log->execute_user = get_uid(); $log->save(true); } @@ -183,9 +189,40 @@ if (isset($_GET['output']) && $_GET['output'] != 'pdf') else $output = 'pdf'; +if (isset($_GET['xsl']) && ($_GET['xsl'] === 'Projektbeurteilung')) +{ + if (!isset($_GET['betreuerart_kurzbz']) || !isset($_GET['person_id']) || !isset($_GET['projektarbeit_id'])) + die('Fehlerhafte Parameteruebergabe'); + + $projektarbeit = new projektarbeit(); + $projektarbeit->load($_GET['projektarbeit_id']); + + $betreuer = new person(); + $betreuer->getPersonFromBenutzer($user); + + //Überprüft ob es der Betreuer oder der Student ist + if ($betreuer->person_id !== $_GET['person_id'] && $projektarbeit->student_uid !== $user && !$rechte->isBerechtigt('assistenz')) + die("

    Sie haben keine Berechtigung für diese Aktion.

    "); + + switch ($_GET['betreuerart_kurzbz']) + { + case 'Begutachter' : + $xsl = 'ProjektBeurteilungBA'; + break; + case 'Erstbegutachter' : + $xsl = 'ProjektBeurteilungMAErst'; + break; + case 'Zweitbegutachter' : + $xsl = 'ProjektBeurteilungMAZweit'; + break; + } + + $allowed = true; +} + $konto = new konto(); -if (((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('admin')) +if ((((isset($_GET["uid"]) && $user == $_GET["uid"])) || $rechte->isBerechtigt('admin')) || (isset($allowed) && $allowed === true)) { $buchungstypen = array(); if (defined("CIS_DOKUMENTE_STUDIENBEITRAG_TYPEN")) diff --git a/cis/private/tools/projektabgabe.php b/cis/private/tools/projektabgabe.php index 586380bd6..9580fcf38 100644 --- a/cis/private/tools/projektabgabe.php +++ b/cis/private/tools/projektabgabe.php @@ -1,333 +1,334 @@ - - * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > - * Rudolf Hangl < rudolf.hangl@technikum-wien.at > - * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > - */ -/******************************************************************************************************* - * projektabgabe - * projektabgabe ermöglicht den Download aller Abgaben eines Stg. - * fuer Diplom- und Bachelorarbeiten - *******************************************************************************************************/ - -require_once('../../../config/cis.config.inc.php'); -require_once('../../../include/functions.inc.php'); -require_once('../../../include/studiengang.class.php'); -require_once('../../../include/datum.class.php'); -require_once('../../../include/benutzerberechtigung.class.php'); -require_once('../../../include/datum.class.php'); -require_once('../../../include/mail.class.php'); -require_once('../../../include/phrasen.class.php'); - -$sprache = getSprache(); -$p = new phrasen($sprache); - -if (!$db = new basis_db()) - die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); - -$aktion=''; -if(isset($_REQUEST['aktion'])) -{ - $aktion=$_REQUEST['aktion']; -} -$zipfile=''; -$stg_kz=(isset($_REQUEST['stg_kz'])?$_REQUEST['stg_kz']:''); -if(!is_numeric($stg_kz) && $stg_kz!='') - exit(); - -$abgabetyp=(isset($_REQUEST['abgabetyp'])?$_REQUEST['abgabetyp']:''); -$termin=(isset($_REQUEST['termin'])?$_REQUEST['termin']:''); - -$htmlstr=''; -$datum_obj = new datum(); -$user = get_uid(); -$rechte = new benutzerberechtigung(); -$rechte->getBerechtigungen($user); -$berechtigung_kurzbz = 'lehre/abgabetool:download'; - -if(isset($_GET['id']) && isset($_GET['uid'])) -{ - if($rechte->isBerechtigt($berechtigung_kurzbz)) - { - if(!is_numeric($_GET['id']) || $_GET['id']=='') - die($p->t('global/fehlerBeiDerParameteruebergabe')); - - $file = $_GET['id'].'_'.$_GET['uid'].'.pdf'; - $filename = PAABGABE_PATH.$file; - header('Content-Type: application/octet-stream'); - header('Content-disposition: attachment; filename="'.$file.'"'); - readfile($filename); - } - else - { - die($p->t('global/keineBerechtigungFuerDieseSeite')); - } - exit(); -} - - -if($aktion!='zip') -{ - echo ' - - - '.$p->t('abgabetool/projektabgabeUebersicht').' - - - + + * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > + * Rudolf Hangl < rudolf.hangl@technikum-wien.at > + * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > + */ +/******************************************************************************************************* + * projektabgabe + * projektabgabe ermöglicht den Download aller Abgaben eines Stg. + * fuer Diplom- und Bachelorarbeiten + *******************************************************************************************************/ + +require_once('../../../config/cis.config.inc.php'); +require_once('../../../include/functions.inc.php'); +require_once('../../../include/studiengang.class.php'); +require_once('../../../include/datum.class.php'); +require_once('../../../include/benutzerberechtigung.class.php'); +require_once('../../../include/datum.class.php'); +require_once('../../../include/mail.class.php'); +require_once('../../../include/phrasen.class.php'); + +include('../../../include/meta/jquery.php'); +include('../../../include/meta/jquery-tablesorter.php'); + +$sprache = getSprache(); +$p = new phrasen($sprache); + +if (!$db = new basis_db()) + die($p->t('global/fehlerBeimOeffnenDerDatenbankverbindung')); + +$aktion=''; +if(isset($_REQUEST['aktion'])) +{ + $aktion=$_REQUEST['aktion']; +} +$zipfile=''; +$stg_kz=(isset($_REQUEST['stg_kz'])?$_REQUEST['stg_kz']:''); +if(!is_numeric($stg_kz) && $stg_kz!='') + exit(); + +$abgabetyp=(isset($_REQUEST['abgabetyp'])?$_REQUEST['abgabetyp']:''); +$termin=(isset($_REQUEST['termin'])?$_REQUEST['termin']:''); + +$htmlstr=''; +$datum_obj = new datum(); +$user = get_uid(); +$rechte = new benutzerberechtigung(); +$rechte->getBerechtigungen($user); +$berechtigung_kurzbz = 'lehre/abgabetool:download'; + +if(isset($_GET['id']) && isset($_GET['uid'])) +{ + if($rechte->isBerechtigt($berechtigung_kurzbz)) + { + if(!is_numeric($_GET['id']) || $_GET['id']=='') + die($p->t('global/fehlerBeiDerParameteruebergabe')); + + $file = $_GET['id'].'_'.$_GET['uid'].'.pdf'; + $filename = PAABGABE_PATH.$file; + header('Content-Type: application/octet-stream'); + header('Content-disposition: attachment; filename="'.$file.'"'); + readfile($filename); + } + else + { + die($p->t('global/keineBerechtigungFuerDieseSeite')); + } + exit(); +} + + +if($aktion!='zip') +{ + echo ' + + + '.$p->t('abgabetool/projektabgabeUebersicht').' + + + - - - + - - - - - -

    '.$p->t('abgabetool/projektabgabeUebersicht').'

    '; - - $s = new studiengang(); - $s->loadArray($rechte->getStgKz($berechtigung_kurzbz),'typ,kurzbz'); - - echo''; - - echo $p->t('global/studiengang').": "; - - - echo $p->t('abgabetool/abgabetyp').": "; - - $qry_termin=" SELECT distinct campus.tbl_paabgabe.datum as termin , to_char(campus.tbl_paabgabe.datum, 'DD.MM.YYYY') as termin_anzeige - FROM lehre.tbl_projektarbeit - JOIN campus.tbl_paabgabe USING(projektarbeit_id) - LEFT JOIN public.tbl_benutzer ON(uid=student_uid) - LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) - LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) - LEFT JOIN public.tbl_studiengang USING(studiengang_kz) - WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') - "; - - if ($stg_kz!='') - $qry_termin.=" AND public.tbl_studiengang.studiengang_kz=".$db->db_add_param($stg_kz, FHC_INTEGER); - if ($abgabetyp!='') - $qry_termin.=" AND campus.tbl_paabgabe.paabgabetyp_kurzbz=".$db->db_add_param($abgabetyp); - $qry_termin.=" ORDER BY termin desc"; - - echo ' '.$p->t('abgabetool/termin').' '; - - ?> - -t('global/anzeigen')."' onclick=\"f=document.abgabeFrm;f.aktion.value='';\"> 
    "; - } - -if(isset($_REQUEST['ok']) || (isset($_REQUEST['aktion']) && $_REQUEST['aktion']=='zip')) -{ - - $s=new studiengang(); - if($stg_kz!='' && !$s->load($stg_kz)) - { - die($p->t('global/studiengangKonnteNichtGefundenWerden')); - } - - if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt($berechtigung_kurzbz, $s->oe_kurzbz)) - { - $qry=""; - - $qry.=" SELECT public.tbl_studiengang.bezeichnung as stgbez, campus.tbl_paabgabe.datum as termin,* - FROM lehre.tbl_projektarbeit - JOIN campus.tbl_paabgabe USING(projektarbeit_id) - LEFT JOIN public.tbl_benutzer ON(uid=student_uid) - LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) - LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) - LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) - LEFT JOIN public.tbl_studiengang USING(studiengang_kz) - WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') - - "; - - if ($stg_kz!='') - $qry.=" AND public.tbl_studiengang.studiengang_kz=".$db->db_add_param($stg_kz); - if ($abgabetyp!='') - $qry.=" AND campus.tbl_paabgabe.paabgabetyp_kurzbz=".$db->db_add_param($abgabetyp); - if ($termin!='') - $qry.=" AND campus.tbl_paabgabe.datum=".$db->db_add_param($termin); - $qry.=" ORDER BY nachname "; - - if($stg_kz=='' && $abgabetyp=='' && $termin=='') - { - $qry.=" limit 100 "; - } - - if(!$erg=$db->db_query($qry)) - { - die('Fehler beim Laden der Betreuungen!'); - } - else - { - $htmlstr .= "
    \n"; - $htmlstr .= "\n"; - $htmlstr .= " - - - - - "; - $htmlstr .= " - "; - $htmlstr .= "\n"; - $i = 0; - while($row=$db->db_fetch_object($erg)) - { - $htmlstr .= ""; - if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$row->uid.'.pdf')) - { - $htmlstr .= " "; - } - else - { - $htmlstr .= " "; - } - //$htmlstr .= ""; - $htmlstr .= ""; - $htmlstr .= ""; - $htmlstr .= ""; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - $htmlstr .= "\n"; - if($aktion=='zip') - { - if($zipfile=='') - { - $zipfile = $row->paabgabe_id.'_'.$row->uid.'.pdf'; - } - else - { - $zipfile .= " ".$row->paabgabe_id.'_'.$row->uid.'.pdf'; - } - } - } - $htmlstr .= "
    ".$p->t('global/download')."".$p->t('abgabetool/termin')."".$p->t('abgabetool/abgabetyp')."".$p->t('global/uid')."".$p->t('global/vorname')."".$p->t('global/nachname')."".$p->t('abgabetool/typ')."".$p->t('abgabetool/titel')."
    uid' target='_blank'>PDF    link".$datum_obj->formatDatum($row->termin,'d.m.Y')."".$abgabetyp." ".$row->uid." ".$row->vorname." ".$row->nachname." ".$row->projekttyp_kurzbz." ".$row->titel." 
    "; - } - } - else - { - die($p->t('global/keineBerechtigungFuerDieseSeite')); - } -} - -if($zipfile=='') -{ - echo $htmlstr; - echo ""; -} -else -{ - if(!$rechte->isBerechtigt($berechtigung_kurzbz)) - { - die($p->t('global/keineBerechtigungFuerDieseSeite')); - } - - //Zip File erstellen - chdir(PAABGABE_PATH); - $zipausgabe=tempnam("/tmp", "PAA").".zip"; - exec("zip ".$zipausgabe." ".$zipfile); - - if(file_exists($zipausgabe)) - { - header('Content-Type: application/octet-stream'); - header('Content-disposition: attachment; filename="Abgabe_'.$s->kuerzel.'.zip"'); - $handle = fopen($zipausgabe, "rb"); - - while (!feof($handle)) - { - echo fread($handle, 1024); - } - - fclose($handle); - - //echo file_get_contents($zipausgabe); - unlink($zipausgabe); - } - else - { - echo $p->t('global/dateiExistiertNicht'); - } -} -?> + + + + +

    '.$p->t('abgabetool/projektabgabeUebersicht').'

    '; + + $s = new studiengang(); + $s->loadArray($rechte->getStgKz($berechtigung_kurzbz),'typ,kurzbz'); + + echo'
    '; + + echo $p->t('global/studiengang').": "; + + + echo $p->t('abgabetool/abgabetyp').": "; + + $qry_termin=" SELECT distinct campus.tbl_paabgabe.datum as termin , to_char(campus.tbl_paabgabe.datum, 'DD.MM.YYYY') as termin_anzeige + FROM lehre.tbl_projektarbeit + JOIN campus.tbl_paabgabe USING(projektarbeit_id) + LEFT JOIN public.tbl_benutzer ON(uid=student_uid) + LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) + LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) + LEFT JOIN public.tbl_studiengang USING(studiengang_kz) + WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') + "; + + if ($stg_kz!='') + $qry_termin.=" AND public.tbl_studiengang.studiengang_kz=".$db->db_add_param($stg_kz, FHC_INTEGER); + if ($abgabetyp!='') + $qry_termin.=" AND campus.tbl_paabgabe.paabgabetyp_kurzbz=".$db->db_add_param($abgabetyp); + $qry_termin.=" ORDER BY termin desc"; + + echo ' '.$p->t('abgabetool/termin').' '; + + ?> + +t('global/anzeigen')."' onclick=\"f=document.abgabeFrm;f.aktion.value='';\"> 

    "; + } + +if(isset($_REQUEST['ok']) || (isset($_REQUEST['aktion']) && $_REQUEST['aktion']=='zip')) +{ + + $s=new studiengang(); + if($stg_kz!='' && !$s->load($stg_kz)) + { + die($p->t('global/studiengangKonnteNichtGefundenWerden')); + } + + if($rechte->isBerechtigt('admin') || $rechte->isBerechtigt($berechtigung_kurzbz, $s->oe_kurzbz)) + { + $qry=""; + + $qry.=" SELECT public.tbl_studiengang.bezeichnung as stgbez, campus.tbl_paabgabe.datum as termin,* + FROM lehre.tbl_projektarbeit + JOIN campus.tbl_paabgabe USING(projektarbeit_id) + LEFT JOIN public.tbl_benutzer ON(uid=student_uid) + LEFT JOIN public.tbl_person ON(tbl_benutzer.person_id=tbl_person.person_id) + LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id) + LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id) + LEFT JOIN public.tbl_studiengang USING(studiengang_kz) + WHERE (projekttyp_kurzbz='Bachelor' OR projekttyp_kurzbz='Diplom') + + "; + + if ($stg_kz!='') + $qry.=" AND public.tbl_studiengang.studiengang_kz=".$db->db_add_param($stg_kz); + if ($abgabetyp!='') + $qry.=" AND campus.tbl_paabgabe.paabgabetyp_kurzbz=".$db->db_add_param($abgabetyp); + if ($termin!='') + $qry.=" AND campus.tbl_paabgabe.datum=".$db->db_add_param($termin); + $qry.=" ORDER BY nachname "; + + if($stg_kz=='' && $abgabetyp=='' && $termin=='') + { + $qry.=" limit 100 "; + } + + if(!$erg=$db->db_query($qry)) + { + die('Fehler beim Laden der Betreuungen!'); + } + else + { + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= " + + + + + "; + $htmlstr .= " + "; + $htmlstr .= "\n"; + $i = 0; + while($row=$db->db_fetch_object($erg)) + { + $htmlstr .= ""; + if(file_exists(PAABGABE_PATH.$row->paabgabe_id.'_'.$row->uid.'.pdf')) + { + $htmlstr .= " "; + } + else + { + $htmlstr .= " "; + } + //$htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= ""; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + $htmlstr .= "\n"; + if($aktion=='zip') + { + if($zipfile=='') + { + $zipfile = $row->paabgabe_id.'_'.$row->uid.'.pdf'; + } + else + { + $zipfile .= " ".$row->paabgabe_id.'_'.$row->uid.'.pdf'; + } + } + } + $htmlstr .= "
    ".$p->t('global/download')."".$p->t('abgabetool/termin')."".$p->t('abgabetool/abgabetyp')."".$p->t('global/uid')."".$p->t('global/vorname')."".$p->t('global/nachname')."".$p->t('abgabetool/typ')."".$p->t('abgabetool/titel')."
    uid' target='_blank'>PDF    link".$datum_obj->formatDatum($row->termin,'d.m.Y')."".$abgabetyp." ".$row->uid." ".$row->vorname." ".$row->nachname." ".$row->projekttyp_kurzbz." ".$row->titel." 
    "; + } + } + else + { + die($p->t('global/keineBerechtigungFuerDieseSeite')); + } +} + +if($zipfile=='') +{ + echo $htmlstr; + echo ""; +} +else +{ + if(!$rechte->isBerechtigt($berechtigung_kurzbz)) + { + die($p->t('global/keineBerechtigungFuerDieseSeite')); + } + + //Zip File erstellen + chdir(PAABGABE_PATH); + $zipausgabe=tempnam("/tmp", "PAA").".zip"; + exec("zip ".$zipausgabe." ".$zipfile); + + if(file_exists($zipausgabe)) + { + header('Content-Type: application/octet-stream'); + header('Content-disposition: attachment; filename="Abgabe_'.$s->kuerzel.'.zip"'); + $handle = fopen($zipausgabe, "rb"); + + while (!feof($handle)) + { + echo fread($handle, 1024); + } + + fclose($handle); + + //echo file_get_contents($zipausgabe); + unlink($zipausgabe); + } + else + { + echo $p->t('global/dateiExistiertNicht'); + } +} +?> diff --git a/content/pdfExport.php b/content/pdfExport.php index 29feeef6e..a85ebb345 100644 --- a/content/pdfExport.php +++ b/content/pdfExport.php @@ -252,7 +252,7 @@ else array('uid', 'stg_kz', 'person_id', 'id', 'prestudent_id', 'buchungsnummern', 'ss', 'abschlusspruefung_id', 'typ', 'all', 'preoutgoing_id', 'lvid', 'projekt_kurzbz', 'von', 'bis', 'stundevon', 'stundebis', 'sem', 'lehreinheit', 'mitarbeiter_uid', 'studienordnung_id', 'fixangestellt', 'standort', - 'abrechnungsmonat', 'form') + 'abrechnungsmonat', 'form', 'projektarbeit_id', 'betreuerart_kurzbz') ) ) { diff --git a/content/student/studentDBDML.php b/content/student/studentDBDML.php index a80ea171a..becb31e88 100644 --- a/content/student/studentDBDML.php +++ b/content/student/studentDBDML.php @@ -2296,8 +2296,12 @@ if(!$error) { $dokumente = explode(';',$_POST['dokumente']); $errormsg = ''; + $sonst = 0; foreach ($dokumente as $dokument_kurzbz) { + if ($dokument_kurzbz === 'Sonst' && $sonst !== 0) + continue; + if($dokument_kurzbz!='') { $dok = new dokument(); @@ -2308,6 +2312,8 @@ if(!$error) $dok->insertamum = date('Y-m-d H:i:s'); $dok->insertvon = $user; $dok->new = true; + if ($dokument_kurzbz === 'Sonst') + $sonst++; if(!$dok->save()) { @@ -2501,8 +2507,13 @@ if(!$error) { $dokumente = explode(';',$_POST['dokumente']); $errormsg = ''; + $sonst = 0; + foreach ($dokumente as $dokument_kurzbz) { + if ($dokument_kurzbz === 'Sonst' && $sonst !== 0) + continue; + if($dokument_kurzbz!='') { $dok = new dokument(); @@ -2514,6 +2525,11 @@ if(!$error) { $errormsg .= "Fehler bei $dokument_kurzbz: $dok->errormsg\n"; } + else + { + if ($dokument_kurzbz === 'Sonst') + $sonst++; + } } else { diff --git a/content/student/studentprojektarbeit.js.php b/content/student/studentprojektarbeit.js.php index ab284808e..66f52f15c 100644 --- a/content/student/studentprojektarbeit.js.php +++ b/content/student/studentprojektarbeit.js.php @@ -892,7 +892,13 @@ function StudentProjektbetreuerAuswahl() document.getElementById('student-projektbetreuer-checkbox-neu').checked=false; var gesamtkosten = StudentProjektbetreuerGesamtkosten(); - + + + if (document.getElementById('student-projektbetreuer-button-beurteilung')) + { + checkBeurteilung(); + } + // Wenn Vertragsdetails angezeigt werden if (projektarbeit_vertragsdetails_anzeigen) { //Reset attributes @@ -1122,6 +1128,12 @@ function StudentProjektbetreuerDetailDisableFields(val) document.getElementById('student-projektbetreuer-button-speichern').disabled=val; document.getElementById('student-projektbetreuer-button-neueperson').disabled=val; document.getElementById('student-projektbetreuer-button-kontaktdaten').disabled=val; + + if (document.getElementById('student-projektbetreuer-button-beurteilung') && val === true) + { + document.getElementById('student-projektbetreuer-button-beurteilung').disabled=val; + document.getElementById('student-projektbetreuer-span-beurteilung').setAttribute("value", ''); + } } // **** diff --git a/content/student/studentprojektarbeitoverlay.xul.php b/content/student/studentprojektarbeitoverlay.xul.php index fe4b8b2b9..4d8ab4835 100644 --- a/content/student/studentprojektarbeitoverlay.xul.php +++ b/content/student/studentprojektarbeitoverlay.xul.php @@ -520,7 +520,7 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN') - +
    @@ -529,7 +529,7 @@ $is_hidden = (!defined('FAS_STUDIERENDE_PROJEKTARBEIT_VERTRAGSDETAILS_ANZEIGEN') - +
    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) ?> +
    @@ -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 097/187] 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 098/187] 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 099/187] =?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 += '
    erstelltam), 'd.m.Y') ?> langtext ?>
    + + + + + + + + + + + + + + + + + + +
    p->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>
    dokument_bezeichnung ?> + nachgereicht_am) ? date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; ?> + + langtext ?> + + anmerkung; ?> +
    + \ No newline at end of file diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index 214f450b0..95e383569 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -76,36 +76,4 @@
    -
    - 0): ?> -
    -

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

    - - - - - - - - - - - - - - - - - - - -
    p->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>
    dokument_bezeichnung ?> - nachgereicht_am) ? date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; ?> - - langtext ?> - - anmerkung; ?> -
    - +
    \ No newline at end of file diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index dbfff7d08..30acb8617 100644 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -49,7 +49,9 @@ 'zgvInPruefung', 'zgvErfuellt', 'zgvNichtErfuellt', - 'zgvErfuelltPruefung' + 'zgvErfuelltPruefung', + 'datumUngueltig', + 'nachreichDatumNichtVergangenheit' ), 'ui' => array( 'gespeichert', @@ -127,6 +129,9 @@
    load->view('system/infocenter/dokpruefung.php'); ?> +
    + load->view('system/infocenter/dokNachzureichend.php'); ?> +
    diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index a1362d2fa..1f50aa147 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -116,6 +116,9 @@
    load->view('system/infocenter/dokpruefung.php', array('formalReadonly' => true)); ?> +
    + load->view('system/infocenter/dokNachzureichend.php'); ?> +
    diff --git a/public/js/infocenter/docUeberpruefung.js b/public/js/infocenter/docUeberpruefung.js index ba45b8986..acb0ca60f 100644 --- a/public/js/infocenter/docUeberpruefung.js +++ b/public/js/infocenter/docUeberpruefung.js @@ -1,8 +1,20 @@ +const ALLOWED_DOC_TYPES = ['VorlSpB2', 'ZgvBaPre', 'ZgvMaPre']; + $(document).ready(function () { + DocUeberpruefung._formatDocTable(); + DocUeberpruefung.checkNachreichungButtons(); + var personid = $("#hiddenpersonid").val(); - DocUeberpruefung.checkNachreichungButtons(); + //add click events to "formal geprüft" checkboxes + $(".prchbox").click(function () + { + var boxid = this.id; + var akteid = InfocenterDetails._getPrestudentIdFromElementId(boxid); + var checked = this.checked; + DocUeberpruefung.saveFormalGeprueft(personid, akteid, checked) + }); $('select.aktenid').change(function() { @@ -33,14 +45,15 @@ $(document).ready(function () if(nachreichungAm === '') { - FHC_DialogLib.alertError('Ein Datum muss im folgenden Format angegeben werden: tt.mm.jjjj'); + FHC_DialogLib.alertError(FHC_PhrasesLib.t('infocenter', 'datumUngueltig')); return false; } var regEx = /^\d{2}\.\d{2}\.(\d{2}|\d{4})$/; + if(nachreichungAm.match(regEx) === null) { - FHC_DialogLib.alertError('Bitte das Datum im folgenden Format angeben: tt.mm.jjjj') + FHC_DialogLib.alertError(FHC_PhrasesLib.t('infocenter', 'datumUngueltig')) return false; } @@ -50,10 +63,48 @@ $(document).ready(function () var DocUeberpruefung = { + saveFormalGeprueft: function(personid, akteid, checked) + { + FHC_AjaxClient.ajaxCallPost( + CALLED_PATH + '/saveFormalGeprueft/' + encodeURIComponent(personid), + { + akte_id: akteid, + formal_geprueft: checked + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (FHC_AjaxClient.hasData(data)) + { + var timestamp = data.retval[0]; + if (timestamp === "") + { + $("#formalgeprueftam_" + akteid).text(""); + } + else + { + var fgdatum = $.datepicker.parseDate("yy-mm-dd", timestamp); + var gerfgdatum = $.datepicker.formatDate("dd.mm.yy", fgdatum); + $("#formalgeprueftam_" + akteid).text(gerfgdatum); + } + //refresh doctable tablesorter, formal geprueft changed! + $("#doctable").trigger("update"); + InfocenterDetails._refreshLog(); + } + else + { + InfocenterDetails._genericSaveError(); + } + }, + errorCallback: InfocenterDetails._genericSaveError, + veilTimeout: 0 + } + ); + }, + saveDocTyp: function(personid, akteid, typ) { FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + "/saveDocTyp/"+encodeURIComponent(personid), + CALLED_PATH + "/saveDocTyp/" + encodeURIComponent(personid), { "akte_id": akteid, "typ" : typ @@ -81,7 +132,7 @@ var DocUeberpruefung = { saveNachreichung: function (personid, nachreichungAm, nachreichungAnmerkung, typ) { FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + "/saveNachreichung/"+encodeURIComponent(personid), + CALLED_PATH + "/saveNachreichung/" + encodeURIComponent(personid), { "nachreichungAm": nachreichungAm, "nachreichungAnmerkung" : nachreichungAnmerkung, @@ -91,8 +142,9 @@ var DocUeberpruefung = { successCallback: function(data, textStatus, jqXHR) { if (FHC_AjaxClient.isSuccess(data)) { - FHC_DialogLib.alertSuccess("Done!"); + DocUeberpruefung._refreshNachzureichendeDoks(); InfocenterDetails._refreshLog(); + FHC_DialogLib.alertSuccess("Done!"); } else { @@ -132,14 +184,35 @@ var DocUeberpruefung = { checkNachreichungButton: function(akteid) { - var allowedTyps = ['VorlSpB2', 'ZgvBaPre', 'ZgvMaPre']; var typ = $('#aktenid_' + akteid).val(); var infos = $('#nachreichungInfos_' + akteid); - if ($.inArray(typ, allowedTyps) === -1) + if ($.inArray(typ, ALLOWED_DOC_TYPES) === -1) + { infos.addClass('hidden'); + } else + { infos.removeClass('hidden'); - } + } + }, + + _refreshNachzureichendeDoks: function() + { + var personid = $("#hiddenpersonid").val(); + + $("#nachzureichendeDoks").load( + CONTROLLER_URL + '/reloadDoks/' + personid + '?fhc_controller_id=' + FHC_AjaxClient.getUrlParameter('fhc_controller_id'), + function () { + DocUeberpruefung._formatDocTable(); + } + ); + }, + + _formatDocTable: function() + { + Tablesort.addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]); + Tablesort.addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]); + }, } \ No newline at end of file diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 1e393fc28..871516935 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -21,9 +21,6 @@ const ONHOLDNAME = 'onhold'; */ $(document).ready(function () { - //initialise table sorter - Tablesort.addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]); - Tablesort.addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]); InfocenterDetails._formatMessageTable(); InfocenterDetails._formatNotizTable(); @@ -37,15 +34,6 @@ $(document).ready(function () $("#sendmsgform").submit(); }); - //add click events to "formal geprüft" checkboxes - $(".prchbox").click(function () - { - var boxid = this.id; - var akteid = InfocenterDetails._getPrestudentIdFromElementId(boxid); - var checked = this.checked; - InfocenterDetails.saveFormalGeprueft(personid, akteid, checked) - }); - //add click events to zgv Prüfung section InfocenterDetails._addZgvPruefungEvents(personid); @@ -133,43 +121,6 @@ var InfocenterDetails = { // ----------------------------------------------------------------------------------------------------------------- // ajax calls - saveFormalGeprueft: function(personid, akteid, checked) - { - FHC_AjaxClient.ajaxCallPost( - CALLED_PATH + '/saveFormalGeprueft/' + encodeURIComponent(personid), - { - akte_id: akteid, - formal_geprueft: checked - }, - { - successCallback: function(data, textStatus, jqXHR) { - if (FHC_AjaxClient.hasData(data)) - { - var timestamp = data.retval[0]; - if (timestamp === "") - { - $("#formalgeprueftam_" + akteid).text(""); - } - else - { - var fgdatum = $.datepicker.parseDate("yy-mm-dd", timestamp); - var gerfgdatum = $.datepicker.formatDate("dd.mm.yy", fgdatum); - $("#formalgeprueftam_" + akteid).text(gerfgdatum); - } - //refresh doctable tablesorter, formal geprueft changed! - $("#doctable").trigger("update"); - InfocenterDetails._refreshLog(); - } - else - { - InfocenterDetails._genericSaveError(); - } - }, - errorCallback: InfocenterDetails._genericSaveError, - veilTimeout: 0 - } - ); - }, saveBewPriorisierung: function(data) { FHC_AjaxClient.ajaxCallPost( diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9559cb0c2..587308519 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -3506,6 +3506,66 @@ $phrases = array( ) ) ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'datumUngueltig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Das Datumsformat ist ungültig oder liegt außerhalb des gültigen Bereichs. Bitte geben Sie ein gültiges Datum im Format tt.mm.jjjj ein.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Date is invalid or out of range. Please enter a valid date in the format dd.mm.yyyy.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'dokUngueltig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bei dem Dokument ist keine Nachreichung möglich.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Date is invalid or out of range. Please enter a valid date in the format dd.mm.yyyy.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'nachreichDatumNichtVergangenheit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Das Datum der Nachreichung darf nicht in der Vergangenheit liegen.', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'The date of submission may not be in the past.', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), array( 'app' => 'core', 'category' => 'global', From 745ecf47111293f47aa1231473a14677102c3cab Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 30 Jun 2021 13:29:09 +0200 Subject: [PATCH 145/187] zgv pruefung unterscheiden zwischen bachelor und master --- .../system/infocenter/InfoCenter.php | 4 +++- .../infocenter/infocenterZgvDetails.php | 13 +++++++--- public/js/infocenter/zgvUeberpruefung.js | 24 ++++++++++++++----- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index deb388add..12d9a9c4d 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -242,6 +242,7 @@ class InfoCenter extends Auth_Controller $persondata = $this->_loadPersonData(getData($prestudentexists)[0]->person_id); $prestudent_id = array('prestudent_id' => $prestudent_id); $status = array('status' => getData($zgv)[0]->status); + $prestudent_data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); $this->DokumentModel->addOrder('bezeichnung'); $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load()))); @@ -250,7 +251,8 @@ class InfoCenter extends Auth_Controller $persondata, $prestudent_id, $status, - $dokumentdata + $dokumentdata, + $prestudent_data ); $origin_page = $this->input->get(self::ORIGIN_PAGE); diff --git a/application/views/system/infocenter/infocenterZgvDetails.php b/application/views/system/infocenter/infocenterZgvDetails.php index 1f50aa147..62fefbec8 100644 --- a/application/views/system/infocenter/infocenterZgvDetails.php +++ b/application/views/system/infocenter/infocenterZgvDetails.php @@ -59,6 +59,7 @@
    +
    diff --git a/public/js/infocenter/zgvUeberpruefung.js b/public/js/infocenter/zgvUeberpruefung.js index 0be4dfdad..6181083f2 100644 --- a/public/js/infocenter/zgvUeberpruefung.js +++ b/public/js/infocenter/zgvUeberpruefung.js @@ -2,6 +2,8 @@ $(document).ready(function () { var personid = $("#hiddenpersonid").val(); + var studiengang = $('#studiengangtyp').val(); + zgvUeberpruefung.checkAfterReload(); $('.zgvRueckfragen').click(function () @@ -18,12 +20,22 @@ $(document).ready(function () $('.zgvAkzeptieren').click(function (){ var prestudentid = InfocenterDetails._getPrestudentIdFromElementId(this.id); - var data = { - 'person_id' : personid, - 'prestudent_id' : prestudentid, - 'status' : 'accepted' + if (studiengang === 'b') + { + $('#inputStatus_' + prestudentid).val('accepted'); + $('#notizModal_' + prestudentid).modal('show'); + $('#notizModal_' + prestudentid + ' #inputNotizTitelModal').val('ZGV wurde erfüllt') } - zgvUeberpruefung.zgvStatusUpdate(data); + else + { + var data = { + 'person_id' : personid, + 'prestudent_id' : prestudentid, + 'status' : 'accepted' + } + zgvUeberpruefung.zgvStatusUpdate(data); + } + }); $('.zgvAblehnen').click(function (){ @@ -176,7 +188,7 @@ var zgvUeberpruefung = { checkAfterReload: function() { $('.zgvStatusText').each(function() { - if($(this).data('info')) { + if ($(this).data('info')) { zgvUeberpruefung.checkStatus(InfocenterDetails._getPrestudentIdFromElementId($(this).attr('id'))); } }); From 6246312ce52115f5484793523955122bc6dfafad Mon Sep 17 00:00:00 2001 From: ma0048 Date: Wed, 30 Jun 2021 15:24:25 +0200 Subject: [PATCH 146/187] bei ergaenzungspruefungen immer eine mail rausschicken und unterscheiden zw englisch und deutsch --- public/js/infocenter/infocenterDetails.js | 34 +++++++++++++---------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index 871516935..f5f435acb 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -9,6 +9,7 @@ const RTFREIGABE_MESSAGE_VORLAGE_QUER = "InfocenterRTfreigegQuer"; const RTFREIGABE_MESSAGE_VORLAGE_QUER_KURZ = "InfocenterRTfreigegQuerKurz"; const STGFREIGABE_MESSAGE_VORLAGE = "InfocenterSTGfreigegeben"; const STGFREIGABE_MESSAGE_VORLAGE_MASTER = "InfocenterSTGfreigegebenM"; +const STGFREIGABE_MESSAGE_VORLAGE_MASTER_ENGLISCH = "InfocenterSTGfreigegebenMEng"; //Statusgründe for which no Studiengang Freigabe Message should be sent const FIT_PROGRAMM_STUDIENGAENGE = [10021, 10027]; @@ -588,6 +589,7 @@ var InfocenterDetails = { var ausbildungssemester = receiverPrestudentstatus.ausbildungssemester; var studiengangbezeichnung = receiverPrestudentstatus.studiengangbezeichnung; var studiengangbezeichnung_englisch = receiverPrestudentstatus.studiengangbezeichnung_englisch; + var vorlage = null; var orgform_deutsch, orgform_englisch; orgform_deutsch = orgform_englisch = ""; @@ -625,7 +627,6 @@ var InfocenterDetails = { } else //not already for RT freigegeben - send RTfreigabe message { - var vorlage = null; //send Quereinstiegsmessage if later Ausbildungssemester if (ausbildungssemester > 1) { @@ -651,22 +652,25 @@ var InfocenterDetails = { } else { - //if Freigabe to Studiengang, send StgFreigabe Message if not already sent and allowed to send - if (!stgFreigegeben && receiverPrestudent.sendStgFreigabeMsg === true) + if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) { - if (receiverPrestudent.studiengangtyp === 'm' && (freigabedata.statusgrundbezeichnung === 'Ergänzungsprüfungen' || freigabedata.statusgrundbezeichnung === 'Supplementary exams')) - { - msgvars = { - 'studiengangbezeichnung': studiengangbezeichnung, - 'studiengangbezeichnung_englisch': studiengangbezeichnung_englisch, - 'orgform_deutsch': orgform_deutsch, - 'orgform_englisch': orgform_englisch - } - InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE_MASTER, msgvars); - }else - { - InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE, msgvars); + msgvars = { + 'studiengangbezeichnung': studiengangbezeichnung, + 'studiengangbezeichnung_englisch': studiengangbezeichnung_englisch, + 'orgform_deutsch': orgform_deutsch, + 'orgform_englisch': orgform_englisch } + if (receiverPrestudentstatus.sprache === 'English') + vorlage = STGFREIGABE_MESSAGE_VORLAGE_MASTER_ENGLISCH + else + vorlage = STGFREIGABE_MESSAGE_VORLAGE_MASTER + + InfocenterDetails.sendFreigabeMessage(prestudent_id, vorlage, msgvars); + } + //if Freigabe to Studiengang, send StgFreigabe Message if not already sent and allowed to send + else if (!stgFreigegeben && receiverPrestudent.sendStgFreigabeMsg === true) + { + InfocenterDetails.sendFreigabeMessage(prestudent_id, STGFREIGABE_MESSAGE_VORLAGE, msgvars); } } }; From 5d48b0aad049a0e0999e89489874241df4c1e828 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 2 Jul 2021 13:14:08 +0200 Subject: [PATCH 147/187] =?UTF-8?q?BT:=20neue=20zu=20akzeptierende=20Dokum?= =?UTF-8?q?ente,=20Studiengang=20als=20=C3=BCbergebener=20zgvma=5FOrt,=20S?= =?UTF-8?q?tyling=20nicht=20verpflichtende=20Dokumente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/dokument.class.php | 13 +++------ include/prestudent.class.php | 51 +++++++++++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/include/dokument.class.php b/include/dokument.class.php index 4d70891c0..6dec9a66d 100644 --- a/include/dokument.class.php +++ b/include/dokument.class.php @@ -1,5 +1,5 @@ db_add_param($dokument_kurzbz).")"; - //echo var_dump($qry); - //gibt ein Array von zu akzeptierenden Dokumenten zurück if ($db->db_query($qry)) { $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) { while ($row = $db->db_fetch_object()) { - //echo var_dump($row->prestudent_id); $arrayDoksZuAkzeptieren[] = $row->prestudent_id; } - //print_r($arrayDoksZuAkzeptieren); //für alle prestudent_ids das Dokument akzeptieren $qry = "INSERT INTO public.tbl_dokumentprestudent(dokument_kurzbz, prestudent_id) VALUES"; @@ -979,20 +975,17 @@ class dokument extends basis_db person_id = ".$this->db_add_param($person_id)." and dokument_kurzbz = ".$this->db_add_param($dokument_kurzbz); - // echo var_dump($qry); - //gibt ein Array von zu Entakzeptierenden Dokumenten zurück if ($db->db_query($qry)) { $num_rows = $db->db_num_rows(); - // Wenn kein ergebnis return 0 sonst ID + if ($num_rows > 0) { while ($row = $db->db_fetch_object()) { $arrayDoksZuEntakzeptieren[] = $row->prestudent_id; } - //print_r($arrayDoksZuEntakzeptieren); //für alle prestudent_ids das Dokument Entakzeptieren $qry = "DELETE FROM public.tbl_dokumentprestudent WHERE prestudent_id in ("; diff --git a/include/prestudent.class.php b/include/prestudent.class.php index 8e19927ff..0fe4a06e6 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -1,5 +1,5 @@ , - * Andreas Oesterreicher and - * Rudolf Hangl . + * Andreas Oesterreicher , + * Rudolf Hangl and + * Manuela Thamer . */ require_once(dirname(__FILE__).'/person.class.php'); require_once(dirname(__FILE__).'/log.class.php'); @@ -2408,4 +2409,48 @@ class prestudent extends person else return false; } + + + /** + * Liefert den wahrscheinlichen Studiengang der MasterZGV einer Person + * @param int $person_id ID der zu überprüfenden Person. + * @return string studiengangkurzbzlang + */ + public function getZGVMasterStg($person_id) + { + if (!is_numeric($person_id)) + { + $this->errormsg = 'Person_id muss eine gueltige Zahl sein'; + return false; + } + + $qry = "SELECT kurzbzlang + FROM public.tbl_prestudent + JOIN public.tbl_prestudentstatus USING (prestudent_id) + JOIN public.tbl_studiengang USING (studiengang_kz) + WHERE person_id = ".$this->db_add_param($person_id, FHC_INTEGER)." + AND status_kurzbz in ('Absolvent','Diplomand','Unterbrecher','Student') + AND typ in ('b','m','d') + ORDER BY status_kurzbz ASC + LIMIT 1;"; + + if ($this->db_query($qry)) + { + if ($row = $this->db_fetch_object()) + { + $stg = $row->kurzbzlang; + return $stg; + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } + else + { + $this->errormsg = 'Fehler beim Laden der Daten'; + return false; + } + } } From cee615664605f1e18c8ca31264e97f8a372bcac0 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Wed, 7 Jul 2021 20:22:53 +0200 Subject: [PATCH 148/187] - added Bisioaufenthaltfoerderung_model.php - dbupdate_3.3.php: added Buchungstyp "ZuschussIO" --- .../codex/Bisioaufenthaltfoerderung_model.php | 15 +++++++++++++++ system/dbupdate_3.3.php | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 application/models/codex/Bisioaufenthaltfoerderung_model.php diff --git a/application/models/codex/Bisioaufenthaltfoerderung_model.php b/application/models/codex/Bisioaufenthaltfoerderung_model.php new file mode 100644 index 000000000..7a817d67c --- /dev/null +++ b/application/models/codex/Bisioaufenthaltfoerderung_model.php @@ -0,0 +1,15 @@ +dbTable = 'bis.tbl_bisio_aufenthaltfoerderung'; + $this->pk = array('bisio_id', 'aufenthaltfoerderung_code'); + $this->hasSequence = false; + } +} diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 407a4aa24..045170661 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4781,6 +4781,19 @@ if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_pruef } } +// Added Buchungstyp "ZuschussIO" +if ($result = @$db->db_query("SELECT 1 FROM public.tbl_buchungstyp WHERE buchungstyp_kurzbz = 'ZuschussIO';")) +{ + if ($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO public.tbl_buchungstyp (buchungstyp_kurzbz, beschreibung, standardtext) VALUES ('ZuschussIO', 'Zuschuss IO', 'Zuschuss Incoming Outgoing');"; + if (!$db->db_query($qry)) + echo 'public.tbl_buchungstyp '.$db->db_last_error().'
    '; + else + echo ' public.tbl_buchungstyp: Added buchungstyp "ZuschussIO"
    '; + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

    Pruefe Tabellen und Attribute!

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

    Es wurde kein Studiengang ausgewählt!

    '); } +//Parameter wenn nur Bewerbermeldung durchgeführt werden soll +$nur_bewerber=filter_input(INPUT_GET, 'nur_bewerber', FILTER_VALIDATE_BOOLEAN); + /* standortcode 22=Wien derzeit fuer alle Studierende der gleiche Standort @@ -269,58 +273,58 @@ if($result_in = $db->db_query($qry_in)) } } -//Hauptselect -// An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird -if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) +if ($nur_bewerber !== true) { - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - )) - ORDER BY student_uid, nachname, vorname - "; -} -else -{ - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." - AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") - AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' - OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) - OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") - OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - ))) - ORDER BY student_uid, nachname, vorname - "; + //Hauptselect + // An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird + if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) + { + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + )) + ORDER BY student_uid, nachname, vorname + "; + } + else + { + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." + AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") + AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' + OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) + OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") + OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + ))) + ORDER BY student_uid, nachname, vorname + "; + } } -if($result = $db->db_query($qry)) -{ - - $datei.=" +$datei.=" ".$erhalter." ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." @@ -328,26 +332,28 @@ if($result = $db->db_query($qry)) ".$stg_kz.""; +if($nur_bewerber !== true && $result = $db->db_query($qry)) +{ while($row = $db->db_fetch_object($result)) { $datei.= GenerateXMLStudentBlock($row); } +} - //Bewerberblock bei Ausserordentlichen nicht anzeigen - if($stg_kz!=('9'.$erhalter)) +//Bewerberblock bei Ausserordentlichen nicht anzeigen +if($stg_kz!=('9'.$erhalter)) +{ + $stg_obj = new studiengang(); + + if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) { - $stg_obj = new studiengang(); - - if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) - { - $orgcodes = array_unique($orgform_code_array); - //Mischform - foreach($orgcodes as $code) - $datei.= GenerateXMLBewerberBlock($code); - } - else - $datei.= GenerateXMLBewerberBlock(); + $orgcodes = array_unique($orgform_code_array); + //Mischform + foreach($orgcodes as $code) + $datei.= GenerateXMLBewerberBlock($code); } + else + $datei.= GenerateXMLBewerberBlock(); } $datei.=" From 50a7bfe92784a66d54d4d5d03f6f23879eaa42f8 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 19 Jul 2021 12:03:55 +0200 Subject: [PATCH 157/187] Minor text changes in Infobox/Nachweisdokumente Signed-off-by: cris-technikum --- system/phrasesupdate.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 2c65fe55f..ce04d5169 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -11315,17 +11315,17 @@ array( array( 'sprache' => 'German', 'text' => "Bitte laden Sie mehrere Nachweis-Dokumente zusammengefasst in einem PDF-Dokument hoch. -

    Falls Sie für den Nachweis der Gleichwertigkeit in Bundesgesetzblättern veröffentlichte Lehrpläne (vgl. HTL, HAK…) verwenden, - laden Sie bitte nur die für die Anrechnung relevanten Teile hoch oder markieren Sie diese entsprechend. -

    Falls diese Informationen nicht enthalten sind, kann der Antrag auch abgelehnt werden.", +

    Falls für den Nachweis der Gleichwertigkeit in Bundesgesetzblättern veröffentlichte Lehrpläne (vgl. HTL, HAK…) verwendet werden, + sind die für die Anrechnung relevanten Teile entsprechend zu markieren. +

    Falls das nicht gemacht wird, wird der Antrag aus formalen Gründen abgelehnt.", 'description' => '', 'insertvon' => 'system' ), array( 'sprache' => 'English', 'text' => "Please combine and upload more than one verification document in one PDF document. -

    If you use curricula published in federal law gazettes (cf. HTL, HAK ...) to prove equivalence, please upload only the parts relevant for recognition or mark them accordingly. -

    If this information is not included, the application might be rejected.", +

    If you use curricula published in federal law gazettes (cf. HTL, HAK ...) to prove equivalence, please mark the parts relevant for recognition accordingly. +

    If this information is not included, the application must be rejected.", 'description' => '', 'insertvon' => 'system' ) From 68a469bce66a4d35ec668210d7a504909a7e8f22 Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 19 Jul 2021 14:50:12 +0200 Subject: [PATCH 158/187] Changed text for Anrechnungen Antragsfrist 15.09. -> to 22.09. Signed-off-by: cris-technikum --- system/phrasesupdate.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index ce04d5169..97bf358f7 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -11263,7 +11263,7 @@ Any unusual occurrences 'sprache' => 'German', 'text' => "Bitte laden Sie den Antrag in deutscher oder englischer Sprache für das
      -
    • Wintersemester spätestens bis 15. September
    • +
    • Wintersemester spätestens bis 22. September
    • Sommersemester spätestens bis 22. Februar hoch.

    Die Entscheidung über den Antrag erfolgt in der Regel innerhalb von zwei Wochen ab dem 15. September @@ -11276,7 +11276,7 @@ Any unusual occurrences 'sprache' => 'English', 'text' => "Please upload the application in German or English
      -
    • by September 15th for the winter semester
    • +
    • by September 22nd for the winter semester
    • by February 22nd for the summer semester at the latest.

    The decision on the application is usually made within two weeks from September 15 (winter semester) or February 22 (summer semester). @@ -11411,7 +11411,7 @@ array( 'sprache' => 'German', 'text' => "Die Entscheidung über den Antrag durch die Studiengangsleitung sollte
      -
    • innerhalb von zwei Wochen ab dem 15. September (Wintersemester)
    • +
    • innerhalb von zwei Wochen ab dem 22. September (Wintersemester)
    • innerhalb von zwei Wochen ab dem 22. Februar (Sommersemester) erfolgen.
    ", 'description' => '', @@ -11421,7 +11421,7 @@ array( 'sprache' => 'English', 'text' => "The decision on the application is usually made by the program director
      -
    • within two weeks from September 15 (winter semester)
    • +
    • within two weeks from September 22 (winter semester)
    • within two weeks from February 22 (summer semester).
    ", 'description' => '', From 143053b893f320efc9818ebac2b2c9cb023b5d91 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 20 Jul 2021 13:53:38 +0200 Subject: [PATCH 159/187] =?UTF-8?q?Bewerbungstool:=20alle=20Masterbewerbun?= =?UTF-8?q?gen=20mit=20Status=20Interessent=20mit=20ZGV-Ort=20=C3=BCbersch?= =?UTF-8?q?reiben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/prestudent.class.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/prestudent.class.php b/include/prestudent.class.php index fcafd36b8..eb8767883 100644 --- a/include/prestudent.class.php +++ b/include/prestudent.class.php @@ -2316,8 +2316,6 @@ class prestudent extends person person_id = ".$this->db_add_param($person_id)." AND typ ='m' - AND - zgvmadatum IS NULL And get_rolle_prestudent(prestudent_id, null) = 'Interessent';"; From ccf4d0e49beb17d708b3f74760fe581adb8b1ac5 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Tue, 20 Jul 2021 20:21:50 +0200 Subject: [PATCH 160/187] studentenmeldung.php: link for file with bewerberdaten only added, instead of previous way of passing a GET parameter for bewerdaten only export --- vilesci/bis/studentenmeldung.php | 155 +++++++++++++++++-------------- 1 file changed, 86 insertions(+), 69 deletions(-) diff --git a/vilesci/bis/studentenmeldung.php b/vilesci/bis/studentenmeldung.php index 213cd4a7b..dceb4d30c 100644 --- a/vilesci/bis/studentenmeldung.php +++ b/vilesci/bis/studentenmeldung.php @@ -76,6 +76,7 @@ $stgart=''; $orgform_code=''; $status=''; $datei=''; +$dateiNurBewerber=''; $aktstatus=''; $aktstatus_datum=''; $mob=''; @@ -100,7 +101,6 @@ $bwlist=''; $storgfor=''; $verwendete_orgformen=array(); $student_data=array(); -$nur_bewerber=false; $datum_obj = new datum(); @@ -139,9 +139,6 @@ else die('

    Es wurde kein Studiengang ausgewählt!

    '); } -//Parameter wenn nur Bewerbermeldung durchgeführt werden soll -$nur_bewerber=filter_input(INPUT_GET, 'nur_bewerber', FILTER_VALIDATE_BOOLEAN); - /* standortcode 22=Wien derzeit fuer alle Studierende der gleiche Standort @@ -273,58 +270,57 @@ if($result_in = $db->db_query($qry_in)) } } -if ($nur_bewerber !== true) +//Hauptselect +// An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird +if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) { - //Hauptselect - // An der FHTW können nur die Incomings ausgelesen werden, wenn die stg_kz 10006 übergeben wird - if (CAMPUS_NAME == 'FH Technikum Wien' && $stg_kz==10006) - { - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - )) - ORDER BY student_uid, nachname, vorname - "; - } - else - { - $qry=" - SELECT - DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat - FROM - public.tbl_student - JOIN public.tbl_benutzer ON(student_uid=uid) - JOIN public.tbl_person USING (person_id) - JOIN public.tbl_prestudent USING (prestudent_id) - JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) - WHERE - bismelden=TRUE - AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." - AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") - AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' - OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) - OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' - OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") - OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") - OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) - ))) - ORDER BY student_uid, nachname, vorname - "; - } + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + )) + ORDER BY student_uid, nachname, vorname + "; +} +else +{ + $qry=" + SELECT + DISTINCT ON(student_uid, nachname, vorname) *, public.tbl_person.person_id AS pers_id, to_char(gebdatum, 'ddmmyy') AS vdat + FROM + public.tbl_student + JOIN public.tbl_benutzer ON(student_uid=uid) + JOIN public.tbl_person USING (person_id) + JOIN public.tbl_prestudent USING (prestudent_id) + JOIN public.tbl_prestudentstatus ON(tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id) + WHERE + bismelden=TRUE + AND tbl_student.studiengang_kz=".$db->db_add_param($stg_kz)." + AND (((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($ssem).") AND (tbl_prestudentstatus.datum<=".$db->db_add_param($bisdatum).") + AND (status_kurzbz='Student' OR status_kurzbz='Outgoing' + OR status_kurzbz='Praktikant' OR status_kurzbz='Diplomand' OR status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher' OR status_kurzbz='Unterbrecher')) + OR ((tbl_prestudentstatus.studiensemester_kurzbz=".$db->db_add_param($psem).") AND (status_kurzbz='Absolvent' + OR status_kurzbz='Abbrecher') AND tbl_prestudentstatus.datum>".$db->db_add_param($bisprevious).") + OR (status_kurzbz='Incoming' AND student_uid IN (SELECT student_uid FROM bis.tbl_bisio WHERE (tbl_bisio.bis>=".$db->db_add_param($bisprevious).") + OR (tbl_bisio.von<=".$db->db_add_param($bisdatum)." AND (tbl_bisio.bis>=".$db->db_add_param($bisdatum)." OR tbl_bisio.bis IS NULL)) + ))) + ORDER BY student_uid, nachname, vorname + "; } -$datei.=" +if($result = $db->db_query($qry)) +{ + $header =" ".$erhalter." ".date("dmY", $datumobj->mktime_fromdate($bisdatum))." @@ -332,34 +328,48 @@ $datei.=" ".$stg_kz.""; -if($nur_bewerber !== true && $result = $db->db_query($qry)) -{ + + $datei .= $header; + $dateiNurBewerber .= $header; + while($row = $db->db_fetch_object($result)) { $datei.= GenerateXMLStudentBlock($row); } -} -//Bewerberblock bei Ausserordentlichen nicht anzeigen -if($stg_kz!=('9'.$erhalter)) -{ - $stg_obj = new studiengang(); - - if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) + //Bewerberblock bei Ausserordentlichen nicht anzeigen + if($stg_kz!=('9'.$erhalter)) { - $orgcodes = array_unique($orgform_code_array); - //Mischform - foreach($orgcodes as $code) - $datei.= GenerateXMLBewerberBlock($code); + $stg_obj = new studiengang(); + + if($orgform_code==3 || $stg_obj->isMischform($stg_kz,$ssem) || $stg_obj->isMischform($stg_kz,$psem)) + { + $orgcodes = array_unique($orgform_code_array); + //Mischform + foreach($orgcodes as $code) + { + $bewerberBlock=GenerateXMLBewerberBlock($code); + $datei.=$bewerberBlock; + $dateiNurBewerber.=$bewerberBlock; + } + } + else + { + $bewerberBlock=GenerateXMLBewerberBlock(); + $datei.=$bewerberBlock; + $dateiNurBewerber.=$bewerberBlock; + } } - else - $datei.= GenerateXMLBewerberBlock(); } -$datei.=" +$footer=" "; + +$datei.=$footer; +$dateiNurBewerber.=$footer; + echo ' @@ -598,6 +608,12 @@ $dateiausgabe=fopen($ddd,'w'); fwrite($dateiausgabe,$datei); fclose($dateiausgabe); +$dddNurBew='bisdaten/bismeldung_bewerber_'.$ssem.'_Stg'.$stg_kz.'.xml'; + +$dateiausgabe=fopen($dddNurBew,'w'); +fwrite($dateiausgabe,$dateiNurBewerber); +fclose($dateiausgabe); + $eee='bisdaten/tabelle_'.$ssem.'_Stg'.$stg_kz.'.html'; $dateiausgabe=fopen($eee,'w'); @@ -608,6 +624,7 @@ if(file_exists($ddd)) { echo 'BIS-Meldung Stg '.$stg_kz.' archivieren
    '; echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.'
    '; + echo 'XML-Datei für BIS-Meldung Stg '.$stg_kz.' - nur Bewerberdaten
    '; } if(file_exists($eee)) { From 36d09813313f2eaad3241cd34bcd4acaaaf6f995 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 23 Jul 2021 12:57:28 +0200 Subject: [PATCH 161/187] =?UTF-8?q?neuer=20Branch=20+=20Korrektur=20Fehler?= =?UTF-8?q?meldung=20bei=20=C3=84nderung=20Status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/crm/Statusgrund.php | 8 ++++++-- application/models/crm/Statusgrund_model.php | 4 +++- application/views/crm/statusGrundList.php | 4 +++- application/views/crm/statusgrundEdit.php | 15 +++++++++++++++ application/views/crm/statusgrundNew.php | 10 ++++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/application/controllers/crm/Statusgrund.php b/application/controllers/crm/Statusgrund.php index 344ac06dc..3c7e43736 100644 --- a/application/controllers/crm/Statusgrund.php +++ b/application/controllers/crm/Statusgrund.php @@ -129,6 +129,7 @@ class Statusgrund extends Auth_Controller $aktiv = $this->input->post("aktiv") != null && $this->input->post("aktiv") == "on" ? true : false; $bezeichnung_mehrsprachig = $this->input->post("bezeichnung_mehrsprachig"); $beschreibung = $this->input->post("beschreibung"); + $statusgrund_kurzbz = $this->input->post("statusgrund_kurzbz"); for ($i = 0; $i < count($bezeichnung_mehrsprachig); $i++) { @@ -177,7 +178,8 @@ class Statusgrund extends Auth_Controller $data = array( "aktiv" => $aktiv, "bezeichnung_mehrsprachig" => $bezeichnung_mehrsprachig, - "beschreibung" => $beschreibung + "beschreibung" => $beschreibung, + "statusgrund_kurzbz" => $statusgrund_kurzbz ); $statusgrund = $this->StatusgrundModel->update($statusgrund_id, $data); @@ -196,6 +198,7 @@ class Statusgrund extends Auth_Controller $bezeichnung_mehrsprachig = $this->input->post("bezeichnung_mehrsprachig"); $beschreibung = $this->input->post("beschreibung"); $status_kurzbz = $this->input->post("status_kurzbz"); + $statusgrund_kurzbz = $this->input->post("statusgrund_kurzbz"); for ($i = 0; $i < count($bezeichnung_mehrsprachig); $i++) { @@ -245,7 +248,8 @@ class Statusgrund extends Auth_Controller "status_kurzbz" => $status_kurzbz, "aktiv" => $aktiv, "bezeichnung_mehrsprachig" => $bezeichnung_mehrsprachig, - "beschreibung" => $beschreibung + "beschreibung" => $beschreibung, + "statusgrund_kurzbz" => $statusgrund_kurzbz ); $statusgrund = $this->StatusgrundModel->insert($data); diff --git a/application/models/crm/Statusgrund_model.php b/application/models/crm/Statusgrund_model.php index 7ab17a45b..d488e12d1 100644 --- a/application/models/crm/Statusgrund_model.php +++ b/application/models/crm/Statusgrund_model.php @@ -12,7 +12,7 @@ class Statusgrund_model extends DB_Model $this->pk = "statusgrund_id"; } - public function getStatus($status_kurzbz = null, $aktiv = null) + public function getStatus($status_kurzbz = null, $aktiv = null, $statusgrund_kurzbz = null) { $this->addOrder('bezeichnung_mehrsprachig'); $where = array(); @@ -20,6 +20,8 @@ class Statusgrund_model extends DB_Model $where['status_kurzbz'] = $status_kurzbz; if (!is_null($aktiv)) $where['aktiv'] = $aktiv; + if (!is_null($statusgrund_kurzbz)) + $where['statusgrund_kurzbz'] = $statusgrund_kurzbz; $status = $this->loadWhere($where); diff --git a/application/views/crm/statusGrundList.php b/application/views/crm/statusGrundList.php index e128856d3..ab8f096bb 100644 --- a/application/views/crm/statusGrundList.php +++ b/application/views/crm/statusGrundList.php @@ -15,6 +15,7 @@ Aktiv Bezeichnung mehrsprachig Beschreibung + Statusgrund @@ -25,6 +26,7 @@ aktiv); ?> bezeichnung_mehrsprachig); ?> beschreibung); ?> + statusgrund_kurzbz); ?> Edit @@ -33,4 +35,4 @@
    - \ No newline at end of file + diff --git a/application/views/crm/statusgrundEdit.php b/application/views/crm/statusgrundEdit.php index 9fa91b6d5..fc001d92a 100644 --- a/application/views/crm/statusgrundEdit.php +++ b/application/views/crm/statusgrundEdit.php @@ -81,6 +81,21 @@   + + + StatusGrund: + + + + +
    + + + + +   + + diff --git a/application/views/crm/statusgrundNew.php b/application/views/crm/statusgrundNew.php index ffcd18429..1c3a5f9e0 100644 --- a/application/views/crm/statusgrundNew.php +++ b/application/views/crm/statusgrundNew.php @@ -51,6 +51,16 @@   + + + StatusGrund: + + + + +
    + + From ccfd038d8a8d729f7a7b03e0d5f36032426e2596 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 23 Jul 2021 13:32:53 +0200 Subject: [PATCH 162/187] =?UTF-8?q?13938=20Vorr=C3=BCckung=20von=20bezeich?= =?UTF-8?q?nung=5Fmehrsprachig=20auf=20statusgrund=5Fkurzbz=20umgebaut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/student/studentrolledialog.js.php | 314 +++++++++++----------- include/statusgrund.class.php | 28 ++ vilesci/personen/student_vorrueckung.php | 47 ++-- 3 files changed, 213 insertions(+), 176 deletions(-) diff --git a/content/student/studentrolledialog.js.php b/content/student/studentrolledialog.js.php index ef0291fe4..60c247781 100644 --- a/content/student/studentrolledialog.js.php +++ b/content/student/studentrolledialog.js.php @@ -1,155 +1,159 @@ -, - * Andreas Oesterreicher and - * Rudolf Hangl . - */ - -require_once('../../config/vilesci.config.inc.php'); - -?> -var StudentRolleStudiensemester_old; -var StudentRolleAusbildungssemester_old; -var StudentRolleStatusgrundDatasource; - -// **** -// * Laedt die Rolle -// **** -function StudentRolleInit(prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester) -{ - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - if(status_kurzbz!='') - { - document.getElementById('student-rolle-grid-row-textbox').hidden=false; - document.getElementById('student-rolle-grid-row-menulist').hidden=true; - - StudentRolleStudiensemester_old=studiensemester_kurzbz; - StudentRolleAusbildungssemester_old=ausbildungssemester; - - //Daten holen - var url = 'rdf/prestudentrolle.rdf.php?prestudent_id='+prestudent_id+'&status_kurzbz='+status_kurzbz+'&studiensemester_kurzbz='+studiensemester_kurzbz+'&ausbildungssemester='+ausbildungssemester+'&'+gettimestamp(); - - var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"]. - getService(Components.interfaces.nsIRDFService); - - var dsource = rdfService.GetDataSourceBlocking(url); - - var subject = rdfService.GetResource("http://www.technikum-wien.at/prestudentrolle/" + prestudent_id+"/"+status_kurzbz+"/"+studiensemester_kurzbz+"/"+ausbildungssemester); - - var predicateNS = "http://www.technikum-wien.at/prestudentrolle/rdf"; - - //RDF parsen - var datum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum" )); - var bestaetigt_datum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bestaetigt_am" )); - var bewerbung_abgeschicktamum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bewerbung_abgeschicktamum" )); - var orgform_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#orgform_kurzbz" )); - var studienplan_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" )); - var anmerkung= getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anmerkung" )); - var statusgrund_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#statusgrund_id" )); - var rt_stufe = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#rt_stufe" )); - var neu = false; - StudentRolleLoadStatusgrund(status_kurzbz, statusgrund_id); - } - else - { - StudentRolleStudiensemester_old=''; - StudentRolleAusbildungssemester_old=''; - - document.getElementById('student-rolle-grid-row-textbox').hidden=true; - document.getElementById('student-rolle-grid-row-menulist').hidden=false; - - //Defaultwerte bei Neuem Datensatz - var status_kurzbz = 'Interessent'; - var studiensemester_kurzbz=window.opener.getStudiensemester(); - var ausbildungssemester='1'; - var datum = ''; - var bestaetigt_datum = ''; - var bewerbung_abgeschicktamum = ''; - var orgform_kurzbz = ''; - var studienplan_id = ''; - var anmerkung = ''; - var statusgrund_id = ''; - var rt_stufe = ''; - StudentRolleLoadStatusgrund(status_kurzbz); - } - - document.getElementById('student-rolle-textbox-prestudent_id').value=prestudent_id; - document.getElementById('student-rolle-textbox-status_kurzbz').value=status_kurzbz; - document.getElementById('student-rolle-menulist-studiensemester').value=studiensemester_kurzbz; - document.getElementById('student-rolle-menulist-ausbildungssemester').value=ausbildungssemester; - document.getElementById('student-rolle-datum-datum').value=datum; - document.getElementById('student-rolle-datum-bestaetigt_datum').value=bestaetigt_datum; - document.getElementById('student-rolle-datum-bewerbung_abgeschicktamum').value=bewerbung_abgeschicktamum; - document.getElementById('student-rolle-menulist-orgform_kurzbz').value=orgform_kurzbz; - MenulistSelectItemOnValue('student-rolle-menulist-studienplan', studienplan_id); - document.getElementById('student-rolle-textbox-anmerkung').value=anmerkung; - MenulistSelectItemOnValue('student-rolle-menulist-statusgrund', statusgrund_id); - MenulistSelectItemOnValue('student-rolle-menulist-stufe', rt_stufe); -} - -// **** -// * Speichern der Rolle -// * Hierzu wird eine Funktion vom Aufrufenden Fenster gestartet weil -// * es dann nicht zu Problemen mit den Zugriffen auf die anderen Fkt -// * kommt. -// **** -function StudentRolleSpeichern() -{ - if(window.opener.StudentRolleSpeichern(document, StudentRolleStudiensemester_old, StudentRolleAusbildungssemester_old)) - window.close(); -} - -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(); - - try - { - StudentRolleStatusgrundDatasource.removeXMLSinkObserver(StudentDetailRolleTreeSinkObserver); - } - catch(e) - {} - - //Alte DS entfernen - var oldDatasources = menulistgrund.database.GetDataSources(); - while(oldDatasources.hasMoreElements()) - { - menulistgrund.database.RemoveDataSource(oldDatasources.getNext()); - } - //Refresh damit die entfernten DS auch wirklich entfernt werden - menulistgrund.builder.rebuild(); - - var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); - StudentRolleStatusgrundDatasource = rdfService.GetDataSourceBlocking(url); - StudentRolleStatusgrundDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); - StudentRolleStatusgrundDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink); - menulistgrund.database.AddDataSource(StudentRolleStatusgrundDatasource); - menulistgrund.builder.rebuild(); -} - -/** - * Wenn das Dropdown fuer den Status geaendert wird, dann - * werden die Statusgruende zu diesem Status geladen - */ -function StudentRolleChangeStatus() -{ - var status = document.getElementById('student-rolle-menulist-status_kurzbz').value; - StudentRolleLoadStatusgrund(status); -} \ No newline at end of file +, + * Andreas Oesterreicher and + * Rudolf Hangl . + */ + +require_once('../../config/vilesci.config.inc.php'); + +?> +var StudentRolleStudiensemester_old; +var StudentRolleAusbildungssemester_old; +var StudentRolleStatusgrundDatasource; + +// **** +// * Laedt die Rolle +// **** +function StudentRolleInit(prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester) +{ + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + if(status_kurzbz!='') + { + document.getElementById('student-rolle-grid-row-textbox').hidden=false; + document.getElementById('student-rolle-grid-row-menulist').hidden=true; + + StudentRolleStudiensemester_old=studiensemester_kurzbz; + StudentRolleAusbildungssemester_old=ausbildungssemester; + + //Daten holen + var url = 'rdf/prestudentrolle.rdf.php?prestudent_id='+prestudent_id+'&status_kurzbz='+status_kurzbz+'&studiensemester_kurzbz='+studiensemester_kurzbz+'&ausbildungssemester='+ausbildungssemester+'&'+gettimestamp(); + + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"]. + getService(Components.interfaces.nsIRDFService); + + var dsource = rdfService.GetDataSourceBlocking(url); + + var subject = rdfService.GetResource("http://www.technikum-wien.at/prestudentrolle/" + prestudent_id+"/"+status_kurzbz+"/"+studiensemester_kurzbz+"/"+ausbildungssemester); + + var predicateNS = "http://www.technikum-wien.at/prestudentrolle/rdf"; + + //RDF parsen + var datum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#datum" )); + var bestaetigt_datum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bestaetigt_am" )); + var bewerbung_abgeschicktamum = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#bewerbung_abgeschicktamum" )); + var orgform_kurzbz = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#orgform_kurzbz" )); + var studienplan_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studienplan_id" )); + var anmerkung= getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anmerkung" )); + var statusgrund_id = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#statusgrund_id" )); + var rt_stufe = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#rt_stufe" )); + var neu = false; + StudentRolleLoadStatusgrund(status_kurzbz, statusgrund_id); + } + else + { + StudentRolleStudiensemester_old=''; + StudentRolleAusbildungssemester_old=''; + + document.getElementById('student-rolle-grid-row-textbox').hidden=true; + document.getElementById('student-rolle-grid-row-menulist').hidden=false; + + //Defaultwerte bei Neuem Datensatz + var status_kurzbz = 'Interessent'; + var studiensemester_kurzbz=window.opener.getStudiensemester(); + var ausbildungssemester='1'; + var datum = ''; + var bestaetigt_datum = ''; + var bewerbung_abgeschicktamum = ''; + var orgform_kurzbz = ''; + var studienplan_id = ''; + var anmerkung = ''; + var statusgrund_id = ''; + var rt_stufe = ''; + StudentRolleLoadStatusgrund(status_kurzbz); + } + + document.getElementById('student-rolle-textbox-prestudent_id').value=prestudent_id; + document.getElementById('student-rolle-textbox-status_kurzbz').value=status_kurzbz; + document.getElementById('student-rolle-menulist-studiensemester').value=studiensemester_kurzbz; + document.getElementById('student-rolle-menulist-ausbildungssemester').value=ausbildungssemester; + document.getElementById('student-rolle-datum-datum').value=datum; + document.getElementById('student-rolle-datum-bestaetigt_datum').value=bestaetigt_datum; + document.getElementById('student-rolle-datum-bewerbung_abgeschicktamum').value=bewerbung_abgeschicktamum; + document.getElementById('student-rolle-menulist-orgform_kurzbz').value=orgform_kurzbz; + MenulistSelectItemOnValue('student-rolle-menulist-studienplan', studienplan_id); + document.getElementById('student-rolle-textbox-anmerkung').value=anmerkung; + MenulistSelectItemOnValue('student-rolle-menulist-statusgrund', statusgrund_id); + MenulistSelectItemOnValue('student-rolle-menulist-stufe', rt_stufe); +} + +// **** +// * Speichern der Rolle +// * Hierzu wird eine Funktion vom Aufrufenden Fenster gestartet weil +// * es dann nicht zu Problemen mit den Zugriffen auf die anderen Fkt +// * kommt. +// **** +function StudentRolleSpeichern() +{ + if(window.opener.StudentRolleSpeichern(document, StudentRolleStudiensemester_old, StudentRolleAusbildungssemester_old)) + window.close(); +} + +function StudentRolleLoadStatusgrund(status_kurzbz, statusgrund_id) +{ + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var menulistgrund = document.getElementById('student-rolle-menulist-statusgrund'); + + 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 + { + StudentRolleStatusgrundDatasource.removeXMLSinkObserver(StudentDetailRolleTreeSinkObserver); + } + catch(e) + {} + + //Alte DS entfernen + var oldDatasources = menulistgrund.database.GetDataSources(); + while(oldDatasources.hasMoreElements()) + { + menulistgrund.database.RemoveDataSource(oldDatasources.getNext()); + } + //Refresh damit die entfernten DS auch wirklich entfernt werden + menulistgrund.builder.rebuild(); + + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); + StudentRolleStatusgrundDatasource = rdfService.GetDataSourceBlocking(url); + StudentRolleStatusgrundDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); + StudentRolleStatusgrundDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink); + menulistgrund.database.AddDataSource(StudentRolleStatusgrundDatasource); + menulistgrund.builder.rebuild(); +} + +/** + * Wenn das Dropdown fuer den Status geaendert wird, dann + * werden die Statusgruende zu diesem Status geladen + */ +function StudentRolleChangeStatus() +{ + var status = document.getElementById('student-rolle-menulist-status_kurzbz').value; + StudentRolleLoadStatusgrund(status); +} diff --git a/include/statusgrund.class.php b/include/statusgrund.class.php index aa084b8c6..6b2c12e03 100644 --- a/include/statusgrund.class.php +++ b/include/statusgrund.class.php @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * Authors: Andreas Oesterreicher , + Manuela Thamer */ require_once('basis_db.class.php'); @@ -30,6 +31,7 @@ class statusgrund extends basis_db public $aktiv = true; // boolean public $bezeichnung_mehrsprachig; // varchar(255)[] public $bezeichnung; // text[] + public $statusgrund_kurzbz; //varchar(32) /** * Konstruktor - Laedt optional einen Statusgrund @@ -71,6 +73,7 @@ class statusgrund extends basis_db $this->aktiv = $this->db_parse_bool($row->aktiv); $this->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row); $this->beschreibung = $sprache->parseSprachResult('beschreibung', $row); + $this->statusgrund_kurzbz = $row->statusgrund_kurzbz; } else { @@ -120,6 +123,7 @@ class statusgrund extends basis_db $obj->aktiv = $this->db_parse_bool($row->aktiv); $obj->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row); $obj->beschreibung = $sprache->parseSprachResult('beschreibung', $row); + $obj->statusgrund_kurzbz = $row->statusgrund_kurzbz; $this->result[] = $obj; } @@ -166,6 +170,7 @@ class statusgrund extends basis_db $obj->aktiv = $this->db_parse_bool($row->aktiv); $obj->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row); $obj->beschreibung = $sprache->parseSprachResult('beschreibung', $row); + $obj->statusgrund_kurzbz = $row->statusgrund_kurzbz; $this->result[] = $obj; } @@ -179,5 +184,28 @@ class statusgrund extends basis_db return true; } + + /** + * Laedt das Klassenobjekt anhand der kurzbz + * + * @param string $statusgrund_kurzbz Statusgrund zu dem das Objekt geladen werden soll. + * @return object classobject + */ + public function getByStatusgrundKurzbz($statusgrund_kurzbz) + { + $qry = " + SELECT + * + FROM + public.tbl_status_grund + WHERE + statusgrund_kurzbz ='". $statusgrund_kurzbz. "' + "; + + $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..b32ba06ad 100644 --- a/vilesci/personen/student_vorrueckung.php +++ b/vilesci/personen/student_vorrueckung.php @@ -19,6 +19,7 @@ * Andreas Oesterreicher < andreas.oesterreicher@technikum-wien.at > * Rudolf Hangl < rudolf.hangl@technikum-wien.at > * Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > + * Manuela Thamer < manuela.thamer@technikum-wien.at > */ /** * Vorrückung aller AKTIVEN Studenten. @@ -32,6 +33,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 +303,16 @@ if (isset($_POST['vorr'])) } } + //auf statusgrund_kurzbz abfragen + $statusgrundObj = new statusgrund($row_status->statusgrund_id); + $statusgrundId = null; + if ($statusgrundObj->statusgrund_kurzbz === "prewiederholer" && $row_status->ausbildungssemester > 1) + { + $s = $row->semester_stlv - 1; + $ausbildungssemester = $row_status->ausbildungssemester - 1; + $statusgrundId = $statusgrundObj->getByStatusgrundKurzbz('wiederholer')->statusgrund_id; + } + $lvb = new lehrverband(); //Lehrverbandgruppe anlegen, wenn noch nicht vorhanden @@ -364,14 +376,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($statusgrundId).");"; } if ($sql != '') { @@ -408,7 +421,7 @@ $outp .= ' Studiengang: - '; //Auswahl Studiengang foreach ($studiengang as $stg) @@ -420,7 +433,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 +448,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 +461,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 +501,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 +514,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 +550,7 @@ $outp .= 'alle -- $outp .= " Ziel-Studiensemester: - \n"; if (isset($ss_arr) && is_array($ss_arr)) { @@ -565,7 +568,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 @@ -617,11 +620,12 @@ if ($result_std != 0) $row = $db->db_fetch_object($result_std, $i); $qry_status = " SELECT - status_kurzbz, ausbildungssemester, tbl_studienplan.studienplan_id, tbl_studienplan.bezeichnung + tbl_prestudentstatus.status_kurzbz, statusgrund_kurzbz, ausbildungssemester, tbl_studienplan.studienplan_id, tbl_studienplan.bezeichnung FROM public.tbl_prestudentstatus JOIN public.tbl_prestudent USING(prestudent_id) LEFT JOIN lehre.tbl_studienplan USING(studienplan_id) + LEFT JOIN public.tbl_status_grund USING (statusgrund_id) WHERE person_id=".$db->db_add_param($row->person_id, FHC_INTEGER)." AND studiengang_kz=".$db->db_add_param($row->studiengang_kz, FHC_INTEGER)." @@ -638,6 +642,7 @@ if ($result_std != 0) if ($row_status = $db->db_fetch_object($result_status)) { $status_kurzbz = $row_status->status_kurzbz; + $statusgrund_kurzbz = $row_status->statusgrund_kurzbz; $ausbildungssemester = $row_status->ausbildungssemester; $studienplan_id = $row_status->studienplan_id; $studienplan_bezeichnung = $row_status->bezeichnung; From 7bd68775e9638674138326c37b3881c5c75ff574 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 23 Jul 2021 13:44:28 +0200 Subject: [PATCH 163/187] =?UTF-8?q?statusgrund=5Fkurzbz=20in=20dbupdate=20?= =?UTF-8?q?erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/dbupdate_3.3.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 407a4aa24..39be74dfb 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -4781,6 +4781,19 @@ if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_pruef } } +//Add Column statusgrund_kurzbz to public.tbl_status_grund +if(!@$db->db_query("SELECT statusgrund_kurzbz FROM public.tbl_status_grund LIMIT 1")) +{ + $qry = "ALTER TABLE public.tbl_status_grund ADD COLUMN statusgrund_kurzbz varchar(32); + ALTER TABLE public.tbl_status_grund ADD CONSTRAINT uk_tbl_statusgrund_kurzbz UNIQUE (statusgrund_kurzbz); + "; + + if(!$db->db_query($qry)) + echo 'public.tbl_status_grund '.$db->db_last_error().'
    '; + else + echo '
    Neue Spalte statusgrund_kurzbz zu Tabelle public.tbl_status_grund hinzugefügt'; +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

    Pruefe Tabellen und Attribute!

    '; @@ -5002,7 +5015,7 @@ $tabellen=array( "public.tbl_rt_person" => array("rt_person_id","person_id","rt_id","studienplan_id","anmeldedatum","teilgenommen","ort_kurzbz","punkte","insertamum","insertvon","updateamum","updatevon"), "public.tbl_rt_studienplan" => array("reihungstest_id","studienplan_id"), "public.tbl_status" => array("status_kurzbz","beschreibung","anmerkung","ext_id","bezeichnung_mehrsprachig"), - "public.tbl_status_grund" => array("statusgrund_id","status_kurzbz","aktiv","bezeichnung_mehrsprachig","beschreibung"), + "public.tbl_status_grund" => array("statusgrund_id","status_kurzbz","aktiv","bezeichnung_mehrsprachig","beschreibung","statusgrund_kurzbz"), "public.tbl_semesterwochen" => array("semester","studiengang_kz","wochen"), "public.tbl_service" => array("service_id", "bezeichnung","beschreibung","ext_id","oe_kurzbz","content_id","design_uid","betrieb_uid","operativ_uid","servicekategorie_kurzbz"), "public.tbl_servicekategorie" => array("servicekategorie_kurzbz", "bezeichnung","sort"), From 9180930e64be46e7088bc4912878d11dddeb5c0e Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 29 Jul 2021 09:09:29 +0200 Subject: [PATCH 164/187] functions for student.rdf urls to add orgform parameter if needed --- content/student/studentoverlay.js.php | 87 +++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index f034ae473..3830ae21b 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -1034,7 +1034,13 @@ function StudentAuswahl() StudentGesamtNotenTreeloaded=false; stsem = getStudiensemester(); - var url = 'rdf/student.rdf.php?prestudent_id='+prestudent_id+'&studiensemester_kurzbz='+stsem+'&'+gettimestamp(); + //var url = 'rdf/student.rdf.php?prestudent_id='+prestudent_id+'&studiensemester_kurzbz='+stsem+'&'+gettimestamp(); + var url = buildStudentRDFURI({ + 'prestudent_id': prestudent_id, + 'studiensemester_kurzbz': stsem + }); + + console.log(url); var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"]. getService(Components.interfaces.nsIRDFService); @@ -2564,11 +2570,49 @@ function StudentKontoFilter() kontotree.builder.addListener(StudentKontoTreeListener); } +// **** +// * Generiert eine student.rdf URI +// **** +function buildStudentRDFURI(queryparams, tree) +{ + var baseurl = "rdf/student.rdf.php"; + console.log(JSON.stringify(tree)); + if ( typeof tree !== "undefined" ) + { + var col = tree.columns ? tree.columns["tree-verband-col-orgform"] : "tree-verband-col-orgform"; + queryparams.orgform = tree.view.getCellText(tree.currentIndex,col); + } + return _buildURI(baseurl, queryparams); +} + +// **** +// * Generiert aus einer BasisURL und einem Dictionary von Parametern eine URI +// **** +function _buildURI(baseurl, queryparams) +{ + var str = []; + var url = baseurl; + for (var p in queryparams) + { + if ( queryparams.hasOwnProperty(p) && queryparams[p].length > 0 ) + { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(queryparams[p])); + } + } + var querystring = str.join("&"); + if ( querystring.length > 0 ) + { + url = url + '?' + querystring + '&' + gettimestamp(); + } + return url; +} + // **** // * Setzt im Studententree einen vordefinierten Filter // **** function StudentKontoFilterStudenten(filter) { + //alert(filter); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var tree=document.getElementById('tree-verband'); @@ -2591,12 +2635,26 @@ function StudentKontoFilterStudenten(filter) var gruppe = getTreeCellText(tree, 'gruppe', tree.currentIndex); var typ = getTreeCellText(tree, 'typ', tree.currentIndex); var stsem = getTreeCellText(tree, 'stsem', tree.currentIndex); - + if(stsem=='') stsem = getStudiensemester(); if(typ=='') typ='student'; - url = "rdf/student.rdf.php?studiengang_kz="+stg_kz+"&semester="+sem+"&verband="+ver+"&gruppe="+grp+"&gruppe_kurzbz="+gruppe+"&studiensemester_kurzbz="+stsem+"&typ="+typ+"&filter2="+filter+"&buchungstyp="+buchungstyp+"&"+gettimestamp(); + + var url = buildStudentRDFURI({ + 'studiengang_kz': stg_kz, + 'semester': sem, + 'verband': ver, + 'gruppe': grp, + 'gruppe_kurzbz': gruppe, + 'studiensemester_kurzbz': stsem, + 'typ': typ, + 'filter2': filter, + 'buchungstyp': buchungstyp + }, tree); + + console.log(url); + var treeStudent=document.getElementById('student-tree'); try @@ -2614,6 +2672,7 @@ function StudentKontoFilterStudenten(filter) treeStudent.database.RemoveDataSource(oldDatasources.getNext()); } + //alert(url); var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); StudentTreeDatasource = rdfService.GetDataSource(url); StudentTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); @@ -2655,7 +2714,20 @@ function StudentKontoFilterBuchungstyp() stsem = getStudiensemester(); if(typ=='') typ='student'; - url = "rdf/student.rdf.php?studiengang_kz="+stg_kz+"&semester="+sem+"&verband="+ver+"&gruppe="+grp+"&gruppe_kurzbz="+gruppe+"&studiensemester_kurzbz="+stsem+"&typ="+typ+"&filter2=buchungstyp;"+filter+"&"+gettimestamp(); + //url = "rdf/student.rdf.php?studiengang_kz="+stg_kz+"&semester="+sem+"&verband="+ver+"&gruppe="+grp+"&gruppe_kurzbz="+gruppe+"&studiensemester_kurzbz="+stsem+"&typ="+typ+"&filter2=buchungstyp;"+filter+"&"+gettimestamp(); + var url = buildStudentRDFURI({ + 'studiengang_kz': stg_kz, + 'semester': sem, + 'verband': ver, + 'gruppe': grp, + 'gruppe_kurzbz': gruppe, + 'studiensemester_kurzbz': stsem, + 'typ': typ, + 'filter2': 'buchungstyp;' + filter + }, tree); + + console.log(url); + var treeStudent=document.getElementById('student-tree'); try @@ -5436,8 +5508,13 @@ function StudentSuche() document.getElementById('tree-verband').view.selection.clearSelection(); //Datasource setzten und Felder deaktivieren - url = "rdf/student.rdf.php?filter="+encodeURIComponent(filter)+"&"+gettimestamp(); + //url = "rdf/student.rdf.php?filter="+encodeURIComponent(filter)+"&"+gettimestamp(); + var url = buildStudentRDFURI({ + 'filter': filter + }); + console.log(url); + var treeStudent=document.getElementById('student-tree'); try From de1c532ca9d43af5f80107fc950c0fe8de794f9f Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 29 Jul 2021 09:11:31 +0200 Subject: [PATCH 165/187] dead code and console.logs removed --- content/student/studentoverlay.js.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index 3830ae21b..57e14083a 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -1034,13 +1034,11 @@ function StudentAuswahl() StudentGesamtNotenTreeloaded=false; stsem = getStudiensemester(); - //var url = 'rdf/student.rdf.php?prestudent_id='+prestudent_id+'&studiensemester_kurzbz='+stsem+'&'+gettimestamp(); + var url = buildStudentRDFURI({ 'prestudent_id': prestudent_id, 'studiensemester_kurzbz': stsem }); - - console.log(url); var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"]. getService(Components.interfaces.nsIRDFService); @@ -2576,7 +2574,6 @@ function StudentKontoFilter() function buildStudentRDFURI(queryparams, tree) { var baseurl = "rdf/student.rdf.php"; - console.log(JSON.stringify(tree)); if ( typeof tree !== "undefined" ) { var col = tree.columns ? tree.columns["tree-verband-col-orgform"] : "tree-verband-col-orgform"; @@ -2714,7 +2711,7 @@ function StudentKontoFilterBuchungstyp() stsem = getStudiensemester(); if(typ=='') typ='student'; - //url = "rdf/student.rdf.php?studiengang_kz="+stg_kz+"&semester="+sem+"&verband="+ver+"&gruppe="+grp+"&gruppe_kurzbz="+gruppe+"&studiensemester_kurzbz="+stsem+"&typ="+typ+"&filter2=buchungstyp;"+filter+"&"+gettimestamp(); + var url = buildStudentRDFURI({ 'studiengang_kz': stg_kz, 'semester': sem, @@ -2726,8 +2723,6 @@ function StudentKontoFilterBuchungstyp() 'filter2': 'buchungstyp;' + filter }, tree); - console.log(url); - var treeStudent=document.getElementById('student-tree'); try @@ -5508,12 +5503,9 @@ function StudentSuche() document.getElementById('tree-verband').view.selection.clearSelection(); //Datasource setzten und Felder deaktivieren - //url = "rdf/student.rdf.php?filter="+encodeURIComponent(filter)+"&"+gettimestamp(); var url = buildStudentRDFURI({ 'filter': filter }); - - console.log(url); var treeStudent=document.getElementById('student-tree'); 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 166/187] =?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 167/187] 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 64eb9eacf4c54d034007e4fb54b828fc3f12002b Mon Sep 17 00:00:00 2001 From: cris-technikum Date: Mon, 30 Aug 2021 15:36:50 +0200 Subject: [PATCH 168/187] 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 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 169/187] 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 170/187] 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 3999098fd68b4e9ff05bbabfcc523f655564945d Mon Sep 17 00:00:00 2001 From: Manfred Date: Thu, 2 Sep 2021 14:08:21 +0200 Subject: [PATCH 171/187] =?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 172/187] =?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 175/187] 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 9f5a8e4eb9709640e56fd6ba1d5f995544df66c6 Mon Sep 17 00:00:00 2001 From: Manfred Date: Tue, 7 Sep 2021 15:01:12 +0200 Subject: [PATCH 176/187] =?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 177/187] 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 178/187] 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 179/187] =?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 180/187] =?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 181/187] 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 182/187] 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 183/187] =?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 -