Compare commits

...

844 Commits

Author SHA1 Message Date
ma0068 087a777f3e Update Comment 2023-10-23 13:43:13 +02:00
ma0068 c37170937c neue Geschlechtsangabe keine Angabe 2023-10-23 13:38:23 +02:00
Harald Bamberger 1bc957821e Merge branch 'bug-29815/ModifyCoodleIcalTerminbestaetigungen' 2023-10-17 07:27:30 +02:00
Andreas Österreicher 22d3b08a06 Escaping von LVs mit Sonderzeichen 2023-10-16 11:08:34 +02:00
Andreas Österreicher 60ee3ec8f0 UID Generierung bei Incoming um Nachname, Vorname ergänzt 2023-10-16 10:26:23 +02:00
Harald Bamberger 52dd2c56a2 Merge branch 'bhdev-studstatus' 2023-10-12 16:24:20 +02:00
Harald Bamberger d06819f25f comment out info_ studierendenantrag phrase 2023-10-12 16:07:20 +02:00
Harald Bamberger b5c0c14e2a fix typo 2023-10-11 19:20:40 +02:00
cgfhtw 9d31cdffe6 Bugfix: handle reload event of Table.js 2023-10-11 14:59:54 +02:00
cgfhtw 95d3b6ac5b Bugfix: Phrasen: local variable has overwritten function parameter 2023-10-11 14:57:44 +02:00
cgfhtw af89ec3942 Bugfix: Phrasen: local variable has overwritten function parameter 2023-10-11 14:44:24 +02:00
cgfhtw ebdd6a2040 Bug: Wiederholer Reminder werden nicht versandt - Fehlerquelle Datumsbereich wenn Prüfungen mehr als ein Monat verteilt 2023-10-10 14:16:32 +02:00
cgfhtw 6137cf3347 Remove unnecessary comment 2023-10-10 14:11:21 +02:00
cgfhtw b5ce0ba7ed Remove unnecessary comment 2023-10-10 13:12:51 +02:00
cgfhtw 5010a1653a cleaner config 2023-10-10 13:09:43 +02:00
cgfhtw 0a25982fa2 Do not allow frozen columns to be invisible 2023-10-10 13:09:28 +02:00
cgfhtw c5b246dc8e CSS table row hovering 2023-10-10 13:08:43 +02:00
cgfhtw 17d5cff178 slightly better css 2023-10-09 15:13:00 +02:00
Harald Bamberger c1a53a1be3 do not use phrases from FHC_JS_PHRASES_STORAGE_OBJECT at all 2023-10-09 11:47:02 +02:00
Harald Bamberger 3ab8fd22f4 minor layout changes 2023-10-06 20:22:05 +02:00
Andreas Österreicher cda93ce85b Fixed PHP81 Warning on Loading Adresses 2023-10-05 08:14:32 +02:00
Harald Bamberger b618ad247a Merge branch 'feature-33459/Studierendenstatusverwaltung_Unterbrechung_Studiensemester' 2023-10-02 16:45:44 +02:00
cgfhtw ad191f3f90 Optische Verbesserungen select field 2023-10-02 11:06:53 +02:00
cgfhtw 54bcf83781 s&d 2023-10-02 11:06:34 +02:00
Andreas Österreicher c828fe2ee4 Version für Legacy BPK Schnittstelle angepasst 2023-09-29 12:58:30 +02:00
Harald Bamberger a237cb1808 check if there are any entries 2023-09-28 15:58:35 +02:00
Harald Bamberger af3588aa61 revert commented lines for the moment until there is a better solution 2023-09-28 15:45:03 +02:00
Harald Bamberger 867a1e94c7 Merge branch 'feature-27351/Digitalisierung_Formulare_Neu' 2023-09-28 14:37:04 +02:00
Harald Bamberger 137c5f28ec modify Phrasen.js so that it can be used by composition api and does not use legacy categories at all 2023-09-28 14:27:35 +02:00
ma0068 4fcf4a57d1 Adaptierung rdfs mit CDATA 2023-09-27 09:57:39 +02:00
Harald Bamberger d8bd100dbb Merge branch 'master' into feature-27351/Digitalisierung_Formulare_Neu 2023-09-25 16:53:33 +02:00
Harald Bamberger 31426d3c5e Merge branch 'master' into feature-27351/Digitalisierung_Formulare_Neu 2023-09-25 16:50:40 +02:00
KarpAlex 972e9b7025 UHSTAT1 form: nations with sperre = true are not loaded 2023-09-25 16:45:39 +02:00
ma0068 e886b4742b Neue Mailvorlagen Sancho_Mail_Antrag_U_Student(SB) 2023-09-19 14:56:30 +02:00
Andreas Österreicher 4242f75fde Hiweistext bei Geburtsdatumsformat korrigiert bei Testclient 2023-09-18 12:35:45 +02:00
Andreas Österreicher 47c956bf1e Geburtsdatum Format korrigiert 2023-09-18 12:22:21 +02:00
Andreas Österreicher 418a149840 Merge branch 'TechnikumWienAcademy-master' 2023-09-14 13:12:08 +02:00
nkrondraf e8c7ecf1ee Besuch der LV kann nun 3 Semester in Vergangenheit liegen für Prüfungsanmeldung 2023-09-14 10:50:04 +02:00
nkrondraf 2a77fb361a raise version number of API to 0.6 2023-09-14 10:32:09 +02:00
Andreas Österreicher 96f8ee33a9 Merge branch 'feature-29835/UHSTAT1_Erfassung_der_UHSTAT1_Daten_ueber_das_Bewerbungstool' 2023-09-12 11:05:37 +02:00
Andreas Österreicher 38da37980d Fehlerhaftes Escaping korrigiert damit inserts mit
standard_conforming_strings funktioniert
2023-09-07 15:34:55 +02:00
Andreas Österreicher 6fba58c113 Merge branch 'master' into feature-29835/UHSTAT1_Erfassung_der_UHSTAT1_Daten_ueber_das_Bewerbungstool 2023-09-07 14:56:18 +02:00
KarpAlex 4175ecc209 UHSTAT1 form: added firstname and lastname of student 2023-09-05 16:49:19 +02:00
cgfhtw 7f0d716bd8 Finale Finalisierung Emailvariablen 2023-08-31 09:25:17 +02:00
cgfhtw 60246100e6 Bugfix: missing phrases 2023-08-31 09:24:43 +02:00
cgfhtw f81c9939f7 config default wert korrigiert 2023-08-31 08:39:21 +02:00
ma0068 1b1f45e690 bugfix Studiengang 2023-08-31 08:33:17 +02:00
Andreas Österreicher fc4915a6ee Merge branch 'feature-32834/infocenter_zusammenfuehren' 2023-08-31 08:11:22 +02:00
Andreas Österreicher ca79bb1f82 Merge branch 'TechnikumWienAcademy-master' 2023-08-30 16:22:04 +02:00
Nikolaus Krondraf 2fe9bda46b längeres Gültigkeitsdatum hinzugefügt 2023-08-30 14:40:52 +02:00
ma0068 20aaefffb1 Finalisierung Emailvariablen 2023-08-29 16:50:02 +02:00
Andreas Österreicher 86aac2388d Als Admin wird nun die Buchungsnummer im Konto Karteireiter im FAS
angezeigt damit diese einfach kopiert werden kann
2023-08-25 11:04:06 +02:00
Andreas Österreicher f3453670b3 Problem behoben wodurch der Plausicheck abgebrochen hat wenn
Studiengänge für den GebDatum Check exkludiert wurden.
2023-08-25 09:50:37 +02:00
Manfred b23eaa2967 Merge remote-tracking branch 'origin/master' 2023-08-24 14:28:58 +02:00
Manfred 6e2c5acc6f Eintrag Archiv für AbschlussdokumentLehrgaenge 2023-08-24 14:28:46 +02:00
ma0048 f8bbdf4b35 Merge remote-tracking branch 'origin/feature-28746/reihungstestjob_fallweise_wird_anzahlung_f_studienbeitrag_buchung_nicht_angelegt' into infocenter_2023_08_24 2023-08-24 11:00:34 +02:00
ma0048 a2a645b7c7 Merge remote-tracking branch 'origin/feature-29529/infocenter_anpassungen' into infocenter_2023_08_24
# Conflicts:
#	system/dbupdate_3.4.php
2023-08-24 11:00:16 +02:00
ma0048 2dbbadea2e Merge remote-tracking branch 'origin/feature-30956/auswertung_reihungstest_excel_problem' into infocenter_2023_08_24 2023-08-24 10:59:16 +02:00
ma0048 0f5c261528 Merge remote-tracking branch 'origin/feature-30693/infocenter_aufgenommen_filter' into infocenter_2023_08_24 2023-08-24 10:56:18 +02:00
ma0048 b93cfbfa9e Merge remote-tracking branch 'origin/feature-27691/sammeltask_aenderung_bewerberdefinition' into infocenter_2023_08_24 2023-08-24 10:56:04 +02:00
ma0048 7609554a74 Merge remote-tracking branch 'origin/feature-26667/reihungstestanmeldung_fuer_master_interessentinnen_ueber_online_bewerbungstool' into infocenter_2023_08_24 2023-08-24 10:55:47 +02:00
ma0048 26e63160ba - bug fix, bescheibung 2023-08-24 10:38:46 +02:00
ma0048 7c365cea81 - title aenderung 2023-08-24 08:01:36 +02:00
ma0048 db96dd1388 - bug fix 2023-08-24 07:56:49 +02:00
Manfred c440711145 Teilgebiete-Übersicht mit Spalten mehrsprachig und Offset 2023-08-22 15:53:19 +02:00
Andreas Österreicher 16366d976d Merge branch 'bug-32636/maillib_email_number_per_time_range' 2023-08-22 15:51:39 +02:00
Manfred ac945ab540 studiensemester_kurzbz in GET-Parameter eingefügt 2023-08-22 15:51:17 +02:00
Andreas Österreicher 0b51239f8c Fixed SQL Error when sending Anrechnungen Recommendation Reminder 2023-08-22 15:24:12 +02:00
Andreas Österreicher 45816c0352 Merge branch 'feature-30181/Anrechnungen_Erweiterte-Angaben-fuer-Studierende' 2023-08-22 14:50:32 +02:00
Andreas Österreicher 73a9d34fba Merge branch 'feature-29838/Anrechnungen-Sammelmail-fuer-LV-Leitung' into feature-30181/Anrechnungen_Erweiterte-Angaben-fuer-Studierende 2023-08-22 14:42:52 +02:00
Andreas Österreicher ac10473b08 Merge branch 'master' into feature-30181/Anrechnungen_Erweiterte-Angaben-fuer-Studierende 2023-08-22 14:40:56 +02:00
Andreas Österreicher 571ae5f6e5 Merge branch 'master' into feature-29838/Anrechnungen-Sammelmail-fuer-LV-Leitung 2023-08-22 14:40:23 +02:00
Cris 057b003977 Merge remote-tracking branch 'origin/feature-30181/Anrechnungen_Erweiterte-Angaben-fuer-Studierende' into feature-30181/Anrechnungen_Erweiterte-Angaben-fuer-Studierende
# Conflicts:
#	system/phrasesupdate.php
2023-08-22 13:42:32 +02:00
cgfhtw e6be6e19d1 Abmeldung PDF-Vorlage: Studiensemester added 2023-08-22 11:30:54 +02:00
cgfhtw 754ed07621 anzeige Lehrverband nach setUnterrbrecher im Fas 2023-08-22 11:18:47 +02:00
cgfhtw bf6fc52fcf Studierendenseite: Reihenfolge WH, Unterbrechung, Abmeldung; wording von du du auf indirekt 2023-08-22 11:18:35 +02:00
cgfhtw 294bfeb2e4 Sancho Mail Antrag_W_Student
Aufnahme der angerechneten bzw. neu zu absolvierenden LVs
2023-08-22 11:18:05 +02:00
cgfhtw b9bf2487c2 Stg-Ansicht: Status styled as link
Stg-Ansicht: Status styled as link
2023-08-22 11:13:56 +02:00
cgfhtw 8da161120f Abmeldung (Stg): Suche auch nach student_uid 2023-08-22 11:11:38 +02:00
ma0048 f9f0e238c6 - bug fix 2023-08-22 10:58:23 +02:00
ma0068 b468f01d0e Lv-zuweisung Breite vergrössert, Prestudent Status Unterbrechungssemester vor Vorrückung 2023-08-18 11:34:38 +02:00
ma0068 376ce0e440 WH: nur positive Noten bei intern angerechnet zulassen 2023-08-17 14:13:30 +02:00
ma0068 4a505631de Kein Verzicht bei Wiederholung 2023-08-17 13:54:34 +02:00
ma0068 1d938ea33d Anzeige following Studiensemester Wiedereinstieg 2023-08-17 13:46:58 +02:00
ma0068 70aa0a9c9c neue Mail an Assistenz: AbbrecherStgl 2023-08-17 13:18:06 +02:00
ma0068 743ba83148 Anzeige Studiensemester Abmeldung 2023-08-17 11:18:51 +02:00
ma0068 c7d2608cce Adaptierung Buttons: Zurückziehen Stgl und Ausblenden Anträge STGL nicht genehmigt Studentview 2023-08-17 11:10:09 +02:00
ma0068 672ee59ba5 neuer Hinweistext mit Einspruchsfrist für Abmeldung Stgl 2023-08-17 10:34:28 +02:00
cgfhtw 95e8859896 Bug Hotfix 2023-08-17 09:50:33 +02:00
ma0068 9aa5f701f7 phrasenupdate 2023-08-17 09:24:15 +02:00
ma0068 fcd3733f3c AbmeldungStgl GrundDropdown 2023-08-17 09:12:30 +02:00
KarpAlex fab1022c49 tbl_uhstat1daten: added primary key, removed abgeschicktamum (instead: own sync table) 2023-08-16 17:40:00 +02:00
KarpAlex b8aadab509 UHSTAT1 form: add insertamum and insertvon when inserting data 2023-08-16 11:12:09 +02:00
Harald Bamberger 08f79b69cb Merge branch 'feature-25003/NotenimportFuerNachpruefung' 2023-08-16 08:11:10 +02:00
Harald Bamberger 7bc1e8cdd9 Merge branch 'master' into feature-25003/NotenimportFuerNachpruefung 2023-08-16 07:57:56 +02:00
KarpAlex e784400943 uhstat1 data save: added uid 2023-08-16 01:21:05 +02:00
KarpAlex c62198b4b5 UHSTAT form: added delete button for employees with permission, edit and delete buttons are only shown if user has permission 2023-08-15 18:27:30 +02:00
KarpAlex d200fc1961 bis tbl_uhstat1daten: added insertamum, insertvon, updateamum, updatevon and abgeschicktamum 2023-08-15 17:19:12 +02:00
ma0048 913f45fcda - auswertung_fhtw um studiengang typ erweitert 2023-08-14 11:53:36 +02:00
cgfhtw 353e2deaf7 AbortController 2023-08-10 11:02:45 +02:00
cgfhtw f9be090bbf Studierendenansicht: nur STGs anzeigen bei denen ein Status "Student" vorhanden ist. 2023-08-08 16:59:42 +02:00
cgfhtw b77e715bdb Font Awesome + Buttons in Studierendenansicht korrigiert 2023-08-08 16:26:15 +02:00
cgfhtw c9e947831e PDF Unterbrechung: Auch in status EmailVersandt abrufbar 2023-08-08 16:16:09 +02:00
cgfhtw 44141ce8d8 PDF Download "Abmeldung durch Stgl" 2023-08-08 16:08:15 +02:00
cgfhtw 9dc36af7fc Umlaute & Genehmigt => Bestätigt 2023-08-08 15:37:20 +02:00
cgfhtw 5c018e204e Lv Popup optische Verbesserungen 2023-08-08 15:12:23 +02:00
cgfhtw 61c6245e1a Phrasen: Antrag => Bekanntgabe 2023-08-08 14:39:05 +02:00
cgfhtw da0dc0e053 Missing Phrase Category in Controller 2023-08-07 13:05:13 +02:00
cgfhtw d0d42a6a15 Unterbrecher - Wiedereintrittssemester Dropdown 2023-08-04 14:11:03 +02:00
Harald Bamberger 9550457b24 Merge branch 'master' into feature-27351/Digitalisierung_Formulare_Neu 2023-08-03 18:20:05 +02:00
Harald Bamberger d1eaebba33 Merge branch 'master' into feature-27351/Digitalisierung_Formulare_Neu 2023-08-03 18:18:43 +02:00
Manfred d689e8fb2f Tablesorter, Datepicker und Spalte mit Lehrform in ueberbuchung.php 2023-08-02 18:24:11 +02:00
KarpAlex d50ba773fe UHSTAT 1 form: correct authentification (from bewerbungstool or with permission), beautified success and error messages, added Rechtsbelehrung, simplified parameter checking 2023-08-01 19:26:36 +02:00
Manfred 392112977c Merge remote-tracking branch 'origin/master' 2023-08-01 18:24:44 +02:00
Manfred f5703a2438 Kleine Anpassungen Testtool-Auswertung
- %-Spalte in Auswertung Detail
- Vorschlag-Nummer in Auswertung_detail_frage
2023-08-01 18:23:24 +02:00
Cris b5a81b540f Added Begruendung ECTS and Begruendung LV Inhalt to STGL- and Lectors Detail-Views 2023-07-31 13:53:24 +02:00
Cris 4c75f908b9 Added card 'ECTS Berechnung Referenzbeispiele' to Infobox 2023-07-31 12:50:06 +02:00
Cris 83bf874156 Removed link 'ECTS Berechnung Referenzbeispiele' 2023-07-31 12:48:56 +02:00
Cris dd392caef7 Adapted max/min length for Begruendung ECTS and Begruendung LVinhalt 2023-07-31 11:44:19 +02:00
Cris 096b436d54 Added phrases for Begruendung ECTS and Begruendung LVinhalt 2023-07-31 11:43:24 +02:00
cgfhtw af24ef1517 Bug: neue Unterbrechung 2023-07-31 09:08:33 +02:00
KarpAlex cfb034bc69 uhstat form: disabled input fields if uhstat entry already saved 2023-07-28 22:39:50 +02:00
KarpAlex 349e9b9442 UHSTAT1 form: removed geburtsstaat from database table, data is shown if uhstat entry already exists 2023-07-28 22:15:26 +02:00
KarpAlex 1e082ed225 UHSTAT1 form: removed geburtsnation as it is saved in person table anyways, started to display existing uhstat data on form load 2023-07-27 17:13:31 +02:00
ma0048 91f79b2021 - aufgenommen filter infocenter fuer lehrgaenge 2023-07-26 13:27:51 +02:00
cgfhtw 02b64ad6a7 Assistenz kann eigene Abmeldungen Zurückziehen 2023-07-25 13:59:18 +02:00
cgfhtw 7239113847 Optionaler Grund bei Einspruch ablehnen 2023-07-25 13:42:38 +02:00
cgfhtw 8c98cea114 semicolon 2023-07-25 13:37:03 +02:00
ma0068 6eaa8c4c01 Codesniffer and MassDetector 2023-07-24 16:04:46 +02:00
KarpAlex f5ace15f7b added phrases to UHSTAT1 form 2023-07-24 14:15:22 +02:00
Cris 74b1ca0614 Added phrases for Begruendung ECTS and Begruendung LVinhalt 2023-07-24 10:24:21 +02:00
cgfhtw 5d97abc6ac Mails 2023-07-20 16:55:09 +02:00
cgfhtw b4370ece82 Comment added 2023-07-20 15:07:46 +02:00
cgfhtw 8923a099cc Sammelmail Stgl & Calltoactions in Student view 2023-07-20 15:04:49 +02:00
cgfhtw 5670bac3f6 Don't allow canceling of Stg Abmeldungen 2023-07-20 15:04:18 +02:00
cgfhtw 35d01b042e Bug canCancel in abmeldung->edit missing 2023-07-20 15:00:42 +02:00
Cris 110d6bace3 Adapted backend logic to save/retrieve begruendung_ects and begruendung_lvinhalt 2023-07-20 13:42:53 +02:00
Cris 54d819e1ea Adapted GUI to display and save begruendung_ects and begruendung_lvinhalt 2023-07-20 13:38:52 +02:00
Cris 8bb3b6d53c DB Update: added 2 attributes to tbl_anrechnung
- begruendung_ects (text)
- begruendung_lvinhalt (text)
2023-07-20 10:48:03 +02:00
Cris 550df4fbd8 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-07-19 15:56:49 +02:00
ma0068 5e6262da56 Config für Datum Start Digitalisierung, finish handleWiederholerDeadline, start Sammelmail an Stgl 2023-07-17 16:29:03 +02:00
ma0048 5f096b58b7 - STG beim nicht vorhanden Master RT anzeigen 2023-07-17 13:52:06 +02:00
KarpAlex 68fbc13a69 added first version of uhstat1 form, added unique constraint for person_id in uhstat1daten table, added permissions for uhstat1daten sequence 2023-07-15 19:57:51 +02:00
cgfhtw a96d99bcd1 Sammelmails: draft 2023-07-13 16:51:54 +02:00
cgfhtw a53ca81784 Wording Änderung bei Studierendenansicht Wiederholung 2023-07-13 16:51:14 +02:00
cgfhtw b04aefc105 Unterbrechung nur für das Aktuelle und kommende Semester 2023-07-13 16:13:40 +02:00
cgfhtw 9d0801676d Bug: Studierenden-Ansicht: Abmeldung bearbeiten bei mehrfachen Abmeldungen 2023-07-13 14:44:51 +02:00
cgfhtw c8fc6c747f Table height & Bug: Allowed/Shown Stgs in Component 2023-07-13 13:57:17 +02:00
cgfhtw f8da119ad7 Abmeldung: Einspruch Abgelehnt handling 2023-07-13 11:48:25 +02:00
ma0048 3192a1b3f2 - job hinzugefuegt um bewerber status automatisch zu setzen
- fas filter hinzugefugt
2023-07-12 09:47:01 +02:00
ma0068 6f1eed6696 Abbrecher 2dos: Änderungen Wordings, neue Statusgründe preabbrecher, durchStgl, durchStud, update setAbbrecher 2023-07-11 17:01:22 +02:00
ma0068 f438d240f9 Update Wording Antrag -> Verwaltung, Genehmigen-> Bestätigen, Überspringen Button Ausblenden 2023-07-11 13:07:54 +02:00
cgfhtw 1aa78386f4 erledigte TODOs entfernt 2023-07-11 08:33:05 +02:00
Andreas Österreicher f4c8f00c8f Added AuthLib to Searchbar Component 2023-07-10 17:18:30 +02:00
cgfhtw 2213fed5b2 Phrasen 2023-07-10 16:39:20 +02:00
Andreas Österreicher 477da65817 Laden der Organisationseinheiten bei Berechtigungszuordnung behoben 2023-07-10 15:17:09 +02:00
cgfhtw cb1c4d01e0 phrasen: dokumente 2023-07-10 14:45:31 +02:00
cgfhtw 3219f43e6d Fehlerhafte Anzeige bei Download von Anträgen 2023-07-10 14:36:54 +02:00
cgfhtw 25258f7d87 E-Mail Reminder für Wiederholer sollen an die FH Adresse des Studierenden geschickt werden 2023-07-10 14:27:50 +02:00
cgfhtw 15786dd772 CIS URLs in Sancho mails 2023-07-10 14:03:03 +02:00
cgfhtw e6a1ea621e Bug: Semester in PDFs 2023-07-10 13:52:29 +02:00
cgfhtw eee3aa08e4 Zugriffsrechte für Abbrecher & Unterbrecher 2023-07-10 13:52:05 +02:00
cgfhtw 1006132451 Infomail 2023-07-10 11:19:21 +02:00
cgfhtw 3fce448451 Abmeldung durch Stgl: status => typ 2023-07-10 10:19:06 +02:00
cgfhtw 5eca034911 clean up 2023-07-10 09:29:00 +02:00
cgfhtw 761af30a75 speed up student selection 2023-07-10 09:21:12 +02:00
cgfhtw 573a8d8e33 composer lock 2023-07-10 09:09:46 +02:00
Manfred 1bca1a8dc3 Merge branch 'benutzerberechtigungGUIneu' 2023-07-07 12:48:07 +02:00
Manfred 94ff4b717d Versehentlich gelöschte Zeile wieder ergänzt 2023-07-07 12:46:06 +02:00
Manfred 5e88ccb5d7 Merge branch 'master' into benutzerberechtigungGUIneu 2023-07-06 18:09:45 +02:00
Manfred 9651903200 Diverse Titel und Textkorrekturen bei Rechte-Skripten 2023-07-06 18:08:06 +02:00
Manfred af9418d456 Anmerkung und Insertdaten bei Rolleberechtigung
+ Vergleichsskript für Rechte in einzelnen Rollen
2023-07-06 18:05:24 +02:00
Andreas Österreicher f35f41a049 Merge branch 'feature-29794/Lehrauftraege_Spalte-Stundensatz-fuer-STGL-und-KFL' 2023-07-06 15:44:16 +02:00
Andreas Österreicher 398b9f9d8f Merge branch 'feature-30393/Remove_check_tbl_benutzer.aktiv_in_AuthLib' 2023-07-06 14:14:47 +02:00
Andreas Österreicher cb4ce6dab6 Anzeige Lehre Saldo in der Zeitaufzeichnung deaktiviert 2023-07-06 13:30:43 +02:00
Paolo d4450e1ae1 Removed check of the tbl_benutzer.aktiv field in the AuthLib 2023-07-05 15:07:05 +02:00
Andreas Österreicher f7dac04dae Merge branch 'feature-29133/einzelne_studiengaenge_aus_issues_check_ausnehmen' 2023-07-05 13:36:23 +02:00
ma0068 1e0e93dfa3 Autocomplete Add-Button Finish 2023-07-05 13:20:46 +02:00
cgfhtw 61856473ea Leitungsansicht Autocomplete 1st draft 2023-07-05 08:30:33 +02:00
cgfhtw 3ca80904ea Verbesserungen Unterbrecher bestätigen 2023-07-04 15:59:43 +02:00
cgfhtw 7eed07a682 LV zuweisung & anzeige: handle semester above max_semester & anmerkung bug 2023-07-04 13:37:54 +02:00
cgfhtw ff93cb26fe Bug: status 2023-07-04 11:10:26 +02:00
cgfhtw b39fa7667e Remove TODO 2023-07-04 11:09:55 +02:00
cgfhtw 64ce3d1f6a Cleaned up commit from 'feature-27351/Digitalisierung_Formulare_Abmeldung_Unterbrechung_Wiederholung' 2023-07-04 10:34:14 +02:00
Cris d5d7797eb7 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-07-03 09:58:54 +02:00
ma0048 f49771ec7f - berechtigungen fuer die sequence hinzugefuegt 2023-06-29 12:10:50 +02:00
Harald Bamberger 2a3eba6441 Merge branch 'master' into feature-25003/NotenimportFuerNachpruefung 2023-06-28 16:26:54 +02:00
KarpAlex 0a961d8e95 UHSTAT1 bis.tbl_abschluss: added default values for in_oesterreich boolean 2023-06-27 11:00:13 +02:00
Andreas Österreicher 5213ab44ff Merge branch 'TechnikumWienAcademy-master' 2023-06-27 09:34:07 +02:00
Andreas Österreicher c89f375015 Removed ServicePing Config for Second LDAP 2023-06-27 09:33:23 +02:00
nkrondraf d6cce60b8f add LDAP service ping configuration to second LDAP server 2023-06-27 08:25:14 +02:00
KarpAlex a54c7a3492 UHSTAT1 data: added tables 2023-06-26 19:15:27 +02:00
Andreas Österreicher efdd81ac0d Problem behoben wodurch keine Fotoliste erstellt werden konnte wenn eine
Person kein Foto hochgeladen hat
2023-06-26 13:45:10 +02:00
Andreas Österreicher 635494b303 Merge branch 'TechnikumWienAcademy-master' 2023-06-26 11:22:18 +02:00
Nikolaus Krondraf e200cd4455 add LDAP service ping configuration 2023-06-26 10:46:45 +02:00
ma0048 a81ceb51b8 - rt sperre vor dem login moeglich 2023-06-22 10:23:00 +02:00
Manfred ee011ef201 OE-Suche verbessert 2023-06-21 11:03:33 +02:00
Andreas Österreicher fb84fb62f7 Merge branch 'TechnikumWienAcademy-ku-prod' 2023-06-21 08:27:21 +02:00
Andreas Österreicher c85bf159ff Merge branch 'ku-prod' of https://github.com/TechnikumWienAcademy/FHC-Core-Academy into TechnikumWienAcademy-ku-prod 2023-06-21 08:26:20 +02:00
Manfred 55fe358d9b Merge branch 'master' into benutzerberechtigungGUIneu 2023-06-20 13:53:10 +02:00
Cris 17c2004a39 Adapted: Check for config 'fbl' in Job to send Sammelmail only to LV-Leitung (no fallback to other lectors) 2023-06-20 13:36:42 +02:00
Cris 82019bb77f Deactivated: einzelne Empehlungsanfrage-Mails an Lektoren deaktiviert 2023-06-20 10:54:40 +02:00
Cris 4e22b1ac1c Added: New Job sendMailRecommendationRequests
Send Sancho mail to LV-Leitung (fallback Lectors) that were requested for recommendation yesterday.
2023-06-19 15:03:38 +02:00
Cris 050a4214f9 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-06-14 13:45:34 +02:00
nkrondraf fb3247c91e performance optimizations 2023-06-13 14:44:01 +02:00
nkrondraf da4ab6bf49 performance optimizations 2023-06-13 14:06:57 +02:00
KarpAlex 7bc8e22906 plausichecks: removed empty lines and unnecessary comments 2023-06-12 22:40:09 +02:00
KarpAlex ab5dc7b1ac plausichecks: removed plausicheck lib, instead, methods are directly in the library for the fehler 2023-06-12 22:32:09 +02:00
KarpAlex c9c6955198 issue configuration: enabled deletion of single configuration values, updated fehlermonitoring phrases 2023-06-05 19:29:27 +02:00
Andreas Österreicher bce7e6ce7f Merge branch 'feature-29133/einzelne_studiengaenge_aus_issues_check_ausnehmen' 2023-06-05 11:03:09 +02:00
ma0048 f5ee097b72 - doppelte benutzer bug fix 2023-06-02 12:01:31 +02:00
ma0068 9e883a48a0 Adaptierungen Icalfiles Coole 2023-06-02 09:02:47 +02:00
Cris 0994b2cc8f Added: Added column 'Stundensatz' in 'Lehrauftrag erteilen' 2023-06-01 12:18:14 +02:00
Cris 7c2d235960 Adapted: Show column 'Stundensatz' in 'Lehrauftrag bestellen' 2023-06-01 12:17:21 +02:00
Cris 73774b0c5d Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-06-01 11:16:06 +02:00
Harald Bamberger b9325875a1 Merge branch 'master' into feature-25003/NotenimportFuerNachpruefung 2023-05-31 16:43:16 +02:00
Harald Bamberger a9666a5f55 Merge branch 'master' into feature-25003/NotenimportFuerNachpruefung 2023-05-31 16:41:53 +02:00
Harald Bamberger 1d63f7aa53 Merge branch 'feature-25003/NotenimportFuerNachpruefung_bhmod' into feature-25003/NotenimportFuerNachpruefung 2023-05-31 16:32:37 +02:00
Andreas Österreicher a5110893ea Dateien die größer als 30MB sind werden nicht automatisch geprüft ob
diese eine Signatur enthalten da dies Dokumente sind die manuell
hochgeladen wurden um das UploadLimit der Arbeit zu umgehen.
2023-05-30 11:59:46 +02:00
Manfred 1ea45269bd Merge branch 'master' into benutzerberechtigungGUIneu 2023-05-25 17:07:08 +02:00
Manfred de4fe258fd Merge remote-tracking branch 'origin/master' 2023-05-25 17:06:22 +02:00
Manfred b5d0cc9626 Klasse "form-control" bei Typ Datepicker ergänzt 2023-05-25 17:06:16 +02:00
Andreas Österreicher 34715712f3 App für Personalverwaltung hinzugefügt 2023-05-24 16:26:53 +02:00
KarpAlex 4b2e3c2f6b Merge branch 'master' into feature-29133/einzelne_studiengaenge_aus_issues_check_ausnehmen 2023-05-23 16:22:05 +02:00
Harald Bamberger 09bc985431 Notenumrechnung beim Punkteimport, Fehlermeldung wenn Note oder Punkte fehlen. 2023-05-23 16:08:50 +02:00
KarpAlex de43e69ccf plausichecks GUI: added fehlercode to recognise fehler in fehler monitoring issues 2023-05-23 14:29:38 +02:00
ma0048 f993780ec3 - texte und anzeige angepasst 2023-05-23 13:17:27 +02:00
Cris b624d91119 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-05-23 12:20:57 +02:00
Andreas Österreicher 7a005a9141 Merge branch 'feature-10001/tempus_kurzbz_bei_reservierungen_anzeigen' 2023-05-22 15:50:37 +02:00
Andreas Österreicher cc8be23f7e Merge branch 'master' into feature-10001/tempus_kurzbz_bei_reservierungen_anzeigen 2023-05-22 15:47:57 +02:00
KarpAlex 86e032b27f Fehler Monitoring: added fehler kurzbz to be displayeed 2023-05-22 14:31:40 +02:00
KarpAlex 0d6ad6aab0 issue konfiguration: added phrases, bugfix displaying correct configuration for correct app 2023-05-22 00:20:01 +02:00
KarpAlex 186412144d Merge branch 'master' into feature-29133/einzelne_studiengaenge_aus_issues_check_ausnehmen 2023-05-21 17:38:49 +02:00
KarpAlex 696849062f Issues konfiguration: added GUI for assigning konfiguration to fehler 2023-05-21 17:34:11 +02:00
ma0068 5001713d16 Erzwingen von Reload nach jeder Freigabe 2023-05-19 07:51:25 +02:00
ma0048 311d235fda - abgewiesene gesperrt von spalte 2023-05-17 16:35:22 +02:00
ma0048 2f573263ba - abfrage ob der pruefling bereits gesperrt ist 2023-05-17 16:00:34 +02:00
ma0048 54de577eee - ausblenden des warnings 2023-05-17 15:08:52 +02:00
ma0048 8584be651b - sperren von rts bearbeitet 2023-05-17 15:06:39 +02:00
ma0048 08c594148b - details bei abgewiesenen 2023-05-17 08:41:04 +02:00
Andreas Österreicher da5494ad35 Merge branch 'feature-24913/TabelleRaumtypNeuesAttributAktiv' 2023-05-15 16:44:38 +02:00
Andreas Österreicher d3be5a7805 Merge branch 'feature-29051/DokumentvorlageAufSonderzeichenUeberpruefen' 2023-05-15 16:32:22 +02:00
Andreas Österreicher 06f62b19b4 Merge branch 'feature-27043/cis_lvinfo_cis_private_lehre_ects_preview_fehlt' 2023-05-15 16:06:55 +02:00
Andreas Österreicher 4844da317f Merge branch 'feature-25917/studienbeastigung_in_englischer_sprache' 2023-05-15 15:42:06 +02:00
Andreas Österreicher 00f555b141 Vorlage umbenannt 2023-05-15 15:34:32 +02:00
Andreas Österreicher d3ec6cad1d Merge branch 'master' into feature-25917/studienbeastigung_in_englischer_sprache 2023-05-15 15:13:47 +02:00
Andreas Österreicher a64fafb6ad Merge branch 'feature-28402/popper_in_bootstrap5' 2023-05-15 14:58:02 +02:00
Andreas Österreicher 9180244e0d Merge branch 'feature-27362/fas_filter_status_bestaetigt_reihungstestanmeldung' 2023-05-15 14:52:36 +02:00
Andreas Österreicher 5c79951f00 Merge branch 'feature-27107/Vilesci_Erfassung_Abwesenheiten_Reinigung' 2023-05-15 14:07:41 +02:00
Manfred 388a265db7 Neues Template "contentmittitel_filterwidget" in Suche ergänzt 2023-05-15 12:11:01 +02:00
Manfred d4653bc89f Neue Rechte anlegen und bestehende bearbeiten 2023-05-15 12:10:25 +02:00
KarpAlex 1ec52e710a Plausichecks: enabled Fehlerkonfiguration for excluding certain Studiengänge from checks, changed comments 2023-05-14 21:19:39 +02:00
KarpAlex fd7c193894 added tables and model for issue Fehlerkonfiguration 2023-05-11 18:54:35 +02:00
Manfred 040cd09691 Merge branch 'master' into benutzerberechtigungGUIneu 2023-05-11 18:26:24 +02:00
Manfred c5e1674264 FAS-Studentensuche verbessert, um Personen ohne Vorname zu findenwerden 2023-05-11 18:14:24 +02:00
Manfred e96a3506a8 Coodle ics für Terminzusagen jetzt mit verschlüsseltem Token
Details zur Umfrage in den Kalenderdaten
2023-05-11 18:02:17 +02:00
ma0068 28baa49f6d Validierung Sonderzeichen Dokumentvorlagen 2023-05-10 08:18:05 +02:00
KarpAlex 96172c67fd PlausicheckProducerLib: corrected method description comment 2023-05-09 23:16:24 +02:00
Cris 81e51c2b92 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-05-09 11:58:43 +02:00
Andreas Österreicher e97d2d89d6 Added Config to Enable/Disable Signature Check in Abgabetool 2023-05-08 16:54:46 +02:00
Andreas Österreicher 2cb4ee9879 Merge branch 'feature-19172/Abgabetool_digitale_signatur_pruefen' 2023-05-08 15:50:59 +02:00
Andreas Österreicher 4c5241dd95 Bei fehlender Signatur in Enduploads wird ein Mail an den Studiengang
geschickt
2023-05-08 15:37:30 +02:00
ma0068 c086eddfae update Abfrage, delete testfiles 2023-05-08 14:18:07 +02:00
ma0068 33e313a633 update Abfrage 2023-05-08 12:12:42 +02:00
KarpAlex c6fe7a3d6a Merge branch 'master' into feature-28089/plausichecks_in_extension_hinzufuegen 2023-05-06 02:03:07 +02:00
KarpAlex 94a126f64e plausichecks: made some core plausichecks warnings instead of errors 2023-05-05 17:29:30 +02:00
Andreas Österreicher 1b57df7a52 Korrektur der Ermittlung des Sommersemesters wenn die Personalmeldung
für vergangene Semester erstellt wird.
2023-05-05 17:19:35 +02:00
Andreas Österreicher 451a21e84e Zugriffsberechtigungen korrigiert damit der Zugriff auf die eigenen
Zeitsperren nicht möglich ist ohne Berechtigung
2023-05-05 16:57:22 +02:00
Andreas Österreicher f7ec0c4ce0 Merge branch 'feature-27946/infocenter_zusaetzliche_spalte_fuer_kaution' 2023-05-05 08:53:17 +02:00
Andreas Österreicher 6c1a47955f Merge branch 'feature-27949/infocenter_evaluieren_des_zurueckstellens_mit_einem_grund_zb_fuer_drittstaaten' 2023-05-05 07:48:53 +02:00
Andreas Österreicher 3b1d913006 Merge branch 'TechnikumWienAcademy-ku-prod-hotfix-221118' 2023-05-04 09:46:02 +02:00
Cris 33c1cc80b2 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-05-04 09:26:44 +02:00
ma0068 58bae0953f dbupdate 2023-05-03 07:57:48 +02:00
Andreas Österreicher fdc3265e97 Merge branch 'ku-prod-hotfix-221118' of https://github.com/TechnikumWienAcademy/FHC-Core-Academy into TechnikumWienAcademy-ku-prod-hotfix-221118 2023-05-02 11:28:15 +02:00
KarpAlex 8efe601826 plausichecks gui bugfix: filter by Studiensemester and Studiengang possible again, removed unnecessary resolver params variable 2023-05-01 16:28:42 +02:00
KarpAlex 96d115e808 issues: added new filter for Personalverwaltung issues 2023-05-01 16:23:49 +02:00
ma0048 8b74420e4f - limit beim selecten 2023-04-30 21:28:47 +02:00
ma0068 f2479c6f36 dbupdate für neue Zeitsperre 2023-04-28 08:05:30 +02:00
Andreas Österreicher 9a4c61d1c3 Fixed Abgabetool Lecturer View 2023-04-27 17:50:03 +02:00
Andreas Österreicher a528018761 Merge branch 'master' into feature-19172/Abgabetool_digitale_signatur_pruefen 2023-04-27 09:57:40 +02:00
ma0048 eefffa8a0e - kaution spalte
- fas abgeschickt am timestamp automatisch ausfuellen
- zgvuberpruefung zeigt abgewiesene nicht an
2023-04-27 09:08:26 +02:00
ma0068 5bdfd447ac Berechtigungspruefung mittels mitarbeiter/zeitsperre:begrenzt, Update Berechtigung für Anzeige in Vilesci-Menue, Einbau Redirect 2023-04-26 16:17:23 +02:00
ma0048 da484fbbb0 - die letzten 5 tage werden geprueft anstatt nur der vortag
- neue bewerbungen nach dem aufgenommen status werden nich automatisch abgewiesen
2023-04-25 08:45:16 +02:00
Harald Bamberger 5519f6af57 Merge branch 'merged_Anrechnungen_26625_27388_28278_28557' 2023-04-24 14:49:29 +02:00
Harald Bamberger d16a670726 Merge branch 'sonstiges-28665/Tabulator-PersistenceID-einbauen' into merged_Anrechnungen_26625_27388_28278_28557 2023-04-24 14:42:21 +02:00
Harald Bamberger 54864da770 Merge branch 'bugfix-28557/Alte-Anrechnungen-lassen-sich-nicht-oeffnen' into merged_Anrechnungen_26625_27388_28278_28557 2023-04-24 12:12:05 +02:00
Harald Bamberger 64aa3c1250 Merge branch 'feature-28278/Anrechnung_Neue-Begruendung-bei-Ablehnung' into merged_Anrechnungen_26625_27388_28278_28557 2023-04-24 11:31:39 +02:00
Harald Bamberger a663fa9436 Merge branch 'feature-27388/Anrechnungen_Zeitfenster-pflegen' into merged_Anrechnungen_26625_27388_28278_28557 2023-04-24 11:30:32 +02:00
Harald Bamberger aa572e8a22 Merge branch 'feature-26625/Anrechnungen-BFI-Änderungen-und-Sonstige' into merged_Anrechnungen_26625_27388_28278_28557 2023-04-24 11:26:45 +02:00
Harald Bamberger 48798e8309 Merge branch 'master' into feature-27388/Anrechnungen_Zeitfenster-pflegen 2023-04-24 11:20:53 +02:00
Harald Bamberger 01ca8f6fb9 Merge branch 'master' into feature-26625/Anrechnungen-BFI-Änderungen-und-Sonstige 2023-04-24 11:18:40 +02:00
Harald Bamberger 80eb64e418 Merge branch 'master' into feature-28278/Anrechnung_Neue-Begruendung-bei-Ablehnung 2023-04-24 10:36:32 +02:00
Harald Bamberger ea79b92beb Merge branch 'master' into bugfix-28557/Alte-Anrechnungen-lassen-sich-nicht-oeffnen 2023-04-24 10:35:22 +02:00
Andreas Österreicher 42d6ea9bed Merge branch 'feature-28426/DiplomaSupplementMinimalVersionSS2023' 2023-04-24 08:31:15 +02:00
KarpAlex 0a8432514c issues: added comment to getLanguageIndex method 2023-04-22 23:35:39 +02:00
KarpAlex 3122825b73 student issues list issueData: language index comes from tbl_sprache, limit results only to dvuh and core issues 2023-04-22 15:41:20 +02:00
KarpAlex bc8709f842 added filter for Personalverwaltung issue list 2023-04-21 17:59:24 +02:00
KarpAlex f39fb46b25 Merge branch 'feature-28886/Filter_Component_vs_Table_Component' into feature-28089/plausichecks_in_extension_hinzufuegen 2023-04-20 13:19:16 +02:00
Manfred 48172216cc Zeilenzähler bei Statistik 2023-04-19 15:43:18 +02:00
Manfred 1fa215103c Insert- und Update-Daten bei Prestudentstatus im FAS 2023-04-19 15:42:51 +02:00
ma0068 88c8b13208 Anzeige Urlaubsverwaltung Vilesci ausschließlich für user mit Oes mit Leitungsfunktionen 2023-04-18 08:10:42 +02:00
Paolo 8eb423414a Merge branch 'master' into feature-19172/Abgabetool_digitale_signatur_pruefen 2023-04-17 10:21:09 +02:00
Andreas Österreicher 5d668791f9 Projektphase in der Zeiterfassung werden temporär 7 Monate in die Vergangenheit anzgezeigt um die Erfassung von alten Einträgen zu ermöglichen 2023-04-14 14:37:52 +02:00
cgfhtw d766e2fd01 console.warn => alert 2023-04-14 08:22:36 +02:00
Manfred 9c801d2723 Merge branch 'benutzerberechtigungGUIneu' 2023-04-11 13:24:56 +02:00
Manfred dce81d614e Merge branch 'master' into benutzerberechtigungGUIneu 2023-04-11 13:23:09 +02:00
cgfhtw a63a79ab91 add param tableOnly & save for multiple components on one page 2023-04-07 14:10:30 +02:00
ma0048 19d369c3c7 - im kalender mitarbeiter kurzbz statt uid anzeigen 2023-04-06 10:17:15 +02:00
Andreas Österreicher f325daab43 Merge branch 'bug-28917/AnwesenheitenLadezeiten' 2023-04-05 16:30:55 +02:00
Andreas Österreicher 326b53544a Übernahme Optimierung der Anwesenheitsabfrage von BFI 2023-04-05 16:28:19 +02:00
Andreas Österreicher 1a3d651759 Merge branch 'feature-27403/DVUH_Plausicheck_fuer_Personen_ohne_Konto_Buchungen' 2023-04-05 15:33:36 +02:00
Paolo e46d5a2433 application/views/templates/FHC-Footer.php now includes the bootstrap5 bundle JS 2023-04-05 15:22:49 +02:00
Andreas Österreicher 995b3ecb18 Merge branch 'feature-28539/Projektarbeitsbeurteilung_Anpassungen' 2023-04-05 15:10:54 +02:00
ma0068 43f613b0bc Änderung FHStG auf FHG 2023-04-05 13:32:32 +02:00
Manfred 5226da2652 Neues Template Content mit Titel und Filterwidget 2023-04-04 17:37:47 +02:00
Manfred 15049640c6 Input-styling 2023-04-04 17:37:01 +02:00
Manfred 0d5a7aee35 Aktive als Default 2023-04-04 17:36:36 +02:00
Manfred cfa71c852c Styleanpassung inaktive 2023-04-04 17:36:18 +02:00
KarpAlex a1a9b10ee1 plausicheck issues: enabled generic passing of different parameters, not just core plausicheck specific. moved studiensemester param to specific PlausiIssueProducer controller 2023-04-04 16:17:18 +02:00
ma0048 fb57ea5838 - splitten von reihungstest uebersichten 2023-04-04 15:57:33 +02:00
ma0048 d93c19913b - spalte fuer kaution hinzugefuegt 2023-04-04 15:07:23 +02:00
Harald Bamberger 80d5d09ed5 fix styling of textarea in import popup 2023-04-04 08:07:03 +02:00
Cris 9e4489093c Adapted & updated Tabulator default options (PersistenceID now changeable / Updates for options in Tabulator 4.9)
. Adapted
.. PersistenceID now changeable
.. check: only set default option if not set in tabulator

. Updates in version 4.9:
.. persistentLayout => persistence
.. getVisibility() => isVisible()
2023-03-29 10:29:06 +02:00
Cris 772e60c944 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-03-28 13:52:23 +02:00
Manfred 9527fd006f Rechte-Detailansicht 2023-03-27 17:08:22 +02:00
Cris bbd5962fd4 Deleted deprecated FBL-files 2023-03-27 11:19:34 +02:00
Cris 47fba23a5e Enhanced queries 2023-03-27 11:11:03 +02:00
Cris 75aff023d3 Corrected Mehrsprachigkeits-variable 2023-03-27 11:08:07 +02:00
Cris 8183144251 Corrected query to retrieve Leitung 2023-03-27 11:06:22 +02:00
Cris 1e00f2683e Corrected check 'isEmpfehlungsberechtigt'
Fachbereichsleiter are always empfehlungsberechtigt.
2023-03-27 11:05:03 +02:00
Cris d8fc724b10 Changed: Now passing config-variable to views
...instead of loading config into view.
2023-03-27 11:02:24 +02:00
Cris 8feec18ff7 Changed query to get Leitung of Lehrveranstaltung-Organisationseinheit (instead of 'Fachbereich') 2023-03-27 10:58:59 +02:00
Manfred cff3cab075 Merge branch 'master' into benutzerberechtigungGUIneu 2023-03-27 10:55:58 +02:00
Manfred 55e47d8b62 Merge remote-tracking branch 'origin/master' 2023-03-27 10:53:23 +02:00
Manfred f72da812d7 Ganzer SQL Filterbar 2023-03-27 10:53:18 +02:00
Manfred 17adaf79b0 Nur verplanbare LV-Teile werden gezählt; Studiengangsfilter 2023-03-27 10:52:35 +02:00
Manfred 84b1f1c81a Multi-Endedatum setzen, Jquery Checkboxes adaptiert 2023-03-27 10:50:00 +02:00
ma0068 76c4c4a0e9 Termin 3 als pruefungstyp in lehre.tbl_pruefungstyp in dbupdate hinterlegt 2023-03-27 08:15:29 +02:00
ma0068 3e056ebf3d Notenimport Nachprüfung und 3.Termin: Ergänzung um nicht numerische Noten 2023-03-24 15:21:01 +01:00
Cris fbcf9d9778 Fixed: Now flagging correctly ALL Studiengänge with Schreibberechtigung
Before Schreibberechtigung was not set correctly true/false and displayed wrong in table.
Therefore fixed query.
2023-03-23 09:10:04 +01:00
Cris b7661b200e Removed unnecessary code 2023-03-22 15:45:06 +01:00
Cris 26ed20b1f5 Changed 'Schreibberechtigt'-column for STGL: Now showing ALL by default 2023-03-22 15:44:00 +01:00
Cris f94274ae1c Optimized Mehrsprachigkeit-query
Removed unnessecary type conversions
2023-03-22 14:08:46 +01:00
Cris a78b4507da Added missing phrasen 2023-03-22 09:42:04 +01:00
ma0048 651bd9e37a - nicht notwendige permission fuer funktion geloescht 2023-03-21 16:57:33 +01:00
ma0048 7336525021 - rueckstelldatum default zwei wochen 2023-03-21 16:56:35 +01:00
Cris 8035176e8b Fixed: Old Anrechnungen sometimes failed to open
...this is fixed now
2023-03-20 13:48:23 +01:00
Cris e4fca1b823 Merge branch 'master' into feature-28278/Anrechnung_Neue-Begruendung-bei-Ablehnung 2023-03-20 11:32:14 +01:00
Cris b59b00dbe4 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-03-20 11:31:33 +01:00
Cris 455d7e9aa2 Restored general Ablehnungstext in Lector & STGL Overview with explenation 2023-03-20 11:30:05 +01:00
Cris ca502488b7 Small text adaption of phrases 2023-03-20 11:20:37 +01:00
Cris 7f99b26e48 Added new phrases
.genehmigungNegativKenntnisseNichtGleichwertigWeilHinweis
.empfehlungNegativKenntnisseNichtGleichwertigWeilHinweis
2023-03-20 11:05:57 +01:00
KarpAlex b827d8cbea Projektarbeit Abgabetool: Text is displayed for student instead of note if Projektarbeit Benotung is saved, but not abgeschickt (sent) 2023-03-17 17:33:18 +01:00
ma0048 598f6b4b09 - nur zukuenftige eintraege markieren 2023-03-16 17:16:31 +01:00
ma0048 2c4dc542b6 - parken und zustellen anzeige in eine spalte zsmgefasst 2023-03-16 17:09:00 +01:00
Andreas Österreicher 4787159071 Merge branch 'feature-24880/Sprachaenderung_in_Projektarbeitsbeurteilung_mit_Token' 2023-03-16 15:13:07 +01:00
ma0048 c365896865 - log eintrag hinzugefuegt, beim setzen auf park... 2023-03-16 13:57:17 +01:00
Andreas Österreicher 71e8742cc8 Merge branch 'TechnikumWienAcademy-master' 2023-03-16 11:25:57 +01:00
KarpAlex 813cca99e2 improved plausicheck getOrgformStgUngleichOrgformPrestudent, so it checks orgform for current prestudent, is valid only for mischform, includes more prestudent statuses 2023-03-16 10:15:40 +01:00
nkrondraf de1ae7e46c correct file path for pictures 2023-03-16 09:40:16 +01:00
Cris d606418072 Set focus on all Begruendungs-textareas
This makes it easier to directly add and complete Begruendungen.
Changed in STGL and Lecotors Overview and Detailview
2023-03-16 09:05:49 +01:00
Cris d69788e8d2 Added 'Andere Begründung' to STGL and Lector Detailview 2023-03-16 09:02:43 +01:00
Cris 4a009f3cef Set ZGV-column visible 2023-03-16 09:01:24 +01:00
KarpAlex 9c1d58c447 Merge branch 'master' into feature-24880/Sprachaenderung_in_Projektarbeitsbeurteilung_mit_Token 2023-03-15 21:47:33 +01:00
Cris 792d1980fe Removed general Ablehnungstext in Lector & STGL Overview
Ablehnungstext was changed in former commit in order to make sure to add personal reason.
This is done in Detail sites.
Therefore the generally written Ablehnungstext is now removed from Overview sites.
2023-03-15 14:49:34 +01:00
ma0048 22cd1e075a - rueckstellgruende umbenannt
- sort in der tabelle hinzugefuegt
- anzeige angepasst
2023-03-14 10:19:07 +01:00
Andreas Österreicher e67e7309cb Merge branch 'feature-3878/temput_ganztaegige_zeitsperren_erzeugen_keine_kollision' 2023-03-13 16:24:45 +01:00
Andreas Österreicher 6e1c602658 Merge branch 'feature-6329/NotenfreigabeMailAufNoReplyAendern' 2023-03-13 15:55:15 +01:00
Andreas Österreicher d8ab7036a6 noreply auf no-reply geändert 2023-03-13 15:54:48 +01:00
Andreas Österreicher 4899c62863 Merge branch 'master' into feature-6329/NotenfreigabeMailAufNoReplyAendern 2023-03-13 15:50:38 +01:00
Cris 1da8881905 Added new Ablehnungstext and checks to Lector Detail View
. Changed Ablehnungstext
. Trim text and focus on textarea to fasten editing
. Check if forgot to add own Begründungstext
2023-03-09 16:11:37 +01:00
Cris 3e092bf375 Added new Ablehnungstext and checks to STGL Detail View
. Changed Ablehnungstext
. Trim text and focus on textarea to fasten editing
. Check if forgot to add own Begründungstext
2023-03-09 16:11:04 +01:00
Cris 8a7bcab2c6 Added new phrases to reject Empfehlung / Anrechnung 2023-03-09 16:05:27 +01:00
Cris 6644564738 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-03-09 09:31:53 +01:00
Cris 31b6ff9954 Removed unnecessary code and added phrase
Unnecessary since implementation of tabulator
2023-03-09 09:27:16 +01:00
Manfred 81f279964c Tooltip für Anmerkung 2023-03-08 15:03:31 +01:00
Manfred 9830025853 Merge branch 'master' into benutzerberechtigungGUIneu 2023-03-08 14:58:46 +01:00
Manfred 18d760886a Update-Details bei Reservierungen im Tempus anzeigen 2023-03-08 14:54:51 +01:00
Manfred 265244c5af Offsetpunkte in Fragenübersicht anzeigen 2023-03-08 14:54:29 +01:00
Manfred 4ceaffa617 Kopierfunktion für Räume 2023-03-08 14:54:13 +01:00
Harald Bamberger 84ca798dad add format to set text as format for date columns and highlight them 2023-03-08 13:50:33 +01:00
Cris bae6675efe Removed config vars start and end of Application period
Removed
.'submit_application_start'
.'submit_application_ende'
2023-03-08 13:02:08 +01:00
Cris ef32586d86 Merge branch 'master' into feature-27388/Anrechnungen_Zeitfenster-pflegen 2023-03-08 13:00:03 +01:00
Cris 4a5e83fece Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-03-08 12:58:29 +01:00
Cris ba0e084311 Integrated into FH Complete Navigation 2023-03-07 18:40:54 +01:00
Cris a7f02548b0 Formatted date (of Anrechnungszeitraum Start and -Ende) 2023-03-07 17:57:39 +01:00
Cris 9882065b20 Removed tablesorter script
Not used.
2023-03-07 17:56:26 +01:00
Cris 058d01b6be Added Berechtigung lehre/anrechnungszeitfenster 2023-03-07 17:37:50 +01:00
Cris 68a6554d19 Removed loading config Anrechnung
Not needed anymore. Using tbl_anrechnungszeitfenster now.
2023-03-07 17:20:20 +01:00
Cris f8349a2a9b Changed Bootstrap 5 -> Bootstrap 3
Tablewidget is not working fine with Bootstrap 5 by now.
2023-03-07 17:18:21 +01:00
Andreas Österreicher 08fffa5009 Merge branch 'feature-15029/Docsbox' 2023-03-07 16:27:16 +01:00
Andreas Österreicher d06efc15a6 Removed Config because its in the global Config 2023-03-07 16:22:35 +01:00
Andreas Österreicher 58c3fba33a Added Missing Config to enable Docsbox Conversion 2023-03-07 16:20:02 +01:00
Andreas Österreicher bf6d0aca38 Merge branch 'master' into feature-15029/Docsbox 2023-03-07 15:57:14 +01:00
Cris c78e715c3e Added phrases 'bearbeitetVon', 'bearbeitetAm' 2023-03-07 14:07:14 +01:00
Cris ba31a0b5b0 Changed HTML table to Tablewidget 2023-03-07 14:06:00 +01:00
Andreas Österreicher c411b826d9 Merge branch 'feature-25518/bewerbungstool_messages_direkt_an_permesser' 2023-03-06 16:54:43 +01:00
Cris 479feea8aa Changed way of checkíng Anrechnungszeitraum
Changed function isExpired to check Anrechnungszeitraeume of tbl_anrechnungszeitraum instead of using config entries.
2023-03-06 15:26:12 +01:00
Cris 043f09892a Deleted hidden testing field 2023-03-06 15:22:56 +01:00
Cris 9e15668c37 Created page-header class
page-header class was dropped since Bootstrap 4.
Therefore added to css style
2023-03-06 13:25:14 +01:00
Cris 9c85877d3d Added new phrases
.anrechnungenVerwalten
.anrechnungszeitraumFestlegen
.anrechnungszeitraumHinzufuegen
.anrechnungszeitraumSpeichern
.anrechnungszeitraumStart
.anrechnungszeitraumEnde
.errorStartdatumNichtInStudiensemester
.errorEndedatumNichtInStudiensemester
.errorStartdatumNachEndedatum
.frageSicherLoeschen
2023-03-06 13:24:03 +01:00
Cris f8fb59e806 Created js to handle Anrechnungszeitraum
Handle:
. modals to add / update Anrechnungszeitraume
. AJAX calls to add / update / delete
2023-03-06 13:21:37 +01:00
Cris d3f88597d9 Created Model Anrechnungszeitraum_model
Inserts / Updates / Deletes Anrechnungszeitraum
2023-03-06 13:19:15 +01:00
Cris 727d0b5876 Created GUI to admin Anrechnungszeitraume
Add / Update / Delete Anrechnungszeitraume
2023-03-06 13:18:23 +01:00
Cris 87a1b3647d Created Controller AdminAnrechnung to admin Anrechnungszeitraume
Add / Update / Delete Anrechnungszeitraume
2023-03-06 13:16:27 +01:00
Cris 35c68d98a1 Created lehre.tbl_anrechnungszeitraum 2023-03-06 13:15:16 +01:00
ma0048 7bb340a415 - checksystem auf 3.4 umgebaut
- vilesci raumtypen inaktive raumtypen werden markiert
- tempus karteireiter ort zeigt nur aktive raumtypen an
- raumsuche auf aktive raumtypen eingeschraenkt
2023-03-01 10:44:47 +01:00
Andreas Österreicher 90a518a70d Merge branch 'bug-27845/rt_zeit_hinzufuegen_bug' 2023-02-28 15:45:48 +01:00
ma0048 37364d9775 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-24913/TabelleRaumtypNeuesAttributAktiv 2023-02-28 13:55:08 +01:00
ma0048 3076753a19 - preview.php verlinkung entfernt
- lvincoming.php entfernt
2023-02-28 08:59:30 +01:00
ma0048 22fbe098ec - studienbestaetigung fuer abbrecher angepasst 2023-02-27 15:01:18 +01:00
ma0048 012e7b9691 - kollision bei ganztaetigen zeitsperren 2023-02-27 11:35:04 +01:00
ma0048 6d1d4cb74b - uebernahme von zurueckgestellten und geparkten personen hinzugefuegt 2023-02-27 11:32:55 +01:00
KarpAlex 601eae1e95 extension plausicheck bugfix: extension name is correctly passed to plausicheckproducerlib 2023-02-24 17:43:36 +01:00
KarpAlex a667ddaf5e Plausichecks: removed/changed comments 2023-02-24 13:32:37 +01:00
KarpAlex 4f2ca62d05 Issues: enabled extensions to produce own plausichecks, IssueResolver: moved directory names to constants, deleted unused IIssueExistsChecker 2023-02-23 19:27:45 +01:00
ma0048 62550423a3 - geparkt und onhold von der log tabelle in eine eigene tabelle verschoben
- nicht mehr benoetigte funktionen entfernt
- infocentertool angepasst
- bewerbungstool angepasst
- phrasen hinzugefuegt
2023-02-23 16:07:52 +01:00
Cris fe7cd05d57 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-02-22 10:10:10 +01:00
Andreas Österreicher fd39312de6 Merge branch 'feature-28084/DVUH_issue_resolvers_different_folder' 2023-02-21 17:12:29 +01:00
KarpAlex 01a020d196 IssueResolver: renamed issue resolvers folder constant 2023-02-21 17:04:26 +01:00
Cris 844f72d3d4 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-02-21 16:05:06 +01:00
Andreas Österreicher 90ada0aaf8 Merge branch 'TechnikumWienAcademy-master' 2023-02-21 08:44:57 +01:00
Nikolaus Krondraf dee4af2fb8 add parameters to generateUID() 2023-02-21 08:02:15 +01:00
KarpAlex 88dee31289 added Plausicheck CORE_STUDENTSTATUS_0015 for finding persons without Konto Buchungen (charges), Plausichecks GUI: generic plausicheck error text is displayed if not defined erroroccured, instead of success message 2023-02-20 11:40:55 +01:00
ma0048 4d85d42a79 - gebiet zeit hinzufuegen fixed
- stammdaten abbrechen button fixed
2023-02-15 14:50:12 +01:00
KarpAlex accccbd362 Projektarbeitsbeurteilung abgabe_lektor_details: added explanatory text below when "grade" (benoten) button is disabled 2023-02-13 17:04:21 +01:00
Manfred de81a5abbd Merge remote-tracking branch 'origin/master' 2023-02-13 13:27:22 +01:00
Manfred 0fdf943085 Textanpassung an 30MB Uploadgrenze 2023-02-13 13:27:16 +01:00
Manfred feb14a9f39 Anpassung Speicherbutton, Tooltips, Alertmessages 2023-02-13 11:27:54 +01:00
Andreas Österreicher ab5e656069 Anrechnungen: Link zu Dokumenten in der Übersicht korrigiert 2023-02-13 10:21:12 +01:00
Andreas Österreicher 8d3a9d86f3 DBUpdate Gegenchecks erweitert 2023-02-09 18:47:42 +01:00
Andreas Österreicher 3f5c6c4ee5 Merge branch 'bug-16636/Lv_Termine_im_FAS_falsch_ermittelt' 2023-02-09 17:11:21 +01:00
Andreas Österreicher 97023c547c Merge branch 'feature-17512/Issues_Plausibilitaetspruefungen' 2023-02-09 16:14:49 +01:00
Andreas Österreicher 947cc3beff Datenbankändungen von 3.3 nach 3.4 verschoben 2023-02-09 16:09:37 +01:00
Andreas Österreicher 151e9d2ca3 Merge branch 'master' into feature-17512/Issues_Plausibilitaetspruefungen 2023-02-09 16:04:33 +01:00
Harald Bamberger 381db6a93f Merge branch 'feature-25561/Quellkursverknüpfung_und_wiederherstellung_f_LehrgangsLVs_der_Academy' 2023-02-09 11:20:07 +01:00
Paolo 7f97a58baa Merge branch 'master' of github.com:FH-Complete/FHC-Core 2023-02-09 10:55:41 +01:00
Paolo 8ef07fd9b2 Fixed LogsViewer: check if request id is not null before using it to set the row color 2023-02-09 10:54:56 +01:00
Andreas Österreicher 569c8c929e Merge branch 'feature-25177/ZeiterfassungMergedBrancheDeploy1' 2023-02-09 10:27:25 +01:00
Harald Bamberger ba76ced168 Merge branch 'master' into feature-25561/Quellkursverknüpfung_und_wiederherstellung_f_LehrgangsLVs_der_Academy 2023-02-08 10:28:43 +01:00
Andreas Österreicher 0347ad9b10 Stunden werden auf NULL gesetzt wenn eine Zeitsperre bearbeitet wird die
keine Stunden zulässt
2023-02-07 18:48:22 +01:00
Andreas Österreicher 990bffeb2c Merge branch 'feature-16899/Anwesenheitsliste_um_Geschlecht_erweitern' 2023-02-07 16:36:42 +01:00
Andreas Österreicher 78a66bfc74 Merge branch 'feature-11836/reihungstest_starten_von_fremden_gebieten_verhindern' 2023-02-07 14:51:20 +01:00
Andreas Österreicher 9c349d9f1b Merge branch 'master' into feature-11836/reihungstest_starten_von_fremden_gebieten_verhindern 2023-02-07 14:46:24 +01:00
Andreas Österreicher 51b5cb8620 Merge branch 'bug-26015/OutgoingAufAnwesenheitslisteAnzeigenBeiMehrerenDatensaetzen' 2023-02-07 14:29:48 +01:00
Andreas Österreicher 366aca2b1c Merge branch 'bug-26740/FAS_Reiter_Anwesenheit' 2023-02-07 14:21:24 +01:00
Andreas Österreicher de5b701532 Problem beim CSV Import behoben wodurch der Import ohne
Projekt-Zuordnung nicht möglich war
2023-02-07 09:01:29 +01:00
Andreas Österreicher b17c6e29e5 Merge branch 'master' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2023-02-06 16:23:48 +01:00
Andreas Österreicher fd0eed8558 Merge branch 'feature-27665/infocenter_zgv_uebernehmen' 2023-02-06 15:49:18 +01:00
ma0048 e6269b121b - fixed zgv uebernehmen 2023-02-06 13:04:32 +01:00
Andreas Österreicher 5441024c75 Merge branch 'feature-27363/infocenter_alte_dokumente_aus_dem_archiv_sichtbar' 2023-02-02 12:20:42 +01:00
Andreas Österreicher f46ff9c97a Merge branch 'feature-11058/fas_unterrichtsnummer_ungleich_lehreinheit_id' 2023-02-02 12:12:12 +01:00
Andreas Österreicher 0cfcb58a58 Merge branch 'feature-25900/krankenstaende_abteilung_und_unternehmen_hinzufuegen' 2023-02-02 12:05:46 +01:00
Andreas Österreicher 92fb2f40cd Merge branch 'feature-26298/unr_problem_im_tempus_fas' 2023-02-02 11:50:40 +01:00
Andreas Österreicher 858ab16bc7 Merge branch 'feature-26104/standort_kurzbz_im_fas_anzeigen' 2023-02-02 11:45:50 +01:00
Andreas Österreicher b2e148d330 Bugfix Standort 2023-02-02 11:45:03 +01:00
Andreas Österreicher 463c6bd97a Merge branch 'feature-25431/zgv_master_eingabe_sperren' 2023-02-02 11:27:25 +01:00
Andreas Österreicher 2fdd136aa9 Merge branch 'feature-24683/reihungstest_zeit_für_gebiete_zuruecksetzen_nach_dem_entsperren_eines_teilnehmers' 2023-02-02 11:20:48 +01:00
Andreas Österreicher 6643fae82c Merge branch 'feature-24682/reihungstest_zugangscode_fuer_login' 2023-02-02 11:06:42 +01:00
Andreas Österreicher 94854592fb Merge branch 'feature-26425/konto_buchung_vorhanden_warning_namen_anzeigen' 2023-02-02 10:38:14 +01:00
Andreas Österreicher b60e0b712f Merge branch 'feature-25430/stammdaten_im_infocentertool_editierbar' 2023-02-02 10:32:36 +01:00
Andreas Österreicher 2b3842df29 Merge branch 'feature-27513/infocenter_fit_anpassung' 2023-01-31 12:29:56 +01:00
Andreas Österreicher e019faabe4 Merge branch 'feature-27480/international_skills_text_anpassungen' 2023-01-30 14:57:22 +01:00
ma0048 3293a75a79 - berechtigungsabfragen angepasst
- fit programme aus der config holen
2023-01-30 11:51:15 +01:00
ma0048 c8df6633af - text anpassungen 2023-01-27 08:56:47 +01:00
KarpAlex c136a0afdb phrasesupdate: added phrase for projektarbeitsbeurteilung weightening notice, changed phrases for total points for correct upper case 2023-01-26 18:55:41 +01:00
KarpAlex 7eda91d0a2 Merge branch 'master' into feature-24880/Sprachaenderung_in_Projektarbeitsbeurteilung_mit_Token 2023-01-26 17:38:34 +01:00
ma0048 44bfe52529 - fas filter hinzugefuegt 2023-01-26 11:35:22 +01:00
ma0048 50070bd2ad - Dokumente aus dem Archiv im Infocenter-Tool nicht anzeigen 2023-01-26 10:41:44 +01:00
Manfred a9e235678c Filter Widget in Tabellen 2023-01-24 21:13:36 +01:00
Paolo 0401821422 Merge branch 'master' into feature-15029/Docsbox 2023-01-23 13:32:51 +01:00
Manfred c8fb2080da Studiengangsfilter bei Fragenübersicht 2023-01-20 10:46:22 +01:00
KarpAlex 73dc39b9d8 added phrases for Projektarbeitsbeurteilung language dropdown 2023-01-17 20:45:05 +01:00
Manfred 194d141539 Merge branch 'VorrueckungLetztesSemester' 2023-01-17 16:01:54 +01:00
Manfred 04584fdec9 Merge branch 'master' into VorrueckungLetztesSemester 2023-01-17 15:59:12 +01:00
Manfred f0b1c14ea4 Contents unchanged 2023-01-17 15:57:01 +01:00
Harald Bamberger 3fb20cf61e Merge branch 'bug-27193/Pause_fehlt_-_Falsche_Anzeige' 2023-01-16 16:10:54 +01:00
Cris 5872612d86 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2023-01-16 13:10:33 +01:00
Harald Bamberger f15e89c451 ignore DienstreiseMT entries when calculating Pausenfehler 2023-01-16 10:24:09 +01:00
Manfred f52c9ed3c2 Anpassung der Errormessage 2023-01-13 15:29:59 +01:00
Cris 8bd007b6ea Merged Fachbereichsleitungs-files into core files
. approveAnrechnungUebersichtData_fbl.php into approveAnrechnungUebersichtData.php
. reviewAnrechnungUebersichtData_fbl.php into reviewAnrechnungUebersichtData.php
2023-01-12 09:38:41 +01:00
Cris f2231fcba2 Disabled recommendation buttons if Lector is not empfehlungsberechtigt
If lector should see Anrechnung but not give a recommendation (because is not the LV-Leitung),
then recommendation buttons are disabled.
2023-01-11 18:13:14 +01:00
Cris 3f4efbcd16 Added function isEmpfehlungsberechtigt to AnrechnungLib
Checks if user is allowed to recommend Anrechnung.
2023-01-11 18:05:49 +01:00
Cris fb4f9981f0 Corrected: Anzeige aller LV-Leitungen, an die Empfehlung gesendet wurde
In der STGL Anrechnungs-Detailsicht wurde bisher nur die erste LV-Leitung
aus dem Ergebnisarray ausgelesen. Nun werden alle angezeigt.
2023-01-11 13:52:44 +01:00
Cris d1319a23ad Added: STGLs sehen jetzt nur Anrechnungen von STGs, für die sie eine Berechtigung haben
Es gibt eine neue Spalte 'schreibberechtigt' in der Anrechnungentabelle.
Defaultmäßig werden nur 'schreibberechtigte' Anrechnungen angezeigt, wo STGL
die Berechtigung auf die OE hat.
Über den Filter können aber auch alle angezeigt werden.
2023-01-11 13:47:23 +01:00
Cris 29f1760a7c Added: LektorInnen sehen jetzt nur Anrechnungen, für die sie eine Empfehlung abgeben dürfen
Es gibt eine neue Spalte 'empfehlungsberechtigt' in der Anrechnungentabelle.
Defaultmäßig werden nur 'empfehlungsberechtigt' Anrechnungen angezeigt, wo LektorIn:
- LV Leitung der LV ist ODER
- die LV keine LV-Leitung hat
Über den Filter können aber auch alle angezeigt werden.
2023-01-11 13:45:18 +01:00
ma0048 ed99325bb9 - anpassungen fuer master bewerbungen 2023-01-10 09:04:53 +01:00
Manfred c1b40608c1 Merge branch 'master' into VorrueckungLetztesSemester 2023-01-09 16:38:49 +01:00
Manfred 2ca9f29c0d Englischen Bachelor-Leitfaden entfernt 2023-01-09 15:52:12 +01:00
KarpAlex 9c40452562 fas lv list: improved speed of query getting the lv by relocating studienplan exists check 2023-01-05 18:25:15 +01:00
KarpAlex 6d05df876b lehrstunde.class.php: added with clause to getStundenplanData for speedup, removed brackets, added comments 2022-12-23 20:18:19 +01:00
KarpAlex b8e973c313 lehrstunde get Stundenplan data: removed var_dump 2022-12-23 02:45:48 +01:00
KarpAlex 514205c171 lehrstunde get Stundenplan: changed how data for students is retrieved, so that correct gruppen, lektoren etc can be displayed 2022-12-23 02:44:22 +01:00
KarpAlex 19ebe3cfa8 lehrstunde getstudienplan method: added studiensemester to "special groups" test for students 2022-12-21 17:43:42 +01:00
KarpAlex 103b93a2b8 getStundenplandata method: student lehreinheiten are taken from Studienplan, not view vw_studentlehrverband 2022-12-20 22:22:36 +01:00
ma0068 9070a81f25 Änderung der From-Adresse auf noreply 2022-12-19 14:09:40 +01:00
ma0068 08ebcf591a Adaptierung Legende Fotoliste 2022-12-16 11:50:14 +01:00
ma0068 00446cdb33 Erweiterung Anwesenheitsliste um Geschlecht 2022-12-16 08:37:04 +01:00
ma0048 d9098179a2 - ermoeglicht es master bewerber sich ueber das bewerbungstool anzumelden 2022-12-14 12:40:38 +01:00
KarpAlex 48ee451a38 changed method projektarbeitIsCurrent to adapt to changes for master (weightening of points), kept old check as projektarbeitIsCurrentBeforeWeightening method 2022-12-13 17:25:42 +01:00
Manfred db53de363c Merge branch 'master' into benutzerberechtigungGUIneu 2022-12-12 10:07:03 +01:00
Manfred 603abd5458 Merge remote-tracking branch 'origin/master' 2022-12-12 09:41:07 +01:00
Manfred cb9eaa7694 Last Status Abgewiesener ergänzt, Felder BPK und Matrikelnummer ergänzt 2022-12-12 09:40:02 +01:00
ma0068 7c17ac4ea7 Erweiterung Abfrage in Klasse Anwesenheit um wahlname 2022-12-12 08:32:51 +01:00
ma0048 ad19e0ed75 - im fas die unr hinzugefuegt 2022-12-12 07:55:36 +01:00
KarpAlex 46f7fc2883 Merge branch 'feature-19154/Beurteilungsformulare_Pruefungssenat' into feature-26516/Beurteilungsformulare_Gewichtung_bei_Master_Beurteilungen 2022-12-07 17:51:04 +01:00
KarpAlex 77361fc5f1 Projektarbeitsbeurteilungen: added phrass "gewichtet" 2022-12-07 17:40:20 +01:00
Cris 8d221be050 Adapt view to use Fachbereichsleitung-DataView 2022-12-06 15:53:15 +01:00
Cris 40c7e1c9f0 Created new Approve Anrechnung Uebersicht for Fachbereichsleitung 2022-12-06 15:52:30 +01:00
Cris 32bdeec02e Added date check for Fachbereichsleitung in Tabulator query 2022-12-06 15:49:04 +01:00
Cris 91a2bf4f21 Merge branch 'bugfix/STGL-kann-alte-Anrechnungen-nicht-sehen' into feature-26625/Anrechnungen-BFI-Änderungen-und-Sonstige 2022-12-06 14:15:15 +01:00
Cris c3e3d8e9d7 Added Fachbereichsleitung permission check to read Anrechnung and download Document 2022-12-06 14:05:42 +01:00
Cris 8735318545 Enhanced code readability 2022-12-06 14:03:22 +01:00
Cris 21060b31dc Bugfixed error message when LV has no lectors and only one recommendation is requested 2022-12-06 14:01:24 +01:00
Cris e148d8c2f4 Added function to get Fachbereich as mail receivers 2022-12-06 13:54:56 +01:00
Cris d3a1ed222c Adapted to send mails only if config['mail'] is TRUE 2022-12-06 13:43:11 +01:00
Cris 0197e5b175 Adapted STGL Views to display Fachbereichsleitung (as 'Empfaenger') after recommendation 2022-12-06 13:33:28 +01:00
Cris fe2601b29a Adapt view to use Fachbereichsleitungs-DataView 2022-12-06 13:25:25 +01:00
Cris 4a87fb49e9 Created new Review Anrechnung Uebersicht Tabulator for Fachbereichsleitung 2022-12-06 13:22:48 +01:00
Cris 88246c443a Added function getFachbereichleitung to AnrechnungLib
...plus adaptation to getEmpfehlungData to use this function.
2022-12-06 10:53:21 +01:00
Cris 10ed780b6c Added method getFachbereichsleitungByLv to Lehrveranstaltung_model
Gets all fachbereichsleiter of a Lehrveranstaltung
2022-12-06 10:50:08 +01:00
Cris cee15a68ba Added config['fbl'] and config['send_mail'] to anrechnungen
. config['fbl'] enables Fachbereichsleitung instead of LektorInnen
. config['send_mail'] enables sending Info Mails
2022-12-06 10:48:52 +01:00
KarpAlex 579eda8680 Merge branch 'master' into feature-19154/Beurteilungsformulare_Pruefungssenat 2022-12-02 19:57:28 +01:00
KarpAlex 911035d5ad added method getBetreuerart to Projektbetreuer model 2022-12-02 19:48:23 +01:00
KarpAlex 41eaee41af getIncomingOrGsFoerderrelevant: studiensemester is checked only for prestudent status 2022-12-01 17:18:18 +01:00
ma0048 d24bc36bf7 - freischaltcode beim RT hinzugefuegt 2022-12-01 11:07:47 +01:00
ma0048 6215786565 - zeit staffelung hinzugefuegt 2022-12-01 10:20:10 +01:00
KarpAlex 7d1267732f IncomingOrGsFoerderrelevant plausicheck: added first version of issue resolver, renamed from IncomingAndGsFoerderrelevant 2022-11-30 17:53:36 +01:00
KarpAlex d1ac2e0424 added plausicheck "getIncomingUndGsFoerderrelevant" 2022-11-30 17:26:50 +01:00
Cris ca217f1869 Fixed: Downloadlink erzeugt nach Page Reload keine Fehlermeldung mehr 2022-11-29 18:10:39 +01:00
ma0048 381fa2ed7e - bei der warnung buchung vorhanden, name hinzugefuegt 2022-11-29 10:17:32 +01:00
ma0068 d1a8ec7490 Erweiterung und OrderBy der Abfragen um Dauer Auslandsaufenthalt 2022-11-29 08:15:22 +01:00
Cris 7cdb7688c4 Fixed: Vergangene Anrechnungen können jetzt eingesehen werden
Manche vergangene Anrechnungen konnten nicht eingesehen werden, weil
die Zuordnung der Studenten zu den Lehrveranstaltungen aufgelöst bzw. geändert werden.
Gefixt, indem nun bei einer bestehenden Anrechnung die bei der Anrechnung hinterlegten Lehrveranstaltung
herangezogen wird.
2022-11-28 17:27:39 +01:00
Cris 72c0f97218 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2022-11-28 10:28:01 +01:00
ma0048 a2f65373cd - fixed bug 2022-11-24 06:57:56 +01:00
KarpAlex 33eb1cb6af removed comment in Plausichecks.php controller 2022-11-23 16:21:05 +01:00
ma0048 37cbe5e8f7 - le details disablen bis der rebuild fertig ist 2022-11-23 07:24:48 +01:00
Andreas Österreicher 37ec8d84e5 Merge branch 'Monika70-studentenexpoertextended' 2022-11-22 11:18:50 +01:00
Andreas Österreicher 817d2842cc Changed Escaping of Parameter 2022-11-22 11:17:57 +01:00
Szabo Mónika 9d43279089 Update studentenexportextended.xls.php
mit Anmerkung erweitern
2022-11-22 10:03:40 +01:00
Andreas Österreicher 60a651c220 Merge branch 'feature-25183/lv_evaluierung_uebersichtsseite_langsam' 2022-11-21 16:36:50 +01:00
Andreas Österreicher 462e77d27d Merge branch 'feature-24768/fas_zgv_bezeichnung' 2022-11-21 16:17:28 +01:00
Andreas Österreicher 920fcc0e42 Merge branch 'feature-246/notizen_bei_lehrveranstaltungen_werden_nicht_korrekt' 2022-11-21 16:11:21 +01:00
Andreas Österreicher 9f8d9f1df6 Merge branch 'bug-25904/studentenmeldung_xml_standort_code_Ambiguitaet' 2022-11-21 15:53:58 +01:00
Andreas Österreicher 7cd4eaf5a2 Merge branch 'bug-26144/Bewerberdaten_BIS_Export_XL_Error' 2022-11-21 15:47:51 +01:00
Andreas Österreicher 5e1ed8fa14 Bugfix für Statistiken mit Array Parametern 2022-11-21 15:39:32 +01:00
Andreas Österreicher 3c99d627e1 Merge branch 'feature-19835/BewerbungstoolKeineZGVAbbrecher' 2022-11-21 15:27:36 +01:00
KarpAlex fec45f7b75 separated Bewerbermeldung from Studierenden BIS Meldung, bugfix: correct Bewerber numbers for correct Studiengänge are displayed, renamed ZugangMaCode Element to ZugangMaStgCode 2022-11-18 18:41:02 +01:00
Nikolaus Krondraf 7ef7b86d30 Studierende können sich frühestens 2 Monate vor Prüfung anmelden 2022-11-18 11:11:35 +01:00
Nikolaus Krondraf 1ec742b8fe typo 2022-11-18 10:05:38 +01:00
Nikolaus Krondraf 01107e361f Studierende können sich frühestens 2 Monate vor Prüfung anmelden 2022-11-18 10:01:39 +01:00
Manfred 82b9f595c3 Merge remote-tracking branch 'origin/master' 2022-11-17 13:57:54 +01:00
Manfred d84f53e5c3 GS-Button zum Kopieren bestehender Einträge 2022-11-17 13:57:52 +01:00
Cris deeb1cdb5e Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2022-11-17 10:42:13 +01:00
KarpAlex 763b0bb756 renamed betreuerart of secondary examiner of bachelor thesis with Vorsitz from Senatspruefer to Senatsmitglied 2022-11-16 17:19:13 +01:00
ma0048 ac370197e1 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-25430/stammdaten_im_infocentertool_editierbar 2022-11-15 15:29:15 +01:00
ma0048 ab95544f9f Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-25518/bewerbungstool_messages_direkt_an_permesser 2022-11-15 15:18:59 +01:00
ma0048 6e6406fb2b Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-25431/zgv_master_eingabe_sperren 2022-11-15 15:17:55 +01:00
ma0048 00fb8366b3 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-25183/lv_evaluierung_uebersichtsseite_langsam 2022-11-15 15:16:21 +01:00
ma0048 8e72b83448 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-24768/fas_zgv_bezeichnung 2022-11-15 15:14:53 +01:00
ma0048 98ec75dc94 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-24683/reihungstest_zeit_für_gebiete_zuruecksetzen_nach_dem_entsperren_eines_teilnehmers 2022-11-15 15:14:04 +01:00
ma0048 9601ac5116 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-246/notizen_bei_lehrveranstaltungen_werden_nicht_korrekt 2022-11-15 15:13:25 +01:00
ma0048 d70c0dcae3 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core into feature-11836/reihungstest_starten_von_fremden_gebieten_verhindern 2022-11-15 15:08:01 +01:00
ma0068 540fc4bede 26198 Notenimport ausschliesslich bei vorhandener Note 2022-11-15 11:22:47 +01:00
KarpAlex 8bbbd8cb8d studentenmeldung bugfix: Erhalter Kz is correctly exported 2022-11-14 18:13:49 +01:00
KarpAlex 048c164394 studentenmeldung.php: correct order - Studenten first, then Bewerber 2022-11-14 17:57:20 +01:00
Andreas Österreicher 6c918be121 Merge branch 'bug-26144/Bewerberdaten_BIS_Export_XL_Error' 2022-11-14 10:50:18 +01:00
KarpAlex 2c743cb37b studentenmeldung.php: Export of Bewerberdaten works for allBaMa and Studiengaenge 2022-11-11 23:41:12 +01:00
Andreas Österreicher 471242cb97 Added Index for tbl_webservicelog.execute_time to increase performance 2022-11-11 15:03:48 +01:00
Harald Bamberger 7df9576481 add tabulator header filters to logsviewer 2022-11-11 15:02:39 +01:00
ma0068 a412db7356 Attribut raumtyp_aktiv als boolean parsen 2022-11-11 14:27:06 +01:00
ma0068 ddfb3cdb4e Formatierungen Urlaubstool 2022-11-11 11:25:42 +01:00
ma0048 119a521913 - standort kurzbz im fas anzeigen, wenn die bezeichnung null ist 2022-11-11 10:56:36 +01:00
Andreas Österreicher b69e79685d Merge branch 'master' into feature-24768/fas_zgv_bezeichnung 2022-11-11 09:53:23 +01:00
Andreas Österreicher 7558614145 Merge branch 'feature-25557/inaktive_lektorinnen_im_lehrauftrags_dropdown_kennzeichnen' 2022-11-11 09:41:18 +01:00
KarpAlex f0b36610b7 Projektarbeitsbeurteilung: added phrases, updated filter for uebersicht-page 2022-11-10 19:38:16 +01:00
ma0068 f72afe473c 26112 Vilesci-Kein Löschen von Zeitsperren bei abgeschickter Monatsliste möglich 2022-11-10 15:02:13 +01:00
ma0068 f766f36095 26113 Änderung Mails Zeitsaldo 2022-11-10 11:43:27 +01:00
ma0068 74fb245757 26114 Änderung Mailtext Urlaub neu 2022-11-10 11:20:36 +01:00
Andreas Österreicher 4e3e425491 Mailversand bei Urlaubstool korrigiert 2022-11-09 11:58:31 +01:00
KarpAlex 29809b6bf1 moved Beurteilungsformulare Pruefungssenat changes to dbupdate_3.4 2022-11-08 16:15:16 +01:00
KarpAlex 83b38b999d Merge branch 'master' into feature-19154/Beurteilungsformulare_Pruefungssenat 2022-11-08 15:35:08 +01:00
ma0048 8df802b74a - die Abteilung und das Unternehmen werden im CSV angezeigt 2022-11-08 14:45:02 +01:00
ma0048 a9d065044d - Inaktive LektorInnen im Lehrauftrags-Dropdown kennzeichnen 2022-11-07 12:17:09 +01:00
Paolo 50bf478f0b If the title is not provided to the FilterComponent then the title div is not rendered 2022-11-04 14:06:50 +01:00
Paolo 317a1f87fa Added colors to the LogsViewer app 2022-11-04 13:56:54 +01:00
ma0048 180e24b916 - studienbestaetigung in englischer sprache hinzugefuegt
- odt files angepasst im core
2022-11-04 10:37:38 +01:00
KarpAlex ebb3a6de1f plausichecks view: adapted to vue update - set correct cs and css includes, removed body 2022-11-03 15:33:05 +01:00
cgfhtw 4dd983c105 Phrases 2022-11-03 12:52:31 +01:00
KarpAlex 35b23bcba4 Merge branch 'master' into feature-17512/Issues_Plausibilitaetspruefungen 2022-11-03 12:07:51 +01:00
KarpAlex 71c953bac7 studentenmeldung: standort_code is retrieved and set in xml correctly (first prestudent, then studiengang) 2022-11-03 12:04:46 +01:00
ma0048 ffec6a5422 - stammdaten editierbar 2022-11-03 09:55:38 +01:00
ma0068 9b79a2f446 Merge branch 'master' into feature-25003/NotenimportFuerNachpruefung 2022-11-03 08:48:05 +01:00
ma0068 314e71a2d0 Merge branch 'master' into feature-24913/TabelleRaumtypNeuesAttributAktiv 2022-11-03 08:46:05 +01:00
ma0048 a8f6ca1670 Merge remote-tracking branch 'origin/master' into feature-25430/stammdaten_im_infocentertool_editierbar
# Conflicts:
#	application/views/system/infocenter/infocenterDetails.php
2022-11-03 08:29:10 +01:00
ma0048 651a4a97e7 - stammdaten editierbar 2022-11-02 16:50:53 +01:00
ma0068 5d847ccd38 Merge branch 'master' into feature-19835/BewerbungstoolKeineZGVAbbrecher 2022-11-02 15:56:04 +01:00
ma0068 c47d2c93fe Merge branch 'master' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-11-02 15:05:25 +01:00
Cris 7b5e5562b5 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2022-11-02 10:56:55 +01:00
Andreas Österreicher 1c0b21cb74 JS Includes Korrigiert für Prüfungsprotokolle und UDFs 2022-10-31 16:30:41 +01:00
Andreas Österreicher 15b2c469e2 Restricted Access 2022-10-31 15:31:50 +01:00
Andreas Österreicher 771395cbbf Versionsnummer auf 3.4 erhöht. Extension installer Prüft auf
Minimalversion vom Core. Neue Ordnerstruktur für Checksystem
2022-10-31 15:16:30 +01:00
ma0048 f0fd071e31 - notizen ausblenden 2022-10-31 13:44:17 +01:00
Andreas Österreicher 989a7b8720 Neuen Config für BASE_LOCATION hinzugefügt 2022-10-31 13:23:03 +01:00
Andreas Österreicher 556e58e78e Merge branch 'feature-19473/VUE_Filter_Navigation_Widgets' 2022-10-31 11:29:51 +01:00
ma0048 f7bd49b408 - master messages an studiengang, wenn bereits bestaetigt
- lehrgang messages direkt an lehrgang
2022-10-28 10:56:02 +02:00
Harald Bamberger c9aba38803 change name of column StdKst to Standardkostenstelle 2022-10-28 07:01:39 +02:00
ma0068 c7f477555c Adaptierungen DB und Dropdowns Fas Lehrveranstaltungen 2022-10-27 15:17:29 +02:00
ma0048 4518eab1a8 - stammdaten include 2022-10-25 07:14:47 +02:00
ma0048 9192befce1 - stammdaten include 2022-10-25 07:08:29 +02:00
ma0048 572e53f554 - addon angepassst fuer die stammdaten 2022-10-25 07:02:13 +02:00
Harald Bamberger b3ce06cb90 Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets 2022-10-24 15:21:11 +02:00
Manfred 73dd6e6dc1 Autocomplete in Berechtigungrolle 2022-10-24 14:27:54 +02:00
Manfred 5e9b5b2ce5 Direktlink auf Rolle 2022-10-24 14:27:34 +02:00
Manfred bf8aa6c4ac Student im Max-Semester nicht vorrücken 2022-10-24 12:23:03 +02:00
Harald Bamberger 50ab6ae5e9 Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets 2022-10-24 11:02:52 +02:00
KarpAlex 7a1f36cb5e issuesData Fehlermonitoring: changed order for issue display, first by error type, then by status 2022-10-23 18:02:59 +02:00
ma0048 53dc6b3c63 - tag closed 2022-10-21 11:07:52 +02:00
ma0048 1609543a31 - lv evaluierung ubersichtsseite optimiert 2022-10-20 14:01:31 +02:00
Manfred aadd6b0d92 Anzahl Rechte zählen 2022-10-18 16:48:27 +02:00
ma0048 0bd7d6f7c6 - editieren von stammdaten im infocentertool 2022-10-18 11:00:57 +02:00
ma0068 47d3ab33e7 Adaptierung Vorlage Notenliste.xls um Nachprüfung und Termin3 2022-10-18 09:17:07 +02:00
KarpAlex 336f32bee0 issues: removed unnecessary unique constraint on fehlercode and fehler_kurzbz, added NOT NULL constraint on fehler_kurzbz together with fehlercode_extern 2022-10-17 18:12:34 +02:00
KarpAlex c96baac859 Merge branch 'master' into feature-17512/Issues_Plausibilitaetspruefungen 2022-10-17 17:11:17 +02:00
ma0068 8754c46575 Refactor Import Termin2 und Termin3 2022-10-17 14:34:11 +02:00
Werner Masik 235f15e9f7 removed primeflex.mini.css 2022-10-17 12:36:08 +02:00
Werner Masik 4480b6ce57 removed 'Bottom Panel' text from verticalSplitter because it is shown on empty pages 2022-10-17 12:36:08 +02:00
Werner Masik 23b228c085 added primeflex css classes 2022-10-17 12:36:08 +02:00
ma0068 4f71a274e2 Update Überprüfungen ZGV mit get_rolle_prestudent() 2022-10-17 08:36:36 +02:00
ma0068 458117fced Funktion existsZGV: prestudents mit Last Status Abbrecher werden nicht berücksichtigt 2022-10-14 16:24:45 +02:00
ma0068 382da823e4 Erweiterung Funktion existsZGV um LastStatusPrestudent 2022-10-14 16:12:41 +02:00
ma0048 bfb24320d7 - editieren der ZGV Master nur noch mit eigenen Recht moeglich 2022-10-14 11:11:25 +02:00
ma0068 ce3cea5515 Validierungen Format Datum, Matrikelnr, StudentId, Note 2022-10-13 15:36:08 +02:00
ma0068 29fc5181bf Importfunktion Termin3 2022-10-13 10:16:26 +02:00
ma0068 035d196ae5 Logik Matrikelnummer StudentenId 2022-10-13 08:04:10 +02:00
ma0068 54411f4de7 Benotungstool: Importfunktion Termin2 2022-10-12 15:06:07 +02:00
KarpAlex 2504c91cd9 AusbildungssemPrestudentUngleichAusbildungssemStatus Plausicheck: added student_uid to fehlertext, changed order of ausbildungssemester in fehlertext 2022-10-12 12:36:34 +02:00
KarpAlex c7c0bbfb49 Merge branch 'feature-17512/Issues_Plausibilitaetspruefungen' of github.com:FH-Complete/FHC-Core into feature-17512/Issues_Plausibilitaetspruefungen 2022-10-12 11:56:02 +02:00
ma0048 492562efdf - zeit hinzufuegen fuer den pruefling 2022-10-12 11:46:03 +02:00
KarpAlex 65c6466465 PlausicheckLib: -run check InaktiverStatusAktiverStatus always for current semester -removed unused result variables, todo comment 2022-10-12 11:23:51 +02:00
Cris 82cbc63096 Merge branch 'master' of https://github.com/FH-Complete/FHC-Core 2022-10-11 09:51:45 +02:00
Andreas Österreicher 30fbeda1ba Merge branch 'master' into feature-15029/Docsbox 2022-10-11 09:32:24 +02:00
Paolo 08a58b919a Added the operations equal and not equal for strings in the FilterComponent 2022-10-10 14:55:49 +02:00
Paolo ba5fb29d13 Merge branch 'feature-19473/VUE_Filter_Navigation_Widgets' of github.com:FH-Complete/FHC-Core into feature-19473/VUE_Filter_Navigation_Widgets 2022-10-10 14:44:31 +02:00
Paolo aead693675 - Removed not used methods sortSelectedFields, removeSelectedField and addSelectedField from controllers/components/Filter
- Removed not used methods sortSelectedFields, addSelectedField and removeSelectedField from libraries/FilterCmptLib
- CSS fixes for FilterComponent and NavigationComponent
- Removed not used API calls from public/js/components/filter/API.js
- Added second level menu entries to the NavigationComponent
- Added new property side-menu to the FilterComponent to render the filters selection via the NavigationComponent or directly from the FilterComponent
- FilterComponent:
	- Column positioning is now managed by tabulator
	- Splitted the column selection from the filter options
	- Added the rendering of the filters selection via an optional dropdown
	- Changed the usability and the look of the filter options
	- German translation
2022-10-10 14:38:02 +02:00
KarpAlex f2f960fd43 Plausichecks: added comments, fixed bug for studiengang parameter in GbDatumWeitZurueck check 2022-10-08 01:40:14 +02:00
KarpAlex fb5656833a added plausichecks to navigation menu, improved plausichecks GUI responsiveness, made it centered 2022-10-07 18:22:06 +02:00
KarpAlex b067c97beb Plausichecks: changed texts of some Plausichecks for better understanding, AbschlussstatusFehlt check: Studiensemester not necessary for resolving, checking for melderelevant for fehler StgPrestudentUngleichStgStudienplan 2022-10-07 18:05:25 +02:00
ma0068 18cdbb8f6d Merge branch 'feature-19041/ZeitausgleichSanchoMail' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 09:09:54 +02:00
ma0068 7d3a12fd1c Merge feature-16658/NeueVertragsartAllIn into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 09:03:20 +02:00
ma0068 36b4964d53 Merge branch 'feature-16655/StundensaldoAllin' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 08:51:00 +02:00
ma0068 11a208de55 Merge branch 'feature-15943/VilesciLoeschenVonUrlaubenBeiAbgeschicktenMonatslistenVerhindern' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 08:49:17 +02:00
ma0068 2f5e9d80da Merge branch 'feature-17071MonatslisteVorzeitigAbschickenEndeDV' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 08:45:48 +02:00
ma0068 ae42051f15 Merge branch 'bug-24113/ZeiterfassungBerücksichtigungVonAttributProjektZeitaufzeichnung' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 08:44:35 +02:00
ma0068 32493c1b9d Merge branch 'bug-19038/AnzeigeOffenerMonatslistenBeiNichtZeitaufzeichnungspflichtig' into feature-25177/ZeiterfassungMergedBrancheDeploy1 2022-10-07 08:40:43 +02:00
KarpAlex 03d6955ec4 issueDataset.js: code formatting 2022-10-06 10:34:32 +02:00
KarpAlex 21d3d40171 issueDatase.js: added comment for changeIssueStatus method 2022-10-06 10:30:55 +02:00
ma0068 9b3b571bd9 Erweiterung Phrasen 2022-10-06 08:55:11 +02:00
KarpAlex 8fe346f6be plausichceks: changed phrasing of check AusbildungssemPrestudentUngleichAusbildungssemStatus 2022-10-06 03:47:28 +02:00
KarpAlex fb70ba3da5 issueDataset.js: enabled sending many issue ids for status change by splitting up 2022-10-06 03:25:57 +02:00
Manfred 5f8a530857 Merge branch 'master' into benutzerberechtigungGUIneu 2022-10-05 17:51:27 +02:00
Manfred d82426cd91 Autocomplete für Kostenstelle 2022-10-05 17:42:45 +02:00
Manfred b293673ee9 Updateamum nur bei geänderten Datensätzen
Kostenstelle Autocomplete
Counter für Anzahl Zeilen
Anmerkungsfeld verbreitert
2022-10-05 17:42:24 +02:00
KarpAlex edd310351b plausichecks fehlertext: check number of parameters before calling vsprintf 2022-10-05 14:07:29 +02:00
KarpAlex c31ab4874d moved "plausicheck start" button in GUI to the right 2022-10-05 14:04:59 +02:00
KarpAlex 2a060ace25 -added issue resolvers for plausichecks - renamed fehler PrestudentStgUngleichStgStudienplan to StgPrestudentUngleichStgStudienplan -fixed some parameters passed for resolving -plausicheck getDatumStudiensemesterFalscheReiheinfolge: performed directly in SQL for speedup -plausicheck GUI: fixed comment, minor text changes 2022-10-04 19:17:03 +02:00
KarpAlex 5670f931ef Plausichecks: beautified GUI output 2022-10-04 03:17:41 +02:00
KarpAlex b28e780aa6 plausichecks issues fehlerupdate.php: added brackets to OrgformStgUngleichOrgformPrestudent 2022-10-04 03:11:59 +02:00
KarpAlex aee25c5252 moved issue resolvers to #own resolvers folder, created first resolver CORE_INOUT_0007 for plausichecks 2022-10-03 19:25:32 +02:00
KarpAlex ae26c4d1ee plausichecks.js: reformatted file, display error as message 2022-10-03 13:40:33 +02:00
KarpAlex f8d3337481 added Plausicheck gui to start plausichecks manually 2022-10-03 02:32:28 +02:00
KarpAlex 5b46722913 -PlausicheckLib: melderelevant and bismelden fields are checked only if applicable, speed up by including conditions in SQL instead of PHP functions -added more info to some fehler texts by params 2022-10-03 02:28:48 +02:00
Andreas Österreicher 9d3d84e7ea Pfad zu Bootstrap angepasst 2022-09-30 15:11:01 +02:00
Andreas Österreicher ae4bf1feb1 Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets 2022-09-30 14:54:07 +02:00
ma0048 b4d86744f2 - fas zgv statt kurzbz auf bezeichnung 2022-09-30 12:50:33 +02:00
ma0068 889f8370e1 bugfix checkIfArbeitspakektZuWaehlen 2022-09-30 12:04:59 +02:00
KarpAlex 0d605158a5 changed text of AktiverStudentOhneStatus plausicheck 2022-09-29 19:43:40 +02:00
KarpAlex eee43fe921 AktiverStudentOhneStatus check: check for status already in SQL instead of getLastStatus function, future status with 4 months buffer 2022-09-29 19:41:30 +02:00
KarpAlex 7c02f21582 added plausichecks to PlausicheckProducerLib, bugfixes in PlausicheckLib and plausicheck libraries and fehlerupdate, mainly concerning passed parameters 2022-09-29 03:16:05 +02:00
KarpAlex 23ec0d6344 Plausicheck AbschlusstatusFehlt: existence of status in previous Semester is checked as well when passing a Studiensemester 2022-09-28 17:26:36 +02:00
KarpAlex 1241a05ed3 -Plausichecks: added correct fehlertext and resolution params -replaced Plausichecker Interface with abstract class, which gets ci instance and loads plausicheck lib -write issue info only if issue really newly inserted 2022-09-27 18:32:15 +02:00
KarpAlex 9bae6bb0a4 added params to plausicheck libraries, added PlausicheckProducerLib to enable execution of plausichecks for GUI as well, removed old IssueProducer_Controller 2022-09-26 00:41:48 +02:00
KarpAlex 2c475f8bde fehlerupdate: renamed NationNichtOesterreichAberGemeinde Plausicheck, PlausicheckLib: added comments 2022-09-22 19:54:18 +02:00
ma0068 cb5c11a6ab Zeiterfassung config DEFAULT_ALLIN_DIENSTVERTRAG für Anzeige Saldo AllIn 2022-09-22 13:50:43 +02:00
Harald Bamberger e4590909e2 use alias if available instead of uid for email address 2022-09-22 13:20:12 +02:00
ma0068 f9e33a1779 Zeiterfassung: Config ECHTER_DIENSTVERTRAG 2022-09-22 11:32:49 +02:00
ma0068 c1df686edc Zeiterfassung: Projektvalidierung in Klassen refactored 2022-09-22 10:30:15 +02:00
Harald Bamberger 921b1d337d fix typo 2022-09-22 10:21:24 +02:00
Harald Bamberger bf216e6505 search also in stdkst and oe unit 2022-09-22 10:00:23 +02:00
Harald Bamberger 225b3b7c6e only show current stdkst in searchresult 2022-09-22 09:39:05 +02:00
KarpAlex edb69498e5 added PlausicheckLib for checking plausi issues 2022-09-21 19:55:37 +02:00
KarpAlex 5d1e99a222 Plausichecks: enabled passing of params to plausi issue checkers, created first checker StgPrestudentUngleichStgStudent 2022-09-21 19:54:20 +02:00
KarpAlex 0643b99e86 added Plausicheck fehler (for issues) to database 2022-09-21 19:50:30 +02:00
Harald Bamberger 85338b8477 add PersonalFilters to sideMenu, refresh sideMenu in the session after a custom filter was saved 2022-09-21 15:56:42 +02:00
Harald Bamberger de667990a3 add Standard-Kostenstelle to search result for employees 2022-09-21 15:23:45 +02:00
ma0068 3570b2c04d BT: Adaptierung Prüfung auf Abbrecher auf aktuellen Prestudentstatus 2022-09-21 12:54:41 +02:00
Paolo aa217a42d4 Fixed handlerApplyFilterFields of the components/filter/Filter 2022-09-21 12:47:07 +02:00
Manfred a27ad33e0e Merge branch 'master' into benutzerberechtigungGUIneu 2022-09-21 11:09:27 +02:00
Nikolaus Krondraf ec07c4154d Problem behoben wodurch die Anrechnungen im FAS nicht angezeigt werden wenn diese ohne Anrechnungstool im FAS erfasst werden 2022-09-20 14:31:51 +02:00
ma0068 4d44bbb79c Anzeige Aktueller Urlaubssaldo in Sanchomail 2022-09-20 12:39:20 +02:00
Paolo 07a1d7ecb2 - Added CSS for the navigation component and the filter component
- Changed layout of the filter component
2022-09-19 16:31:55 +02:00
KarpAlex 926180f5da system/checkStudenten: corrected typo in Studierenden Orgform Plausicheck text output 2022-09-18 23:11:43 +02:00
KarpAlex 40d8edebef Plausichecks: added run method to IssueProducer_Controller for producing plausicheck issues 2022-09-18 23:02:55 +02:00
KarpAlex d5eff7d615 issue plausichecks: added issue producer files, code formatting 2022-09-15 18:56:18 +02:00
Manfred 450b0b6433 Initial commit 2022-09-14 15:55:07 +02:00
KarpAlex 0d03689f57 added IIssueExistsChecker and Issue<producer_Controller for detection of issues 2022-09-14 02:48:43 +02:00
ma0068 7252bc1e6f add config.file 2022-09-09 13:20:50 +02:00
ma0068 604592cdd1 Bewerbungstool: neue Funktion isPastAbbrecher() 2022-09-07 15:27:47 +02:00
ma0068 625b3c74c4 Bewerbungstool: keine ZGV bei Abbrechern, Berücksichtigung studentstatus für Dokumenthandling 2022-09-07 09:22:06 +02:00
ma0068 259f9d29d5 Merge branch 'master' into feature-19041/ZeitausgleichSanchoMail 2022-09-05 15:20:44 +02:00
ma0068 b53f3a1170 Merge branch 'master' into feature-17071MonatslisteVorzeitigAbschickenEndeDV 2022-09-05 13:54:44 +02:00
ma0068 b8d1c61b83 Merge branch 'master' into feature-16658/NeueVertragsartAllIn 2022-09-05 13:53:59 +02:00
ma0068 619924eff8 Merge branch 'master' into feature-16655/StundensaldoAllin 2022-09-05 13:52:59 +02:00
ma0068 477a7dd588 Merge branch 'master' into feature-15943/VilesciLoeschenVonUrlaubenBeiAbgeschicktenMonatslistenVerhindern 2022-09-05 13:51:45 +02:00
ma0068 6bdbe91dd9 Merge branch 'master' into bug-19038/AnzeigeOffenerMonatslistenBeiNichtZeitaufzeichnungspflichtig 2022-09-05 13:36:10 +02:00
ma0068 8670ab18f8 Zeitaufzeichnung: Berücksichtigung von Attribut Zeitaufzeichnung bei Projekt und Projektphase 2022-09-05 11:27:33 +02:00
KarpAlex cc33502ab3 adapted "resend token for Begutachter" mail to Projektarbeitsbeurteilung controller split 2022-09-01 02:23:32 +02:00
Paolo 537ce0940c Code quality check improvements 2022-08-31 15:48:35 +02:00
KarpAlex 824a148b92 adapted core to Projektarbeitsbeurteilung Zweitbegutachter/Erstbegutacher Controller split 2022-08-31 13:38:38 +02:00
Andreas Österreicher ed9f6e0c9b Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-30 14:44:13 +02:00
Andreas Österreicher a2bacae6d7 Merge branch 'feature-19001/VUE_ROUTER' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-30 14:43:10 +02:00
KarpAlex 92762c5dc2 Projektarbeitsbeurteilung:
- getZweitbegutachterWithToken: returns Zweitbegutachter (Senatspruefer) 
from Senatspruefungen as well
- added phrase
2022-08-27 01:34:03 +02:00
KarpAlex 2ff067193d added Senatsvorsitz to betreuerart kurzbz in pdfExport 2022-08-24 19:39:59 +02:00
KarpAlex 1d408b9d65 added comment to getZweitbegutachterWithToken method in projektbetreuer class 2022-08-24 19:39:31 +02:00
KarpAlex 60d675f22b added parbeitDownload phrases for Projektarbeitsbeurteilung 2022-08-24 18:09:53 +02:00
KarpAlex 2125fdc219 sending of zweitbetreuer mail with token: correct subject depending on projekttyp 2022-08-24 18:09:30 +02:00
KarpAlex 1d5d5e4a84 added getEndabgabe method to Paabgabe model 2022-08-24 18:07:34 +02:00
KarpAlex a1622d8b74 made betreuert SenatsprueferIn gender neutral 2022-08-24 17:05:30 +02:00
KarpAlex 82d7891f3c Projektarbeitsbeurteilung possible for Prüfungssenat. Mails are sent to Senat members, Senat members are displayed with correct labels, external Prüfer can get login token 2022-08-23 17:45:12 +02:00
KarpAlex 282b46d54e Added betreuerart Senatsvorsitz and Senatsprüfer 2022-08-23 15:26:13 +02:00
Harald Bamberger 238810b5a8 workaround issue with resizable columns 2022-08-19 12:38:29 +02:00
Paolo b0ffbea9a5 Composer changes 2022-08-19 12:21:04 +02:00
Werner Masik 5af4f7a405 Merge remote-tracking branch 'origin/feature-19473/VUE_Filter_Navigation_Widgets' into feature-19001/VUE_ROUTER 2022-08-18 21:31:54 +02:00
Harald Bamberger 3138ac3e25 add columns Aktiv and StdKst to MA Uebersicht Filterx 2022-08-18 16:38:28 +02:00
Harald Bamberger 582cb20b72 rename Handler functions to do not have a data and methods property error 2022-08-18 15:27:02 +02:00
Paolo c9eb60aade Removed tabulator property from Filter component 2022-08-18 14:52:50 +02:00
Paolo a0e2d7e37d Filter component: changed columns handling for the tabulator 2022-08-18 11:53:54 +02:00
Werner Masik 7b95ca4b92 Merge remote-tracking branch 'origin/feature-19473/VUE_Filter_Navigation_Widgets' into feature-19001/VUE_ROUTER 2022-08-17 22:13:29 +02:00
Werner Masik a3c9d75617 added model for adressentyp 2022-08-16 13:10:20 +02:00
Paolo 7dd48b2350 Fixed meta includes 2022-08-16 10:57:32 +02:00
Paolo 492014db3a Changed variable names for includes 2022-08-16 10:28:13 +02:00
Harald Bamberger dd38765237 Merge branch 'feature-19538/Gruppenadministratoren' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-16 10:25:46 +02:00
Werner Masik 5ea46ece47 added VueRouter to composer; integrate router.php from extensions 2022-08-15 20:25:42 +02:00
Harald Bamberger 2e00f30e71 Merge branch 'feature-18224/Anrechnungen_ECTS-Grenze' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-11 16:07:39 +02:00
Cris 73c516cbed Merge branch 'feature-18224/Anrechnungen_ECTS-Grenze' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-11 14:59:39 +02:00
Cris 08b1047b09 Merge branch 'feature-19473/VUE_Filter_Navigation_Widgets' of https://github.com/FH-Complete/FHC-Core into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-11 14:59:06 +02:00
Paolo 1103bb7aa1 Merge branch 'feature-19473/VUE_Filter_Navigation_Widgets' of github.com:FH-Complete/FHC-Core into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-11 14:47:31 +02:00
Paolo d95cbb39e3 Reverted bootstrap and jquery include order 2022-08-11 14:46:28 +02:00
ma0048 d7fb91371e added missing includes for infocenter 2022-08-11 14:34:32 +02:00
Cris f85dd2fd2e Merge branch 'feature-18224/Anrechnungen_ECTS-Grenze' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-10 18:21:01 +02:00
Cris c6aa3c7d9b Merge branch 'feature-18224/Anrechnungen_ECTS-Grenze' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-10 16:28:08 +02:00
Cris fabdb70d72 Merge branch 'feature-18224/Anrechnungen_ECTS-Grenze' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-10 16:08:54 +02:00
Paolo e39bb1ea8a Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-09 18:43:06 +02:00
Harald Bamberger 7499a7f90a navigation component add option to pass css classes for left menu, verticalsplit add isCollapsed function, searchbar remove search button and prevent page reload on pressing enter 2022-08-09 17:12:47 +02:00
Paolo 6d81e36e68 Merge branch 'master' into feature-19473/VUE_Filter_Navigation_Widgets 2022-08-08 12:11:08 +02:00
Paolo b912ca9a06 Navigation and Filter components code improvements 2022-08-08 10:31:30 +02:00
ma0048 1ee0e8eeb9 verhindert das starten von fremden gebieten 2022-07-22 12:33:47 +02:00
ma0068 53a3417c8e Erweiterung lehreinheiten_vorrueckung.php um Config DEFAULT_ECHTER_DIENSTVERTRAG 2022-07-18 16:22:30 +02:00
ma0068 d81b205c05 Adaptierung checkbisverwendung.php und lehrveranstaltungDBDML.php um Config DEFAULT_ECHTER_DIENSTVERTRAG 2022-07-18 14:03:07 +02:00
Paolo 6b4b3bad6a Fixed application/libraries/FilterCmptLib->applyFilterFields, from arrays to objects 2022-07-14 11:47:28 +02:00
Paolo 267f5b2972 - Added new directory public/js/apps/LogsViewer/
- Moved public/js/apps/LogsViewer.js to public/js/apps/LogsViewer/
- Added new JS file public/js/apps/LogsViewer/TabulatorSetup.js to setup the tabulator in the LogsViewer app
- Added new property tabulatorEvents to the FilterCmpt to subscribe events for the tabulator
2022-07-14 11:28:06 +02:00
Paolo de07d1f340 Switched FilterCmpt to tabulator 2022-07-13 18:57:55 +02:00
Paolo e433affcc3 - Fixed disappearing side menu when additional menu entries are provided by another component
- Fixed wrong parameter for removeFilterField call
2022-07-13 15:44:00 +02:00
Paolo 4dab69cb15 Reverted changes in application/models/person/Benutzer_model.php, pk => array 2022-07-13 09:45:58 +02:00
Paolo 8b8515ee03 Fixed typo in system/filtersupdate.php 2022-07-12 14:51:39 +02:00
Paolo 137af3ef71 Fixed typo 2022-07-12 14:10:47 +02:00
Paolo ae70dbcb64 Fixed includes of filter type in FilterCmptLib when it is declared in an extension 2022-07-12 14:09:17 +02:00
Paolo f7e057d7db Fixed identation public/js/components/filter/Filter.js 2022-07-12 13:02:16 +02:00
Paolo c400641754 Includes fixes twbs/bootstrap to twbs/bootstrap3 2022-07-12 12:46:19 +02:00
Paolo 6ce7068ead Includes fixes tinymce/tinymce to tinymce/tinymce4 2022-07-12 12:39:48 +02:00
Paolo 790f2bb130 Includes fixes jsoneditor to josdejong/jsoneditor 2022-07-12 12:34:30 +02:00
Paolo 3f07aa172c Includes fixes json-forms to brutusin/json-forms 2022-07-12 12:29:11 +02:00
Paolo 76db7bd53a Includes fixes jquery/jqueryV2 to jquery/jquery2 2022-07-12 12:18:35 +02:00
Paolo a780338367 Includes fixes components/font-awesome to fortawesome/font-awesome4 2022-07-12 12:16:48 +02:00
Paolo 946ccc33d5 Include fixes alvaro-prieto/colResizable to alvaro-prieto/colresizable 2022-07-12 12:11:09 +02:00
Paolo eb2b738133 Includes fixes: jquery/jqueryV1 to jquery/jquery1 2022-07-12 11:59:52 +02:00
Paolo abcb575ef0 Added swith to turn on/off the top menu of the navigation component 2022-07-12 11:02:56 +02:00
Werner Masik 8c8623ce4f change primary key to string instead of array
because it is not a composite key and the load method gets confused otherwise
2022-07-11 17:31:37 +02:00
Harald Bamberger 17322283f5 use searchresult property photo_url 2022-07-11 16:15:48 +02:00
Paolo 5896a75a44 Merge branch 'feature-19473/VUE_Filter_Navigation_Widgets' of github.com:FH-Complete/FHC-Core into feature-19473/VUE_Filter_Navigation_Widgets 2022-07-11 16:11:53 +02:00
Harald Bamberger 26eb77f030 change orgunit renderer to expect array of of objects for leaders 2022-07-11 16:10:28 +02:00
Paolo b53add9e67 libraries/SearchBarLib->_organisationunit removes from the leaders array those elements with uid and name == null 2022-07-11 16:10:24 +02:00
Paolo 198c6baf3d - Added new protected method getPostJSON to FHC_Controller to get POSTed JSON
- application/controllers/components/Filter.php now makes use of getPostJSON from the FHC_Controller
- RESTClient now POST a JSON request
- public/js/components/filter/Filter.js improvements
2022-07-11 14:54:14 +02:00
Paolo cfe7c6b9a4 Fixed typo in application/libraries/FilterCmptLib.php, renamed __getDatasetQueryCondition to _getDatasetQueryCondition 2022-07-11 10:27:49 +02:00
Paolo aac21c9fda Updated composer.lock 2022-07-08 12:33:11 +02:00
Harald Bamberger 9d6d759fd0 current composer.lock for axios zip from github 2022-07-08 12:17:52 +02:00
Paolo 8ab83a0baa Added directory "components" to the extension installation 2022-07-07 17:26:49 +02:00
Paolo 4e201f1002 Added slot in the header of the navigation component 2022-07-07 17:24:18 +02:00
Paolo 2f1d5f157f - Added new constant PHOTO_IMG_URL to application/libraries/SearchBarLib.php
- phone and photo_url are now return from SearchBarLib->_mitarbeiter
- SearchBarLib->_organisationunit fixed correct number of employees per organisation unit
- SearchBarLib->_organisationunit now returns the mailgroup
- SearchBarLib->_organisationunit returns an array of leaders, each element of this array is an object having the properties uid and name
2022-07-07 16:56:43 +02:00
Werner Masik 647b2a9f45 added rudimentary filter for employee search 2022-07-06 18:02:31 +02:00
Werner Masik 39520d32fd added selectRecord event to filter component 2022-07-06 18:02:10 +02:00
Werner Masik f5df010884 added application/components/extensions/ to .gitignore 2022-07-06 17:52:13 +02:00
Werner Masik f7c394547e * fixed missing $primevue3 var in FHC-Common.php 2022-07-06 17:52:13 +02:00
Werner Masik 19273003ee * changed composer.json
* primvue is now included with help of https://asset-packagist.org/
* https://asset-packagist.org/ makes including npm packages with composer easy
2022-07-06 17:52:13 +02:00
Werner Masik 6c618c9a20 * changed some { to [ for PHP 7.4 compatibility
* added some PrimeVUE 3 components to composer (currently used in organization chart of PV21 extension)
2022-07-06 17:52:13 +02:00
Paolo 74b0fc5662 - Added new directory public/js/components/filter/
- Moved component public/js/components/Filter.js to public/js/components/filter/
- Moved API calls from public/js/components/filter/Filter.js to public/js/components/filter/API.js
- public/js/components/filter/Filter.js now imports public/js/components/filter/API.js
2022-07-06 16:59:33 +02:00
ma0068 fe6a6c5da3 neue Funktion getVorgesetzteMonatTimesheet() 2022-07-06 15:24:28 +02:00
Paolo ce9aa4c388 - Removed inlcudes of RESTClient from PHP (FHC-Common, FHC-Footer and views/system/logs/logsViewer)
- Changed RESTClient to be a JS module
- Now RESTClient is included via JS in the app LogsViewer and in component Navigation
- Added new directory public/js/components/navigation
- Moved component Navigation to public/js/components/navigation
- Moved API calls of the Navigation component to public/js/components/navigation/API.js
- Navigation component now imports public/js/components/navigation/API.js
2022-07-06 09:48:15 +02:00
Paolo 2927682dae Merge branch 'feature-19473/VUE_Filter_Navigation_Widgets' of github.com:FH-Complete/FHC-Core into feature-19473/VUE_Filter_Navigation_Widgets 2022-07-04 19:30:18 +02:00
Paolo 60b3be3d64 - Added new JS public/js/RESTClient.js as axios wrapper
- composer.json: added axios from github
- Added new directory application/components/extensions/
- Added new utility function findResource to application/helpers/hlp_common_helper.php
- Now the library libraries/FilterCmptLib loads the component definition php files from the extensions
- views/system/logs/logsViewer now includes axios and restclient, removed the includes for ajaxlib and jQueryUI
- Added includes for the RESTClient and axios to views/templates/FHC-Common and views/templates/FHC-Footer
- Improved component js/components/Fetch
- Components public/js/components/Filter.js and public/js/components/Navigation.js now they are making use of the Fetch component or/and the RESTClient
2022-07-04 19:25:16 +02:00
Harald Bamberger 5c94e33f24 render array properties correct, resize result on window resize, hide result on loosing focus 2022-07-02 13:26:18 +02:00
ma0068 2e4085c8de Validierung bei Löschen zeitaufzeichnungsrelevanter Zeitsperren und bereits abgeschickter Monatsliste 2022-06-30 14:22:29 +02:00
ma0068 35426251cb Delete Testausgabe 2022-06-30 11:42:14 +02:00
ma0068 cf7ad022a7 Sancho Mail im Urlaubstool, neue Funktion checkActiveAddon 2022-06-30 10:51:02 +02:00
ma0068 60cbb8bd8c Einfügen Spalte Status Monatsliste, Verhindern bei Löschen von ZA wenn Monatsliste abgeschickt 2022-06-29 15:01:16 +02:00
Harald Bamberger 32daed2ad2 first draft data fetch component 2022-06-29 13:17:57 +02:00
Paolo f85225cc4e Addex axios to the views/templates/ includes 2022-06-29 10:58:33 +02:00
Paolo 091307680b - Sorted composer packages in composer.json
- New composer.lock generated
- Added new package axios
2022-06-29 10:57:08 +02:00
Paolo 796c09999f Changed FilterCmptLib public methods to private where they were not used outside the library itself 2022-06-29 10:55:30 +02:00
ma0068 ad30cc862e Neue Spalte Status Monatsliste 2022-06-29 10:53:45 +02:00
ma0068 797cabccb9 neue Mailvorlagen Sancho fuer Zeitausgleich und Urlaub 2022-06-29 08:46:01 +02:00
Paolo bcaa560a46 Bugfix: query executed before changes are applied 2022-06-28 10:29:44 +02:00
Paolo 2a298dc6d1 - Added JSON post parameter check in controllers/components/SearchBar->search
- Expanded search capabilities for organization units and employees
2022-06-27 16:22:40 +02:00
Harald Bamberger 47f7c03075 virtualsplit and searchbar vue component, TestSearch Controller and View for Demonstration, minor change to SearchBar Controller to work with posted json 2022-06-24 19:26:37 +02:00
Paolo 147ab92bae - Added new library libraries/SearchBarLib
- Added new controller components/SearchBar
- Removed not anymore used view application/views/system/logs/logsViewerData.php
2022-06-24 17:59:01 +02:00
Paolo 24b78454d3 - Added new function generateJSModulesInclude to application/helpers/hlp_header_helper.php
- Added entry "customJSModules" to the application/views/templates/FHC-Footer.php to be passed to the generateJSModulesInclude function to generate JS modules tags
- The new VUE components are making use of the JS import and export functionalities
2022-06-24 15:07:50 +02:00
Paolo 9e48ba09d8 - Moved GUI options from application/components/filters/LogsViewer.php to application/views/system/logs/logsViewer.php
- Changed controller components/Filter to work with the new FilterComponent
- Removed unused code from library libraries/FilterCmptLib
- Changed library libraries/FilterCmptLib to work with the new changes in the controller components/Filter
- Added new CSSs for the new FilterComponent and NavigationComponent
2022-06-24 14:55:04 +02:00
ma0068 c87aee0ddf Zeitsperre Umbau Mail auf Sanchomail, Anzeige Zeitsaldo in Sanchomail, Adpatierungen Urlaub 2022-06-24 08:10:51 +02:00
Paolo 618a62425b Adapted composer.json and includes to be compatible to composer version 2 2022-06-07 14:56:33 +02:00
Paolo f3fe3aa099 New changes for the Navigation and Filter components 2022-06-02 10:34:45 +02:00
Paolo 29002124cc - Added new controller components/Filter.php
- Added new library FilterCmptLib
- Fixed includes paths in FHC-Footer and FHC-Header
- Moved the LogsViewer tool to VUE+BS5
2022-06-02 10:32:26 +02:00
Paolo 8880e07bf2 include/dokument_export.class.php now checks the new signature server response structure 2022-05-24 12:22:30 +02:00
Paolo 7f2025c414 Added signature config entries to config/cis.config-default.inc.php 2022-05-24 11:27:24 +02:00
Paolo c354c69e21 Fixed Zwischenabgabe file upload 2022-05-24 11:23:48 +02:00
Paolo 061780a0d2 - Added new VUE based JS public/js/components/Filter.js, public/js/components/Navigation.js and public/js/apps/LogsViewer.js
- Fixed bootstrap includes in FHC-Footer and FHC-Header
- Moved Job Logs Viewer to VUE
2022-05-24 09:45:31 +02:00
Paolo a603081544 - Changed composer.json and updated composer.lock
- Added new PostgreSQL types in application/core/DB_Model.php
- Updated the includes in application/views/*
- Added new view template application/views/templates/FHC-Common.php
- Moved JS includes in application/views/templates/FHC-Footer.php
- Updated JS and CSS includes in application/views/templates/FHC-Footer.php and application/views/templates/FHC-Header.php
- Updated public/js/bootstrapper.js
- Changed global variable names in application/views/templates/FHC-Common.php to include the version of the included source
2022-05-23 18:45:29 +02:00
Paolo 94a1534c14 - Warning Wrap on small Screens in Leturer side
- Perform Signatur Check only on Files from Type Endupload
2022-05-23 14:42:59 +02:00
Paolo 3d0bdcf95a Changed composer.json and updated composer.lock 2022-05-17 16:05:02 +02:00
Paolo 2d23836396 Translated german phrase 2022-05-16 16:23:15 +02:00
Paolo 22bba685ff Added new style to the warning 2022-05-16 16:15:48 +02:00
Paolo d4042228d9 - Better code and comments in application/libraries/SignatureLib->list
- cis/private/lehre/abgabe_lektor_details.php and cis/private/lehre/abgabe_student_details.php check if the uploaded document contains digital signares and display a phrase
- Added new phrase to locale/de-AT/abgabetool.php and locale/en-US/abgabetool.php
2022-05-13 20:11:31 +02:00
Paolo 2a8b61c07f - Added new library application/libraries/SignatureLib.php
- Changed configs for the signature server in config/vilesci.config-default.inc.php
- Changed include/dokument_export.class.php to make use of the new configs
2022-05-11 18:29:10 +02:00
Paolo 704b32c76c Fixed constant values in application/libraries/DocsboxLib.php 2022-05-11 11:06:53 +02:00
Paolo 58d252b5b7 Added 3rd parameter to Docsbox::convert call were missing 2022-05-06 09:57:55 +02:00
Paolo d7e4d7ebde Moved config entries from application/config/docsbox.php to config/cis.config-default.inc.php and config/vilesci.config-default.inc.php 2022-05-03 10:58:46 +02:00
ma0068 b6cc084799 Adaptierung Funktion getLastBisZAPflicht() 2022-04-28 11:46:45 +02:00
ma0068 9bf20dd7a4 neue Funktion: getLastVerwendungZapflicht 2022-04-28 07:54:43 +02:00
Paolo d3c30af9f7 Merge branch 'master' into feature-15029/Docsbox 2022-04-11 20:14:26 +02:00
ma0068 6d1c926ec0 Anzeige AllinSaldo in Zeitaufzeichnung 2022-03-29 13:56:00 +02:00
Paolo e50cc27a89 Fixed exec second parameter value 2022-03-04 20:13:03 +01:00
Paolo db49f2b1e7 - libraries/DocsboxLib:
- Added new constant DEFAULT_FORMAT
	- ERROR and SUCCESS constant values are the same of EXIT_ERROR
	  and EXIT_SUCCESS
	- public method convert parameter format does not have a default
	  value anymore
	- Added use import of ZipArchive
- libraries/DocumentLib: removed unused variables
2022-03-04 19:47:32 +01:00
Paolo 6f14b5cec5 - Changed DocsboxLib->convert, not it accepts a new optional parameter called format
- Integrated the DocsboxLib into the application/libraries/DocumentLib.php
2021-10-14 14:25:35 +02:00
Paolo 2fb4be0e55 - Added new config entry DOCSBOX_ENABLED to config/global.config-default.inc.php
- Added new library application/libraries/DocsboxLib.php to manage document conversion using docsbox
- Added new config file application/config/docsbox.php
- Integrated DocsboxLib into include/dokument_export.class.php
2021-10-14 11:34:27 +02:00
Paolo ab59c265d4 First commit 2021-10-04 14:05:10 +02:00
629 changed files with 43664 additions and 7177 deletions
+1
View File
@@ -24,6 +24,7 @@ application/logs/
application/models/extensions/
application/views/extensions/
application/widgets/extensions/
application/components/extensions/
public/extensions/
@@ -0,0 +1,19 @@
<?php
$filterCmptArray = array(
'app' => 'core',
'datasetName' => 'logs',
//'filterKurzbz' => 'jobs48hours', // REMOVE ME
'query' => '
SELECT wsl.webservicelog_id AS "LogId",
wsl.request_id AS "RequestId",
wsl.execute_time AS "ExecutionTime",
wsl.execute_user AS "ExecutedBy",
wsl.beschreibung AS "Description",
wsl.request_data AS "Data",
wsl.webservicetyp_kurzbz AS "WebserviceType"
FROM system.tbl_webservicelog wsl
ORDER BY wsl.execute_time DESC
',
'requiredPermissions' => 'admin'
);
+6 -5
View File
@@ -6,10 +6,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
// Deadline for Application given as Time-Interval after Semesterstart.
$config['interval_blocking_application'] = 'P1M';
// Application submission period given by start- and enddate.
$config['submit_application_start'] = '05.09.2022';
$config['submit_application_end'] = '22.09.2022';
// Lehrveranstaltungen with these grades will be blocked for application
$config['grades_blocking_application'] = array(
5, // nicht genügend
@@ -19,4 +15,9 @@ $config['grades_blocking_application'] = array(
14, // nicht bestanden,
15, // nicht teilgenommen
18 // unentschuldigt
);
);
//Enables Fachbereichsleiter instead of LV Leiter
$config['fbl'] = FALSE;
//Enables Info Mails
$config['send_mail'] = TRUE;
+55 -20
View File
@@ -15,7 +15,7 @@ $config['navigation_header'] = array(
'description' => 'Organisation',
'sort' => 20,
'requiredPermissions' => 'basis/vilesci:r',
'children'=> array(
'children' => array(
'vilesci' => array(
'link' => base_url('vilesci'),
'icon' => '',
@@ -40,7 +40,7 @@ $config['navigation_header'] = array(
'description' => 'Lehre',
'sort' => 30,
'requiredPermissions' => 'basis/vilesci:r',
'children'=> array(
'children' => array(
'cis' => array(
'link' => CIS_ROOT,
'icon' => '',
@@ -71,16 +71,16 @@ $config['navigation_header'] = array(
'lehre/lehrauftrag_erteilen:r'
)
),
'zverfueg' => array(
'link' => site_url('lehre/lvplanung/AdminZeitverfuegbarkeit'),
'description' => 'Zeitverf&uuml;gbarkeit',
'expand' => true,
'sort' => 45,
'requiredPermissions' => array(
'lehre/zeitverfuegbarkeit:rw',
'lehre/zeitverfuegbarkeit:rw'
)
),
'zverfueg' => array(
'link' => site_url('lehre/lvplanung/AdminZeitverfuegbarkeit'),
'description' => 'Zeitverf&uuml;gbarkeit',
'expand' => true,
'sort' => 45,
'requiredPermissions' => array(
'lehre/zeitverfuegbarkeit:rw',
'lehre/zeitverfuegbarkeit:rw'
)
),
'zgvueberpruefung' => array(
'link' => site_url('system/infocenter/ZGVUeberpruefung'),
'description' => 'ZGV Überprüfung',
@@ -98,7 +98,7 @@ $config['navigation_header'] = array(
'description' => 'Personen',
'sort' => 40,
'requiredPermissions' => 'basis/vilesci:r',
'children'=> array(
'children' => array(
'messages' => array(
'link' => site_url('system/messages/MessageClient/read'),
'icon' => '',
@@ -120,11 +120,18 @@ $config['navigation_header'] = array(
'sort' => 30,
'requiredPermissions' => 'system/issues_verwalten:r'
),
'plausichecks' => array(
'link' => site_url('system/issues/Plausichecks'),
'description' => 'Plausichecks',
'expand' => true,
'sort' => 40,
'requiredPermissions' => 'system/issues_verwalten:r'
),
'gruppenmanagement' => array(
'link' => site_url('person/Gruppenmanagement'),
'description' => 'Gruppenmanagement',
'expand' => true,
'sort' => 40,
'sort' => 50,
'requiredPermissions' => 'lehre/gruppenmanager:r'
)
)
@@ -136,7 +143,7 @@ $config['navigation_header'] = array(
'expand' => false,
'sort' => 50,
'requiredPermissions' => 'admin:r',
'children'=> array(
'children' => array(
'extensions' => array(
'link' => site_url('system/extensions/Manager'),
'description' => 'Extensions Manager',
@@ -157,7 +164,14 @@ $config['navigation_header'] = array(
'expand' => true,
'sort' => 20,
'requiredPermissions' => 'system/developer:r'
)
),
'anrechnungen' => array(
'link' => site_url('lehre/anrechnung/AdminAnrechnung'),
'description' => 'Anrechnungen',
'expand' => true,
'sort' => 30,
'requiredPermissions' => 'lehre/anrechnungszeitfenster:rw'
)
)
)
)
@@ -177,6 +191,15 @@ $config['navigation_menu']['Vilesci/index'] = array(
)
);
$config['navigation_menu']['Vilesci/index'] = array(
'dashboard' => array(
'link' => '#',
'description' => 'Dashboard',
'icon' => 'dashboard',
'sort' => 1
)
);
$config['navigation_menu']['organisation/Reihungstest/index'] = array(
'reihungstestverwalung' => array(
'link' => base_url('vilesci/stammdaten/reihungstestverwaltung.php'),
@@ -201,7 +224,8 @@ $config['navigation_menu']['lehre/lehrauftrag/Lehrauftrag/*'] = array(
'icon' => 'dashboard',
'sort' => 1,
'requiredPermissions' => array('lehre/lehrauftrag_bestellen:r','lehre/lehrauftrag_erteilen:r')
),'lehrauftragBestellen' => array(
),
'lehrauftragBestellen' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag bestellen',
'icon' => '',
@@ -223,6 +247,7 @@ $config['navigation_menu']['lehre/lehrauftrag/Lehrauftrag/*'] = array(
'requiredPermissions' => array('lehre/lehrauftrag_erteilen:r')
)
);
$config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/*'] = array(
'lehrauftragDashboard' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag/Dashboard'),
@@ -230,7 +255,8 @@ $config['navigation_menu']['lehre/lehrauftrag/LehrauftragErteilen/*'] = array(
'icon' => 'dashboard',
'sort' => 1,
'requiredPermissions' => array('lehre/lehrauftrag_bestellen:r','lehre/lehrauftrag_erteilen:r')
),'lehrauftragBestellen' => array(
),
'lehrauftragBestellen' => array(
'link' => site_url('lehre/lehrauftrag/Lehrauftrag'),
'description' => 'Lehrauftrag bestellen',
'icon' => '',
@@ -257,9 +283,18 @@ $config['navigation_menu']['system/issues/Issues/*'] = array(
'fehlerzustaendigkeiten' => array(
'link' => site_url('system/issues/IssuesZustaendigkeiten'),
'description' => 'Fehler Zuständigkeiten',
'icon' => 'cogs',
'icon' => 'users',
'sort' => 100,
'target' => '_blank',
'requiredPermissions' => array('admin:rw')
)
),
'fehlerkonfiguration' => array(
'link' => site_url('system/issues/IssuesKonfiguration'),
'description' => 'Fehler Konfiguration',
'icon' => 'cogs',
'sort' => 200,
'target' => '_blank',
'requiredPermissions' => array('admin:rw')
),
);
+23
View File
@@ -60,3 +60,26 @@ $route['api/v1/organisation/[G|g]eschaeftsjahr/(:any)'] = 'api/v1/organisation/g
$route['api/v1/organisation/[O|o]rganisationseinheit/(:any)'] = 'api/v1/organisation/organisationseinheit2/$1';
$route['api/v1/ressource/[B|b]etriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1';
$route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
// load routes from extensions
$subdir = 'application/config/extensions';
$dirlist = scandir($subdir);
if ($dirlist)
{
$files = array_diff($dirlist, array('.','..'));
foreach ($files as &$item)
{
if (is_dir($subdir . DIRECTORY_SEPARATOR . $item))
{
$routes_file = $subdir . DIRECTORY_SEPARATOR . $item . DIRECTORY_SEPARATOR . 'routes.php';
if (file_exists($routes_file))
{
require($routes_file);
}
}
}
}
+161
View File
@@ -0,0 +1,161 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
$config['frist_rueckzahlung_studiengebuer_WS'] = '15.10.';
$config['frist_rueckzahlung_studiengebuer_SS'] = '15.03.';
// TODO(chris): review this!
#$config['unterbrechung_dms'] = ['oe_kurzbz' => null, 'dokument_kurzbz' => null, 'kategorie_kurzbz' => null];
$config['unterbrechung_dms'] = ['oe_kurzbz' => null, 'dokument_kurzbz' => null, 'kategorie_kurzbz' => 'Akte'];
/**
* UPLOAD
*/
/**
* Allowed filetypes for attachment upload in unterbrechung antrag
*
* @var array An array of fileextensions
*/
$config['unterbrechung_dms_filetypes'] = ['jpg', 'pdf'];
/**
* GRADES
*/
/**
* On wiederholung the student must repeat certain lvs.
* This lvs will be graded with this id
*
* @var integer tbl_note.note
*/
$config['wiederholung_note_angerechnet'] = 19;
/**
* On wiederholung the student can not attend certain lvs.
* Those lvs will be graded with this id
*
* @var integer tbl_note.note
*/
$config['wiederholung_note_nicht_zugelassen'] = 20;
/**
* JOBS
*/
/**
* The Job will remind for every Unterbrecher who has a
* wiedereinstieg_datum between the date the Job is run
* and the modified date
* e.g.: If the Job is running on 2023-04-20 and the modifier
* is '+3 days' it will remind of everyone that
* has a wiedereinstiegs_datum between 2023-04-20 and 2023-04-23
*
* @var string A string formated as PHP DateTime modifier
* @see https://www.php.net/manual/de/datetime.modify.php
*/
$config['unterbrechung_job_remind_wiedereinstieg_date_modifier'] = '+3 days';
/**
* The Job will sent a request to everyone who faild the 3rd committee exam
* and respecting the given conditions (not repeated yet, stg not in blacklist)
* to decide if he/she will repeat or not
*
* First request
*
* @var string A string formated as PHP DateTime modifier
* @see https://www.php.net/manual/de/datetime.modify.php
*/
$config['wiederholung_job_request_1_date_modifier'] = '+0 days';
/**
* Second request
*
* @var string A string formated as PHP DateTime modifier
* @see https://www.php.net/manual/de/datetime.modify.php
*/
$config['wiederholung_job_request_2_date_modifier'] = '+3 weeks';
/**
* Final deadline - after this the student will be abgemeldet if he hasn't chosen yet
*
* @var string A string formated as PHP DateTime modifier
* @see https://www.php.net/manual/de/datetime.modify.php
*/
$config['wiederholung_job_deadline_date_modifier'] = '+1 month';
/**
* before this exam dates for Wiederholer will be ignored
*
* @var string A string formated as Date
*
*/
$config['digitalization_start'] = '2022-07-01';
/**
* Objection period - the student will be abgemeldet if he hasn't objected in this period
*
* @var string A string formated as PHP DateTime modifier
* @see https://www.php.net/manual/de/datetime.modify.php
*/
$config['abmeldung_job_deadline_date_modifier'] = '+2 weeks';
/**
* System User - uid of a user that is allowed to set prestudentstatus
*
* @var string
*/
$config['antrag_job_systemuser'] = '';
/**
* WHITELISTS
*/
/**
* List of stati who entitle a prestudent to create an Antrag
*
* @var array Array of tbl_status.status_kurzbz's
*/
$config['antrag_prestudentstatus_whitelist'] = ['Student', 'Diplomand'];
/**
* BLACKLISTS
*/
/**
* List of Statusgründe that prevent a prestudent from create an Wiederholungsantrag
*
* @var array An array of tbl_status_grund.statusgrund_id's
*/
$config['status_gruende_wiederholer'] = [16, 15];
/**
* Blacklisted for abmeldung anträge
*
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgkz_blacklist_abmeldung'] = [];
/**
* Blacklisted for unterbrechung anträge
*
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgkz_blacklist_unterbrechung'] = [];
/**
* Blacklisted for wiederholung anträge
*
* @var array An array of tbl_studiengang.studiengang_kz's
*/
$config['stgkz_blacklist_wiederholung'] = [];
+438
View File
@@ -0,0 +1,438 @@
<?php
if (! defined("BASEPATH")) exit("No direct script access allowed");
class UHSTAT1 extends FHC_Controller
{
const BERECHTIGUNG_UHSTAT_VERWALTEN = 'student/uhstat1daten_verwalten';
const PERSON_ID_SESSION_INDEX = 'bewerbung/personId';
const CODEX_OESTERREICH = 'A';
const LOWER_BOUNDARY_YEARS = 160;
const UPPER_BOUNDARY_YEARS = 20;
private $_uid;
private $_uhstat1Fields = array();
public function __construct()
{
parent::__construct();
// load ci libs
$this->load->library('form_validation');
// load ci helpers
$this->load->helper(array('form', 'url'));
// load libraries
$this->load->library('AuthLib');
$this->load->library('PermissionLib');
// load models
$this->load->model('codex/Oehbeitrag_model', 'OehbeitragModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$this->load->model('system/Sprache_model', 'SpracheModel');
$this->load->model('codex/Abschluss_model', 'AbschlussModel');
$this->load->model('codex/Uhstat1daten_model', 'Uhstat1datenModel');
$this->loadPhrases(
array(
'ui',
'uhstat'
)
);
$this->_uid = getAuthUID();
// set form field information
$this->_uhstat1Fields = array(
'mutter_geburtsstaat' => array('name' => 'Geburtsstaat Mutter'),
'mutter_geburtsjahr' => array('name' => 'Geburtsjahr Mutter'),
'mutter_bildungsstaat' => array('name' => 'Bildungsstaat Mutter'),
'mutter_bildungmax' => array(
'name' => 'Geburtsjahr Mutter',
'rules' => array(
'callback_bildungsstaat_bildungmax_check[m]' => array(
'bildungsstaat_bildungmax_check' => $this->p->t('uhstat', 'ausbildungBildungsstaatUebereinstimmung')
)
)
),
'vater_geburtsstaat' => array('name' => 'Geburtsstaat Vater'),
'vater_geburtsjahr' => array('name' => 'Geburtsjahr Vater'),
'vater_bildungsstaat' => array('name' => 'Bildungsstaat Vater'),
'vater_bildungmax' => array('name' => 'Geburtsjahr Vater'),
'vater_bildungmax' => array(
'name' => 'Geburtsjahr Vater',
'rules' => array(
'callback_bildungsstaat_bildungmax_check[v]' => array(
'bildungsstaat_bildungmax_check' => $this->p->t('uhstat', 'ausbildungBildungsstaatUebereinstimmung')
)
)
)
);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
public function index()
{
$formMetaData = $this->_getFormMetaData();
if (isError($formMetaData)) show_error(getError($formMetaData));
if (!hasData($formMetaData)) show_error("No form meta data could be loaded");
$uhstatData = $this->_getUHSTAT1Data();
if (isError($uhstatData)) show_error(getError($uhstatData));
$this->load->view("codex/uhstat1.php", array(
'formMetaData' => getData($formMetaData),
'uhstatData' => getData($uhstatData)
)
);
}
/**
* Add or update UHSTAT1 data
*/
public function saveUHSTAT1Data()
{
$saved = false;
$person_id = $this->_getValidPersonId('sui');
$this->form_validation->set_error_delimiters('<span class="text-danger">', '</span>');
foreach ($this->_uhstat1Fields as $field => $params)
{
// all fields are required
$ruleNames = 'required';
$ruleMessages = array('required' => $this->p->t('uhstat', 'angabeFehlt'));
// add additional rules
if (isset($params['rules']))
{
foreach ($params['rules'] as $ruleName => $ruleMessage)
{
$ruleNames .= '|'.$ruleName;
$ruleMessages = array_merge($ruleMessages, $ruleMessage);
}
}
$this->form_validation->set_rules(
$field,
$params['name'],
$ruleNames,
$ruleMessages
);
}
$uhstat1datenRes = null;
if ($this->form_validation->run()) // if valid
{
// get post fields
$uhstatData = array();
foreach ($this->_uhstat1Fields as $field => $params)
{
$uhstatData[$field] = $this->input->post($field);
}
// check if entry already exists
$uhstat1datenloadRes = $this->Uhstat1datenModel->loadWhere(array('person_id' => $person_id));
// if yes, update
if (hasData($uhstat1datenloadRes))
{
$uhstatData['updateamum'] = 'NOW()';
$uhstatData['updatevon'] = $this->_uid;
$uhstat1datenRes = $this->Uhstat1datenModel->update(
array('person_id' => $person_id),
$uhstatData
);
}
else // otherwise insert
{
$uhstatData['insertamum'] = 'NOW()';
$uhstatData['insertvon'] = $this->_uid;
$uhstat1datenRes = $this->Uhstat1datenModel->insert(
array_merge($uhstatData, array('person_id' => $person_id))
);
}
}
$formMetaData = $this->_getFormMetaData();
if (isError($formMetaData)) show_error(getError($formMetaData));
if (!hasData($formMetaData)) show_error("No form meta data could be loaded");
$successMessage = '';
$errorMessage = '';
// pass success/error messages to view
if (isset($uhstat1datenRes))
{
if (isSuccess($uhstat1datenRes))
{
$successMessage = $this->p->t('uhstat', 'erfolgreichGespeichert');
$saved = true;
}
else
$errorMessage = $this->p->t('uhstat', 'fehlerBeimSpeichern');
}
// load view with form data
$this->load->view("codex/uhstat1.php", array(
'formMetaData' => getData($formMetaData),
'saved' => $saved,
'successMessage' => $successMessage,
'errorMessage' => $errorMessage
)
);
}
/**
* Check callback for Bildungsstaat - if Bildungsstaat is Austria, a highest education should be in Austria.
* @param $bildungmax
* @param $bildungsstaat_typ - mother (m) or father (v)
* @return bool true if valid, false otherwise
*/
public function bildungsstaat_bildungmax_check($bildungmax, $bildungsstaat_typ)
{
// valid if no type passed
if (!isset($bildungsstaat_typ) || !isset($bildungmax)) return true;
// get correct input
if ($bildungsstaat_typ == 'm') // mutter
$bildungsstaat = $this->input->post('mutter_bildungsstaat');
elseif ($bildungsstaat_typ == 'v') // vater
$bildungsstaat = $this->input->post('vater_bildungsstaat');
else
return true;
if (!isset($bildungsstaat)) return true;
// find out if abschluss is in Austria
$this->AbschlussModel->addSelect("in_oesterreich");
$abschlussRes = $this->AbschlussModel->load($bildungmax);
if (hasData($abschlussRes))
{
$in_oesterreich = getData($abschlussRes)[0]->in_oesterreich;
// invalid if abschluss in Austria, but not Bildungsstaat, or abschluss not in Austria, but Bildungsstaat in Austria
return ($in_oesterreich && $bildungsstaat == self::CODEX_OESTERREICH) || (!$in_oesterreich && $bildungsstaat != self::CODEX_OESTERREICH);
}
return false;
}
/**
* Deletes UHSTAT1 entry.
*/
public function deleteUHSTAT1Data()
{
$saved = false;
// uhstat data can only be deleted with permission
if (!$this->_checkPermission('suid')) show_error('no permission');
$person_id = $this->_getValidPersonId('suid');
$uhstat1datenRes = $this->Uhstat1datenModel->delete(
array('person_id' => $person_id)
);
$formMetaData = $this->_getFormMetaData();
if (isError($formMetaData)) show_error(getError($formMetaData));
if (!hasData($formMetaData)) show_error("No form meta data could be loaded");
$successMessage = '';
$errorMessage = '';
// pass success/error messages to view
if (isset($uhstat1datenRes))
{
if (isSuccess($uhstat1datenRes))
{
$successMessage = $this->p->t('uhstat', 'erfolgreichGeloescht');
}
else
$errorMessage = $this->p->t('uhstat', 'fehlerBeimLoeschen');
}
// load view with form data
$this->load->view("codex/uhstat1.php", array(
'formMetaData' => getData($formMetaData),
'successMessage' => $successMessage,
'errorMessage' => $errorMessage
)
);
}
// -----------------------------------------------------------------------------------------------------------------
// Private methods
/**
* Gets initial data needed to display UHSTAT1 form.
*/
private function _getFormMetaData()
{
$person_id = $this->_getValidPersonId('s');
// read only display param
$readOnly = $this->input->get('readOnly');
// depending on permissions, editing or deleting is possible
$editPermission = $this->_checkPermission('sui');
$deletePermission = $this->_checkPermission('suid');
$languageIdx = $this->_getLanguageIndex();
$formMetaData = array(
'nation' => array(),
'abschluss_oesterreich' => array(),
'abschluss_nicht_oesterreich' => array(),
'jahre' => array(),
'person_id' => $person_id,
'editPermission' => $editPermission,
'deletePermission' => $deletePermission,
'readOnly' => $readOnly
);
// get person data
$this->load->model('person/Person_model', 'PersonModel');
$this->PersonModel->addSelect("vorname, nachname");
$personRes = $this->PersonModel->load($person_id);
if (isError($personRes)) return $personRes;
if (hasData($personRes))
{
$person = getData($personRes)[0];
$formMetaData['vorname'] = $person->vorname;
$formMetaData['nachname'] = $person->nachname;
}
$nationTextFieldName = $languageIdx == 1 ? 'langtext' : 'engltext';
// get nation list
$this->load->model('codex/Nation_model', 'NationModel');
$this->NationModel->addSelect("nation_code, $nationTextFieldName AS nation_text");
$this->NationModel->addOrder("nation_text");
$nationRes = $this->NationModel->loadWhere('sperre IS NULL OR sperre = FALSE');
if (isError($nationRes)) return $nationRes;
if (hasData($nationRes))
{
$nations = getData($nationRes);
// put austria in beginning of selection
foreach ($nations as $nation)
{
if ($nation->nation_code == self::CODEX_OESTERREICH) array_unshift($nations, $nation);
}
$formMetaData['nation'] = $nations;
}
// get abschluss list
$abschlussRes = $this->AbschlussModel->getActiveAbschluesse($languageIdx);
if (isError($abschlussRes)) return $abschlussRes;
$abschlussData = getData($abschlussRes);
if (hasData($abschlussRes))
{
foreach (getData($abschlussRes) as $abschluss)
{
if ($abschluss->in_oesterreich === true)
$formMetaData['abschluss_oesterreich'][] = $abschluss;
elseif ($abschluss->in_oesterreich === false)
$formMetaData['abschluss_nicht_oesterreich'][] = $abschluss;
else
{
$formMetaData['abschluss_oesterreich'][] = $abschluss;
$formMetaData['abschluss_nicht_oesterreich'][] = $abschluss;
}
}
}
// get realistic birth years, dated back from current year
$currYear = date("Y");
$formMetaData['jahre'] = range($currYear - self::UPPER_BOUNDARY_YEARS, $currYear - self::LOWER_BOUNDARY_YEARS);
return success($formMetaData);
}
/**
* Gets initial data needed to display UHSTAT1 form.
*/
private function _getUHSTAT1Data()
{
$person_id = $this->_getValidPersonId('s');
$this->Uhstat1datenModel->addSelect(
implode(', ', array_keys($this->_uhstat1Fields))
);
$uhstatRes = $this->Uhstat1datenModel->loadWhere(array('person_id' => $person_id));
if (isError($uhstatRes)) return $uhstatRes;
return success(hasData($uhstatRes) ? getData($uhstatRes)[0] : null);
}
/**
* Gets language index of currently logged in user.
* @return int (the index, start at 1)
*/
private function _getLanguageIndex()
{
$idx = 1;
$this->SpracheModel->addSelect('index');
$langRes = $this->SpracheModel->loadWhere(array('sprache' => getUserLanguage()));
if (hasData($langRes))
{
$idx = getData($langRes)[0]->index;
}
return $idx;
}
/**
* Gets Id of person having permissions to manage UHSTAT1 data.
* Can be passed as parameter or be in session.
* @return int person_id
*/
private function _getValidPersonId($berechtigungsArt)
{
// if coming from bewerbungstool - person id is in session (person must be logged in bewerbungstool)
if (isset($_SESSION[self::PERSON_ID_SESSION_INDEX]) && is_numeric($_SESSION[self::PERSON_ID_SESSION_INDEX]))
return $_SESSION[self::PERSON_ID_SESSION_INDEX];
// if person id passed directly...
$person_id = $this->input->post('person_id');
if (!isset($person_id)) $person_id = $this->input->get('person_id');
if (!isset($person_id) || !is_numeric($person_id)) show_error("invalid person id");
// ...check if there is a permission for editing UHSTAT1 data
if ($this->_checkPermission($berechtigungsArt)) return $person_id;
show_error("No permission");
}
/**
* Checks if logged user has the UHSTAT management permission.
* @param $art - type of permission, e.g. suid for full permissions
* @return bool
*/
private function _checkPermission($art)
{
return $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_UHSTAT_VERWALTEN, $art);
}
}
@@ -0,0 +1,218 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \Studierendenantrag_model as Studierendenantrag_model;
/**
*
*/
class Abmeldung extends FHC_Controller
{
/**
* Calls the parent's constructor and loads the FilterCmptLib
*/
public function __construct()
{
parent::__construct();
// Libraries
$this->load->library('AuthLib');
$this->load->library('AntragLib');
// Load language phrases
$this->loadPhrases([
'studierendenantrag'
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Retrieves data of the current studiengang for the current user
*/
public function getDetailsForNewAntrag($prestudent_id)
{
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, true)) {
$this->output->set_status_header(403);
return $this->outputJsonError('Forbidden');
}
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($prestudent_id);
if (isError($result)) {
$this->output->set_status_header(500);
return $this->outputJsonError(getError($result));
}
$result = $result->retval;
if (!$result) {
$this->output->set_status_header(403);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_student'));
}
elseif ($result == -3)
{
$this->output->set_status_header(403);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
}
elseif ($result == -1)
{
$result = $this->antraglib->getDetailsForLastAntrag(
$prestudent_id,
[
Studierendenantrag_model::TYP_ABMELDUNG,
Studierendenantrag_model::TYP_ABMELDUNG_STGL
]
);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$data = getData($result);
$data->canCancel = (
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id)
);
return $this->outputJsonSuccess($data);
}
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$this->outputJsonSuccess(getData($result));
}
public function getDetailsForAntrag($studierendenantrag_id)
{
if (!$this->antraglib->isEntitledToShowAntrag($studierendenantrag_id)) return show_404();
$result = $this->antraglib->getDetailsForAntrag($studierendenantrag_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$data = getData($result);
if ($data->typ !== Studierendenantrag_model::TYP_ABMELDUNG_STGL && $data->typ !== Studierendenantrag_model::TYP_ABMELDUNG)
return show_404();
$data->canCancel = (
$data->status == Studierendenantragstatus_model::STATUS_CREATED &&
$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id)
);
$this->outputJsonSuccess($data);
}
public function createAntrag()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
$this->form_validation->set_rules('grund', 'Grund', 'required');
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$grund = $this->input->post('grund');
$studiensemester = $this->input->post('studiensemester');
$prestudent_id = $this->input->post('prestudent_id');
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(['db' => getError($result)]);
}
$result = $result->retval;
if (!$result)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
}
elseif ($result == -3)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
}
elseif ($result < 0)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
}
$result = $this->antraglib->createAbmeldung($prestudent_id, $studiensemester, getAuthUID(), $grund);
if (isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
$result = $this->antraglib->getDetailsForAntrag(getData($result));
if (!hasData($result))
return $this->outputJsonSuccess(true);
$data = getData($result);
$data->canCancel = (boolean)$this->antraglib->isEntitledToCancelAntrag($data->studierendenantrag_id);
$this->outputJsonSuccess($data);
}
public function cancelAntrag()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules('antrag_id', 'Antrag ID', 'required');
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$antrag_id = $this->input->post('antrag_id');
if(!$this->antraglib->isEntitledToCancelAntrag($antrag_id))
{
$this->output->set_status_header(403);
return $this->outputJsonError('Forbidden');
}
$result = $this->antraglib->cancelAntrag($antrag_id, getAuthUID());
if(isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
if (!hasData($result))
return $this->outputJsonSuccess($antrag_id);
$this->outputJsonSuccess(getData($result));
}
public function getStudiengaengeAssistenz()
{
$this->load->library('PermissionLib');
$_POST = json_decode($this->input->raw_input_stream, true);
$query = $this->input->post('query');
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
$result = $this->antraglib->getAktivePrestudentenInStgs($studiengaenge, $query);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$result = getData($result);
if (!$result) {
return $this->outputJsonSuccess([]);
}
return $this->outputJsonSuccess($result);
}
}
@@ -0,0 +1,413 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \stdClass as stdClass;
/**
*
*/
class Leitung extends FHC_Controller
{
/**
* Calls the parent's constructor and loads the FilterCmptLib
*/
public function __construct()
{
parent::__construct();
// Libraries
$this->load->library('AuthLib');
$this->load->library('AntragLib');
// Load language phrases
$this->loadPhrases([
'studierendenantrag'
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
public function getActiveStgs()
{
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
$stgs = [];
if ($studiengaenge) {
$result = $this->StudierendenantragModel->loadForStudiengaenge($studiengaenge);
if (isError($result))
return $this->outputJson($result);
$antraege = getData($result) ?: [];
foreach ($antraege as $antrag) {
if (!isset($stgs[$antrag->studiengang_kz])) {
$stgs[$antrag->studiengang_kz] = new stdClass();
$stgs[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
$stgs[$antrag->studiengang_kz]->orgform = $antrag->orgform;
$stgs[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
}
}
}
if ($stgsNeuanlage) {
$result = $this->StudierendenantragModel->loadForStudiengaenge($stgsNeuanlage);
if (isError($result))
return $this->outputJson($result);
$antraege = getData($result) ?: [];
foreach ($antraege as $antrag) {
if (!isset($stgs[$antrag->studiengang_kz])) {
$stgs[$antrag->studiengang_kz] = new stdClass();
$stgs[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
$stgs[$antrag->studiengang_kz]->orgform = $antrag->orgform;
$stgs[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
}
}
}
$this->outputJsonSuccess($stgs);
}
public function getAntraege($studiengang = null)
{
if($studiengang)
$studiengaenge = [$studiengang];
else {
$studiengaenge =$this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
if(!is_array($studiengaenge))
$studiengaenge = [];
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
if(!is_array($stgsNeuanlage))
$stgsNeuanlage = [];
$studiengaenge = array_unique(array_merge($studiengaenge, $stgsNeuanlage));
}
$antraege = [];
if ($studiengaenge) {
$result = $this->StudierendenantragModel->loadForStudiengaenge($studiengaenge);
if (isError($result)) {
$this->output->set_status_header(500);
return $this->outputJson('Internal Server Error');
}
if(hasData($result))
{
$antraege = getData($result);
}
}
$this->outputJson($antraege);
}
public function reopenAntrag()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToReopenAntrag',
[
'isEntitledToReopenAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$result = $this->antraglib->reopenWiederholung($studierendenantrag_id, getAuthUID());
if (isError($result))
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
$this->outputJsonSuccess($studierendenantrag_id);
}
public function objectAntrag()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToObjectAntrag|callback_canBeObjected',
[
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
'canBeObjected' => $this->p->t('studierendenantrag', 'error_no_objection')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$result = $this->antraglib->objectAbmeldung($studierendenantrag_id, getAuthUID());
if (isError($result))
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
$this->outputJsonSuccess($studierendenantrag_id);
}
public function objectionDeny()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToObjectAntrag|callback_isObjected',
[
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
'isObjected' => $this->p->t('studierendenantrag', 'error_not_objected')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$grund = $this->input->post('grund');
$result = $this->antraglib->denyObjectionAbmeldung($studierendenantrag_id, getAuthUID(), $grund);
if (isError($result))
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
$this->outputJsonSuccess($studierendenantrag_id);
}
public function objectionApprove()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToObjectAntrag|callback_isObjected',
[
'isEntitledToObjectAntrag' => $this->p->t('studierendenantrag', 'error_no_right'),
'isObjected' => $this->p->t('studierendenantrag', 'error_not_objected')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$result = $this->antraglib->cancelAntrag($studierendenantrag_id, getAuthUID());
if (isError($result))
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
$this->outputJsonSuccess($studierendenantrag_id);
}
public function isEntitledToReopenAntrag($studierendenantrag_id)
{
return $this->antraglib->isEntitledToReopenAntrag($studierendenantrag_id);
}
public function isEntitledToObjectAntrag($studierendenantrag_id)
{
return $this->antraglib->isEntitledToObjectAntrag($studierendenantrag_id);
}
public function isEntitledToRejectAntrag($studierendenantrag_id)
{
return $this->antraglib->isEntitledToRejectAntrag($studierendenantrag_id);
}
public function canBeObjected($studierendenantrag_id)
{
return $this->antraglib->hasType($studierendenantrag_id, Studierendenantrag_model::TYP_ABMELDUNG_STGL);
}
public function isObjected($studierendenantrag_id)
{
return $this->antraglib->hasStatus($studierendenantrag_id, Studierendenantragstatus_model::STATUS_OBJECTED);
}
public function approveAbmeldung()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToApproveAntrag',
[
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$result = $this->antraglib->approveAbmeldung([$studierendenantrag_id], getAuthUID());
if (isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
return $this->outputJsonSuccess($studierendenantrag_id);
}
public function approveAbmeldungStgl()
{
return $this->approveAbmeldung();
}
public function approveUnterbrechung()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToApproveAntrag',
[
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$result = $this->antraglib->approveUnterbrechung([$studierendenantrag_id], getAuthUID());
if (isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
return $this->outputJsonSuccess($studierendenantrag_id);
}
public function rejectUnterbrechung()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToRejectAntrag',
[
'isEntitledToRejectAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
]
);
$this->form_validation->set_rules('grund', 'Grund', 'required');
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$grund = $this->input->post('grund');
$result = $this->antraglib->rejectUnterbrechung([$studierendenantrag_id], getAuthUID(), $grund);
if (isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
return $this->outputJsonSuccess($studierendenantrag_id);
}
public function approveWiederholung()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules(
'studierendenantrag_id',
'Studierenden Antrag',
'required|callback_isEntitledToApproveAntrag',
[
'isEntitledToApproveAntrag' => $this->p->t('studierendenantrag', 'error_no_right')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
$result = $this->antraglib->approveWiederholung($studierendenantrag_id, getAuthUID());
if (isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
return $this->outputJsonSuccess($studierendenantrag_id);
}
public function isEntitledToApproveAntrag($studierendenantrag_id)
{
return $this->antraglib->isEntitledToApproveAntrag($studierendenantrag_id);
}
public function getHistory($studierendenantrag_id)
{
if (!$this->antraglib->isEntitledToSeeHistoryForAntrag($studierendenantrag_id)) {
$this->output->set_status_header(403);
return $this->outputJson('Forbidden');
}
$result = $this->antraglib->getAntragHistory($studierendenantrag_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$this->outputJsonSuccess(getData($result) ?: []);
}
}
@@ -0,0 +1,233 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \Studierendenantrag_model as Studierendenantrag_model;
use \DateTime as DateTime;
/**
*
*/
class Unterbrechung extends FHC_Controller
{
/**
* Calls the parent's constructor and loads the FilterCmptLib
*/
public function __construct()
{
parent::__construct();
// Configs
$this->load->config('studierendenantrag');
// Libraries
$this->load->library('AuthLib');
$this->load->library('AntragLib');
// Load language phrases
$this->loadPhrases([
'studierendenantrag',
'ui'
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
public function getDetailsForNewAntrag($prestudent_id)
{
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false)) {
$this->output->set_status_header(403);
return $this->outputJsonError('Forbidden');
}
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id);
if (isError($result)) {
$this->output->set_status_header(500);
return $this->outputJsonError(getError($result));
}
$result = $result->retval;
if (!$result) {
$this->output->set_status_header(403);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_student'));
}
elseif ($result == -1)
{
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_UNTERBRECHUNG);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
return $this->outputJsonSuccess(getData($result));
}
elseif ($result == -2)
{
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$result = getData($result);
$this->output->set_status_header(400);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_pending', [
'typ' => $this->p->t('studierendenantrag', 'antrag_typ_' . $result->typ)
]));
}
elseif ($result == -3)
{
$this->output->set_status_header(403);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
}
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$data = getData($result);
$data->studiensemester = $this->antraglib->getSemesterForUnterbrechung($data->studiensemester_kurzbz);
$this->outputJsonSuccess($data);
}
public function getDetailsForAntrag($studierendenantrag_id)
{
if (!$this->antraglib->isEntitledToShowAntrag($studierendenantrag_id)) return show_404();
$result = $this->antraglib->getDetailsForAntrag($studierendenantrag_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$data = getData($result);
if ($data->typ !== Studierendenantrag_model::TYP_UNTERBRECHUNG)
return show_404();
$this->outputJsonSuccess($data);
}
public function createAntrag()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
$this->form_validation->set_rules('grund', 'Grund', 'required');
$this->form_validation->set_rules(
'datum_wiedereinstieg',
'Datum Wiedereinstieg',
'required|callback_isValidDate|callback_isDateInFuture',
[
'isValidDate' => $this->p->t('ui', 'error_invalid_date'),
'isDateInFuture' => $this->p->t('ui', 'error_invalid_date')
]
);
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$grund = $this->input->post('grund');
$studiensemester = $this->input->post('studiensemester');
$prestudent_id = $this->input->post('prestudent_id');
$datum_wiedereinstieg = $this->input->post('datum_wiedereinstieg');
$dms_id = null;
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(['db' => getError($result)]);
}
$result = $result->retval;
if (!$result)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
}
elseif ($result == -3)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
}
elseif ($result < 0)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
}
if(isset($_FILES['attachment']) && (!isset($_FILES['attachment']['error']) || $_FILES['attachment']['error'] != UPLOAD_ERR_NO_FILE))
{
$this->load->library('DmsLib');
$dms = $this->config->item('unterbrechung_dms');
if (!count(array_filter($dms, function ($v) {
return $v !== null;
})))
$dms = ['kategorie_kurzbz' => 'Akte'];
$dms['version'] = 0;
$allowed_filetypes = $this->config->item('unterbrechung_dms_filetypes') ?: ['*'];
$result = $this->dmslib->upload($dms, 'attachment', $allowed_filetypes);
if(isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
$dms_id = getData($result)['dms_id'];
}
$result = $this->antraglib->createUnterbrechung($prestudent_id, $studiensemester, getAuthUID(), $grund, $datum_wiedereinstieg, $dms_id);
if(isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
$antragId = getData($result);
$result = $this->antraglib->getDetailsForAntrag($antragId);
if(!hasData($result))
return $this->outputJsonSuccess($antragId);
$this->outputJsonSuccess(getData($result));
}
public function cancelAntrag()
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules('antrag_id', 'Antrag ID', 'required');
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$antrag_id = $this->input->post('antrag_id');
$result = $this->antraglib->cancelAntrag($antrag_id, getAuthUID());
if (isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
if (!hasData($result))
return $this->outputJsonSuccess($antrag_id);
$this->outputJsonSuccess(getData($result));
}
public function isValidDate($date)
{
try {
new DateTime($date);
} catch (Exception $e) {
return false;
}
return true;
}
public function isDateInFuture($date)
{
return new DateTime() < new DateTime($date);
}
}
@@ -0,0 +1,372 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \REST_Controller as REST_Controller;
/**
*
*/
class Wiederholung extends FHC_Controller
{
/**
* Calls the parent's constructor and loads the FilterCmptLib
*/
public function __construct()
{
parent::__construct();
// Configs
$this->load->config('studierendenantrag');
// Libraries
$this->load->library('AuthLib');
$this->load->library('PermissionLib');
$this->load->library('AntragLib');
$requiredPermissions = [
'saveLvs' => ['student/studierendenantrag:w'],
'getLvsAsRdf' => ['student/studierendenantrag:r', 'student/noten:r'],
'moveLvsToZeugnis' => ['student/studierendenantrag:w', 'student/noten:w']
];
if (isset($requiredPermissions[$this->router->method])) {
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method)) {
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
$this->outputJson('Forbidden');
exit;
}
}
// Load language phrases
$this->loadPhrases([
'global',
'studierendenantrag'
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Retrieves data of the current studiengang for the current user
*/
public function getDetailsForNewAntrag($prestudent_id)
{
if (!$this->antraglib->isEntitledToCreateAntragFor($prestudent_id, false)) {
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
return $this->outputJsonError('Forbidden');
}
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($prestudent_id);
if (isError($result)) {
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
return $this->outputJsonError(getError($result));
}
$result = $result->retval;
if (!$result) {
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_student_no_failed_exam'));
}
elseif ($result == -1)
{
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id, Studierendenantrag_model::TYP_WIEDERHOLUNG);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$data = getData($result);
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
$pruefungsdata = current(getData($result));
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
$data->pruefungsdatum = $pruefungsdata->datum;
return $this->outputJsonSuccess($data);
}
elseif ($result == -2)
{
$result = $this->antraglib->getDetailsForLastAntrag($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$result = getData($result);
$this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_pending', [
'typ' => $this->p->t('studierendenantrag', 'antrag_typ_' . $result->typ)
]));
}
elseif ($result == -3)
{
$this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST);
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_stg_blacklist'));
}
$result = $this->antraglib->getDetailsForNewAntrag($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$data = getData($result);
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
$pruefungsdata = current(getData($result));
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
$data->pruefungsdatum = $pruefungsdata->datum;
$this->outputJsonSuccess($data);
}
public function createAntrag()
{
$this->createAntragWithStatus(true);
}
public function cancelAntrag()
{
$this->createAntragWithStatus(false);
}
protected function createAntragWithStatus($repeat)
{
$this->load->library('form_validation');
$_POST = json_decode($this->input->raw_input_stream, true);
$this->form_validation->set_rules('prestudent_id', 'Prestudent ID', 'required');
$this->form_validation->set_rules('studiensemester', 'Studiensemester', 'required');
if ($this->form_validation->run() == false)
{
return $this->outputJsonError($this->form_validation->error_array());
}
$prestudent_id = $this->input->post('prestudent_id');
$studiensemester = $this->input->post('studiensemester');
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($prestudent_id);
if (isError($result)) {
return $this->outputJsonError(['db' => getError($result)]);
}
$result = $result->retval;
if (!$result)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_no_student')]);
}
elseif ($result == -2)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_antrag_exists')]);
}
elseif ($result == -3)
{
return $this->outputJsonError(['db' => $this->p->t('studierendenantrag', 'error_stg_blacklist')]);
}
$result = $this->antraglib->createWiederholung($prestudent_id, $studiensemester, getAuthUID(), $repeat);
if(isError($result))
{
return $this->outputJsonError(['db' => getError($result)]);
}
$antragId = getData($result);
$result = $this->antraglib->getDetailsForAntrag($antragId);
if(!hasData($result))
return $this->outputJsonSuccess(true);
$data = getData($result);
$result = $this->antraglib->getFailedExamForPrestudent($prestudent_id);
// NOTE(chris): error handling for this function should already happenden in antraglib->getPrestudentWiederholungsBerechtigt()
$pruefungsdata = current(getData($result));
$data->studiensemester_kurzbz = $pruefungsdata->studiensemester_kurzbz;
$data->lvbezeichnung = $pruefungsdata->lvbezeichnung;
$data->pruefungsdatum = $pruefungsdata->datum;
$this->outputJsonSuccess($data);
}
public function getLvs($antrag_id)
{
$result = $this->antraglib->getLvsForAntrag($antrag_id);
if (isError($result)) {
$error = getError($result);
if ($error == 'Forbidden')
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN);
return $this->outputJsonError(getError($result));
}
$lvs = getData($result);
$this->outputJsonSuccess($lvs);
}
public function saveLvs()
{
$result = $this->getPostJSON();
$antragsLvs = array_merge($result->forbiddenLvs, $result->mandatoryLvs);
$insert = array_map(function ($lv) {
return [
'studierendenantrag_id' => $lv->studierendenantrag_id,
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id,
'note' => $lv->zugelassen
? ($lv->zugelassen == 1 ? 0 : $this->config->item('wiederholung_note_angerechnet'))
: $this->config->item('wiederholung_note_nicht_zugelassen'),
'anmerkung' => $lv->anmerkung,
'insertvon' => getAuthUID(),
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz
];
}, $antragsLvs);
$antrag_ids = array_unique(array_map(function ($lv) {
return $lv['studierendenantrag_id'];
}, $insert));
foreach ($antrag_ids as $antrag_id) {
$result = $this->StudierendenantragModel->loadIdAndStatusWhere([
'studierendenantrag_id' => $antrag_id
]);
if (isError($result))
return $this->outputJsonError(getError($result));
if (!hasData($result))
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_antrag_found', ['id' => $antrag_id]));
$antrag = current(getData($result));
if ($antrag->status != Studierendenantragstatus_model::STATUS_CREATED && $antrag->status != Studierendenantragstatus_model::STATUS_LVSASSIGNED)
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_antrag_locked'));
}
if(!$antragsLvs)
return $this->outputJsonError($this->p->t('studierendenantrag', 'error_no_lv'));
$result = $this->antraglib->saveLvs($insert);
if (isError($result))
return $this->outputJsonError(getError($result));
$this->outputJsonSuccess(getData($result));
}
public function getLvsAsRdf($prestudent_id)
{
// header für no cache
$this->output->set_header("Cache-Control: no-cache");
$this->output->set_header("Cache-Control: post-check=0, pre-check=0", false);
$this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
$this->output->set_header("Pragma: no-cache");
$this->output->set_header("Content-type: application/xhtml+xml");
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
$sem_akt = $this->variablelib->getVar('semester_aktuell');
$result = $this->antraglib->getLvsForPrestudent($prestudent_id, $sem_akt);
if (isError($result)) {
return $this->outputJsonError(getError($result));
}
$lvs = getData($result) ?: [];
$rdf_url = 'http://www.technikum-wien.at/antragnote';
$this->load->view('lehre/Antrag/Wiederholung/getLvs.rdf.php', [
'url' => $rdf_url,
'lvs' => $lvs
]);
}
public function moveLvsToZeugnis()
{
$anzahl = $this->input->post('anzahl');
$student_uid = $this->input->post('student_uid');
$this->load->model('education/Studierendenantraglehrveranstaltung_model', 'StudierendenantraglehrveranstaltungModel');
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
$errormsg = array();
for($i=0; $i<$anzahl; $i++)
{
$id = $this->input->post('studierendenantrag_lehrveranstaltung_id_' . $i);
$result =$this->StudierendenantraglehrveranstaltungModel->load($id);
if(isError($result))
{
$errormsg[] = getError($result);
}
elseif(!hasData($result))
{
$errormsg[] = $this->p->t('studierendenantrag', 'error_no_lv_in_application');
}
else
{
$antragLv = getData($result)[0];
$result= $this->ZeugnisnoteModel->load([
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
'student_uid'=> $student_uid,
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz
]);
if(isError($result))
{
$errormsg[] = getError($result);
}
else
{
if (hasData($result))
{
$result = $this->ZeugnisnoteModel->update(
[
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
'student_uid'=> $student_uid,
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz
],
[
'note'=> $antragLv->note,
'uebernahmedatum' => date('c'),
'benotungsdatum' => $antragLv->insertamum,
'updateamum' => date('c'),
'bemerkung'=>$antragLv->anmerkung,
'updatevon'=>getAuthUID()
]
);
}
else
{
$result = $this->ZeugnisnoteModel->insert([
'lehrveranstaltung_id'=> $antragLv->lehrveranstaltung_id,
'student_uid'=> $student_uid,
'studiensemester_kurzbz' => $antragLv->studiensemester_kurzbz,
'note'=> $antragLv->note,
'uebernahmedatum' => date('c'),
'benotungsdatum' => $antragLv->insertamum,
'insertamum' => date('c'),
'bemerkung'=>$antragLv->anmerkung,
'insertvon'=>getAuthUID()
]);
}
if(isError($result))
{
$errormsg[] = getError($result);
}
}
}
}
if($errormsg)
$return = false;
else
$return = true;
$this->load->view('lehre/Antrag/Wiederholung/moveLvs.rdf.php', [
'return' => $return,
'errormsg' => $errormsg
]);
}
}
@@ -0,0 +1,207 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* This controller operates between (interface) the JS (GUI) and the FilterCmptLib (back-end)
* Provides data to the ajax get calls about the filter component
* Listens to ajax post calls to change the filter data
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
* NOTE: extends the FHC_Controller instead of the Auth_Controller because the FilterCmpt has its
* own permissions check
*/
class Filter extends FHC_Controller
{
const FILTER_UNIQUE_ID = 'filterUniqueId'; // Name of the filter cmpt unique id (mandatory)
const FILTER_TYPE = 'filterType'; // The filter type (PHP filter definition) used (mandatory)
const FILTER_ID = 'filterId'; // The id of the used filter (optional)
/**
* Calls the parent's constructor and loads the FilterCmptLib
*/
public function __construct()
{
parent::__construct();
// Loads authentication library and starts authentication
$this->load->library('AuthLib');
// Loads the FilterCmptLib with HTTP GET/POST parameters
$this->_startFilterCmptLib();
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Retrieves data about the current filter from the session and will be written on the output in JSON format
*/
public function getFilter()
{
$this->outputJsonSuccess($this->filtercmptlib->getSession());
}
/**
* Remove an applied filter (SQL where condition) from the current filter
*/
public function removeFilterField()
{
$request = $this->getPostJSON();
if (property_exists($request, 'filterField')
&& $this->filtercmptlib->removeFilterField($request->filterField) == true)
{
$this->outputJsonSuccess('Field removed');
}
else
{
$this->outputJsonError('Error occurred');
}
}
/**
* Add a filter (SQL where clause) to be applied to the current filter
*/
public function addFilterField()
{
$request = $this->getPostJSON();
if (property_exists($request, 'filterField')
&& $this->filtercmptlib->addFilterField($request->filterField) == true)
{
$this->outputJsonSuccess('Field added');
}
else
{
$this->outputJsonError('Error occurred');
}
}
/**
* Apply the filter changes
*/
public function applyFilterFields()
{
$request = $this->getPostJSON();
if (property_exists($request, 'filterFields')
&& $this->filtercmptlib->applyFilterFields($request->filterFields) == true)
{
$this->outputJsonSuccess('Applied');
}
else
{
$this->outputJsonError('Error occurred');
}
}
/**
* Save the current filter as a custom filter for this user with the given description
*/
public function saveCustomFilter()
{
$request = $this->getPostJSON();
if (property_exists($request, 'customFilterName')
&& $this->filtercmptlib->saveCustomFilter($request->customFilterName) == true)
{
$this->outputJsonSuccess('Saved');
}
else
{
$this->outputJsonError('An error occurred while saving a custom filter');
}
}
/**
* Remove a custom filter by its filterId
*/
public function removeCustomFilter()
{
$request = $this->getPostJSON();
if (property_exists($request, 'filterId')
&& $this->filtercmptlib->removeCustomFilter($request->filterId) == true)
{
$this->outputJsonSuccess('Removed');
}
else
{
$this->outputJsonError('Wrong parameter');
}
}
/**
* Reloads the dataset
*/
public function reloadDataset()
{
$this->filtercmptlib->reloadDataset();
$this->outputJsonSuccess('Success');
}
//------------------------------------------------------------------------------------------------------------------
// Private methods
/**
* Loads the FilterCmptLib with the FILTER_UNIQUE_ID parameter
* If the parameter FILTER_UNIQUE_ID is not given then the execution of the controller is terminated and
* an error message is printed
*/
private function _startFilterCmptLib()
{
$filterUniqueId = null;
$filterType = null;
$filterId = null;
// Try to get the POSTed JSON
$postJSON = $this->getPostJSON();
// POSTed JSON
if ($postJSON != null)
{
// If the mandatory parameters FILTER_UNIQUE_ID and FILTER_TYPE have been provided
if (property_exists($postJSON, self::FILTER_UNIQUE_ID) && property_exists($postJSON, self::FILTER_TYPE))
{
// Retrives them from the POSTed JSON
$filterUniqueId = $postJSON->{self::FILTER_UNIQUE_ID};
$filterType = $postJSON->{self::FILTER_TYPE};
}
// If the optional parameter FILTER_ID has been provided
if (property_exists($postJSON, self::FILTER_ID)) $filterId = $postJSON->{self::FILTER_ID};
}
else // otherwise it is an HTTP GET call
{
// If the mandatory parameters FILTER_UNIQUE_ID and FILTER_TYPE have been provided
if (isset($_GET[self::FILTER_UNIQUE_ID]) && isset($_GET[self::FILTER_TYPE]))
{
// Retrives them from the HTTP GET
$filterUniqueId = $this->input->get(self::FILTER_UNIQUE_ID);
$filterType = $this->input->get(self::FILTER_TYPE);
}
// If the optional parameter FILTER_ID has been provided
if (isset($_GET[self::FILTER_ID])) $filterId = $filterId = $this->input->get(self::FILTER_ID);
}
// If the mandatory parameters have _not_ been provided, then terminate the execution and return an error
if ($filterUniqueId == null) $this->terminateWithJsonError('Parameter "'.self::FILTER_UNIQUE_ID.'" not provided!');
if ($filterType == null) $this->terminateWithJsonError('Parameter "'.self::FILTER_TYPE.'" not provided!');
// Loads the FilterCmptLib that contains all the used logic
$this->load->library(
'FilterCmptLib',
array(
'filterUniqueId' => $filterUniqueId,
'filterType' => $filterType,
'filterId' => $filterId
)
);
// Start the component
$this->filtercmptlib->start();
}
}
@@ -0,0 +1,22 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class Phrasen extends FHC_Controller
{
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* @param string $module
*/
public function loadModule($module)
{
$this->load->library('PhrasesLib', [$module], 'pj');
$this->outputJsonSuccess(json_decode($this->pj->getJSON()));
}
}
@@ -0,0 +1,54 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class SearchBar extends FHC_Controller
{
const SEARCHSTR_PARAM = 'searchstr';
const TYPES_PARAM = 'types';
/**
* Object initialization
*/
public function __construct()
{
parent::__construct();
// Loads the AuthLib and starts the authentication
$this->load->library('AuthLib');
// Load the library SearchBarLib
$this->load->library('SearchBarLib');
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Gets a JSON body via HTTP POST and provides the parameters
*/
public function search()
{
$json = json_decode($this->input->raw_input_stream);
// Checks if the searchstr and the types parameters are in the POSTed JSON
if (isset($json->{self::SEARCHSTR_PARAM}) && isset($json->{self::TYPES_PARAM}))
{
// Convert to json the result from searchbarlib->search
$this->outputJson(
$this->searchbarlib->search(
$json->{self::SEARCHSTR_PARAM},
$json->{self::TYPES_PARAM}
)
);
}
else // otherwise return an error in JSON format
{
$this->outputJsonError(SearchBarLib::ERROR_WRONG_JSON);
}
}
}
+85 -6
View File
@@ -37,6 +37,9 @@ class AnrechnungJob extends JOB_Controller
$this->load->helper('hlp_sancho_helper');
$this->load->library('AnrechnungLib');
// Load configs
$this->load->config('anrechnung');
}
/**
@@ -213,7 +216,7 @@ class AnrechnungJob extends JOB_Controller
'datentabelle' => $anrechnungen_table,
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
);
// Send mail
sendSanchoMail(
'AnrechnungAntragStellen',
@@ -227,6 +230,82 @@ class AnrechnungJob extends JOB_Controller
$this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.');
}
// Send Sancho mail to LV-Leitung (fallback Lectors) that were requested for recommendation yesterday.
public function sendMailRecommendationRequests(){
$this->logInfo('Start AnrechnungJob sendMailRecommendationRequests to inform lecturers about yesterdays requests for recommendation.');
// Get Anrechnungen, für die gestern eine Empfehlung angefragt worden ist
$this->AnrechnungModel->addSelect('astat.anrechnung_id, astat.datum, astat.insertamum');
$this->AnrechnungModel->addDistinct('astat.anrechnung_id');
$this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus astat', 'anrechnung_id');
$result = $this->AnrechnungModel->loadWhere('
studiensemester_kurzbz = (SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende)
AND genehmigt_von IS NULL
AND empfehlung_anrechnung IS NULL
AND status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) .' -- in Bearbeitung durch Lektor
AND NOW()::date = (astat.datum + interval \'1 day\') -- nur gestrige Empfehlungsanfrage
ORDER BY astat.anrechnung_id, astat.datum DESC, astat.insertamum DESC -- nur letzten status dabei prüfen
');
// Exit, wenn es gestern keine Empfehlungsanfragen gab
if (!hasData($result))
{
$this->logInfo('End AnrechnungJob sendMailRecommendationRequests, because no recommendations were requested yesterday.');
exit;
}
$anrechnung_id_arr = array_column(getData($result), 'anrechnung_id');
$arr_lvLector_arr = array();
foreach ($anrechnung_id_arr as $anrechnung_id)
{
// Get full name of Fachbereichsleitung or LV Leitung.
if($this->config->item('fbl') === TRUE)
{
$arr_lvLector_arr[] = $this->anrechnunglib->getLeitungOfLvOe($anrechnung_id);
}
else
{
$arr_lvLector_arr[] = $this->anrechnunglib->getLectors($anrechnung_id); // Returns LV Leitung. If not present, then all lectors of LV.
}
}
// Unique lector array to send only one mail per lector
$arr_lvLector_arr = array_unique($arr_lvLector_arr, SORT_REGULAR);
// Link to 'Anrechnungen prüfen' dashboard
$url =
CIS_ROOT. 'cis/index.php?menu='.
CIS_ROOT. 'cis/menu.php?content_id=&content='.
CIS_ROOT. index_page(). self::REVIEW_ANRECHNUNG_URI;
foreach ($arr_lvLector_arr as $lvLector_arr)
{
foreach ($lvLector_arr as $lector)
{
// Prepare mail content
$fields = array(
'vorname' => $lector->vorname,
'stgl_name' => 'Die Studiengangsleitung',
'link' => anchor($url, 'Anrechnungsanträge Übersicht')
);
// Send mail
sendSanchoMail(
'AnrechnungEmpfehlungAnfordern',
$fields,
$lector->uid. '@'. DOMAIN,
'Deine Empfehlung wird benötigt zur Anerkennung nachgewiesener Kenntnisse'
);
}
}
$this->logInfo('SUCCEDED AnrechnungJob sendMailRecommendationRequests');
}
/**
* Send Sancho mail to students, whose Anrechnungen were approved 24 hours ago.
*/
@@ -308,7 +387,7 @@ class AnrechnungJob extends JOB_Controller
$db = new DB_Model();
$result = $db->execReadOnlyQuery($qry);
// Exit if there are no rejected Anrechnungen
if (!hasData($result))
{
@@ -361,9 +440,9 @@ html;
$result = $this->AnrechnungModel->loadWhere('
studiensemester_kurzbz = (
SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende)
SELECT studiensemester_kurzbz FROM tbl_studiensemester WHERE now()::date BETWEEN start AND ende
)
AND genehmigt_von IS NULL
AND genehmigt_von IS NULL
AND empfehlung_anrechnung IS NULL
AND status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR) .' -- in Bearbeitung durch Lektor
AND NOW()::date = (astat.datum + interval \'1 week\') -- eine Woche nach Empfehlungsanfrage
@@ -376,7 +455,7 @@ html;
$this->logInfo('End AnrechnungJob sendMailRemindRecommendation, because no recommendations to be done.');
exit;
}
$anrechnung_id_arr = array_column(getData($result), 'anrechnung_id');
$arr_lvLector_arr = array();
@@ -435,7 +514,7 @@ html;
'vorname' => $stgl->vorname
);
}
return $stglMailAdress_arr;
}
// If not available, get assistance mail address
+608
View File
@@ -0,0 +1,608 @@
<?php
if (!defined("BASEPATH")) exit("No direct script access allowed");
use \DateTime as DateTime;
class AntragJob extends JOB_Controller
{
/**
* API constructor
*/
public function __construct()
{
parent::__construct();
// Configs
$this->load->config('studierendenantrag');
// Loads SanchoHelper
$this->load->helper('hlp_sancho_helper');
// Load Model
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
$this->load->model('education/Studierendenantragstatus_model', 'StudierendenantragstatusModel');
$this->load->model('education/Pruefung_model', 'PruefungModel');
$this->load->model('person/Kontakt_model', 'KontaktModel');
$this->load->model('crm/Student_model', 'StudentModel');
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
}
/**
* Send infomail to Stgl
*/
public function sendStglSammelmail()
{
$this->load->model('person/Person_model', 'PersonModel');
$this->logInfo('Start Job sendStglSammelmail');
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->StudierendenantragModel->addJoin('public.tbl_prestudent', 'prestudent_id');
$this->db->group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_ABMELDUNG_STGL);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_UNTERBRECHUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_CREATED);
$this->db->group_end();
$this->db->or_group_start();
$this->db->where('typ', Studierendenantrag_model::TYP_WIEDERHOLUNG);
$this->db->where('campus.get_status_studierendenantrag(studierendenantrag_id)', Studierendenantragstatus_model::STATUS_LVSASSIGNED);
$this->db->group_end();
$result = $this->StudierendenantragModel->load();
if(isError($result))
return $this->logError(getError($result));
if(!hasData($result))
return $this->logInfo('End Job sendStglSammelmail: 0 Mails sent');
$antraege = getData($result);
$stgs = array();
$stgLeitungen = array();
foreach ($antraege as $antrag)
{
if (!isset($stgs[$antrag->studiengang_kz]))
{
$result = $this->StudiengangModel->getLeitung($antrag->studiengang_kz);
if (isError($result))
{
$this->logError(getError($result));
continue;
}
if (!hasData($result))
{
$this->logError('Keine Leitung für Studiengang ' . $antrag->studiengang_kz . ' gefunden!');
continue;
}
$leitung = current(getData($result));
if (!isset($stgLeitungen[$leitung->uid]))
{
$stgLeitungen[$leitung->uid] = [ 'Details' => $leitung, 'stgs' => [] ];
}
$stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz;
$result = $this->StudiengangModel->load($antrag->studiengang_kz);
if (isError($result))
{
$this->logError(getError($result));
continue;
}
if (!hasData($result))
{
$this->logError('Keine Details für Studiengang ' . $antrag->studiengang_kz . ' gefunden!');
continue;
}
$details = current(getData($result));
$stgs[$antrag->studiengang_kz] = [
'Abmeldung' => [],
'Unterbrechung' => [],
'Wiederholung' => [],
'Details' => $details
];
}
$stgs[$antrag->studiengang_kz][str_replace('Stgl', '', $antrag->typ)] = $antrag;
}
$this->load->model('system/Sprache_model', 'SpracheModel');
$result = $this->SpracheModel->loadWhere(['content' => true]);
if (isError($result)) {
$this->logError(getError($result));
$languages = [DEFAULT_LANGUAGE];
} elseif (!hasData($result)) {
$languages = [DEFAULT_LANGUAGE];
} else {
$languages = array_map(function ($row) {
return $row->sprache;
}, getData($result));
}
$count = 0;
foreach ($stgLeitungen as $leitung)
{
$data = [
'name' => trim($leitung['Details']->vorname . ' ' . $leitung['Details']->nachname),
'vorname' => $leitung['Details']->vorname,
'nachname' => $leitung['Details']->nachname
];
foreach ($languages as $lang) {
unset($this->p);
$this->loadPhrases(['studierendenantrag'], $lang);
$table = '';
foreach ($leitung['stgs'] as $studiengang_kz) {
$rows = '';
$stg = $stgs[$studiengang_kz];
foreach (['Abmeldung', 'Unterbrechung', 'Wiederholung'] as $typ) {
$c = count($stg[$typ]);
if ($c) {
$rows .= $this->p->t('studierendenantrag', 'mail_part_x_new_' . $typ, ['count' => $c]);
}
}
$table .= $this->p->t('studierendenantrag', 'mail_part_table', [
'stg_bezeichnung' => $stg['Details']->bezeichnung,
'stg_orgform_kurzbz' => $stg['Details']->orgform_kurzbz,
'rows' => $rows
]);
}
$data['table_' . $lang] = $table;
}
$data['table'] = $data['table_' . DEFAULT_LANGUAGE];
// NOTE(chris): Sancho mail
if (sendSanchoMail("Sancho_Mail_Antrag_Stgl", $data, $leitung['Details']->uid . '@' . DOMAIN, 'Anträge - Aktion(en) erforderlich'))
$count++;
}
$this->logInfo($count . " Emails erfolgreich versandt");
$this->logInfo('End Job sendStglSammelmail');
}
/**
* Send reminder to Assistant for Wiedereinstieg Unterbrecher
*
*/
public function sendReminderWiedereinstieg()
{
$now = new DateTime();
$modifier = $this->config->item('unterbrechung_job_remind_wiedereinstieg_date_modifier');
if (!$modifier)
return $this->logError('Konnte Job nicht starten: Config "unterbrechung_job_remind_wiedereinstieg_date_modifiers" nicht gesetzt');
$end = new DateTime();
$end->modify($modifier);
$this->logInfo(sprintf(
'Start Job sendReminderWiedereinstieg (Wiedereinstieg zwischen %s - %s)',
$now->format('Y-m-d'),
$end->format('Y-m-d')
));
$result = $this->StudierendenantragModel->getAntraegeWhereWiedereinstiegBetween($now, $end);
if(isError($result))
{
$this->logError(getError($result));
$this->logInfo('Ende Job sendReminderWiedereinstieg');
return;
}
$antraege = getData($result) ?: [];
$count = 0;
foreach ($antraege as $antrag)
{
$this->StudiengangModel->addJoin('public.tbl_prestudent ps','studiengang_kz');
$res = $this->StudiengangModel->loadWhere(['prestudent_id' => $antrag->prestudent_id]);
$stg = '';
$orgform = '';
if (hasData($res)) {
$studiengang = current(getData($res));
$stg = $studiengang->bezeichnung;
$orgform = $studiengang->orgform_kurzbz;
}
$datum = new DateTime($antrag->datum_wiedereinstieg);
$data = array(
'prestudent' => $antrag->prestudent_id,
'name' => trim($antrag->vorname . ' '. $antrag->nachname),
'datum_wiedereinstieg' => $datum->format('d.m.Y'),
'vorname' => $antrag->vorname,
'nachname' => $antrag->nachname,
'Orgform' => $orgform,
'stg' => $stg
);
$result = $this->StudentModel->loadWhere(['prestudent_id'=> $antrag->prestudent_id]);
if (hasData($result)) {
$student = current(getData($result));
$data['UID'] = $student->student_uid;
}
// NOTE(chris): Sancho mail
if(sendSanchoMail('Sancho_Mail_Antrag_U_Reminder', $data, $antrag->email, 'Reminder: Unterbrechung Wiedereinstieg'))
{
$count++;
$this->StudierendenantragstatusModel->insert([
'studierendenantrag_id' => $antrag->studierendenantrag_id,
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_REMINDERSENT,
'insertvon' => 'AntragJob'
]);
}
}
$this->logInfo($count . ' Reminder gesendet - Ende Job sendReminderWiedereinstieg');
}
/**
* Set Wiederholer after deadline to Abbrecher
*
*/
public function handleWiederholerDeadline()
{
$this->logInfo('Start Job handleWiederholerDeadline');
$this->load->library('PrestudentLib');
$insertvon = $this->config->item('antrag_job_systemuser');
if (!$insertvon) {
$this->logError('Config "antrag_job_systemuser" nicht gesetzt');
$this->logInfo('Ende Job handleWiederholerDeadline');
return;
}
$modifier_deadline = $this->config->item('wiederholung_job_deadline_date_modifier');
if (!$modifier_deadline) {
$this->logError('Config "wiederholung_job_deadline_date_modifier" nicht gesetzt');
$this->logInfo('Ende Job handleWiederholerDeadline');
return;
}
$digi_start= $this->config->item('digitalization_start');
if($digi_start)
$digi_start = new DateTime($digi_start);
$dateDeadline = new DateTime();
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
$result = $this->PruefungModel->getAllPrestudentsWhereCommitteeExamFailed(
[
null,
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
Studierendenantragstatus_model::STATUS_REQUESTSENT_2
],
$dateDeadline,
$digi_start
);
if(isError($result))
{
$this->logError(getError($result));
}
else
{
$prestudents = getData($result) ?: [];
$count = 0;
$prestudents = $this->prestudentsGetUnique($prestudents);
foreach ($prestudents as $prestudent)
{
$result = $this->prestudentlib->setAbbrecher($prestudent->prestudent_id, $prestudent->studiensemester_kurzbz, $insertvon);
if (isError($result))
$this->logError(getError($result));
else
$count++;
}
$this->logInfo($count . " Students set to Abbrecher");
}
$this->logInfo('Ende Job handleWiederholerDeadline');
}
/**
* Set Abmeldungen after deadline to Abbrecher
*
*/
public function handleAbmeldungenStglDeadline()
{
$this->logInfo('Start Job handleAbmeldungenStglDeadline');
$this->load->library('AntragLib');
$insertvon = $this->config->item('antrag_job_systemuser');
if (!$insertvon) {
$this->logError('Config "antrag_job_systemuser" nicht gesetzt');
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
return;
}
$modifier_deadline = $this->config->item('abmeldung_job_deadline_date_modifier');
if (!$modifier_deadline) {
$this->logError('Config "abmeldung_job_deadline_date_modifier" nicht gesetzt');
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
return;
}
$dateDeadline = new DateTime();
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
$this->StudierendenantragModel->addSelect('prestudent_id');
$this->StudierendenantragModel->addSelect('studiensemester_kurzbz');
$this->StudierendenantragModel->addSelect('s.insertamum');
$this->StudierendenantragModel->db->where_in('public.get_rolle_prestudent(prestudent_id, studiensemester_kurzbz)', $this->config->item('antrag_prestudentstatus_whitelist'));
$result = $this->StudierendenantragModel->getWithLastStatusWhere([
'typ' => Studierendenantrag_model::TYP_ABMELDUNG_STGL,
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_APPROVED,
's.insertamum <=' => $dateDeadline->format('c')
]);
if(isError($result))
{
$this->logError(getError($result));
}
else
{
$antraege = getData($result) ?: [];
$count = 0;
foreach ($antraege as $antrag)
{
$result = $this->prestudentlib->setAbbrecher(
$antrag->prestudent_id,
$antrag->studiensemester_kurzbz,
$insertvon,
'abbrecherStgl',
$antrag->insertamum
);
if (isError($result))
$this->logError(getError($result));
else
{
$count++;
$result = $this->PrestudentModel->load($antrag->prestudent_id);
if(!hasData($result)) {
$this->logWarning('No Prestudent found');
continue;
}
$prestudent = current(getData($result));
$result = $this->StudiengangModel->load($prestudent->studiengang_kz);
if(!hasData($result)) {
$this->logWarning('No Studiengang found');
continue;
}
$studiengang = current(getData($result));
$result = $this->PersonModel->loadPrestudent($antrag->prestudent_id);
if(!hasData($result))
{
$this->logWarning('No Person found');
continue;
}
$person = current(getData($result));
$email = $studiengang->email;
$dataMail = array(
'prestudent' => $antrag->prestudent_id,
'studiensemester' => $antrag->studiensemester_kurzbz,
'name' => trim($person->vorname . ' '. $person->nachname),
);
if(!sendSanchoMail('Sancho_Mail_Antrag_A_Assist', $dataMail, $email, 'Einspruchsfrist abgelaufen'))
{
$this->logWarning("Failed to send Notification to " . $email);
}
}
}
$this->logInfo($count . " Students set to Abbrecher");
}
$this->logInfo('Ende Job handleAbmeldungenStglDeadline');
}
/**
* Send Request to Student do Decide between Wiederholung and Verzicht
*
*/
public function sendAufforderungWiederholer()
{
$this->logInfo('Start Job sendAufforderungWiederholer');
$modifier_request_1 = $this->config->item('wiederholung_job_request_1_date_modifier');
$modifier_request_2 = $this->config->item('wiederholung_job_request_2_date_modifier');
$modifier_deadline = $this->config->item('wiederholung_job_deadline_date_modifier');
$digi_start = $this->config->item('digitalization_start');
if ($digi_start) {
try {
$digi_start = new DateTime($digi_start);
} catch(Exception $e) {
}
}
if ($modifier_deadline) {
$dateDeadline = new DateTime();
$dateDeadline->sub(DateInterval::createFromDateString($modifier_deadline));
if ($digi_start)
$dateDeadline = max($digi_start, $dateDeadline);
} else {
$dateDeadline = $digi_start ?: null;
}
//first request
if ($modifier_request_1) {
$dateStichtag = new DateTime();
$dateStichtag->sub(DateInterval::createFromDateString($modifier_request_1));
if (!$dateDeadline || $dateStichtag > $dateDeadline)
$this->sendReminder(
'Request1',
null,
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
$dateDeadline,
$dateStichtag,
$modifier_deadline,
'Aufforderung: Bekanntgabe Wiederholung'
);
} else
$this->logError('Config "wiederholung_job_request_1_date_modifier" nicht gesetzt');
//second request
if ($modifier_request_2) {
$dateStichtag = new DateTime();
$dateStichtag->sub(DateInterval::createFromDateString($modifier_request_2));
if (!$dateDeadline || $dateStichtag > $dateDeadline)
$this->sendReminder(
'Request2',
Studierendenantragstatus_model::STATUS_REQUESTSENT_1,
Studierendenantragstatus_model::STATUS_REQUESTSENT_2,
$dateDeadline,
$dateStichtag,
$modifier_deadline,
'Reminder Aufforderung: Bekanntgabe Wiederholung'
);
} else
$this->logError('Config "wiederholung_job_request_2_date_modifier" nicht gesetzt');
$this->logInfo('Ende Job sendAufforderungWiederholer');
}
protected function prestudentsGetUnique($prestudents)
{
$result = [];
foreach ($prestudents as $prestudent) {
if (!isset($result[$prestudent->prestudent_id]))
$result[$prestudent->prestudent_id] = $prestudent;
else {
if ($result[$prestudent->prestudent_id]->datum > $prestudent->datum)
$result[$prestudent->prestudent_id] = $prestudent;
}
}
return $result;
}
protected function sendReminder($name, $status_from, $status_to, $deadline, $date_stichtag, $modifier_deadline, $subject)
{
$this->logInfo('Start Job sendAufforderungWiederholer ' . $name);
$result = $this->PruefungModel->getAllPrestudentsWhereCommitteeExamFailed($status_from, $date_stichtag, $deadline);
if(isError($result))
{
$this->logError(getError($result));
}
else
{
$prestudents = getData($result) ?: [];
$count = 0;
$prestudents = $this->prestudentsGetUnique($prestudents);
foreach ($prestudents as $prestudent)
{
$stg_kz = $prestudent->studiengang_kz;
if (in_array($stg_kz, $this->config->item('stgkz_blacklist_wiederholung')))
continue;
$url = site_url('lehre/Studierendenantrag/wiederholung/' . $prestudent->prestudent_id);
$urlCIS = CIS_ROOT . 'index.ci.php/lehre/Studierendenantrag/wiederholung/' . $prestudent->prestudent_id;
$email = $this->StudentModel->getEmailFH($this->StudentModel->getUID($prestudent->prestudent_id));
$fristende = new DateTime($prestudent->datum);
$fristende->add(DateInterval::createFromDateString($modifier_deadline));
$datum_kp = new DateTime($prestudent->datum);
$result = $this->StudiensemesterModel->getNextFrom($prestudent->studiensemester_kurzbz);
$next_sem = "";
$sem_after_next_sem = "";
if (hasData($result)) {
$next_sem = current(getData($result))->studiensemester_kurzbz;
$result = $this->StudiensemesterModel->getNextFrom($next_sem);
if (hasData($result)) {
$sem_after_next_sem = current(getData($result))->studiensemester_kurzbz;
}
}
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$result = $this->PrestudentstatusModel->loadLastWithStgDetails($prestudent->prestudent_id, $prestudent->studiensemester_kurzbz);
if (hasData($result)) {
$ausbildungssemester = current(getData($result))->semester;
}
$dataMail = array(
'name'=> trim($prestudent->vorname . ' '. $prestudent->nachname),
'vorname' => $prestudent->vorname,
'nachname' => $prestudent->nachname,
'pers_kz'=> $prestudent->matrikelnr,
'stg' => $prestudent->bezeichnung,
'lvbezeichnung' => $prestudent->lvbezeichnung,
'datum_kp' => $datum_kp->format('d.m.Y'),
'studiensemester'=> $prestudent->studiensemester_kurzbz,
'Orgform'=> $prestudent->orgform,
'prestudent_id' => $prestudent->prestudent_id,
'url' => $url,
'urlCIS' => $urlCIS,
'fristablauf' => $fristende->format('d.m.Y'),
'pre_wiederholer_sem' => $next_sem,
'wiederholer_sem' => $sem_after_next_sem,
'sem' => $ausbildungssemester
);
// NOTE(chris): Sancho mail
if(sendSanchoMail('Sancho_Mail_Antrag_W_' . $name, $dataMail, $email, $subject))
{
$antrag_id = null;
$result = $this->StudierendenantragModel->loadWhere([
'prestudent_id' => $prestudent->prestudent_id,
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG
]);
if (isError($result))
$this->logError(getError($result));
elseif (hasData($result))
$antrag_id = current(getData($result) ?: []) -> studierendenantrag_id;
if ($antrag_id == null)
{
$result = $this->StudierendenantragModel->insert([
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz'=> $prestudent->studiensemester_kurzbz,
'datum' => date('c'),
'typ' => Studierendenantrag_model::TYP_WIEDERHOLUNG,
'insertvon' => 'AntragJob'
]);
if (isError($result))
$this->logError(getError($result));
else
$antrag_id = getData($result);
}
if ($antrag_id)
{
$result = $this->StudierendenantragstatusModel->insert([
'studierendenantrag_id' => $antrag_id,
'studierendenantrag_statustyp_kurzbz' => $status_to,
'insertvon' => 'AntragJob'
]);
if (isError($result))
$this->logError(getError($result));
}
$count++;
}
}
$this->logInfo($count . " Mails '" . $subject . "' sent");
}
$this->logInfo('Ende Job sendAufforderungWiederholer ' . $name);
}
}
+27 -1
View File
@@ -22,7 +22,33 @@ class IssueResolver extends IssueResolver_Controller
'CORE_INOUT_0003' => 'CORE_INOUT_0003',
'CORE_INOUT_0004' => 'CORE_INOUT_0004',
'CORE_INOUT_0005' => 'CORE_INOUT_0005',
'CORE_INOUT_0006' => 'CORE_INOUT_0006'
'CORE_INOUT_0006' => 'CORE_INOUT_0006',
'CORE_INOUT_0007' => 'CORE_INOUT_0007',
'CORE_INOUT_0008' => 'CORE_INOUT_0008',
'CORE_INOUT_0009' => 'CORE_INOUT_0009',
'CORE_STG_0001' => 'CORE_STG_0001',
'CORE_STG_0002' => 'CORE_STG_0002',
'CORE_STG_0003' => 'CORE_STG_0003',
'CORE_STG_0004' => 'CORE_STG_0004',
'CORE_STUDENTSTATUS_0001' => 'CORE_STUDENTSTATUS_0001',
'CORE_STUDENTSTATUS_0002' => 'CORE_STUDENTSTATUS_0002',
'CORE_STUDENTSTATUS_0003' => 'CORE_STUDENTSTATUS_0003',
'CORE_STUDENTSTATUS_0004' => 'CORE_STUDENTSTATUS_0004',
'CORE_STUDENTSTATUS_0005' => 'CORE_STUDENTSTATUS_0005',
'CORE_STUDENTSTATUS_0006' => 'CORE_STUDENTSTATUS_0006',
'CORE_STUDENTSTATUS_0007' => 'CORE_STUDENTSTATUS_0007',
'CORE_STUDENTSTATUS_0008' => 'CORE_STUDENTSTATUS_0008',
'CORE_STUDENTSTATUS_0009' => 'CORE_STUDENTSTATUS_0009',
'CORE_STUDENTSTATUS_0010' => 'CORE_STUDENTSTATUS_0010',
'CORE_STUDENTSTATUS_0011' => 'CORE_STUDENTSTATUS_0011',
'CORE_STUDENTSTATUS_0012' => 'CORE_STUDENTSTATUS_0012',
'CORE_STUDENTSTATUS_0013' => 'CORE_STUDENTSTATUS_0013',
'CORE_STUDENTSTATUS_0014' => 'CORE_STUDENTSTATUS_0014',
'CORE_STUDENTSTATUS_0015' => 'CORE_STUDENTSTATUS_0015',
'CORE_PERSON_0001' => 'CORE_PERSON_0001',
'CORE_PERSON_0002' => 'CORE_PERSON_0002',
'CORE_PERSON_0003' => 'CORE_PERSON_0003',
'CORE_PERSON_0004' => 'CORE_PERSON_0004'
);
}
}
@@ -0,0 +1,42 @@
<?php
/**
* Job for producing core Plausicheck issues
*/
class PlausiIssueProducer extends PlausiIssueProducer_Controller
{
private $_currentStudiensemester;
protected $_app = 'core';
public function __construct()
{
parent::__construct();
$this->load->library('issues/PlausicheckDefinitionLib');
// load models
$this->load->model('organisation/studiensemester_model', 'StudiensemesterModel');
// get current Studiensemester
$studiensemesterRes = $this->StudiensemesterModel->getAkt();
if (hasData($studiensemesterRes)) $this->_currentStudiensemester = getData($studiensemesterRes)[0]->studiensemester_kurzbz;
// set fehler which can be produced by the job
// structure: fehler_kurzbz => class (library) name for resolving
$this->_fehlerLibMappings = $this->plausicheckdefinitionlib->getFehlerLibMappings();
}
/**
* Runs issue production job.
* @param studiensemester_kurzbz string job is run for students of a certain semester.
* @param studiengang_kz int job is run for students of certain Studiengang.
*/
public function run($studiensemester_kurzbz = null, $studiengang_kz = null)
{
// get Studiensemester
if (isEmptyString($studiensemester_kurzbz)) $studiensemester_kurzbz = $this->_currentStudiensemester;
// producing issues for semester and optionally Studiengang
$this->producePlausicheckIssues(array('studiensemester_kurzbz' => $studiensemester_kurzbz, 'studiengang_kz' => $studiengang_kz));
}
}
@@ -3,6 +3,9 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
class ReihungstestJob extends JOB_Controller
{
const LAST_DAYS_PRESTUDENTSTATUS = 5;
/**
* Constructor
*/
@@ -826,7 +829,7 @@ class ReihungstestJob extends JOB_Controller
AND tbl_studiengang.typ IN ('b', 'm')
)
SELECT * FROM prst
WHERE prestudenstatus_datum >= (SELECT CURRENT_DATE - 1)
WHERE prestudenstatus_datum >= (SELECT CURRENT_DATE - ". self::LAST_DAYS_PRESTUDENTSTATUS .")
AND (studiengang_typ = 'b' OR (studiengang_typ = 'm' AND EXISTS (SELECT 1 /* Master Studiengänge berücksichtigen wenn auch Bachelor im gleichen Semester */
FROM prst prstb
WHERE studiengang_typ = 'b'
@@ -868,7 +871,8 @@ class ReihungstestJob extends JOB_Controller
tbl_person.nachname,
tbl_person.vorname,
tbl_prestudent.*,
tbl_studiengang.typ AS studiengang_typ
tbl_studiengang.typ AS studiengang_typ,
tbl_prestudentstatus.datum
FROM PUBLIC.tbl_person
JOIN PUBLIC.tbl_prestudent USING (person_id)
JOIN PUBLIC.tbl_prestudentstatus USING (prestudent_id)
@@ -901,7 +905,7 @@ class ReihungstestJob extends JOB_Controller
$mailArray[$rowNiedrPrios->studiengang_kz][$rowNiedrPrios->orgform_kurzbz]['AufnahmeHoeherePrio'][]
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
}
elseif ($rowNiedrPrios->laststatus == 'Bewerber')
elseif ($rowNiedrPrios->laststatus == 'Bewerber' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum)
{
// Abgewiesenen-Status mit Statusgrund "Aufnahme anderer Studiengang" (ID 5) setzen
$lastStatus = $this->PrestudentstatusModel->getLastStatus($rowNiedrPrios->prestudent_id);
@@ -927,7 +931,7 @@ class ReihungstestJob extends JOB_Controller
= $rowNiedrPrios->nachname.' '.$rowNiedrPrios->vorname.' ('.$rowNiedrPrios->prestudent_id.')';
}
}
elseif ($rowNiedrPrios->laststatus == 'Wartender')
elseif ($rowNiedrPrios->laststatus == 'Wartender' && $row_ps->prestudenstatus_datum > $rowNiedrPrios->datum)
{
// Abgewiesenen-Status mit Statusgrund "Aufnahme anderer Studiengang" (ID 5) setzen
// Mail zur Info an Assistenz schicken
@@ -0,0 +1,82 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \REST_Controller as REST_Controller;
/**
*/
class Attachment extends FHC_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
$this->load->library('DmsLib');
$this->load->library('AuthLib');
$this->load->library('PermissionLib');
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* @param integer $dms_id
*
* @return void
*/
public function show($dms_id)
{
$result = $this->StudierendenantragModel->loadWhere(['dms_id' => $dms_id]);
if (!getData($result))
return show_404();
if (!$this->permissionlib->isBerechtigt('student/antragfreigabe'))
{
$isSamePerson = false;
$antraege = getData($result);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
foreach ($antraege as $antrag)
{
$prestudent = $this->PrestudentModel->load($antrag->prestudent_id);
if(hasData($prestudent))
{
if(current(getData($prestudent))->person_id == getAuthPersonId())
{
$isSamePerson = true;
break;
}
}
}
if ($isSamePerson == false)
{
$this->output->set_status_header(REST_Controller::HTTP_FORBIDDEN); // set the HTTP header as unauthorized
$this->load->library('EPrintfLib'); // loads the EPrintfLib to format the output
// Prints the main error message
$this->eprintflib->printError('You are not allowed to access to this content');
// Prints the called controller name
$this->eprintflib->printInfo('Controller name: '.$this->router->class);
// Prints the called controller method name
$this->eprintflib->printInfo('Method name: '.$this->router->method);
// Prints the required permissions needed to access to this method
$this->eprintflib->printInfo('Required permissions: student/antragfreigabe');
return show_error('You are not entitled to read this document');
}
}
$result = $this->dmslib->download($dms_id);
if (isError($result))
return show_error(getError($result));
$this->outputFile(getData($result));
}
}
@@ -0,0 +1,48 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \DateTime as DateTime;
use \Studierendenantrag_model as Studierendenantrag_model;
use \REST_Controller as REST_Controller;
/**
*/
class Wiederholung extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct([
'assistenz'=> 'student/studierendenantrag:w'
]);
$this->load->library('AntragLib');
// Load language phrases
$this->loadPhrases([
'studierendenantrag'
]);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
public function assistenz($antrag_id)
{
$result = $this->antraglib->getDetailsForAntrag($antrag_id);
if (isError($result))
return show_error(getError($result));
if (!hasData($result))
return show_404();
$this->load->view('lehre/Antrag/Wiederholung/Student', [
'antrag_id' => $antrag_id,
'antrag' => getData($result)
]);
}
}
@@ -0,0 +1,221 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \stdClass as stdClass;
/**
*/
class Studierendenantrag extends FHC_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
// Load Libraries
$this->load->library('AuthLib');
$this->load->library('AntragLib');
// Load Models
$this->load->model('education/Studierendenantrag_model', 'StudierendenantragModel');
// Load language phrases
$this->loadPhrases([
'studierendenantrag'
]);
if (strtolower($this->router->method) === 'leitung')
$this->_isAllowed([
'leitung' => ['student/studierendenantrag:r', 'student/antragfreigabe:r']
]);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
public function index()
{
$dataAntrag = $this->StudierendenantragModel->loadForPerson(getAuthPersonId());
if (isError($dataAntrag))
return show_error(getError($dataAntrag));
$dataAntrag = (getData($dataAntrag) ? : []);
$prestudentenArr = array();
foreach ($dataAntrag as $antrag)
{
if (!isset($prestudentenArr[$antrag->prestudent_id]))
{
$prestudentenArr[$antrag->prestudent_id] = array(
'allowedNewTypes' => array(),
'antraege'=> array(),
'bezeichnungStg' => $antrag->bezeichnung,
'bezeichnungOrgform' => $antrag->orgform
);
$result = $this->antraglib->getPrestudentWiederholungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Wiederholung';
$result = $this->antraglib->getPrestudentUnterbrechungsBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Unterbrechung';
$result = $this->antraglib->getPrestudentAbmeldeBerechtigt($antrag->prestudent_id);
if (getData($result) == 1)
$prestudentenArr[$antrag->prestudent_id]['allowedNewTypes'][] = 'Abmeldung';
}
if ($antrag->studierendenantrag_id == null)
continue;
if ($antrag->typ == Studierendenantrag_model::TYP_ABMELDUNG_STGL && (!$antrag->isapproved))
continue;
$prestudentenArr[$antrag->prestudent_id]['antraege'][] = $antrag;
}
$this->load->view('lehre/Antrag/Student/List', [
'antraege' => $prestudentenArr
]);
}
public function leitung()
{
$studiengaenge = $this->permissionlib->getSTG_isEntitledFor('student/antragfreigabe');
$stgsNeuanlage = $this->permissionlib->getSTG_isEntitledFor('student/studierendenantrag');
$stgL = [];
if ($studiengaenge) {
$result = $this->StudiengangModel->loadWithOrgform($studiengaenge);
if (isError($result))
return show_error(getError($result));
$antraege = getData($result) ?: [];
foreach ($antraege as $antrag) {
if (!isset($stgL[$antrag->studiengang_kz])) {
$stgL[$antrag->studiengang_kz] = new stdClass();
$stgL[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
$stgL[$antrag->studiengang_kz]->orgform = $antrag->orgform;
$stgL[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
}
}
}
$stgA = [];
if ($stgsNeuanlage) {
$result = $this->StudiengangModel->loadWithOrgform($stgsNeuanlage);
if (isError($result))
return show_error(getError($result));
$antraege = getData($result) ?: [];
foreach ($antraege as $antrag) {
if (!isset($stgA[$antrag->studiengang_kz])) {
$stgA[$antrag->studiengang_kz] = new stdClass();
$stgA[$antrag->studiengang_kz]->bezeichnung = $antrag->bezeichnung;
$stgA[$antrag->studiengang_kz]->orgform = $antrag->orgform;
$stgA[$antrag->studiengang_kz]->studiengang_kz = $antrag->studiengang_kz;
}
}
}
$this->load->view('lehre/Antrag/Leitung/List', [
'stgA' => $stgA,
'stgL' => $stgL
]);
}
public function abmeldung($prestudent_id, $studierendenantrag_id = null)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Abmeldung'
]);
}
public function abmeldungstgl($prestudent_id, $studierendenantrag_id = null)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'AbmeldungStgl'
]);
}
public function unterbrechung($prestudent_id, $studierendenantrag_id = null)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Unterbrechung'
]);
}
public function wiederholung($prestudent_id, $studierendenantrag_id = null)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
'studierendenantrag_id' => $studierendenantrag_id,
'antrag_type' => 'Wiederholung'
]);
}
/**
* 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
* Wrapper for permissionlib->isEntitled
*/
private function _isAllowed($requiredPermissions)
{
// Loads permission lib
$this->load->library('PermissionLib');
// Checks if this user is entitled to access to this content
if (!$this->permissionlib->isEntitled($requiredPermissions, $this->router->method))
{
$this->output->set_status_header(REST_Controller::HTTP_UNAUTHORIZED); // set the HTTP header as unauthorized
$this->load->library('EPrintfLib'); // loads the EPrintfLib to format the output
// Prints the main error message
$this->eprintflib->printError('You are not allowed to access to this content');
// Prints the called controller name
$this->eprintflib->printInfo('Controller name: '.$this->router->class);
// Prints the called controller method name
$this->eprintflib->printInfo('Method name: '.$this->router->method);
// Prints the required permissions needed to access to this method
$this->eprintflib->printInfo('Required permissions: '.$this->_rpsToString($requiredPermissions, $this->router->method));
exit; // immediately terminate the execution
}
}
/**
* Converts an array of permissions to a string that contains them as a comma separated list
* Ex: "<permission 1>, <permission 2>, <permission 3>"
*/
private function _rpsToString($requiredPermissions, $method)
{
$strRequiredPermissions = ''; // string that contains all the required permissions needed to access to this method
if (isset($requiredPermissions[$method])) // if the called method is present in the permissions array
{
// If it is NOT then convert it into an array
$rpsMethod = $requiredPermissions[$method];
if (!is_array($rpsMethod))
{
$rpsMethod = array($rpsMethod);
}
// Copy all the permissions into $strRequiredPermissions separated by a comma
for ($i = 0; $i < count($rpsMethod); $i++)
{
$strRequiredPermissions .= $rpsMethod[$i].', ';
}
$strRequiredPermissions = rtrim($strRequiredPermissions, ', ');
}
return $strRequiredPermissions;
}
}
@@ -0,0 +1,187 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class AdminAnrechnung extends Auth_Controller
{
public function __construct()
{
// Set required permissions
parent::__construct(
array(
'index' => 'lehre/anrechnungszeitfenster:rw',
'save' => 'lehre/anrechnungszeitfenster:rw',
'edit' => 'lehre/anrechnungszeitfenster:rw',
'delete' => 'lehre/anrechnungszeitfenster:rw'
)
);
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungszeitraum_model', 'AnrechnungszeitraumModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
// Load libraries
$this->load->library('WidgetLib');
$this->load->library('PermissionLib');
$this->load->library('AnrechnungLib');
// Load language phrases
$this->loadPhrases(
array(
'global',
'ui',
'lehre',
'anrechnung',
'table'
)
);
$this->_setAuthUID();
$this->setControllerId();
}
public function index()
{
// Set nearest Studiensemester as default
$result = $this->StudiensemesterModel->getNearest();
$studiensemester_kurzbz = hasData($result) ? getData($result)[0]->studiensemester_kurzbz : '';
// Get existing Anrechnungszeitraeume
$this->AnrechnungszeitraumModel->addOrder('anrechnungszeitraum_id', 'DESC');
$result = $this->AnrechnungszeitraumModel->load();
$anrechnungszeitraum_arr = hasData($result) ? getData($result) : array();
$viewData = array(
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'anrechnungszeitraum_arr' => $anrechnungszeitraum_arr
);
$this->load->view('lehre/anrechnung/adminAnrechnung.php', $viewData);
}
/**
* Save new Anrechnungszeitraum.
*/
public function save()
{
$this->_validate($this->input->post());
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
$anrechnungstart = $this->input->post('anrechnungstart');
$anrechnungende = $this->input->post('anrechnungende');
$result = $this->AnrechnungszeitraumModel->insertAzr($studiensemester_kurzbz, $anrechnungstart, $anrechnungende);
if (isError($result))
{
$this->terminateWithJsonError(getError($result));
}
if (hasData($result))
{
$this->outputJsonSuccess(array('anrechnungszeitraum_id' => getData($result)));
}
}
/**
* Edit Anrechnungszeitraum.
*/
public function edit()
{
$this->_validate($this->input->post());
$anrechnungszeitraum_id = $this->input->post('anrechnungszeitraum_id');
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
$anrechnungstart = $this->input->post('anrechnungstart');
$anrechnungende = $this->input->post('anrechnungende');
$result = $this->AnrechnungszeitraumModel->updateAzr(
$anrechnungszeitraum_id,
$studiensemester_kurzbz,
$anrechnungstart,
$anrechnungende
);
if (isError($result))
{
$this->terminateWithJsonError(getError($result));
}
if (hasData($result))
{
$this->outputJsonSuccess(array('anrechnungszeitraum_id' => getData($result)));
}
}
/**
* Delete Anrechnungszeitraum.
*/
public function delete()
{
$anrechnungszeitraum_id = $this->input->post('anrechnungszeitraum_id');
$result = $this->AnrechnungszeitraumModel->deleteAzr($anrechnungszeitraum_id);
if (isError($result))
{
$this->terminateWithJsonError(getError($result));
}
if (hasData($result))
{
$this->outputJsonSuccess(array('anrechnungszeitraum_id' => getData($result)));
}
}
/**
* Validates post parameters.
*
* @param $post
*/
private function _validate($post)
{
$studiensemester_kurzbz = $post['studiensemester_kurzbz'];
$anrechnungstart = $post['anrechnungstart'];
$anrechnungende = $post['anrechnungende'];
if (isEmptyString($studiensemester_kurzbz)
|| isEmptyString($anrechnungstart)
|| isEmptyString($anrechnungende))
{
$this->terminateWithJsonError($this->p->t('ui', 'errorFelderFehlen'));
}
if ($anrechnungstart > $anrechnungende)
{
$this->terminateWithJsonError($this->p->t('ui', 'errorStartdatumNachEndedatum'));
}
$result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
$studiensemester = getData($result)[0];
if ($anrechnungstart < $studiensemester->start || $anrechnungstart > $studiensemester->ende)
{
$this->terminateWithJsonError($this->p->t('ui', 'errorStartdatumNichtInStudiensemester'));
}
if ($anrechnungende < $studiensemester->start || $anrechnungende > $studiensemester->ende)
{
$this->terminateWithJsonError($this->p->t('ui', 'errorEndedatumNichtInStudiensemester'));
}
}
/**
* 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');
}
}
@@ -33,6 +33,9 @@ class approveAnrechnungDetail extends Auth_Controller
)
);
//Load configs
$this->load->config('anrechnung');
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
@@ -90,7 +93,8 @@ class approveAnrechnungDetail extends Auth_Controller
$antragData = $this->anrechnunglib->getAntragData(
$anrechnungData->prestudent_id,
$anrechnungData->studiensemester_kurzbz,
$anrechnungData->lehrveranstaltung_id
$anrechnungData->lehrveranstaltung_id,
$anrechnungData->anrechnung_id
);
// Get Empfehlung data
@@ -209,71 +213,64 @@ class approveAnrechnungDetail extends Auth_Controller
*/
public function requestRecommendation()
{
$data = $this->input->post('data');
$anrechnung_id = $this->input->post('anrechnung_id');
if(isEmptyArray($data))
if(isEmptyString($anrechnung_id))
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
$retval = array();
$counter = 0;
// Check if Anrechnungs-LV has lector
if (!$this->anrechnunglib->LVhasLector($anrechnung_id))
{
$this->terminateWithJsonError('LV has no lector');
}
foreach ($data as $item)
{
// Check if Anrechnungs-LV has lector
if (!$this->anrechnunglib->LVhasLector($item['anrechnung_id']))
{
// Count up LV with no lector
$counter++;
// Get Fachbereichsleitung or LV Leitung.
if($this->config->item('fbl') === TRUE)
{
$result = $this->anrechnunglib->getLeitungOfLvOe($anrechnung_id);
}
else
{
// If LV Leitung is not present, gets all LV lectors.
$result = $this->anrechnunglib->getLectors($anrechnung_id);
}
// Break, if LV has no lector
break;
}
$empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, 'fullname')) : '';
// 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']))
{
$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,
'empfehlungsanfrageAm' => (new DateTime())->format('d.m.Y'),
'empfehlungsanfrageAn' => $empfehlungsanfrage_an
);
}
}
/**
* 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);
}
// Request Recommendation
if ($this->anrechnunglib->requestRecommendation($anrechnung_id))
{
$retval[]= array(
'anrechnung_id' => $anrechnung_id,
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR),
'empfehlung_anrechnung' => null,
'empfehlungsanfrageAm' => (new DateTime())->format('d.m.Y'),
'empfehlungsanfrageAn' => $empfehlungsanfrage_an
);
}
// Output json to ajax
if (isEmptyArray($retval) && $counter > 0)
{
return $this->outputJsonError(
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
);
}
if ($empfehlungsanfrage_an == '')
{
$this->terminateWithJsonError(
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
);
}
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
if (isEmptyArray($retval))
{
$this->terminateWithJsonError("Empfehlung wurde nicht angefordert");
}
else
{
// Output json to ajax
return $this->outputJsonSuccess($retval);
}
}
/**
@@ -467,39 +464,33 @@ class approveAnrechnungDetail extends Auth_Controller
/**
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
* @param $mail_params
* @param $anrechnung_id
* @return bool
*/
private function _sendSanchoMailToLectors($mail_params)
private function _sendSanchoMailToLectors($anrechnung_id)
{
// Get Lehrveranstaltungen
$anrechnung_arr = array();
foreach ($mail_params as $item)
{
$this->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz');
$anrechnung_arr[]= array(
'lehrveranstaltung_id' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->lehrveranstaltung_id,
'studiensemester_kurzbz' => $this->AnrechnungModel->load($item['anrechnung_id'])->retval[0]->studiensemester_kurzbz
);
}
$anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR);
$lehrveranstaltung_id = $this->AnrechnungModel->load($anrechnung_id)->retval[0]->lehrveranstaltung_id;
$studiensemester_kurzbz = $this->AnrechnungModel->load($anrechnung_id)->retval[0]->studiensemester_kurzbz;
/**
* Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
* Get mail receivers.
* If config is default (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.
* **/
$lector_arr = $this->_getLectors($anrechnung_arr);
if ($this->config->item('fbl') === TRUE)
{
$receiver_arr = $this->_getLeitungOfLvOe($lehrveranstaltung_id);
}
else
{
$receiver_arr = $this->_getLectors($studiensemester_kurzbz, $lehrveranstaltung_id);
}
// Send mail to lectors
foreach ($lector_arr as $lector)
// Send mail
foreach ($receiver_arr as $receiver)
{
$to = $lector->uid;
$vorname = $lector->vorname;
$to = $receiver->uid. '@'. DOMAIN;;
$vorname = $receiver->vorname;
// Get full name of stgl
$this->load->model('person/Person_model', 'PersonModel');
@@ -537,35 +528,30 @@ class approveAnrechnungDetail extends Auth_Controller
* @param $anrechnung_arr
* @return array
*/
private function _getLectors($anrechnung_arr)
private function _getLectors($studiensemester_kurzbz, $lehrveranstaltung_id)
{
$lector_arr = array();
// Get lectors
foreach($anrechnung_arr as $anrechnung)
{
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
$result = $this->LehrveranstaltungModel->getLecturersByLv($anrechnung['studiensemester_kurzbz'], $anrechnung['lehrveranstaltung_id']);
$result = $this->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lehrveranstaltung_id);
if (!$result = getData($result))
{
show_error('Failed retrieving lectors of Lehrveranstaltung');
}
if (!$result = getData($result))
{
show_error('Failed retrieving lectors of Lehrveranstaltung');
}
// Check if lv has LV-Leitung
$key = array_search(true, array_column($result, 'lvleiter'));
// 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);
}
}
// 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
@@ -584,6 +570,14 @@ class approveAnrechnungDetail extends Auth_Controller
}
// Get Leitungen of Lehrveranstaltungs-Organisationseinheit
private function _getLeitungOfLvOe($lehrveranstaltung_id)
{
$result = $this->LehrveranstaltungModel->getLeitungOfLvOe($lehrveranstaltung_id);
return hasData($result) ? getData($result) : show_error('Failed retrieving Leitung of Lehrveranstaltungs-Organisationseinheit');
}
private function _saveEmpfehlungsNotiz($anrechnung_id, $empfehlungstext, $notiz_id)
{
$this->load->model('person/Notiz_model', 'NotizModel');
@@ -606,8 +600,5 @@ class approveAnrechnungDetail extends Auth_Controller
trim($empfehlungstext),
$this->_uid
);
}
}
@@ -28,6 +28,9 @@ class approveAnrechnungUebersicht extends Auth_Controller
)
);
// Load configs
$this->load->config('anrechnung');
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
@@ -78,6 +81,19 @@ class approveAnrechnungUebersicht extends Auth_Controller
show_error(getError($studiengang_kz_arr));
}
// Get oes the user is entitled for
$oe_kurzbz_arr_schreibberechtigt = array();
if ($oe_arr = $this->permissionlib->getOE_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN))
{
foreach($oe_arr as $oe)
{
$berechtigt = $this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid', $oe);
if ($berechtigt) $oe_kurzbz_arr_schreibberechtigt[]= $oe;
}
}
// Check if permission is readonly
$hasReadOnlyAccess =
$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 's')
&& !$this->permissionlib->isBerechtigt(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN, 'suid');
@@ -87,9 +103,11 @@ class approveAnrechnungUebersicht extends Auth_Controller
$viewData = array(
'studiensemester_selected' => $studiensemester_kurzbz,
'studiengaenge_entitled' => $studiengang_kz_arr,
'studiengaenge_entitled' => $studiengang_kz_arr, // alle STG mit Lese- und Schreibberechtigung
'oes_schreibberechtigt' => $oe_kurzbz_arr_schreibberechtigt, // alle STG nur mit Schreibberechtigung
'hasReadOnlyAccess' => $hasReadOnlyAccess,
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess
'hasCreateAnrechnungAccess' => $hasCreateAnrechnungAccess,
'configFachbereichsleitung' => $this->config->item('fbl')
);
$this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
@@ -207,14 +225,20 @@ class approveAnrechnungUebersicht extends Auth_Controller
// 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 = $this->anrechnunglib->getLectors($item['anrechnung_id']);
$empfehlungsanfrage_an = !isEmptyArray($lector_arr)
? implode(', ', array_column($lector_arr, 'fullname'))
: '';
// Get full name of Fachbereichsleitung or LV Leitung.
if($this->config->item('fbl') === TRUE)
{
$result = $this->anrechnunglib->getLeitungOfLvOe($item['anrechnung_id']);
}
else
{
// If LV Leitung is not present, get full name of LV lectors.
$result = $this->anrechnunglib->getLectors($item['anrechnung_id']);
}
$retval[]= array(
$empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, '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),
@@ -225,23 +249,18 @@ class approveAnrechnungUebersicht 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
if (isEmptyArray($retval) && $counter == 0)
if (isEmptyArray($retval))
{
return $this->outputJsonError('Es wurden keine Empfehlungen angefordert');
if ($counter > 0)
{
$this->terminateWithJsonError('Bei '. $counter.' LV sind keine LektorInnen zugeteilt.');
}
$this->terminateWithJsonError('Es wurden keine Empfehlungen angefordert');
}
return $this->outputJsonSuccess($retval);
$this->outputJsonSuccess($retval);
}
/**
@@ -316,7 +335,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
* @param $mail_params
* @return bool
*/
private function _sendSanchoMailToLectors($mail_params)
private function _sendSanchoMail($mail_params)
{
// Get Lehrveranstaltungen
$anrechnung_arr = array();
@@ -332,18 +351,25 @@ class approveAnrechnungUebersicht extends Auth_Controller
$anrechnung_arr = array_unique($anrechnung_arr, SORT_REGULAR);
/**
* 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.
* **/
$lector_arr = $this->_getLectors($anrechnung_arr);
/**
* Get mail receivers.
* If retrieving lectors: prio for LV-Leitung, if not present to all lectors of LV.
* This function will receive a unique array to avoid sending more mails to one and the same user.
**/
if($this->config->item('fbl') === TRUE)
{
$receiver_arr = $this->_getLeitungOfLvOe($anrechnung_arr);
}
else
{
$receiver_arr = $this->_getLectors($anrechnung_arr);
}
// Send mail to lectors
foreach ($lector_arr as $lector)
foreach ($receiver_arr as $receiver)
{
$to = $lector->uid;
$vorname = $lector->vorname;
$to = $receiver->uid. '@'. DOMAIN;
$vorname = $receiver->vorname;
// Get full name of stgl
$this->load->model('person/Person_model', 'PersonModel');
@@ -427,4 +453,34 @@ class approveAnrechnungUebersicht extends Auth_Controller
return $lector_arr;
}
/**
* Get Leitungen of Lehrveranstaltungs-Organisationseinheit with unique uids.
*
* @param $anrechnung_arr
* @return array
*/
private function _getLeitungOfLvOe($anrechnung_arr)
{
$oeLeitung_arr = array();
// Get Leitungen
foreach($anrechnung_arr as $anrechnung)
{
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
$result = $this->LehrveranstaltungModel->getLeitungOfLvOe($anrechnung['lehrveranstaltung_id']);
if (!hasData($result))
{
show_error('No Leitung found');
}
$oeLeitung_arr = array_merge($oeLeitung_arr, getData($result));
}
// Make array unique
$oeLeitung_arr = array_unique($oeLeitung_arr, SORT_REGULAR);
return $oeLeitung_arr;
}
}
@@ -80,11 +80,7 @@ class requestAnrechnung extends Auth_Controller
$prestudent_id = getData($result)[0]->prestudent_id;
// Check if application deadline is expired
$is_expired = self::_isExpired(
$this->config->item('submit_application_start'),
$this->config->item('submit_application_end'),
$studiensemester_kurzbz
);
$is_expired = $this->_isExpired($studiensemester_kurzbz);
// Check if Lehrveranstaltung was already graded with application blocking grades
$is_blocked = self::_LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id);
@@ -93,7 +89,7 @@ class requestAnrechnung extends Auth_Controller
$anrechnungData = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id);
// Get Antrag data
$antragData = $this->anrechnunglib->getAntragData($prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id);
$antragData = $this->anrechnunglib->getAntragData($prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id, $anrechnungData->anrechnung_id);
$viewData = array(
'antragData' => $antragData,
@@ -115,6 +111,8 @@ class requestAnrechnung extends Auth_Controller
$lehrveranstaltung_id = $this->input->post('lv_id');
$studiensemester_kurzbz = $this->input->post('studiensemester');
$bestaetigung = $this->input->post('bestaetigung');
$begruendung_ects = $this->input->post('begruendung_ects');
$begruendung_lvinhalt = $this->input->post('begruendung_lvinhalt');
// Validate data
if (empty($_FILES['uploadfile']['name']))
@@ -125,7 +123,9 @@ class requestAnrechnung extends Auth_Controller
if (isEmptyString($begruendung_id) ||
isEmptyString($anmerkung) ||
isEmptyString($lehrveranstaltung_id) ||
isEmptyString($studiensemester_kurzbz))
isEmptyString($studiensemester_kurzbz) ||
isEmptyString($begruendung_ects) ||
isEmptyString($begruendung_lvinhalt))
{
return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen'));
}
@@ -176,7 +176,9 @@ class requestAnrechnung extends Auth_Controller
$lehrveranstaltung_id,
$begruendung_id,
$lastInsert_dms_id,
$anmerkung
$anmerkung,
$begruendung_ects,
$begruendung_lvinhalt
);
if (isError($result))
@@ -234,32 +236,30 @@ class requestAnrechnung extends Auth_Controller
* @return bool True if deadline is expired
* @throws Exception
*/
private function _isExpired($start, $ende, $studiensemester_kurzbz)
private function _isExpired($studiensemester_kurzbz)
{
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$today = new DateTime('today midnight');
// If start is not given, set to Semesterstart.
if (!isset($start) || isEmptyString($start))
{
$this->StudiensemesterModel->addSelect('start');
$result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
$start = getData($result)[0]->start;
}
// Load all Anrechnungszeitfenster for this Studiensemester
$this->load->model('education/Anrechnungszeitraum_model', 'AnrechnungszeitraumModel');
$result = $this->AnrechnungszeitraumModel->loadWhere(array('studiensemester_kurzbz' => $studiensemester_kurzbz));
// If ende is not given, set to Semesterende.
if (!isset($ende) || isEmptyString($ende))
{
$this->StudiensemesterModel->addSelect('ende');
$result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
$ende = getData($result)[0]->ende;
}
if (hasData($result))
{
// Loop through Anrechnungszeitfenster
foreach (getData($result) as $azrObj)
{
$start = new DateTime($azrObj->anrechnungstart);
$ende = new DateTime($azrObj->anrechnungende);
$today = new DateTime('today midnight');
$start = new DateTime($start);
$ende = new DateTime($ende);
// Return false if today is at least within one Anrechnungszeitraum
if (($today >= $start && $today <= $ende)) return false;
// True if expired
return ($today < $start || $today > $ende);
}
}
// Return true if today is in none Anrechnungszeitraum
return true;
}
/**
@@ -28,6 +28,9 @@ class reviewAnrechnungDetail extends Auth_Controller
)
);
// Load configs
$this->load->config('anrechnung');
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
@@ -84,16 +87,21 @@ class reviewAnrechnungDetail extends Auth_Controller
$antragData = $this->anrechnunglib->getAntragData(
$anrechnungData->prestudent_id,
$anrechnungData->studiensemester_kurzbz,
$anrechnungData->lehrveranstaltung_id
$anrechnungData->lehrveranstaltung_id,
$anrechnungData->anrechnung_id
);
// Get Empfehlung data
$empfehlungData = $this->anrechnunglib->getEmpfehlungData($anrechnung_id);
// False if LV-Leitung is present and user is not LV-Leitung. Otherwise always true.
$isEmpfehlungsberechtigt = $this->anrechnunglib->isEmpfehlungsberechtigt($anrechnung_id);
$viewData = array(
'antragData' => $antragData,
'anrechnungData' => $anrechnungData,
'empfehlungData' => $empfehlungData
'empfehlungData' => $empfehlungData,
'isEmpfehlungsberechtigt' => $isEmpfehlungsberechtigt
);
$this->load->view('lehre/anrechnung/reviewAnrechnungDetail.php', $viewData);
@@ -140,10 +148,13 @@ class reviewAnrechnungDetail extends Auth_Controller
* Send mails to STGL (if not present STGL, send to STGL assistance)
* NOTE: mails are sent at the end to ensure sending only one mail to each STGL
* */
if (!$this->_sendSanchoMails($json, true))
{
return $this->outputJsonError('Failed sending emails');
}
if ($this->config->item('send_mail') === TRUE)
{
if (!$this->_sendSanchoMails($json, true))
{
return $this->outputJsonError('Failed sending emails');
}
}
return $this->outputJsonSuccess($json);
}
@@ -191,10 +202,13 @@ class reviewAnrechnungDetail extends Auth_Controller
if (isset($json) && !isEmptyArray($json))
{
// Send mails to STGL (if not present STGL, send to STGL assistance)
if (!$this->_sendSanchoMails($json, false))
{
return $this->outputJsonError('Failed sending emails');
}
if ($this->config->item('send_mail') === TRUE)
{
if (!$this->_sendSanchoMails($json, false))
{
return $this->outputJsonError('Failed sending emails');
}
}
return $this->outputJsonSuccess($json);
}
@@ -253,8 +267,14 @@ class reviewAnrechnungDetail extends Auth_Controller
show_error('Failed retrieving Anrechnung');
}
$result = $this->LehrveranstaltungModel
->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
if($this->config->item('fbl') === TRUE)
{
$result = $this->LehrveranstaltungModel->getLeitungOfLvOe($result->lehrveranstaltung_id);
}
else
{
$result = $this->LehrveranstaltungModel->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
}
if($result = getData($result))
{
@@ -282,14 +302,20 @@ class reviewAnrechnungDetail extends Auth_Controller
show_error('Failed retrieving Anrechnung');
}
$result = $this->LehrveranstaltungModel
->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
if($this->config->item('fbl') === TRUE)
{
$result = $this->LehrveranstaltungModel->getLeitungOfLvOe($result->lehrveranstaltung_id);
}
else
{
$result = $this->LehrveranstaltungModel->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
}
if($result = getData($result))
{
$entitled_lector_arr = array_column($result, 'uid');
$entitled_uid_arr = array_column($result, 'uid');
if (in_array($this->_uid, $entitled_lector_arr))
if (in_array($this->_uid, $entitled_uid_arr))
{
return;
}
@@ -26,6 +26,9 @@ class reviewAnrechnungUebersicht extends Auth_Controller
)
);
// Load configs
$this->load->config('anrechnung');
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
@@ -72,7 +75,8 @@ class reviewAnrechnungUebersicht extends Auth_Controller
}
$viewData = array(
'studiensemester_selected' => $studiensemester_kurzbz
'studiensemester_selected' => $studiensemester_kurzbz,
'configFachbereichsleitung' => $this->config->item('fbl')
);
$this->load->view('lehre/anrechnung/reviewAnrechnungUebersicht.php', $viewData);
@@ -111,16 +115,19 @@ class reviewAnrechnungUebersicht extends Auth_Controller
* Send mails to STGL (if not present STGL, send to STGL assistance)
* NOTE: mails are sent at the end to ensure sending only one mail to each STGL
* */
if (!$this->_sendSanchoMails($json, true))
{
show_error('Failed sending emails');
}
if ($this->config->item('send_mail') === TRUE)
{
if (!$this->_sendSanchoMails($json, true))
{
show_error('Failed sending emails');
}
}
return $this->outputJsonSuccess($json);
}
else
{
return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
$this->terminateWithJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
}
}
@@ -154,10 +161,13 @@ class reviewAnrechnungUebersicht extends Auth_Controller
if (isset($json) && !isEmptyArray($json))
{
// Send mails to STGL (if not present STGL, send to STGL assistance)
if (!$this->_sendSanchoMails($json, false))
{
show_error('Failed sending emails');
}
if ($this->config->item('send_mail') === TRUE)
{
if (!$this->_sendSanchoMails($json, false))
{
show_error('Failed sending emails');
}
}
return $this->outputJsonSuccess($json);
}
@@ -217,14 +227,20 @@ class reviewAnrechnungUebersicht extends Auth_Controller
show_error('Failed retrieving Anrechnung');
}
$result = $this->LehrveranstaltungModel
->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
if ($this->config->item('fbl') === TRUE)
{
$result = $this->LehrveranstaltungModel->getLeitungOfLvOe($result->lehrveranstaltung_id);
}
else
{
$result = $this->LehrveranstaltungModel->getLecturersByLv($result->studiensemester_kurzbz, $result->lehrveranstaltung_id);
}
if($result = getData($result))
{
$entitled_lector_arr = array_column($result, 'uid');
$entitled_uid_arr = array_column($result, 'uid');
if (in_array($this->_uid, $entitled_lector_arr))
if (in_array($this->_uid, $entitled_uid_arr))
{
return;
}
@@ -78,8 +78,8 @@ class Gruppenmanagement extends Auth_Controller
}
/**
* Gets Benutzer assigned to a Gruppe
*/
* Gets Benutzer assigned to a Gruppe
*/
public function getBenutzer()
{
$gruppe_kurzbz = $this->input->get('gruppe_kurzbz');
@@ -93,8 +93,8 @@ class Gruppenmanagement extends Auth_Controller
}
/**
* Gets all Benutzer for assignment to Gruppe
*/
* Gets all Benutzer for assignment to Gruppe
*/
public function getAllBenutzer()
{
$this->BenutzerModel->addSelect('uid, vorname, nachname');
@@ -1,4 +1,20 @@
<?php
/**
* Copyright (C) 2022 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
@@ -0,0 +1,44 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Test Search Vue Component
*/
class TestSearch extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct(
array(
'index' => 'system/developer:r'
)
);
// Loads WidgetLib
$this->load->library('WidgetLib');
// Loads phrases system
$this->loadPhrases(
array(
'global',
'ui',
'filter'
)
);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Everything has a beginning
*/
public function index()
{
$this->load->view('system/logs/testSearch.php');
}
}
@@ -21,6 +21,7 @@ class InfoCenter extends Auth_Controller
const FREIGEGEBEN_PAGE = 'freigegeben';
const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert';
const ABGEWIESEN_PAGE = 'abgewiesen';
const AUFGENOMMEN_PAGE = 'aufgenommen';
const SHOW_DETAILS_PAGE = 'showDetails';
const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails';
const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung';
@@ -115,12 +116,14 @@ class InfoCenter extends Auth_Controller
'index' => 'infocenter:r',
'freigegeben' => 'infocenter:r',
'abgewiesen' => 'infocenter:r',
'aufgenommen' => 'infocenter:r',
'reihungstestAbsolviert' => 'infocenter:r',
'showDetails' => 'infocenter:r',
'showZGVDetails' => 'lehre/zgvpruefung:r',
'unlockPerson' => 'infocenter:rw',
'saveFormalGeprueft' => 'infocenter:rw',
'saveDocTyp' => 'infocenter:rw',
'updateStammdaten' => 'infocenter:rw',
'saveNachreichung' => 'infocenter:rw',
'getPrestudentData' => 'infocenter:r',
'getLastPrestudentWithZgvJson' => 'infocenter:r',
@@ -141,12 +144,6 @@ class InfoCenter extends Auth_Controller
'reloadNotizen' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'reloadLogs' => 'infocenter:r',
'outputAkteContent' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'getPostponeDate' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'park' => 'infocenter:rw',
'unpark' => 'infocenter:rw',
'setOnHold' => 'infocenter:rw',
'removeOnHold' => array('infocenter:rw', 'lehre/zgvpruefung:rw'),
'getStudienjahrEnd' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'setNavigationMenuArrayJson' => 'infocenter:r',
'getAbsageData' => 'infocenter:r',
'saveAbsageForAll' => 'infocenter:rw',
@@ -163,6 +160,7 @@ class InfoCenter extends Auth_Controller
$this->load->model('crm/Statusgrund_model', 'StatusgrundModel');
$this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel');
$this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel');
$this->load->model('crm/Rueckstellung_model', 'RueckstellungModel');
$this->load->model('person/Notiz_model', 'NotizModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->model('system/Message_model', 'MessageModel');
@@ -172,11 +170,16 @@ class InfoCenter extends Auth_Controller
$this->load->model('codex/Zgv_model', 'ZgvModel');
$this->load->model('codex/Zgvmaster_model', 'ZgvmasterModel');
$this->load->model('codex/Nation_model', 'NationModel');
$this->load->model('person/Kontakt_model', 'KontaktModel');
$this->load->model('person/Geschlecht_model', 'GeschlechtModel');
$this->load->model('person/adresse_model', 'AdresseModel');
// Loads libraries
$this->load->library('PersonLogLib');
$this->load->library('WidgetLib');
$this->load->config('infocenter');
$this->loadPhrases(
array(
'global',
@@ -227,6 +230,16 @@ class InfoCenter extends Auth_Controller
$this->load->view('system/infocenter/infocenterAbgewiesen.php');
}
/**
* Aufgenommene page of the InfoCenter tool
*/
public function aufgenommen()
{
$this->_setNavigationMenu(self::AUFGENOMMEN_PAGE); // define the navigation menu for this page
$this->load->view('system/infocenter/infocenterAufgenommen.php');
}
/**
*
@@ -313,7 +326,7 @@ class InfoCenter extends Auth_Controller
show_error('Person does not exist!');
$origin_page = $this->input->get(self::ORIGIN_PAGE);
if ($origin_page == self::INDEX_PAGE)
if (in_array($origin_page, array(self::INDEX_PAGE, self::ABGEWIESEN_PAGE)))
{
// mark person as locked for editing
$result = $this->PersonLockModel->lockPerson($person_id, $this->_uid, self::APP);
@@ -358,7 +371,14 @@ class InfoCenter extends Auth_Controller
if (isError($result)) show_error(getError($result));
$redirectLink = '/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
$origin_page = $this->input->get(self::ORIGIN_PAGE);
if ($origin_page === self::ABGEWIESEN_PAGE)
$redirectLink = self::INFOCENTER_URI. '/' .self::ABGEWIESEN_PAGE;
else
$redirectLink = '/'.self::INFOCENTER_URI;
$redirectLink .= '?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
// Force reload of Dataset after Unlock
$redirectLink .= '&'.self::KEEP_TABLESORTER_FILTER.'=true';
@@ -600,7 +620,7 @@ class InfoCenter extends Auth_Controller
}
/**
* Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang
* Sendet bei einer neuen ZGV Prüfung eine Mail an den Studiengang
*/
private function sendZgvMail($mail, $typ, $person){
$data = array(
@@ -691,7 +711,7 @@ class InfoCenter extends Auth_Controller
/**
* Fügt einen neuen ZGV Status hinzu oder updated einen bestehenden
* Falls es erfolgreich war, sendet er die Mail raus
* Falls es erfolgreich war, wird eine Mail rausgeschickt
*/
public function zgvRueckfragen()
{
@@ -745,7 +765,8 @@ class InfoCenter extends Auth_Controller
$this->sendZgvMail($mail, $typ, $person);
elseif (isError($insert))
$this->terminateWithJsonError('Fehler beim Speichern');
}else
}
else
{
$insert = $this->ZGVPruefungModel->insert(
array(
@@ -775,7 +796,7 @@ class InfoCenter extends Auth_Controller
}
$hold = false;
if ($this->personloglib->getOnHoldDate($person_id) !== null)
if (hasData($this->RueckstellungModel->getByPersonId($person_id, 'onhold_zgv')))
$hold = true;
$this->outputJsonSuccess(
@@ -1111,14 +1132,14 @@ class InfoCenter extends Auth_Controller
public function reloadDoks($person_id)
{
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true);
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true, false);
$this->load->view('system/infocenter/dokNachzureichend.php', array('dokumente_nachgereicht' => $dokumente_nachgereicht->retval));
}
public function reloadUebersichtDoks($person_id)
{
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false);
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false, false);
$this->DokumentModel->addOrder('bezeichnung');
$dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load())));
@@ -1156,107 +1177,7 @@ class InfoCenter extends Auth_Controller
->set_output($aktecontent->retval)
->_display();
}
/**
* Gets the date until which a person is parked
* @param $person_id
*/
public function getPostponeDate($person_id)
{
$result = array(
'type' => null,
'date' => null
);
$parkedDate = $this->personloglib->getParkedDate($person_id);
if (isset($parkedDate))
{
$result['type'] = 'parked';
$result['date'] = $parkedDate;
}
else
{
$onholdDate = $this->personloglib->getOnHoldDate($person_id);
if (isset($onholdDate))
{
$result['type'] = 'onhold';
$result['date'] = $onholdDate;
}
}
$this->outputJsonSuccess($result);
}
/**
* Initializes parking of a person, i.e. a person is not expected to do any actions while parked
*/
public function park()
{
$person_id = $this->input->post('person_id');
$date = $this->input->post('parkdate');
$result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->_uid);
$this->outputJson($result);
}
/**
* Removes parking of a person
*/
public function unPark()
{
$person_id = $this->input->post('person_id');
$result = $this->personloglib->unPark($person_id);
$this->outputJson($result);
}
/**
* Sets a person on hold ("zurückstellen")
*/
public function setOnHold()
{
$person_id = $this->input->post('person_id');
$date = $this->input->post('onholddate');
$result = $this->personloglib->setOnHold($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->_uid);
$this->outputJson($result);
}
/**
* Removed on hold status of a person
*/
public function removeOnHold()
{
$person_id = $this->input->post('person_id');
$result = $this->personloglib->removeOnHold($person_id);
$this->outputJson($result);
}
/**
* Gets the End date of the current Studienjahr
*/
public function getStudienjahrEnd()
{
$this->load->model('organisation/studienjahr_model', 'StudienjahrModel');
$result = $this->StudienjahrModel->getCurrStudienjahr();
$json = null;
if (hasData($result))
{
$json = $result->retval[0]->ende;
}
$this->outputJsonSuccess(array($json));
}
/**
* Wrapper for setNavigationMenu, returns JSON message
@@ -1320,6 +1241,126 @@ class InfoCenter extends Auth_Controller
$this->outputJsonSuccess('success');
}
public function updateStammdaten()
{
if (isEmptyString($this->input->post('nachname')) ||
isEmptyString($this->input->post('geschlecht')) ||
isEmptyString($this->input->post('gebdatum')))
{
$this->terminateWithJsonError($this->p->t('infocenter', 'stammdatenFeldFehlt'));
}
$datum = explode('.', $this->input->post('gebdatum'));
if (!checkdate($datum[1], $datum[0], $datum[2]))
{
$this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig'));
}
$person_id = $this->input->post('personid');
$update = $this->PersonModel->update(
array
(
'person_id' => $person_id
),
array
(
'titelpre' => isEmptyString($this->input->post('titelpre')) ? null : $this->input->post('titelpre'),
'vorname' => isEmptyString($this->input->post('vorname')) ? null : $this->input->post('vorname'),
'nachname' => $this->input->post('nachname'),
'titelpost' => isEmptyString($this->input->post('titelpost')) ? null : $this->input->post('titelpost'),
'gebdatum' => isEmptyString($this->input->post('gebdatum')) ? null : date("Y-m-d", strtotime($this->input->post('gebdatum'))),
'svnr' => isEmptyString($this->input->post('svnr')) ? null : $this->input->post('svnr'),
'staatsbuergerschaft' => isEmptyString($this->input->post('buergerschaft')) ? null : $this->input->post('buergerschaft'),
'geschlecht' => $this->input->post('geschlecht'),
'geburtsnation' => isEmptyString($this->input->post('gebnation')) ? null : $this->input->post('gebnation'),
'gebort' => isEmptyString($this->input->post('gebort')) ? null : $this->input->post('gebort'),
'updateamum' => date('Y-m-d H:i:s'),
'updatevon' => $this->_uid
)
);
if (isError($update))
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
$kontakte = $this->input->post('kontakt');
foreach ($kontakte as $kontakt)
{
$kontaktExists = $this->KontaktModel->loadWhere(array(
'kontakt_id' => $kontakt['id'],
'person_id' => $person_id,
));
if (hasData($kontaktExists))
{
$kontaktExists = getData($kontaktExists)[0];
if ($kontaktExists->kontakt === $kontakt['value'])
continue;
$update = $this->KontaktModel->update(
array
(
'kontakt_id' => $kontakt['id']
),
array
(
'kontakt' => isEmptyString($kontakt['value']) ? null : $kontakt['value'],
'updateamum' => date('Y-m-d H:i:s'),
'updatevon' => $this->_uid
)
);
if (isError($update))
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
}
}
$adressen = $this->input->post('adresse');
foreach ($adressen as $adresse)
{
$adresseExists = $this->AdresseModel->loadWhere(array(
'adresse_id' => $adresse['id'],
'person_id' => $person_id,
));
if (hasData($adresseExists))
{
$adresse = $adresse['value'];
$adresseExists = getData($adresseExists)[0];
if ($adresseExists->strasse !== $adresse['strasse'] ||
$adresseExists->plz !== $adresse['plz'] ||
$adresseExists->ort !== $adresse['ort'] ||
$adresseExists->nation !== $adresse['nation'])
{
$update = $this->AdresseModel->update(
array
(
'adresse_id' => $adresseExists->adresse_id
),
array
(
'strasse' => isEmptyString($adresse['strasse']) ? null : $adresse['strasse'],
'plz' => isEmptyString($adresse['plz']) ? null : $adresse['plz'],
'ort' => isEmptyString($adresse['ort']) ? null : $adresse['ort'],
'nation' => isEmptyString($adresse['nation']) ? null : $adresse['nation'],
'updateamum' => date('Y-m-d H:i:s'),
'updatevon' => $this->_uid
)
);
if (isError($update))
$this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
}
}
}
$this->outputJsonSuccess('Success');
}
public function saveNachreichung($person_id)
{
$nachreichungAm = $this->input->post('nachreichungAm');
@@ -1358,7 +1399,6 @@ class InfoCenter extends Auth_Controller
if($nachreichungAm < $today)
$this->terminateWithJsonError($this->p->t('infocenter', 'nachreichDatumNichtVergangenheit'));
$akte = $this->AkteModel->loadWhere(array('person_id' => $person_id, 'dokument_kurzbz' => $allowedTypes[$typ]));
if (hasData($akte)) {
@@ -1505,6 +1545,7 @@ class InfoCenter extends Auth_Controller
$freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
$reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
$abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
$aufgenommenLink = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE);
$currentFilterId = $this->input->get(self::FILTER_ID);
if (isset($currentFilterId))
@@ -1512,6 +1553,7 @@ class InfoCenter extends Auth_Controller
$freigegebenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
$aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId;
}
$this->navigationlib->setSessionMenu(
@@ -1562,7 +1604,19 @@ class InfoCenter extends Auth_Controller
null, // subscriptLinkValue
'', // target
30 // sort
)
),
'aufgenommen' => $this->navigationlib->oneLevel(
'Aufgenommene', // description
$aufgenommenLink, // link
null, // children
'check', // icon
null, // subscriptDescription
false, // expand
null, // subscriptLinkClass
null, // subscriptLinkValue
'', // target
40 // sort
),
)
);
}
@@ -1590,6 +1644,9 @@ class InfoCenter extends Auth_Controller
if ($origin_page === self::ABGEWIESEN_PAGE)
$link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE);
if ($origin_page === self::AUFGENOMMEN_PAGE)
$link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE);
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
if (isset($prevFilterId))
{
@@ -1794,14 +1851,14 @@ class InfoCenter extends Auth_Controller
if (!isset($stammdaten->retval))
return null;
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false);
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false, false);
if (isError($dokumente))
{
show_error(getError($dokumente));
}
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true);
$dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true, false);
if (isError($dokumente_nachgereicht))
{
@@ -1996,6 +2053,12 @@ class InfoCenter extends Auth_Controller
$this->NationModel->addOrder('langtext');
$allNations = getData($this->NationModel->load());
$additional_stg = explode(',', ($this->config->item('infocenter_studiengang_kz')));
$this->GeschlechtModel->addOrder('sort');
$allGenders = getData($this->GeschlechtModel->load());
$data = array (
'zgvpruefungen' => $zgvpruefungen,
'abwstatusgruende' => $abwstatusgruende,
@@ -2004,6 +2067,8 @@ class InfoCenter extends Auth_Controller
'all_zgvs' => $allZGVs,
'all_zgvs_master' => $allZGVsMaster,
'all_nations' => $allNations,
'additional_stg' => $additional_stg,
'all_genders' => $allGenders
);
return $data;
@@ -2164,8 +2229,8 @@ class InfoCenter extends Auth_Controller
$prestudentstatus = $prestudent->prestudentstatus;
$person_id = $prestudent->person_id;
$person = $this->PersonModel->getPersonStammdaten($person_id, true)->retval;
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false)->retval;
$dokumenteNachzureichen = $this->AkteModel->getAktenWithDokInfo($person_id, null, true)->retval;
$dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false, false)->retval;
$dokumenteNachzureichen = $this->AkteModel->getAktenWithDokInfo($person_id, null, true, false)->retval;
//fill mail variables
$interessentbez = $person->geschlecht == 'm' ? 'Ein Interessent' : 'Eine Interessentin';
@@ -2262,12 +2327,10 @@ class InfoCenter extends Auth_Controller
public function getAbsageData()
{
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm']);
$stg_typ = $this->getStudienArtBerechtigung(['b', 'm']);
if (hasData($stg_typ))
if (!is_null($stg_typ))
{
$stg_typ = getData($stg_typ);
$statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
$studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
$studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester);
@@ -2283,15 +2346,16 @@ class InfoCenter extends Auth_Controller
$this->outputJsonSuccess(null);
}
public function getStudienArtBerechtigung()
public function getStudienArtBerechtigung($typ = null)
{
$studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, ['b', 'm', 'l']);
$stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, $typ);
return getData($stg_typ);
}
public function getStudienartData()
{
$this->outputJsonSuccess($this->getStudienArtBerechtigung());
$this->outputJsonSuccess($this->getStudienArtBerechtigung(['b', 'm', 'l']));
}
public function saveAbsageForAll()
@@ -0,0 +1,135 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Rueckstellung extends Auth_Controller
{
private $_ci; // Code igniter instance
private $_uid;
public function __construct()
{
parent::__construct(
array(
'get' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'set' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'delete' => array('infocenter:r', 'lehre/zgvpruefung:r'),
'getStatus' => array('infocenter:rw', 'lehre/zgvpruefung:rw')
)
);
$this->load->model('crm/Rueckstellung_model', 'RueckstellungModel');
$this->load->model('crm/RueckstellungStatus_model', 'RueckstellungStatusModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->library('PersonLogLib');
$this->_setAuthUID(); // sets property uid
$this->_ci =& get_instance(); // get code igniter instance
}
public function get($person_id)
{
$result = null;
$rueckstellung = $this->_ci->RueckstellungModel->getByPersonId($person_id);
if (isError($rueckstellung))
$this->terminateWithJsonError($this->_ci->p->t('ui', 'fehlerBeimLesen'));
if (hasData($rueckstellung))
{
$rueckstellung = getData($rueckstellung)[0];
$fullName = getData($this->_ci->PersonModel->getFullName($rueckstellung->insertvon));
$result = array(
'von' => $fullName,
'bezeichnung' => $rueckstellung->bezeichnung,
'bis' => $rueckstellung->datum_bis,
'status_kurzbz' => $rueckstellung->status_kurzbz
);
if ($rueckstellung->status_kurzbz === 'parked' && $rueckstellung->datum_bis < date('Y-m-d'))
{
$this->_ci->RueckstellungModel->delete(array('person_id' => $person_id, 'status_kurzbz' => 'parked'));
$result = null;
}
}
$this->outputJsonSuccess($result);
}
public function set()
{
$person_id = $this->input->post('person_id');
$datum_bis = $this->input->post('datum_bis');
$status_kurzbz = $this->input->post('status_kurzbz');
$result = $this->_ci->RueckstellungModel->insert(
array('person_id' => $person_id,
'status_kurzbz' => $status_kurzbz,
'datum_bis' => date_format(date_create($datum_bis), 'Y-m-d'),
'insertvon' => $this->_uid
)
);
if (isError($result))
$this->terminateWithJsonError(getError($result));
$this->_log($person_id, $status_kurzbz);
$this->outputJson($result);
}
public function delete()
{
$person_id = $this->input->post('person_id');
$status = $this->input->post('status');
$result = $this->_ci->RueckstellungModel->delete(array('person_id' => $person_id, 'status_kurzbz' => $status));
if (isError($result))
$this->terminateWithJsonError($this->_ci->p->t('ui', 'fehlerBeimSpeichern'));
$this->outputJson($result);
}
public function getStatus($aktiv = true)
{
$this->_ci->RueckstellungStatusModel->addOrder('sort');
$result = $this->_ci->RueckstellungStatusModel->loadWhere(array('aktiv' => $aktiv));
if (isError($result))
$this->terminateWithJsonError($this->_ci->p->t('ui', 'fehlerBeimLesen'));
$this->outputJsonSuccess(getData($result));
}
/**
* 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');
}
private function _log($person_id, $status_kurzbz)
{
$message = "Person $person_id set to $status_kurzbz";
$this->_ci->personloglib->log(
$person_id,
'Action',
array(
'name' => 'Person status set',
'message' => $message,
'success' => true
),
'bewerbung',
'infocenter',
null,
$this->_uid
);
}
}
@@ -26,6 +26,7 @@ class Issues extends Auth_Controller
// Load models
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$this->load->model('system/Sprache_model', 'SpracheModel');
$this->loadPhrases(
array(
@@ -45,10 +46,11 @@ class Issues extends Auth_Controller
public function index()
{
$oes_for_issues = $this->_getOesForIssues();
$language_index = $this->_getLanguageIndex();
$this->load->view(
'system/issues/issues',
$oes_for_issues
array_merge($oes_for_issues, array('language_index' => $language_index))
);
}
@@ -166,4 +168,28 @@ class Issues extends Auth_Controller
'all_oe_kurzbz_berechtigt' => $all_oe_kurzbz_berechtigt
);
}
/**
* Gets language index of currently logged in user.
* @return object int (the index, start at 1)
*/
private function _getLanguageIndex()
{
$idx = 1;
$this->SpracheModel->addSelect('sprache, index');
$langRes = $this->SpracheModel->load();
if (hasData($langRes))
{
$userLang = getUserLanguage();
$lang = getData($langRes);
foreach ($lang as $l)
{
if ($l->sprache == $userLang) $idx = $l->index;
}
}
return $idx;
}
}
@@ -0,0 +1,305 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class IssuesKonfiguration extends Auth_Controller
{
private $_uid;
const STRING_DATA_TYPE = 'string';
const INTEGER_DATA_TYPE = 'integer';
const FLOAT_DATA_TYPE = 'float';
public function __construct()
{
parent::__construct(
array(
'index' => 'admin:r',
'getApps' => 'admin:r',
'getFehlerKonfigurationByApp' => 'admin:r',
'saveFehlerKonfiguration' => 'admin:rw',
'deleteKonfiguration' => 'admin:rw',
'deleteKonfigurationsWerte' => 'admin:rw'
)
);
// Load libraries
$this->load->library('IssuesLib');
$this->load->library('WidgetLib');
// Load models
$this->load->model('system/Fehlerkonfigurationstyp_model', 'FehlerkonfigurationstypModel');
$this->load->model('system/Fehlerkonfiguration_model', 'FehlerkonfigurationModel');
$this->loadPhrases(
array(
'global',
'ui',
'filter',
'fehlermonitoring'
)
);
$this->_setAuthUID(); // sets property uid
$this->setControllerId(); // sets the controller id
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Load initial view.
*/
public function index()
{
$this->load->view("system/issues/issuesKonfiguration.php");
}
/**
* Loads all Apps to which Fehler exist.
*/
public function getApps()
{
$this->FehlerModel->addDistinct();
$this->FehlerModel->addSelect('app');
$this->FehlerModel->addJoin('system.tbl_fehler_konfigurationstyp', 'app');
$this->FehlerModel->addOrder('app');
$appRes = $this->FehlerModel->load();
$this->outputJson($appRes);
}
/**
* Gets all fehlercodes, optionally by app.
*/
public function getFehlerKonfigurationByApp()
{
$app = $this->input->get('app');
// get all Konfiguration types, optionally filtered by app
$this->FehlerkonfigurationstypModel->addSelect('konfigurationstyp_kurzbz, konfigurationsdatentyp, beschreibung');
$this->FehlerkonfigurationstypModel->addOrder('konfigurationstyp_kurzbz');
$konfRes = isEmptyString($app)
? $this->FehlerkonfigurationstypModel->load()
: $this->FehlerkonfigurationstypModel->loadWhere(array('app' => $app));
if (isError($konfRes)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlerFehlerKonfigurationLaden'));
// get all Fehler, optionally filtered by app
$params = array('fehlercode_extern' => null);
$this->FehlerModel->addSelect('fehlercode, fehler_kurzbz, fehlertyp_kurzbz, fehlertext');
$this->FehlerModel->addOrder('fehlercode');
if (!isEmptyString($app)) $params['app'] = $app;
$fehlerRes = $this->FehlerModel->loadWhere($params);
if (isError($fehlerRes)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlerFehlerLaden'));
// return object with retrieved data
$konfObj = new StdClass();
$konfObj->konfigurationstypen = array();
$konfObj->fehler = array();
if (hasData($konfRes)) $konfObj->konfigurationstypen = getData($konfRes);
if (hasData($fehlerRes)) $konfObj->fehler = getData($fehlerRes);
$this->outputJsonSuccess($konfObj);
}
/**
* Saves a Fehler configuration, inserts new configuration or updates existing.
* Checks if datatype of passed configuration is correct.
*/
public function saveFehlerKonfiguration()
{
$result = null;
$konfigurationstyp_kurzbz = $this->input->post('konfigurationstyp_kurzbz');
$fehlercode = $this->input->post('fehlercode');
$konfigurationsWert = $this->input->post('konfigurationsWert');
// check if all params passed
if (isEmptyString($konfigurationstyp_kurzbz)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'ungueltigerKonfigurationstyp'));
if (isEmptyString($fehlercode)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlercodeFehlt'));
// separate by semicolon if multiple values passed
$konfigurationsWert = explode(';', $konfigurationsWert);
// check konfigurationswert
// get the expected data type
$dataType = self::STRING_DATA_TYPE;
$this->FehlerkonfigurationstypModel->addSelect('konfigurationsdatentyp');
$konfigtypRes = $this->FehlerkonfigurationstypModel->loadWhere(array('konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz));
if (hasData($konfigtypRes))
{
$konfigurationsdatentyp = getData($konfigtypRes)[0]->konfigurationsdatentyp;
foreach ($konfigurationsWert as $idx => $konfWert)
{
// check if data type correct
$valid = false;
switch ($konfigurationsdatentyp)
{
case self::INTEGER_DATA_TYPE:
$valid = (string)(int)$konfWert == $konfWert;
$konfigurationsWert[$idx] = (int) $konfWert;
break;
case self::FLOAT_DATA_TYPE:
$valid = (string)(float)$konfWert == $konfWert;
$konfigurationsWert[$idx] = (float) $konfWert;
break;
default:
$valid = is_string($konfWert) && preg_match('/^[A-Za-z0-9_]+$/', $konfWert);
}
if (!$valid) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'ungueltigerKonfigurationswert', array($konfigurationsdatentyp)));
}
}
// check if konfiguration already set for the fehlercode
$this->FehlerkonfigurationModel->addSelect('konfiguration');
$fehlerkonfigurationRes = $this->FehlerkonfigurationModel->loadWhere(
array(
'konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz,
'fehlercode' => $fehlercode
)
);
if (isError($fehlerkonfigurationRes)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlerFehlerKonfigurationLaden'));
// if konfiguration exists, update by add konfiguration values to existing
if (hasData($fehlerkonfigurationRes))
{
$fehlerkonfiguration = getData($fehlerkonfigurationRes);
$existingKonf = json_decode($fehlerkonfiguration[0]->konfiguration);
if (!$existingKonf) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlerJsonDekodierung'));
if (!is_array($existingKonf)) $existingKonf = array($existingKonf);
$newKonf = json_encode(array_values(array_unique(array_merge($existingKonf, $konfigurationsWert))));
if (!$newKonf) $this->terminateWithJsonError("error when encoding JSON");
$result = $this->FehlerkonfigurationModel->update(
array('konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz, 'fehlercode' => $fehlercode),
array('konfiguration' => $newKonf, 'updateamum' => 'NOW()', 'updatevon' => $this->_uid)
);
}
else // if no konfiguration exists, add new konfiguration entry
{
$newKonf = json_encode($konfigurationsWert);
if (!$newKonf) $this->terminateWithJsonError("error when encoding JSON");
$result = $this->FehlerkonfigurationModel->insert(
array(
'konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz,
'fehlercode' => $fehlercode,
'konfiguration' => $newKonf,
'insertvon' => $this->_uid
)
);
}
// output result (insert or update)
$this->outputJson($result);
}
/**
* Deletes values of a Konfiguration.
*/
public function deleteKonfigurationsWerte()
{
$konfigurationstyp_kurzbz = $this->input->post('konfigurationstyp_kurzbz');
$fehlercode = $this->input->post('fehlercode');
$konfigurationsWert = $this->input->post('konfigurationsWert');
// check if Konfigurationstyp correctly passed
if (isEmptyString($konfigurationstyp_kurzbz)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'ungueltigerKonfigurationstyp'));
// check if fehlercode correctly passed
if (isEmptyString($fehlercode)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlercodeFehlt'));
// separate by semicolon if multiple values passed
$konfigurationsWert = explode(';', $konfigurationsWert);
// check if konfiguration already set for the fehlercode
$this->FehlerkonfigurationModel->addSelect('konfiguration');
$fehlerkonfigurationRes = $this->FehlerkonfigurationModel->loadWhere(
array(
'konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz,
'fehlercode' => $fehlercode
)
);
if (!hasData($fehlerkonfigurationRes)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlerFehlerKonfigurationLaden'));
// if konfiguration exists, update values
if (hasData($fehlerkonfigurationRes))
{
$fehlerkonfiguration = getData($fehlerkonfigurationRes);
$existingKonf = json_decode($fehlerkonfiguration[0]->konfiguration);
if (!$existingKonf) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlerJsonDekodierung'));
if (!is_array($existingKonf)) $existingKonf = array($existingKonf);
$newKonfArr = array_values(array_diff($existingKonf, $konfigurationsWert));
// if no konfiguration values left, delete whole entry
if (isEmptyArray($newKonfArr))
{
$this->outputJson(
$this->FehlerkonfigurationModel->delete(
array('konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz, 'fehlercode' => $fehlercode)
)
);
}
else
{
$newKonf = json_encode($newKonfArr);
if (!$newKonf) $this->terminateWithJsonError("error when encoding JSON");
// if there are still values, delete only part of the konfiguration
$this->outputJson(
$this->FehlerkonfigurationModel->update(
array('konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz, 'fehlercode' => $fehlercode),
array('konfiguration' => $newKonf, 'updateamum' => 'NOW()', 'updatevon' => $this->_uid)
)
);
}
}
}
/**
* Deletes a Konfiguration.
*/
public function deleteKonfiguration()
{
$konfigurationstyp_kurzbz = $this->input->post('konfigurationstyp_kurzbz');
$fehlercode = $this->input->post('fehlercode');
// check if Konfigurationstyp correctly passed
if (isEmptyString($konfigurationstyp_kurzbz)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'ungueltigerKonfigurationstyp'));
// check if fehlercode correctly passed
if (isEmptyString($fehlercode)) $this->terminateWithJsonError($this->p->t('fehlermonitoring', 'fehlercodeFehlt'));
$this->outputJson(
$this->FehlerkonfigurationModel->delete(
array('konfigurationstyp_kurzbz' => $konfigurationstyp_kurzbz, 'fehlercode' => $fehlercode)
)
);
}
/**
* 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');
}
}
@@ -26,7 +26,6 @@ class IssuesZustaendigkeiten extends Auth_Controller
// Load models
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$this->load->model('system/Fehler_model', 'FehlerModel');
$this->load->model('system/Fehler_model', 'FehlerModel');
$this->load->model('system/Fehlerzustaendigkeiten_model', 'FehlerzustaendigkeitenModel');
$this->loadPhrases(
@@ -70,7 +69,7 @@ class IssuesZustaendigkeiten extends Auth_Controller
{
$app = $this->input->get('app');
//$this->FehlerModel->addSelect('fehlercode, fehler_kurzbz, fehlertext, fehlertyp_kurzbz');
$this->FehlerModel->addSelect('fehlercode, fehler_kurzbz, fehlertext, fehlertyp_kurzbz, app');
$this->FehlerModel->addOrder('fehlercode');
$fehlerRes = isset($app) ? $this->FehlerModel->loadWhere(array('app' => $app)) : $this->FehlerModel->load();
@@ -0,0 +1,194 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class Plausichecks extends Auth_Controller
{
const GENERIC_ISSUE_OCCURED_TEXT = 'Issue aufgetreten';
public function __construct()
{
parent::__construct(
array(
'index' => array('system/issues_verwalten:r'),
'runChecks' => array('system/issues_verwalten:r')
)
);
// Load libraries
$this->load->library('issues/PlausicheckProducerLib', array('app' => 'core'));
$this->load->library('issues/PlausicheckDefinitionLib');
$this->load->library('WidgetLib');
// Load models
$this->load->model('system/Fehler_model', 'FehlerModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
}
/*
* Get data for filtering the plausichecks and load the view.
*/
public function index()
{
$filterData = $this->_getFilterData();
$this->load->view('system/issues/plausichecks', $filterData);
}
/**
* Initiate plausichecks run.
*/
public function runChecks()
{
$studiensemester_kurzbz = $this->input->get('studiensemester_kurzbz');
$studiengang_kz = $this->input->get('studiengang_kz');
$fehler_kurzbz = $this->input->get('fehler_kurzbz');
// issues array for passing issue texts
$allIssues = array();
// all fehler kurzbz which are going to be checked
$fehlerKurzbz = !isEmptyString($fehler_kurzbz) ? array($fehler_kurzbz) : $this->plausicheckdefinitionlib->getFehlerKurzbz();
$fehlerLibMappings = $this->plausicheckdefinitionlib->getFehlerLibMappings();
// set Studiengang to null if not passed
if (isEmptyString($studiengang_kz)) $studiengang_kz = null;
// get the data returned by Plausicheck
foreach ($fehlerKurzbz as $fehler_kurzbz)
{
// get Text and fehlercode of the Fehler
$this->FehlerModel->addSelect('fehlercode, fehlertext, fehlertyp_kurzbz');
$fehlerRes = $this->FehlerModel->loadWhere(array('fehler_kurzbz' => $fehler_kurzbz));
if (isError($fehlerRes)) $this->terminateWithJsonError(getError($fehlerRes));
// do not check error if no data
if (!hasData($fehlerRes)) continue;
// get the error data
$fehler = getData($fehlerRes)[0];
// initialize issue array
$allIssues[$fehler_kurzbz] = array('fehlercode' => $fehler->fehlercode, 'data' => array());
// get library name for producing issue
$libName = $fehlerLibMappings[$fehler_kurzbz];
// execute the check
$plausicheckRes = $this->plausicheckproducerlib->producePlausicheckIssue(
$libName,
$fehler_kurzbz,
array(
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'studiengang_kz' => $studiengang_kz
)
);
if (isError($plausicheckRes)) $this->terminateWithJsonError(getError($plausicheckRes));
if (hasData($plausicheckRes))
{
$plausicheckData = getData($plausicheckRes);
foreach ($plausicheckData as $plausiData)
{
// get the data needed for issue production
$person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null;
$oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null;
$fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null;
// optionally replace fehler parameters in text, output the fehlertext
if (!isEmptyString($fehler->fehlertext))
{
$fehlercode = $fehler->fehlercode;
$fehlerText = $fehler->fehlertext;
$fehlerTyp = $fehler->fehlertyp_kurzbz;
if (!isEmptyArray($fehlertext_params))
{
// replace placeholder with params, if present
if (count($fehlertext_params) != substr_count($fehlerText, '%s'))
$this->terminateWithJsonError('Wrong number of parameters for Fehlertext, fehler_kurzbz ' . $fehler_kurzbz);
$fehlerText = vsprintf($fehlerText, $fehlertext_params);
}
if (isset($person_id)) $fehlerText .= "; person_id: $person_id";
if (isset($oe_kurzbz)) $fehlerText .= "; oe_kurzbz: $oe_kurzbz";
$issueObj = new StdClass();
$issueObj->fehlertext = $fehlerText;
$issueObj->type = $fehlerTyp;
$allIssues[$fehler_kurzbz]['data'][] = $issueObj;
}
else // if no issue text found, use generic text
{
$fehlerText = self::GENERIC_ISSUE_OCCURED_TEXT;
}
// add generic parameters to issue text
if (isset($person_id)) $fehlerText .= "; person_id: $person_id";
if (isset($oe_kurzbz)) $fehlerText .= "; oe_kurzbz: $oe_kurzbz";
}
}
}
$this->outputJsonSuccess($allIssues);
}
/**
* Get the data needed for filtering for limiting checks.
*/
private function _getFilterData()
{
$this->StudiensemesterModel->addOrder('start', 'DESC');
$studiensemesterRes = $this->StudiensemesterModel->load();
if (isError($studiensemesterRes)) show_error(getError($studiensemesterRes));
$currSemRes = $this->StudiensemesterModel->getAkt();
if (isError($currSemRes)) show_error(getError($currSemRes));
$this->StudiengangModel->addSelect('studiengang_kz, tbl_studiengang.bezeichnung, tbl_studiengang.typ,
tbl_studiengangstyp.bezeichnung AS typbezeichnung, UPPER(tbl_studiengang.typ::varchar(1) || tbl_studiengang.kurzbz) as kuerzel');
$this->StudiengangModel->addJoin('public.tbl_studiengangstyp', 'typ');
$this->StudiengangModel->addOrder('kuerzel, tbl_studiengang.bezeichnung, studiengang_kz');
$studiengaengeRes = $this->StudiengangModel->loadWhere(array('aktiv' => true));
if (isError($studiengaengeRes)) show_error(getError($studiengaengeRes));
$fehlerKurzbz = $this->plausicheckdefinitionlib->getFehlerKurzbz();
$db = new DB_Model();
// get fehlercodes for fehler_kurzbz
$fehlerRes = $db->execReadOnlyQuery(
'SELECT
fehler_kurzbz, fehlercode
FROM
system.tbl_fehler
WHERE
fehler_kurzbz IN ?',
array($fehlerKurzbz)
);
if (isError($fehlerRes)) show_error(getError($fehlerRes));
$fehlerKurzbzCodeMappings = array();
if (hasData($fehlerRes))
{
$fehler = getData($fehlerRes);
foreach ($fehler as $fe)
{
$fehlerKurzbzCodeMappings[$fe->fehler_kurzbz] = $fe->fehlercode;
}
}
return array(
'semester' => hasData($studiensemesterRes) ? getData($studiensemesterRes) : array(),
'currsemester' => hasData($currSemRes) ? getData($currSemRes) : array(),
'studiengaenge' => hasData($studiengaengeRes) ? getData($studiengaengeRes) : array(),
'fehlerKurzbzCodeMappings' => $fehlerKurzbzCodeMappings
);
}
}
+10
View File
@@ -169,6 +169,15 @@ abstract class FHC_Controller extends CI_Controller
}
}
/**
* Return the JSON decoded HTTP POST request
* If the request is not in JSON format then a null value is returned
*/
protected function getPostJSON()
{
return json_decode($this->input->raw_input_stream);
}
//------------------------------------------------------------------------------------------------------------------
// Private methods
@@ -185,3 +194,4 @@ abstract class FHC_Controller extends CI_Controller
}
}
}
+61 -56
View File
@@ -5,7 +5,10 @@
*/
abstract class IssueResolver_Controller extends JOB_Controller
{
const ISSUES_FOLDER = 'issues';
const CI_PATH = 'application';
const CI_LIBRARY_FOLDER = 'libraries';
const EXTENSIONS_FOLDER = 'extensions';
const ISSUE_RESOLVERS_FOLDER = 'issues/resolvers';
const CHECK_ISSUE_RESOLVED_METHOD_NAME = 'checkIfIssueIsResolved';
protected $_codeLibMappings;
@@ -43,71 +46,73 @@ abstract class IssueResolver_Controller extends JOB_Controller
}
else
{
$openIssues = getData($openIssuesRes);
foreach ($openIssues as $issue)
{
if (isset($this->_codeLibMappings[$issue->fehlercode]))
// ignore if Fehlercode is not in libmappings (shouldn't be checked)
if (!isset($this->_codeLibMappings[$issue->fehlercode])) continue;
$libName = $this->_codeLibMappings[$issue->fehlercode];
// add person id and oe kurzbz automatically as params, merge it with additional params
// decode bewerbung_parameter into assoc array
$params = array_merge(
array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz),
isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array()
);
// if called from extension (extension name set), path includes extension names
$libRootPath = isset($this->_extensionName) ? self::EXTENSIONS_FOLDER . '/' . $this->_extensionName . '/' : '';
// path for loading issue library
$issuesLibPath = $libRootPath . self::ISSUE_RESOLVERS_FOLDER . '/';
// file path of library for check if file exists
$issuesLibFilePath = DOC_ROOT . self::CI_PATH
. '/' . $libRootPath . self::CI_LIBRARY_FOLDER . '/' . self::ISSUE_RESOLVERS_FOLDER . '/' . $libName . '.php';
// check if library file exists
if (!file_exists($issuesLibFilePath))
{
$libName = $this->_codeLibMappings[$issue->fehlercode];
// log error and continue with next issue if not
$this->logError("Issue library file " . $issuesLibFilePath . " does not exist");
continue;
}
// add person id and oe kurzbz automatically as params, merge it with additional params
// decode bewerbung_parameter into assoc array
$params = array_merge(
array('issue_id' => $issue->issue_id, 'issue_person_id' => $issue->person_id, 'issue_oe_kurzbz' => $issue->oe_kurzbz),
isset($issue->behebung_parameter) ? json_decode($issue->behebung_parameter, true) : array()
);
// load library connected to fehlercode
$this->load->library($issuesLibPath . $libName);
// if called from extension (extension name set), path includes extension names, otherwise it is the core library folder
$libRootPath = isset($this->_extensionName) ? 'extensions/' . $this->_extensionName . '/' : '';
$issuesLibPath = $libRootPath . self::ISSUES_FOLDER . '/';
$issuesLibFilePath = DOC_ROOT . 'application/' . $libRootPath . 'libraries/' . self::ISSUES_FOLDER . '/' . $libName . '.php';
$lowercaseLibName = mb_strtolower($libName);
// check if library file exists
if (!file_exists($issuesLibFilePath))
// check if method is defined in library class
if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_RESOLVED_METHOD_NAME)))
{
// log error and continue with next issue if not
$this->logError("Method " . self::CHECK_ISSUE_RESOLVED_METHOD_NAME . " is not defined in library $lowercaseLibName");
continue;
}
// call the function for checking for issue resolution
$issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_RESOLVED_METHOD_NAME}($params);
if (isError($issueResolvedRes))
{
$this->logError(getError($issueResolvedRes));
}
else
{
$issueResolvedData = getData($issueResolvedRes);
if ($issueResolvedData === true)
{
// log error and continue with next issue if not
$this->logError("Issue library file " . $issuesLibFilePath . " does not exist");
continue;
}
// set issue to resolved if needed
$behobenRes = $this->issueslib->setBehoben($issue->issue_id, null);
// load library connected to fehlercode
$this->load->library(
$issuesLibPath . $libName
);
$lowercaseLibName = mb_strtolower($libName);
// check if method is defined in libary class
if (!is_callable(array($this->{$lowercaseLibName}, self::CHECK_ISSUE_RESOLVED_METHOD_NAME)))
{
// log error and continue with next issue if not
$this->logError("Method " . self::CHECK_ISSUE_RESOLVED_METHOD_NAME . " is not defined in library $lowercaseLibName");
continue;
}
// call the function for checking for issue resolution
$issueResolvedRes = $this->{$lowercaseLibName}->{self::CHECK_ISSUE_RESOLVED_METHOD_NAME}($params);
if (isError($issueResolvedRes))
{
$this->logError(getError($issueResolvedRes));
}
else
{
$issueResolvedData = getData($issueResolvedRes);
if ($issueResolvedData === true)
{
// set issue to resolved if needed
$behobenRes = $this->issueslib->setBehoben($issue->issue_id, null);
if (isError($behobenRes))
$this->logError(getError($behobenRes));
else
$this->logInfo("Issue " . $issue->issue_id . " successfully resolved");
}
if (isError($behobenRes))
$this->logError(getError($behobenRes));
else
$this->logInfo("Issue " . $issue->issue_id . " successfully resolved");
}
}
}
@@ -0,0 +1,66 @@
<?php
/**
* Job for producing Plausicheck issues
*/
abstract class PlausiIssueProducer_Controller extends JOB_Controller
{
protected $_fehlerLibMappings;
protected $_app;
public function __construct($app = null)
{
parent::__construct();
// pass extension name if calling from extension
$extensionName = isset($this->_extensionName) ? $this->_extensionName : null;
// load libraries
$this->load->library('issues/PlausicheckProducerLib', array('extensionName' => $extensionName, 'app' => $this->_app));
$this->load->library('IssuesLib');
}
protected function producePlausicheckIssues($params)
{
$this->logInfo("Plausicheck issue producer job started");
// get the data returned by Plausicheck
foreach ($this->_fehlerLibMappings as $fehler_kurzbz => $libName)
{
// execute the check
$this->logInfo("Checking " . $fehler_kurzbz . "...");
$plausicheckRes = $this->plausicheckproducerlib->producePlausicheckIssue(
$libName,
$fehler_kurzbz,
$params
);
if (isError($plausicheckRes)) $this->logError(getError($plausicheckRes));
if (hasData($plausicheckRes))
{
$plausicheckData = getData($plausicheckRes);
foreach ($plausicheckData as $plausiData)
{
// get the data needed for issue production
$person_id = isset($plausiData['person_id']) ? $plausiData['person_id'] : null;
$oe_kurzbz = isset($plausiData['oe_kurzbz']) ? $plausiData['oe_kurzbz'] : null;
$fehlertext_params = isset($plausiData['fehlertext_params']) ? $plausiData['fehlertext_params'] : null;
$resolution_params = isset($plausiData['resolution_params']) ? $plausiData['resolution_params'] : null;
// write the issue
$addIssueRes = $this->issueslib->addFhcIssue($fehler_kurzbz, $person_id, $oe_kurzbz, $fehlertext_params, $resolution_params);
// log if error, or log info if inserted new issue
if (isError($addIssueRes))
$this->logError(getError($addIssueRes));
elseif (hasData($addIssueRes) && is_integer(getData($addIssueRes)))
$this->logInfo("Plausicheck issue " . $fehler_kurzbz . " successfully produced, person_id: " . $person_id);
}
}
}
$this->logInfo("Plausicheck issue producer job stopped");
}
}
+109 -39
View File
@@ -1,24 +1,25 @@
<?php
/**
* FH-Complete
* Copyright (C) 2022 fhcomplete.org
*
* @package FHC-Helper
* @author FHC-Team
* @copyright Copyright (c) 2016 fhcomplete.org
* @license GPLv3
* @since Version 1.0.0
*/
/**
* FHC Helper
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @subpackage Helpers
* @category Helpers
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \DateTime as DateTime;
// ------------------------------------------------------------------------
// Collection of utility functions for general purpose
// ------------------------------------------------------------------------
@@ -42,15 +43,19 @@ function generateToken($length = 64)
{
$firstGeneratedToken = random_bytes($length); // try to generates cryptographically secure pseudo-random bytes...
}
catch (Exception $e) { $firstGeneratedToken = null; } // if fails $firstGeneratedToken is set to null
catch (Exception $e)
{
// If fails $firstGeneratedToken is set to null
$firstGeneratedToken = null;
}
}
// For PHP >= 5.3 and < 7 and openssl is available
elseif (function_exists('openssl_random_pseudo_bytes'))
{
$firstGeneratedToken = openssl_random_pseudo_bytes($length, $strong);
// If the token generation ended with errors OR the generated token is NOT strong enough
if ($firstGeneratedToken == false || $strong == false) $firstGeneratedToken = null; // $firstGeneratedToken is set to null
}
if ($firstGeneratedToken == false || $strong == false) $firstGeneratedToken = null; // $firstGeneratedToken is set to null
}
if ($firstGeneratedToken != null) // If everything was fine
{
@@ -107,10 +112,7 @@ function var_dump_to_error_log($parameter)
function loadResource($path, $resources = null, $subdir = false)
{
// Place a / character at the and of the string if not present
if (strrpos($path, '/') < strlen($path) - 1)
{
$path .= '/';
}
if (strrpos($path, '/') < strlen($path) - 1) $path .= '/';
// Loads in $tmpResources all the given resources
$tmpResources = $resources;
@@ -125,28 +127,36 @@ function loadResource($path, $resources = null, $subdir = false)
// Loads in $tmpPaths path and eventually the subdirectories
$tmpPaths = array($path);
// NOTE: Used @ to prevent ugly error messages
if (is_dir($path) && ($dirHandler = @opendir($path)) !== false)
// If path is a directory
if (is_dir($path))
{
// Reads all file system entries present in path
while (($entry = readdir($dirHandler)) !== false)
// NOTE: Used @ to prevent ugly error messages
$dirHandler = @opendir($path);
// Successfully opened
if ($dirHandler !== false)
{
// If entry is a directory but not the current and subdirectories should be loaded
if ($subdir === true && $entry != '.' && $entry != '..' && is_dir($entry))
// Reads all file system entries present in path
while (($entry = readdir($dirHandler)) !== false)
{
$tmpPaths[] = $entry;
}
// If no resources are specified and the current file system entry is a file
if ($resources == null && is_file($path.$entry))
{
// If the current entry is a php file store the name without extension
if ($entry != ($tmpName = str_replace('.php', '', $entry)))
// If entry is a directory but not the current and subdirectories should be loaded
if ($subdir === true && $entry != '.' && $entry != '..' && is_dir($path.$entry))
{
$tmpResources[] = $tmpName;
$tmpPaths[] = $path.$entry.'/';
}
// If no resources are specified and the current file system entry is a file
if ($resources == null && is_file($path.$entry))
{
// Name without php extension
$tmpName = str_replace('.php', '', $entry);
// If the current entry is a php file store the name without extension
if ($entry != $tmpName) $tmpResources[] = $tmpName;
}
}
closedir($dirHandler);
}
closedir($dirHandler);
}
// Loops through the resources
@@ -156,10 +166,7 @@ function loadResource($path, $resources = null, $subdir = false)
foreach ($tmpPaths as $tmpPath)
{
$fileName = $tmpPath.$tmpResource.'.php'; // Php extension
if (file_exists($fileName))
{
include_once($fileName);
}
if (file_exists($fileName)) include_once($fileName);
}
}
}
@@ -351,3 +358,66 @@ function sanitizeProblemChars($str)
return preg_replace($acentos, array_keys($acentos), htmlentities($str, ENT_NOQUOTES | ENT_HTML5, $enc));
}
/**
*
*/
function findResource($path, $resource, $subdir = false, $extraDir = null)
{
// Place a / character at the and of the string if not present
if (strrpos($path, '/') < strlen($path) - 1) $path .= '/';
// Loads in $tmpPaths path and eventually the subdirectories
$tmpPaths = array($path);
if (is_dir($path))
{
// NOTE: Used @ to prevent ugly error messages
$dirHandler = @opendir($path);
// Successfully opened
if ($dirHandler !== false)
{
// Reads all file system entries present in path
while (($entry = readdir($dirHandler)) !== false)
{
// If entry is a directory but not the current and subdirectories should be loaded
if ($subdir === true && $entry != '.' && $entry != '..' && is_dir($path.$entry))
{
if ($extraDir == null)
{
$tmpPaths[] = $path.$entry.'/';
}
else
{
$tmpPaths[] = $path.$entry.'/'.$extraDir.'/';
}
}
}
closedir($dirHandler);
}
}
// Loops through the paths
foreach ($tmpPaths as $tmpPath)
{
$fileName = $tmpPath.$resource.'.php'; // Php extension
if (file_exists($fileName)) return $fileName;
}
return null;
}
/**
* check if String can be converted to a date
*/
function isValidDate($dateString)
{
try
{
return (new DateTime($dateString)) !== false;
}
catch(Exception $e)
{
return false;
}
}
+37 -1
View File
@@ -149,6 +149,31 @@ function generateJSsInclude($JSs)
}
}
/**
* Generates tags for the javascript modules you want to include, the parameter could by a string or an array of strings
*/
function generateJSModulesInclude($JSModules)
{
$jsInclude = '<script type="module" src="%s"></script>';
$ci =& get_instance();
$cachetoken = '?'.$ci->config->item('fhcomplete_build_version');
if (isset($JSModules))
{
$tmpJSs = is_array($JSModules) ? $JSModules : array($JSModules);
for ($tmpJSsCounter = 0; $tmpJSsCounter < count($tmpJSs); $tmpJSsCounter++)
{
$toPrint = sprintf($jsInclude, base_url($tmpJSs[$tmpJSsCounter].$cachetoken)).PHP_EOL;
if ($tmpJSsCounter > 0) $toPrint = "\t\t".$toPrint;
echo $toPrint;
}
}
}
/**
* Generates all the includes needed by the Addons
*/
@@ -156,16 +181,26 @@ function generateAddonsJSsInclude($calledFrom)
{
$aktive_addons = array_filter(explode(";", ACTIVE_ADDONS));
// For each active addon
foreach ($aktive_addons as $addon)
{
// Build the path to the hook file
$hookfile = DOC_ROOT.'addons/'.$addon.'/hooks.config.inc.php';
// If the hook file exists
if (file_exists($hookfile))
{
include($hookfile);
$js_hooks = array(); // default value
include($hookfile); // include the hook file where the array js_hooks should be setup
// If it contains the provided key calledFrom
if (key_exists($calledFrom, $js_hooks))
{
foreach ($js_hooks[$calledFrom] as $js_file)
{
generateJSsInclude('addons/'.$addon.'/'.$js_file);
}
}
}
}
@@ -180,3 +215,4 @@ function generateBackwardCompatibleJSMsIe($js)
echo ' <script type="text/javascript" src="'.$js.'"></script>'."\n";
echo "<![endif]-->\n";
}
+95 -17
View File
@@ -37,19 +37,30 @@ class AnrechnungLib
* @param $lv_id
* @return StdClass
*/
public function getAntragData($prestudent_id, $studiensemester_kurzbz, $lv_id)
public function getAntragData($prestudent_id, $studiensemester_kurzbz, $lv_id, $anrechnung_id = null)
{
$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])
// If Anrechnung exists
if (is_numeric($anrechnung_id))
{
show_error('You are not assigned to this course yet.');
// Just load LV by lv_id
$result = $this->ci->LehrveranstaltungModel->load($lv_id);
$lv = getData($result)[0];
}
// If Anrechnung not exists
else
{
// Load LV, but check if student is assigned to that LV. Break, if not.
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])
{
@@ -163,6 +174,8 @@ class AnrechnungLib
$anrechnung_data->insertvon = '';
$anrechnung_data->studiensemester_kurzbz = '';
$anrechnung_data->empfehlung = '';
$anrechnung_data->begruendung_ects = '';
$anrechnung_data->begruendung_lvinhalt = '';
$anrechnung_data->status_kurzbz = '';
$anrechnung_data->status = getUserLanguage() == 'German' ? 'neu' : 'new';
$anrechnung_data->dokumentname = '';
@@ -274,14 +287,21 @@ class AnrechnungLib
if (hasData($result))
{
$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'));
}
// Get users who received request for recommendation
if($this->ci->config->item('fbl') === TRUE)
{
$res = $this->getLeitungOfLvOe($anrechnung_id);
}
else
{
$res = $this->getLectors($anrechnung_id);
}
if (!isEmptyArray($res))
{
$empfehlung_data->empfehlungsanfrageAn = implode(', ', array_column($res, 'fullname'));
}
}
if (is_null($anrechnung->empfehlung_anrechnung))
@@ -741,6 +761,25 @@ class AnrechnungLib
// Continue, if LV has no lector (there is no one to ask for recommendation)
return hasData($result) ? true : false;
}
/**
* Check if user is allowed to recommend Anrechnung.
*
* @param $anrechnung_id
* @return bool
*/
public function isEmpfehlungsberechtigt($anrechnung_id)
{
if($this->ci->config->item('fbl') === TRUE)
{
return true;
}
// Get lv-leitungen or, if not present, all lectors of lv.
$lector_arr = $this->getLectors($anrechnung_id);
// Return false if lv-leitung is present and user is not lv-leitung. Otherways return always true.
return in_array(getAuthUID(), array_column($lector_arr, 'uid'));
}
/**
* Get LV Leitung. If not present, get all LV lectors.
@@ -774,11 +813,14 @@ class AnrechnungLib
// Check if lv has LV-Leitung
$key = array_search(true, array_column($result, 'lvleiter'));
// If lv has LV-Leitung, keep only the one
// If lv has 1 or more LV-Leitungen, keep only them
if ($key !== false)
{
$lector_arr[]= $result[$key];
foreach ($result as $lector)
{
if ($lector->lvleiter) $lector_arr[]= $lector;
}
}
// ...otherwise keep all lectors
else
@@ -803,6 +845,40 @@ class AnrechnungLib
return $lector_arr;
}
/**
* Get Leitung of Lehrveranstaltungs-Organisationseinheit.
*
* @param $anrechnung_id
* @return false|mixed|null
*/
public function getLeitungOfLvOe($anrechnung_id)
{
$this->ci->AnrechnungModel->addSelect('lehrveranstaltung_id');
$result = $this->ci->AnrechnungModel->load($anrechnung_id);
$lehrveranstaltung_id = getData($result)[0]->lehrveranstaltung_id;
// Get Leitungen
$result = $this->ci->LehrveranstaltungModel->getLeitungOfLvOe($lehrveranstaltung_id);
if (!hasData($result))
{
return false;
}
$oeLeitung_arr = getData($result);
foreach ($oeLeitung_arr as $oeLeitung)
{
$oeLeitung->fullname = $oeLeitung->vorname. ' '. $oeLeitung->nachname;
}
// Now make the array unique
$oeLeitung_arr = array_unique($oeLeitung_arr, SORT_REGULAR);
return $oeLeitung_arr;
}
// Return an object with Anrechnungdata
private function _setAnrechnungDataObject($anrechnung)
{
@@ -820,6 +896,8 @@ class AnrechnungLib
$anrechnung_data->insertvon= $anrechnung->insertvon;
$anrechnung_data->studiensemester_kurzbz= $anrechnung->studiensemester_kurzbz;
$anrechnung_data->empfehlung= $anrechnung->empfehlung_anrechnung;
$anrechnung_data->begruendung_ects = $anrechnung->begruendung_ects;
$anrechnung_data->begruendung_lvinhalt = $anrechnung->begruendung_lvinhalt;
// Get last status_kurzbz
$result = $this->ci->AnrechnungModel->getLastAnrechnungstatus($anrechnung->anrechnung_id);
File diff suppressed because it is too large Load Diff
+1 -4
View File
@@ -551,10 +551,7 @@ class AuthLib
// Needed information
$this->_ci->PersonModel->addSelect('person_id, vorname, nachname, uid');
// Retrieves the uid if it is possible for active users
$this->_ci->PersonModel->addJoin(
'(SELECT uid, person_id FROM public.tbl_benutzer WHERE aktiv = TRUE) tb', 'person_id',
'LEFT'
);
$this->_ci->PersonModel->addJoin('public.tbl_benutzer', 'person_id', 'LEFT');
// Execute query with where clause
$personResult = $this->_ci->PersonModel->loadWhere($queryParamsArray);
+2
View File
@@ -595,6 +595,8 @@ class DmsLib
if (isError($insDmsResult)) return $insDmsResult;
$upload_data['dms_id'] = getData($insDmsResult);
if(isset($upload_data['file_type']) && !isset($dms['mimetype']))
$dms['mimetype'] = $upload_data['file_type'];
// Insert DMS version
$insVersionResult = $this->_ci->DmsVersionModel->insert(
+304
View File
@@ -0,0 +1,304 @@
<?php
/* Copyright (C) 2022 fhcomplete.net
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
require_once(dirname(__FILE__).'/../../vendor/nategood/httpful/bootstrap.php');
use \ZipArchive as ZipArchive;
/**
* Simple client to convert documents using Docsbox
*/
class DocsboxLib
{
const ERROR = 1;
const SUCCESS = 0;
const STATUS_FINISHED = 'finished'; // Docsbox status when a document conversion ended
const STATUS_QUEUED = 'queued'; // Docsbox status when a file has been queued for the conversion
const STATUS_STARTED = 'started'; // Docsbox status when a file has started being worked
const STATUS_WORKING = 'working'; // Docsbox status when a file is being converted
const OUTPUT_FILENAME = 'out.zip.pdf'; // File name used by docsbox to save a converted document
const DEFAULT_FORMAT = 'pdf'; // Default supported format
// -------------------------------------------------------------------------------------------------
// Public static methods
/**
* Static method used to convert a document using a Docsbox installation (local/remote) over the network
* It return 0 on success and any other integer on error
* NOTE: currently format is not supported
*/
public static function convert($inputFileName, $outputFileName, $format)
{
// If a format has not been given
if (($format == null) || ($format != null && ctype_space($format) === true)) $format = self::DEFAULT_FORMAT;
// Posts the file to docsbox
$queueId = self::_postFile($inputFileName);
// If an error occurred
if ($queueId == null) return self::ERROR;
// Checks and waits if the file has been converted
$resultUrl = self::_checkConvertion($queueId);
// If an error occurred
if ($resultUrl == null) return self::ERROR;
// Download and rename the converted file
$downloaded = self::_downloadFile($resultUrl, $outputFileName);
// If an error occurred
if (!$downloaded) return self::ERROR;
return self::SUCCESS;
}
// -------------------------------------------------------------------------------------------------
// Private static methods
/**
* Posts the given file to a Docsboxserver and checks the response to return a valid queue id
* On failure it returns a null value
*/
private static function _postFile($inputFileName)
{
$queueId = null;
try
{
// Posts the given file and expects a response in JSON format
$postFileResponse = \Httpful\Request::post(DOCSBOX_SERVER.DOCSBOX_PATH_API)
->attach(array('file' => $inputFileName))
->expectsJson()
->send();
// Checks that:
// - the response is not empty
// - the reponse body has the property id
// - the property id is a valid string
// - the reponse body has the property status
// - docsbox queued the conversion of the posted file
if (is_object($postFileResponse)
&& isset($postFileResponse->body)
&& isset($postFileResponse->body->id)
&& $postFileResponse->body->id != '' && $postFileResponse->body->id != null
&& isset($postFileResponse->body->status)
&& $postFileResponse->body->status == self::STATUS_QUEUED)
{
$queueId = $postFileResponse->body->id;
}
else
{
// If docsbox refused to convert the posted file
if (isset($postFileResponse->body->status)
&& $postFileResponse->body->status != self::STATUS_QUEUED)
{
error_log(
'Docsbox did not queue the posted file. Returned status: '.
$postFileResponse->body->status
);
}
else // any other generic error
{
error_log(
'An error occurred while posting to docsbox. Response: '.
print_r($postFileResponse, 1)
);
}
}
}
catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception
{
error_log($cee->getMessage());
}
catch (Exception $e) // any other exception
{
error_log($e->getMessage());
}
return $queueId;
}
/**
* Check the status of the file convertion identified by the given queue element id
* A URL is returned with the path where it is possible to download the converted file
* If an error occurred then a null value is returned
*/
private static function _checkConvertion($queueId)
{
$resultUrl = null;
$startConvertionsTime = time(); // time when the file conversion has started
// Until a timeout has occurred
while (time() - $startConvertionsTime <= DOCSBOX_CONVERSION_TIMEOUT)
{
sleep(DOCSBOX_WAITING_SLEEP_TIME); // takes a nap on every round
try
{
// Calls the docsbox server to check the status of the
// file conversion using the provided queue id
// it expects a response in JSON format
$getStatusResponse = \Httpful\Request::get(DOCSBOX_SERVER.DOCSBOX_PATH_API.$queueId)
->expectsJson()
->send();
// Checks that:
// - the response is not empty
// - the reponse body has the property id
// - the property id is a valid string
// - the reponse body has the property status
// - docsbox is working the conversion of the posted file
if (is_object($getStatusResponse)
&& isset($getStatusResponse->body->id)
&& $getStatusResponse->body->id != '' && $getStatusResponse->body->id != null
&& isset($getStatusResponse->body->status))
{
// Checks that docsbox has finished working on the file conversion
// and that there is a valid resultUrl property
if ($getStatusResponse->body->status == self::STATUS_FINISHED
&& isset($getStatusResponse->body->result_url)
&& $getStatusResponse->body->result_url != ''
&& $getStatusResponse->body->result_url != null)
{
$resultUrl = $getStatusResponse->body->result_url;
break;
}
// Just started or still working on it
elseif ($getStatusResponse->body->status == self::STATUS_WORKING
|| $getStatusResponse->body->status == self::STATUS_STARTED)
{
// go on!
}
else // any other status is abnormal
{
error_log(
'Not valid status for queue element: '.$queueId.'. Response: '.
print_r($getStatusResponse, 1)
);
break; // interrupt the loop on error
}
}
else // if the response from the docsbox server is not valid
{
error_log(
'An error occurred while checking the docsbox activity. Response: '.
print_r($getStatusResponse, 1)
);
break; // interrupt the loop on error
}
}
catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception
{
error_log($cee->getMessage());
break; // interrupt the loop on error
}
catch (Exception $e) // any other exception
{
error_log($e->getMessage());
break; // interrupt the loop on error
}
}
return $resultUrl;
}
/**
* Download the converted file using the provided URL, unzip it, and renames it into the provided file name
*/
private static function _downloadFile($resultUrl, $outputFileName)
{
$downloaded = false; // pessimistic assumption
try
{
// Download the file
$getFileResponse = \Httpful\Request::get(DOCSBOX_SERVER.$resultUrl)->send();
// If the downloaded file content is valid and not empty
if (isset($getFileResponse->body)
&& $getFileResponse->body != null
&& $getFileResponse->body != '')
{
// Output directory where to unzip the downloaded zip file
$outputDirectory = dirname($outputFileName);
// The path and name of the downloaded zip file
$temporaryDownloadedZip = sys_get_temp_dir().'/'.basename($resultUrl);
// Write the file content into a temporary directory and file
if (file_put_contents($temporaryDownloadedZip, $getFileResponse->body) != false)
{
$zipArchive = new ZipArchive;
// Open and extract the dowloaded zip file into the directory of the output file
if ($zipArchive->open($temporaryDownloadedZip) === true
&& $zipArchive->extractTo($outputDirectory) === true
&& $zipArchive->close() === true)
{
// Opened, extracted and closed!
// Rename the extracted file to the given output file name
if (rename($outputDirectory.'/'.self::OUTPUT_FILENAME, $outputFileName))
{
$downloaded = true;
}
else
{
error_log(
'An error occurred while renaming the extracted file: '.
$outputDirectory.'/'.self::OUTPUT_FILENAME.' into: '.
$outputFileName
);
}
}
else
{
error_log(
'An error occurred while working the dowloaded zip file: '.
$temporaryDownloadedZip
);
}
}
else // if an error occurred while writing
{
error_log(
'An error occurred while writing the file content to: '.
$temporaryDownloadedZip
);
}
}
else // if the downloaded file is not valid
{
error_log(
'An error occurred while downloading the file from the docsbox server: '.
print_r($getFileResponse, 1)
);
}
}
catch(\Httpful\Exception\ConnectionErrorException $cee)
{
error_log($cee->getMessage());
}
catch (Exception $e)
{
error_log($e->getMessage());
}
return $downloaded;
}
}
+50 -20
View File
@@ -14,20 +14,28 @@ class DocumentLib
// Gets CI instance
$this->ci =& get_instance();
exec('unoconv --version', $ret_arr);
if(isset($ret_arr[0]))
// Which document converter has to be used
if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true)
{
$hlp = explode(' ', $ret_arr[0]);
if(isset($hlp[1]))
{
$this->unoconv_version = $hlp[1];
}
else
show_error('Could not get Unoconv Version');
// Use docsbox!!
}
else
show_error('Unoconv not found - Please install Unoconv');
{
exec('unoconv --version', $ret_arr);
if(isset($ret_arr[0]))
{
$hlp = explode(' ', $ret_arr[0]);
if(isset($hlp[1]))
{
$this->unoconv_version = $hlp[1];
}
else
show_error('Could not get Unoconv Version');
}
else
show_error('Unoconv not found - Please install Unoconv');
}
}
/**
@@ -57,9 +65,16 @@ class DocumentLib
case 'application/vnd.ms-word':
case 'application/vnd.oasis.opendocument.text':
case 'text/plain':
// Unoconv Version 0.6 seems to fail on converting TXT Files
if ($this->unoconv_version == '0.6')
return error();
if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true)
{
// Use docsbox
}
else
{
// Unoconv Version 0.6 seems to fail on converting TXT Files
if ($this->unoconv_version == '0.6')
return error();
}
$ret = $this->convert($filename, $outFile, 'pdf');
if(isSuccess($ret))
@@ -105,6 +120,7 @@ class DocumentLib
finfo_close($finfo);
$out = null;
exec($cmd, $out, $ret);
if ($ret != 0)
{
@@ -123,13 +139,26 @@ class DocumentLib
*/
public function convert($inFile, $outFile, $format)
{
if ($this->unoconv_version == '0.6')
$command = 'unoconv -f %1$s %3$s > %2$s';
else
$command = 'unoconv -f %s --output %s %s 2>&1';
$command = sprintf($command, $format, $outFile, $inFile);
$ret = 0;
exec($command, $out, $ret);
// If it is set to use docsbox
if (defined('DOCSBOX_ENABLED') && DOCSBOX_ENABLED === true)
{
require_once(dirname(__FILE__).'/../application/libraries/DocsboxLib.php');
$ret = DocsboxLib::convert($inFile, $outFile, $format);
}
else // otherwise use unoconv
{
if ($this->unoconv_version == '0.6')
$command = 'unoconv -f %1$s %3$s > %2$s';
else
$command = 'unoconv -f %s --output %s %s 2>&1';
$command = sprintf($command, $format, $outFile, $inFile);
$out = null;
exec($command, $out, $ret);
}
if ($ret != 0)
{
@@ -191,6 +220,7 @@ class DocumentLib
$cmd .= '/countspaces { [ exch { dup 32 ne { pop } if } forall ] length } bind def >> ';
$cmd .= 'setpagedevice viewJPEG"';
$out = null;
exec($cmd, $out, $ret);
if ($ret != 0)
{
+44 -20
View File
@@ -1,7 +1,25 @@
<?php
/**
* Copyright (C) 2022 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \stdClass as stdClass;
/**
* Library to manage core extensions
*/
@@ -23,7 +41,7 @@ class ExtensionsLib
// Directories that are part of the extension archive
private $SOFTLINK_TARGET_DIRECTORIES = array(
APPPATH => array('config', 'controllers', 'helpers', 'hooks', 'libraries', 'models', 'views', 'widgets'),
APPPATH => array('config', 'components', 'controllers', 'helpers', 'hooks', 'libraries', 'models', 'views', 'widgets'),
DOC_ROOT => array('public')
);
@@ -181,17 +199,15 @@ class ExtensionsLib
// Select all the version of this extension
$this->_ci->ExtensionsModel->addSelect('extension_id');
$result = $this->_ci->ExtensionsModel->loadWhere(array('name' => $extensionName));
if (hasData($result)) // if something was found
// If something was found
if (hasData($result))
{
$extsArray = array();
foreach ($result->retval as $key => $extension) // loops on them
// Loops on them
foreach ($result->retval as $extension)
{
// Remove them all
$result = $this->_ci->ExtensionsModel->delete($extension->extension_id);
if (isSuccess($result))
{
$delExtension = true;
}
if (isSuccess($result)) $delExtension = true;
}
}
}
@@ -432,9 +448,13 @@ class ExtensionsLib
// If no errors occurred
if ($extensionJson != null)
{
// Default value
$fhcomplete_version = 0;
require_once('version.php'); // get the core version
// Checks if the required core version of the extension is the same of this system
if (isset($extensionJson->core_version) && $extensionJson->core_version == $fhcomplete_version)
if (isset($extensionJson->core_version) && version_compare($extensionJson->core_version, $fhcomplete_version,'<='))
{
$this->_printMessage('Required core version: '.$extensionJson->core_version);
$this->_printMessage('Current core version: '.$fhcomplete_version);
@@ -587,18 +607,22 @@ class ExtensionsLib
for ($sqlDir = $startVersion; $sqlDir <= $extensionJson->version; $sqlDir++)
{
// If a directory with the same value of the version is present in the sql scripts directory
if (($files = glob($pkgSQLsPath.'/'.$sqlDir.'/*'.ExtensionsLib::SQL_FILE_EXTENSION)) != false)
{
$files = glob($pkgSQLsPath.'/'.$sqlDir.'/*'.ExtensionsLib::SQL_FILE_EXTENSION);
if ($files != false)
{
// Loads every sql files
foreach ($files as $file)
{
$sql = file_get_contents($file); // gets the entire content of the file
foreach ($files as $file)
{
$sql = file_get_contents($file); // gets the entire content of the file
$this->_printMessage('Executing query:');
$this->_printMessage($sql);
// Try to execute that
if (!isSuccess($result = @$this->_ci->ExtensionsModel->executeQuery($sql)))
$resultQuery = @$this->_ci->ExtensionsModel->executeQuery($sql);
// If _not_ a success
if (!isSuccess($resultQuery))
{
$this->_errorOccurred = true;
$this->_printFailure(' error occurred while executing the query');
@@ -608,11 +632,11 @@ class ExtensionsLib
else
{
$this->_printMessage('Query result:');
var_dump($result->retval); // KEEP IT!!!
var_dump(getData($resultQuery)); // KEEP IT!!!
$this->_ci->eprintflib->printEOL();
}
}
}
}
}
}
$this->_printSuccess(!$this->_errorOccurred);
@@ -673,7 +697,7 @@ class ExtensionsLib
foreach ($this->SOFTLINK_TARGET_DIRECTORIES as $rootPath => $targetDirectories)
{
foreach ($targetDirectories as $key => $targetDirectory)
foreach ($targetDirectories as $targetDirectory)
{
if (file_exists($rootPath.$targetDirectory.'/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$extensionName))
{
@@ -727,7 +751,7 @@ class ExtensionsLib
// For every target directory
foreach ($this->SOFTLINK_TARGET_DIRECTORIES as $rootPath => $targetDirectories)
{
foreach ($targetDirectories as $key => $targetDirectory)
foreach ($targetDirectories as $targetDirectory)
{
// If destination of the symlink does not exist
if (!file_exists($rootPath.$targetDirectory.'/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$extensionName))
File diff suppressed because it is too large Load Diff
+24 -5
View File
@@ -169,6 +169,9 @@ class IssuesLib
return $this->_changeIssueStatus($issue_id, $data, $user);
}
// --------------------------------------------------------------------------------------------------------------
// Private methods
/**
* Changes status of an issue.
* @param int $issue_id
@@ -215,8 +218,15 @@ class IssuesLib
* @param string $inhalt_extern
* @return object success or error
*/
private function _addIssue($fehlercode, $person_id = null, $oe_kurzbz = null, $fehlertext_params = null, $resolution_params = null, $fehlercode_extern = null, $inhalt_extern = null)
{
private function _addIssue(
$fehlercode,
$person_id = null,
$oe_kurzbz = null,
$fehlertext_params = null,
$resolution_params = null,
$fehlercode_extern = null,
$inhalt_extern = null
) {
if (isEmptyString($person_id) && isEmptyString($oe_kurzbz))
return error("Person_id or oe_kurzbz must be set.");
@@ -226,7 +236,15 @@ class IssuesLib
if (hasData($fehlerRes))
{
$fehlertextVorlage = getData($fehlerRes)[0]->fehlertext;
$fehlertext = isEmptyArray($fehlertext_params) ? $fehlertextVorlage : vsprintf($fehlertextVorlage, $fehlertext_params);
$fehlertext = $fehlertextVorlage;
if (!isEmptyArray($fehlertext_params))
{
if (count($fehlertext_params) != substr_count($fehlertextVorlage, '%s'))
return error('Wrong number of parameters for Fehlertext, fehler_kurzbz ' . $fehlercode);
$fehlertext = vsprintf($fehlertextVorlage, $fehlertext_params);
}
$openIssuesCountRes = $this->_ci->IssueModel->getOpenIssueCount($fehlercode, $person_id, $oe_kurzbz, $fehlercode_extern);
@@ -252,6 +270,7 @@ class IssuesLib
return error("Invalid parameters for resolution");
}
// insert new issue
return $this->_ci->IssueModel->insert(
array(
'fehlercode' => $fehlercode,
@@ -267,8 +286,8 @@ class IssuesLib
)
);
}
else
return success($openIssueCount);
else // return success if issue already exists
return success("Issue already exists");
}
else
return error("Number of open issues could not be determined");
+1
View File
@@ -182,6 +182,7 @@ class MailLib
{
if ($this->sended == $this->email_number_per_time_range)
{
$this->sended = 0;
sleep($this->email_time_range); // Wait!!!
}
}
+34 -7
View File
@@ -1,4 +1,20 @@
<?php
/**
* Copyright (C) 2022 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
@@ -37,7 +53,7 @@ class NavigationLib
// Loads library ExtensionsLib
$this->_ci->load->library('ExtensionsLib');
$this->_navigationPage = $this->_getNavigationtPage($params); // sets the id for the related navigation widget
$this->_navigationPage = $this->_getNavigationPage($params); // sets the id for the related navigation widget
}
//------------------------------------------------------------------------------------------------------------------
@@ -67,9 +83,19 @@ class NavigationLib
* Returns the structure for one level of the menu
*/
public function oneLevel(
$description, $link = '#', $children = null, $icon = '', $expand = false,
$subscriptDescription = null, $subscriptLinkClass = null, $subscriptLinkValue = null, $target = '',
$sort = null, $requiredPermissions = null, $subscriptLinkHref = '#')
$description,
$link = '#',
$children = null,
$icon = '',
$expand = false,
$subscriptDescription = null,
$subscriptLinkClass = null,
$subscriptLinkValue = null,
$target = '',
$sort = null,
$requiredPermissions = null,
$subscriptLinkHref = '#'
)
{
return array(
'description' => $description,
@@ -223,7 +249,8 @@ class NavigationLib
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/'.self::CONFIG_NAVIGATION_FILENAME;
if (file_exists($filename))
{
unset($config);
$config = array(); // default value
include($filename);
if (isset($config[$configName]) && is_array($config[$configName]))
@@ -278,7 +305,7 @@ class NavigationLib
}
else
{
foreach ($navigationArray as $key=>$row)
foreach ($navigationArray as $key => $row)
{
// Search for * Entries
if (mb_strpos($key, '*') === 0 || mb_strpos($key, '*') === mb_strlen($key) - 1)
@@ -300,7 +327,7 @@ class NavigationLib
* Return an unique string that identify this navigation widget
* NOTE: The default value is the URI where the NavigationWidget is called
*/
private function _getNavigationtPage($params)
private function _getNavigationPage($params)
{
if ($params != null
&& is_array($params)
-165
View File
@@ -7,9 +7,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
*/
class PersonLogLib
{
const PARKED_LOGNAME = 'Parked';
const ONHOLD_LOGNAME = 'Onhold';
/**
* Constructor
*/
@@ -78,168 +75,6 @@ class PersonLogLib
else
show_error(getError($result));
}
/**
* Parks a person, i.e. marks a person so no actions are expected for the person (e.g. as a prestudent)
* Done by adding a logentry in the future
* @param $person_id
* @param $date
* @param $taetigkeit_kurzbz
* @param string $app
* @param null $oe_kurzbz
* @param null $user
* @return insert object
*/
public function park($person_id, $date, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null)
{
$onhold = $this->getOnHoldDate($person_id);
if (hasData($onhold))
return error("Person already on hold");
$logjson = array(
'name' => self::PARKED_LOGNAME
);
return $this->_savePsLog($person_id, $date, $taetigkeit_kurzbz, $logjson, $app, $oe_kurzbz, $user);
}
/**
* Unparks a person, i.e. removes all log entries in the future with logname for parking
* @param $person_id
* @return array with deleted logids
*/
public function unPark($person_id)
{
$deleted = array();
$result = $this->ci->PersonLogModel->getLogsInFuture($person_id);
if (hasData($result))
{
foreach ($result->retval as $log)
{
$logdata = json_decode($log->logdata);
if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME)
{
$delresult = $this->ci->PersonLogModel->deleteLog($log->log_id);
if (isSuccess($delresult))
{
$deleted[] = $log->log_id;
}
}
}
}
return success($deleted);
}
/**
* Gets date until which a person is parked
* @param $person_id
* @return the date if person is parked, null otherwise
*/
public function getParkedDate($person_id)
{
$result = $this->ci->PersonLogModel->getLogsInFuture($person_id);
$parkeddate = null;
if (hasData($result))
{
foreach ($result->retval as $log)
{
$logdata = json_decode($log->logdata);
if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME)
{
$parkeddate = $log->zeitpunkt;
break;
}
}
}
return $parkeddate;
}
/**
* Sets person on hold, i.e. marks a person so no actions are expected for the person (e.g. as a prestudent).
* Done by adding a logentry with a special name. can be undone only manually by clicking button.
* @param $person_id
* @param $date
* @param $taetigkeit_kurzbz
* @param string $app
* @param null $oe_kurzbz
* @param null $user
* @return array
*/
public function setOnHold($person_id, $date, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null)
{
$parked = $this->getParkedDate($person_id);
if (hasData($parked))
return error("Person already parked");
$logjson = array(
'name' => self::ONHOLD_LOGNAME
);
return $this->_savePsLog($person_id, $date, $taetigkeit_kurzbz, $logjson, $app, $oe_kurzbz, $user);
}
/**
* Removes on hold status, i.e. removes all log entries with logname for on hold
* @param $person_id
* @return array
*/
public function removeOnHold($person_id)
{
$deleted = array();
$result = $this->ci->PersonLogModel->filterLog($person_id);
if (hasData($result))
{
foreach ($result->retval as $log)
{
$logdata = json_decode($log->logdata);
if (isset($logdata->name) && $logdata->name === self::ONHOLD_LOGNAME)
{
$delresult = $this->ci->PersonLogModel->deleteLog($log->log_id);
if (isSuccess($delresult))
{
$deleted[] = $log->log_id;
}
}
}
}
return success($deleted);
}
/**
* Gets date until which a person is on hold
* @param $person_id
* @return the date if person is on hold, null otherwise
*/
public function getOnHoldDate($person_id)
{
$result = $this->ci->PersonLogModel->filterLog($person_id);
$onholddate = null;
if (hasData($result))
{
foreach ($result->retval as $log)
{
$logdata = json_decode($log->logdata);
if (isset($logdata->name) && $logdata->name === self::ONHOLD_LOGNAME)
{
$onholddate = $log->zeitpunkt;
break;
}
}
}
return $onholddate;
}
/**
* Saves a processstate log with specified parameters, including a specified log date.
* @param $person_id
+410
View File
@@ -0,0 +1,410 @@
<?php
/**
* FH-Complete
*
* @package FHC-Helper
* @author FHC-Team
* @copyright Copyright (c) 2023 fhcomplete.net
* @license GPLv3
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
class PrestudentLib
{
/**
* Object initialization
*/
public function __construct()
{
$this->_ci =& get_instance();
// // Configs
// $this->_ci->load->config('studierendenantrag');
// // Models
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->_ci->load->model('crm/Student_model', 'StudentModel');
$this->_ci->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$this->_ci->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
$this->_ci->load->model('organisation/Lehrverband_model', 'LehrverbandModel');
$this->_ci->load->model('education/Studentlehrverband_model', 'StudentlehrverbandModel');
$this->_ci->load->model('person/Benutzer_model', 'BenutzerModel');
$this->_ci->load->model('organisation/Studiengang_model', 'StudiengangModel');
}
public function setAbbrecher($prestudent_id, $studiensemester_kurzbz, $insertvon = null, $statusgrund_kurzbz = null, $datum = null, $bestaetigtam = null)
{
if (!$insertvon)
$insertvon = getAuthUID();
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz);
if (isError($result))
return $result;
$result = getData($result);
if (!$result)
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudent_in_sem', [
'prestudent_id' => $prestudent_id,
'studiensemester_kurzbz' => $studiensemester_kurzbz
]));
$prestudent_status = current($result);
$result = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
if (isError($result))
return $result;
$result = getData($result);
if (!$result)
return error($this->_ci->p->t('studierendenantrag', 'error_no_student_for_prestudent', ['prestudent_id' => $prestudent_id]));
$student = current($result);
if(!$datum)
$datum = date('c');
if(!$bestaetigtam)
$bestaetigtam = date('c');
//Status und Statusgrund updaten
$result = $this->_ci->PrestudentstatusModel->withGrund($statusgrund_kurzbz)->insert([
'prestudent_id' => $prestudent_id,
'status_kurzbz' => Prestudentstatus_model::STATUS_ABBRECHER,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'ausbildungssemester' => $prestudent_status->ausbildungssemester,
'datum' => $datum,
'insertvon' => $insertvon,
'insertamum' => date('c'),
'orgform_kurzbz'=> $prestudent_status->orgform_kurzbz,
'studienplan_id'=> $prestudent_status->studienplan_id,
'bestaetigtvon' => $insertvon,
'bestaetigtam' => $bestaetigtam
]);
if (isError($result))
return $result;
//Verband anlegen
$result = $this->_ci->LehrverbandModel->load([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'A',
'gruppe' => ''
]);
if (isError($result))
return $result;
$result = getData($result);
if (!$result)
{
$result = $this->_ci->LehrverbandModel->load([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => '',
'gruppe' => ''
]);
if (isError($result))
return $result;
$result = getData($result);
if(!$result)
{
$this->_ci->LehrverbandModel->insert([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => '',
'gruppe' => '',
'bezeichnung' => 'Ab-Unterbrecher',
'aktiv' => true,
]);
}
$this->_ci->LehrverbandModel->insert([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'A',
'gruppe' => '',
'bezeichnung' => 'Abbrecher',
'aktiv' => true
]);
}
//noch nicht eingetragene Zeugnisnoten auf 9 setzen
$result = $this->_ci->ZeugnisnoteModel->getZeugnisnoten($student->student_uid, $studiensemester_kurzbz);
if (isError($result))
return $result;
$result = getData($result) ?: [];
foreach ($result as $lv)
{
if (!$lv->note)
{
$result = $this->_ci->ZeugnisnoteModel->insert([
'note' => 9,
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
'student_uid' => $lv->uid,
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
]);
if (isError($result)) {
$result = $this->_ci->ZeugnisnoteModel->update([
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
'student_uid' => $lv->uid,
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
], [
'note' => 9
]);
if (isError($result))
return $result;
}
}
}
//Update Aktionen
//StudentModel updaten
$this->_ci->StudentModel->update([
'student_uid' => $student->student_uid
], [
'verband' => 'A',
'gruppe' => '',
'semester' => 0,
'updatevon' => $insertvon,
'updateamum' => date('c')
]);
//Studentlehrverband setzen
$this->_ci->StudentlehrverbandModel->update([
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'student_uid' => $student->student_uid
], [
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'A',
'gruppe' => '',
'updateamum' => date('c'),
'updatevon' => $insertvon
]);
//Benutzer inaktiv setzen
$this->_ci->BenutzerModel->update([
'uid' => $student->student_uid
], [
'aktiv' => false,
'updateaktivvon' => $insertvon,
'updateaktivam' => date('c'),
'updatevon' => $insertvon,
'updateamum' => date('c')
]);
return success();
}
public function setUnterbrecher($prestudent_id, $studiensemester_kurzbz, $studierendenantrag_id, $insertvon = null)
{
$ausbildungssemester_plus = 0;
if (!$insertvon)
$insertvon = getAuthUID();
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id, $studiensemester_kurzbz);
if (isError($result))
return $result;
$result = getData($result);
if (!$result) {
//NOTE(manu): only valid if nextSemester focus max
$result = $this->_ci->PrestudentstatusModel->getLastStatus($prestudent_id);
if (isError($result))
return $result;
$result = getData($result);
//check if ausbildungssemester is last
$this->_ci->StudiengangModel->addJoin('public.tbl_prestudent p', 'studiengang_kz');
$res = $this->_ci->StudiengangModel->loadWhere(['p.prestudent_id' => $prestudent_id]);
if(isError($res))
return $res;
if(!hasData($res))
return error($this->_ci->p->t('studierendenantrag', 'error_no_stg_for_prestudent', [
'prestudent_id' => $prestudent_id
]));
$studiengang = current(getData($res));
$prestudent_status = current($result);
if($prestudent_status->ausbildungssemester + 1 < $studiengang->max_semester)
$ausbildungssemester_plus = 1;
if(!$result)
{
return error($this->_ci->p->t('studierendenantrag', 'error_no_prestudent_in_sem', [
'prestudent_id' => $prestudent_id,
'studiensemester_kurzbz' => $studiensemester_kurzbz
]));
}
}
$prestudent_status = current($result);
$result = $this->_ci->StudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
if (isError($result))
return $result;
$result = getData($result);
if (!$result)
return error($this->_ci->p->t('studierendenantrag', 'error_no_student_for_prestudent', ['prestudent_id' => $prestudent_id]));
$student = current($result);
$resultAntrag = $this->_ci->StudierendenantragModel->load($studierendenantrag_id);
if (isError($resultAntrag))
return $resultAntrag;
$resultAntrag = getData($resultAntrag);
if (!$resultAntrag)
return error($this->_ci->p->t('studierendenantrag', 'error_no_antrag_found', ['id' => $studierendenantrag_id]));
$antrag = current($resultAntrag);
//Status updaten
$result = $this->_ci->PrestudentstatusModel->insert([
'prestudent_id' => $prestudent_id,
'status_kurzbz' => Prestudentstatus_model::STATUS_UNTERBRECHER,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'ausbildungssemester' => $prestudent_status->ausbildungssemester + $ausbildungssemester_plus,
'datum' => date('c'),
'insertvon' => $insertvon,
'insertamum' => date('c'),
'orgform_kurzbz'=> $prestudent_status->orgform_kurzbz,
'studienplan_id'=> $prestudent_status->studienplan_id,
'bestaetigtvon' => $insertvon,
'bestaetigtam' => date('c'),
'anmerkung'=> 'Wiedereinstieg ' . $antrag->datum_wiedereinstieg
]);
if (isError($result))
return $result;
//Verband anlegen
$result = $this->_ci->LehrverbandModel->load([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'B',
'gruppe' => ''
]);
if (isError($result))
return $result;
$result = getData($result);
if (!$result)
{
$result = $this->_ci->LehrverbandModel->load([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => '',
'gruppe' => ''
]);
if (isError($result))
return $result;
$result = getData($result);
if(!$result)
{
$this->_ci->LehrverbandModel->insert([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => '',
'gruppe' => '',
'bezeichnung' => 'Ab-Unterbrecher',
'aktiv' => true,
]);
}
$this->_ci->LehrverbandModel->insert([
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'B',
'gruppe' => '',
'bezeichnung' => 'Unterbrecher',
'aktiv' => true
]);
}
//noch nicht eingetragene Zeugnisnoten auf 9 setzen
$result = $this->_ci->ZeugnisnoteModel->getZeugnisnoten($student->student_uid, $studiensemester_kurzbz);
if (isError($result))
return $result;
$result = getData($result) ?: [];
foreach ($result as $lv)
{
if (!$lv->note)
{
$result = $this->_ci->ZeugnisnoteModel->insert([
'note' => 9,
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
'student_uid' => $lv->uid,
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
]);
if (isError($result)) {
$result = $this->_ci->ZeugnisnoteModel->update([
'studiensemester_kurzbz' => $lv->studiensemester_kurzbz,
'student_uid' => $lv->uid,
'lehrveranstaltung_id' => $lv->lehrveranstaltung_id
], [
'note' => 9
]);
if (isError($result))
return $result;
}
}
}
//Update Aktionen
//StudentModel updaten
$this->_ci->StudentModel->update([
'student_uid' => $student->student_uid
], [
'verband' => 'B',
'gruppe' => '',
'semester' => 0,
'updatevon' => $insertvon,
'updateamum' => date('c')
]);
//Studentlehrverband setzen
$result = $this->_ci->StudentlehrverbandModel->loadWhere([
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'student_uid' => $student->student_uid
]);
if (hasData($result)) {
$this->_ci->StudentlehrverbandModel->update([
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'student_uid' => $student->student_uid
], [
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'B',
'gruppe' => '',
'updateamum' => date('c'),
'updatevon' => $insertvon
]);
} else {
$this->_ci->StudentlehrverbandModel->insert([
'student_uid' => $student->student_uid,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'studiengang_kz' => $student->studiengang_kz,
'semester' => 0,
'verband' => 'B',
'gruppe' => '',
'insertamum' => date('c'),
'insertvon' => $insertvon
]);
}
return success();
}
}
+298
View File
@@ -0,0 +1,298 @@
<?php
/**
* Copyright (C) 2022 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \stdClass as stdClass;
/**
*
*/
class SearchBarLib
{
// Error constats
const ERROR_WRONG_JSON = 'ERR001';
const ERROR_WRONG_SEARCHSTR = 'ERR002';
const ERROR_NO_TYPES = 'ERR003';
const ERROR_WRONG_TYPES = 'ERR004';
// List of allowed types of search
const ALLOWED_TYPES = ['mitarbeiter', 'organisationunit', 'raum', 'person', 'student', 'prestudent', 'document', 'cms'];
const PHOTO_IMG_URL = '/cis/public/bild.php?src=person&person_id=';
private $_ci; // Code igniter instance
/**
* Gets the CI instance and loads model
*/
public function __construct()
{
$this->_ci =& get_instance(); // get code igniter instance
// It is loaded only to have the DB_Model available
$this->_ci->load->model('person/Benutzer_model', 'BenutzerModel');
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* It performes the search of the given search string using the specified search types
*/
public function search($searchstr, $types)
{
// Checks if the given parameters are fine
$search = $this->_checkParameters($searchstr, $types);
// If the check was successful then perform the search
if (isSuccess($search)) $search = $this->_search($searchstr, $types);
return $search; // return the result
}
//------------------------------------------------------------------------------------------------------------------
// Private methods
/**
* Checks:
* - The given searchstr is a not empty string
* - The given types is a not empty array and contains allowed search types
*/
private function _checkParameters($searchstr, $types)
{
// If searchstr is empty
if (isEmptyString($searchstr)) return error(self::ERROR_WRONG_SEARCHSTR);
// If types is not an array or it is empty
if (isEmptyArray($types)) return error(self::ERROR_NO_TYPES);
// If all the elements in types are allowed search types
if (!isEmptyArray(array_diff($types, self::ALLOWED_TYPES))) return error(self::ERROR_WRONG_TYPES);
return success(); // The check is fine!
}
/**
* Loops on types and perform the search of that type using searchstr
* Then it collects all the returned data into an array as property of an object
*/
private function _search($searchstr, $types)
{
// Object to be returned
$result = new stdClass();
$result->data = array();
// For each search type
foreach ($types as $type)
{
// Perform the search and then add the result to data
$result->data = array_merge($result->data, $this->{'_'.$type}($searchstr, $type));
}
return $result;
}
/**
* Search for employees
*/
private function _mitarbeiter($searchstr, $type)
{
$dbModel = new DB_Model();
$employees = $dbModel->execReadOnlyQuery('
SELECT
\''.$type.'\' AS type,
b.uid AS uid,
p.person_id AS person_id,
p.vorname || \' \' || p.nachname AS name,
ARRAY_AGG(DISTINCT(org.bezeichnung)) AS organisationunit_name,
COALESCE(b.alias, b.uid) || \''.'@'.DOMAIN.'\' AS email,
TRIM(COALESCE(k.kontakt, \'\') || \' \' || COALESCE(m.telefonklappe, \'\')) AS phone,
\''.base_url(self::PHOTO_IMG_URL).'\' || p.person_id AS photo_url,
ARRAY_AGG(DISTINCT(stdkst.bezeichnung)) AS standardkostenstelle
FROM public.tbl_mitarbeiter m
JOIN public.tbl_benutzer b ON(b.uid = m.mitarbeiter_uid)
JOIN (
SELECT o.bezeichnung, bf.uid
FROM public.tbl_benutzerfunktion bf
JOIN public.tbl_organisationseinheit o USING(oe_kurzbz)
WHERE bf.funktion_kurzbz = \'kstzuordnung\'
AND (bf.datum_von IS NULL OR bf.datum_von <= NOW())
AND (bf.datum_bis IS NULL OR bf.datum_bis >= NOW())
GROUP BY o.bezeichnung, bf.uid
) stdkst ON stdkst.uid = b.uid
JOIN public.tbl_person p USING(person_id)
JOIN (
SELECT o.bezeichnung, bf.uid
FROM public.tbl_benutzerfunktion bf
JOIN public.tbl_organisationseinheit o USING(oe_kurzbz)
WHERE bf.funktion_kurzbz = \'oezuordnung\'
AND (bf.datum_von IS NULL OR bf.datum_von <= NOW())
AND (bf.datum_bis IS NULL OR bf.datum_bis >= NOW())
GROUP BY o.bezeichnung, bf.uid
) org ON org.uid = b.uid
LEFT JOIN (
SELECT kontakt, standort_id
FROM public.tbl_kontakt
WHERE kontakttyp = \'telefon\'
) k ON(k.standort_id = m.standort_id)
WHERE b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR org.bezeichnung ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR stdkst.bezeichnung ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
GROUP BY type, b.uid, p.person_id, name, email, m.telefonklappe, phone
');
// If something has been found then return it
if (hasData($employees)) return getData($employees);
// Otherwise return an empty array
return array();
}
/**
* Seach for organisation units
*/
private function _organisationunit($searchstr, $type)
{
$dbModel = new DB_Model();
$ous = $dbModel->execReadOnlyQuery('
SELECT
\''.$type.'\' AS type,
o.oe_kurzbz AS oe_kurzbz,
o.bezeichnung AS name,
oParent.oe_kurzbz AS parentoe_kurzbz,
oParent.bezeichnung AS parentoe_name,
ARRAY_AGG(DISTINCT(bfLeader.uid)) AS leader_uid,
ARRAY_AGG(DISTINCT(bfLeader.vorname || \' \' || bfLeader.nachname)) AS leader_name,
COUNT(bfCount.benutzerfunktion_id) AS number_of_people,
(CASE WHEN o.mailverteiler = TRUE THEN o.oe_kurzbz || \''.'@'.DOMAIN.'\' END) AS mailgroup
FROM public.tbl_organisationseinheit o
LEFT JOIN public.tbl_organisationseinheit oParent ON(oParent.oe_kurzbz = o.oe_parent_kurzbz)
LEFT JOIN (
SELECT benutzerfunktion_id, oe_kurzbz
FROM public.tbl_benutzerfunktion
WHERE funktion_kurzbz = \'oezuordnung\'
AND (datum_von IS NULL OR datum_von <= NOW())
AND (datum_bis IS NULL OR datum_bis >= NOW())
) bfCount ON(bfCount.oe_kurzbz = o.oe_kurzbz)
LEFT JOIN (
SELECT bf.oe_kurzbz, bf.uid, p.vorname, p.nachname
FROM public.tbl_benutzerfunktion bf
JOIN public.tbl_benutzer b USING(uid)
JOIN public.tbl_person p USING(person_id)
WHERE funktion_kurzbz = \'Leitung\'
AND (datum_von IS NULL OR datum_von <= NOW())
AND (datum_bis IS NULL OR datum_bis >= NOW())
AND b.aktiv = TRUE
) bfLeader ON(bfLeader.oe_kurzbz = o.oe_kurzbz)
WHERE o.oe_kurzbz ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR o.bezeichnung ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
GROUP BY type, o.oe_kurzbz, o.bezeichnung, oParent.oe_kurzbz, oParent.bezeichnung
');
// If something has been found
if (hasData($ous))
{
// Loop through the returned dataset
foreach (getData($ous) as $ou)
{
// Create the new property leaders as an empty array
$ou->leaders = array();
// Loop through the found leaders for this organisation unit
for ($i = 0; $i < count($ou->leader_uid); $i++)
{
// If a leader exists for this organisationunit and has a name :D
if (!isEmptyString($ou->leader_uid[$i]) && !isEmptyString($ou->leader_name[$i]))
{
// Empty object that will contains the leader uid and name
$leader = new stdClass();
// Set the properties name and uid
$leader->uid = $ou->leader_uid[$i];
$leader->name = $ou->leader_name[$i];
// Add the leader object to the leaders array
$ou->leaders[] = $leader;
}
}
// Remove the not needed properties leader_uid and leader_name
unset($ou->leader_uid);
unset($ou->leader_name);
}
// Returns the changed dataset
return getData($ous);
}
// Otherwise return an empty array
return array();
}
/**
* Search for persons
*/
private function _person($searchstr, $type)
{
return array();
}
/**
* Search for students
*/
private function _student($searchstr, $type)
{
return array();
}
/**
* Search for prestudents
*/
private function _prestudent($searchstr, $type)
{
return array();
}
/**
* Search for documents
*/
private function _document($searchstr, $type)
{
return array();
}
/**
* Search for CMSs
*/
private function _cms($searchstr, $type)
{
return array();
}
/**
* Search for rooms
*/
private function _raum($searchstr, $type)
{
return array();
}
}
+85
View File
@@ -0,0 +1,85 @@
<?php
/**
* Copyright (C) 2022 fhcomplete.net
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
require_once(dirname(__FILE__).'/../../vendor/nategood/httpful/bootstrap.php');
/**
* Simple client to call the signature server
*/
class SignatureLib
{
// -------------------------------------------------------------------------------------------------
// Public static methods
/**
* Returns the list of signature inside the given file
*/
public static function list($inputFileName)
{
try
{
// Dont send Document if it is bigger than 30 MB (Limit of Signature Server)
if (filesize($inputFileName) > 30000000)
{
$returnObject = new stdClass();
$returnObject->code = 1;
$returnObject->error = 1;
$returnObject->retval = 'File to big';
return $returnObject;
}
// Get the content of the given file
$inputFileContent = file_get_contents($inputFileName);
if ($inputFileContent === false) // if failed
{
error_log('An error occurred while getting the content from: '.$inputFileName);
}
else
{
// Posts the given file content + file name and expects a response in JSON format
$resultPost = \Httpful\Request::post(SIGNATUR_URL.'/'.SIGNATUR_LIST_API)
->sendsJson()
->authenticateWith(SIGNATUR_USER, SIGNATUR_PASSWORD)
->body('{"filename": "'.basename($inputFileName).'", "content": "'.base64_encode($inputFileContent).'"}')
->expectsJson()
->send();
}
}
catch(\Httpful\Exception\ConnectionErrorException $cee) // Httpful exception
{
error_log($cee->getMessage());
}
catch (Exception $e) // any other exception
{
error_log($e->getMessage());
}
// If the response is fine
if (isset($resultPost->body) && is_object($resultPost->body)
&& isset($resultPost->body->retval) && is_array($resultPost->body->retval))
{
return $resultPost->body->retval;
}
// Otherwise return a null as error
return null;
}
}
@@ -0,0 +1,55 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Library containing definitions of all core plausichecks.
*/
class PlausicheckDefinitionLib
{
// set fehler for core plausichecks
// structure: fehler_kurzbz => class (library) name for resolving
private $_fehlerLibMappings = array(
'AbbrecherAktiv' => 'AbbrecherAktiv',
'AbschlussstatusFehlt' => 'AbschlussstatusFehlt',
'AktSemesterNull' => 'AktSemesterNull',
'AktiverStudentOhneStatus' => 'AktiverStudentOhneStatus',
'AusbildungssemPrestudentUngleichAusbildungssemStatus' => 'AusbildungssemPrestudentUngleichAusbildungssemStatus',
'BewerberNichtZumRtAngetreten' => 'BewerberNichtZumRtAngetreten',
'DatumAbschlusspruefungFehlt' => 'DatumAbschlusspruefungFehlt',
'DatumSponsionFehlt' => 'DatumSponsionFehlt',
'DatumStudiensemesterFalscheReihenfolge' => 'DatumStudiensemesterFalscheReihenfolge',
'FalscheAnzahlAbschlusspruefungen' => 'FalscheAnzahlAbschlusspruefungen',
'FalscheAnzahlHeimatadressen' => 'FalscheAnzahlHeimatadressen',
'FalscheAnzahlZustelladressen' => 'FalscheAnzahlZustelladressen',
'GbDatumWeitZurueck' => 'GbDatumWeitZurueck',
'InaktiverStudentAktiverStatus' => 'InaktiverStudentAktiverStatus',
'IncomingHeimatNationOesterreich' => 'IncomingHeimatNationOesterreich',
'IncomingOhneIoDatensatz' => 'IncomingOhneIoDatensatz',
'IncomingOrGsFoerderrelevant' => 'IncomingOrGsFoerderrelevant',
'InskriptionVorLetzerBismeldung' => 'InskriptionVorLetzerBismeldung',
'NationNichtOesterreichAberGemeinde' => 'NationNichtOesterreichAberGemeinde',
'OrgformStgUngleichOrgformPrestudent' => 'OrgformStgUngleichOrgformPrestudent',
'PrestudentMischformOhneOrgform' => 'PrestudentMischformOhneOrgform',
'StgPrestudentUngleichStgStudienplan' => 'StgPrestudentUngleichStgStudienplan',
'StgPrestudentUngleichStgStudent' => 'StgPrestudentUngleichStgStudent',
'StudentstatusNachAbbrecher' => 'StudentstatusNachAbbrecher'
//'StudienplanUngueltig' => 'StudienplanUngueltig'
);
/**
* Gets all fehler_kurzbz-library mappings for fehler which need to be checked.
*/
public function getFehlerLibMappings()
{
return $this->_fehlerLibMappings;
}
/**
* Gets all fehler_kurzbz for fehler which need to be checked.
*/
public function getFehlerKurzbz()
{
return array_keys($this->_fehlerLibMappings);
}
}
@@ -0,0 +1,81 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
class PlausicheckProducerLib
{
const CI_PATH = 'application';
const CI_LIBRARY_FOLDER = 'libraries';
const EXTENSIONS_FOLDER = 'extensions';
const PLAUSI_ISSUES_FOLDER = 'issues/plausichecks';
const EXECUTE_PLAUSI_CHECK_METHOD_NAME = 'executePlausiCheck';
private $_ci; // ci instance
private $_extensionName; // name of extension
private $_app; // name of application
private $_konfiguration = array(); // konfigratio parameters
public function __construct($params = null)
{
// set extension name if called from extension
if (isset($params['extensionName'])) $this->_extensionName = $params['extensionName'];
// set application
$app = isset($params['app']) ? $params['app'] : null;
$this->_ci =& get_instance(); // get ci instance
// load models
$this->_ci->load->model('system/Fehlerkonfiguration_model', 'FehlerkonfigurationModel');
// get all configuration parameters for the application
$fehlerkonfigurationRes = $this->_ci->FehlerkonfigurationModel->getKonfiguration($app);
if (hasData($fehlerkonfigurationRes))
{
$fehlerkonfiguration = getData($fehlerkonfigurationRes);
foreach ($fehlerkonfiguration as $fk)
{
$this->_konfiguration[$fk->fehler_kurzbz][$fk->konfigurationstyp_kurzbz] = $fk->konfiguration;
}
}
}
/**
* Executes plausicheck using a given library, returns the result.
* @param $libName string name of library producing the issue
* @param $fehler_kurzbz string unique short name of fehler, for which issue is produced
* @param $params parameters passed to issue production method
*/
public function producePlausicheckIssue($libName, $fehler_kurzbz, $params)
{
// if called from extension (extension name set), path includes extension names
$libRootPath = isset($this->_extensionName) ? self::EXTENSIONS_FOLDER . '/' . $this->_extensionName . '/' : '';
// path for loading issue library
$issuesLibPath = $libRootPath . self::PLAUSI_ISSUES_FOLDER . '/';
// file path of library for check if file exists
$issuesLibFilePath = DOC_ROOT . self::CI_PATH
. '/' . $libRootPath . self::CI_LIBRARY_FOLDER . '/' . self::PLAUSI_ISSUES_FOLDER . '/' . $libName . '.php';
// check if library file exists
if (!file_exists($issuesLibFilePath)) return error("Issue library file " . $issuesLibFilePath . " does not exist");
// load konfiguration parameters of the fehler_kurzbz
$config = isset($this->_konfiguration[$fehler_kurzbz]) ? $this->_konfiguration[$fehler_kurzbz] : null;
// load library connected to fehlercode
$this->_ci->load->library($issuesLibPath . $libName, $config);
$lowercaseLibName = mb_strtolower($libName);
// check if method is defined in library class
if (!is_callable(array($this->_ci->{$lowercaseLibName}, self::EXECUTE_PLAUSI_CHECK_METHOD_NAME)))
return error("Method " . self::EXECUTE_PLAUSI_CHECK_METHOD_NAME . " is not defined in library $lowercaseLibName");
// call the function for checking for issue production
return $this->_ci->{$lowercaseLibName}->{self::EXECUTE_PLAUSI_CHECK_METHOD_NAME}($params);
}
}
@@ -0,0 +1,91 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class AbbrecherAktiv extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getAbbrecherAktiv($studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Abbrecher cannot be active.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getAbbrecherAktiv($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
$qry = "
SELECT
pre.person_id, pre.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_prestudentstatus pre_status
JOIN public.tbl_prestudent pre USING(prestudent_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 pre.studiengang_kz = stg.studiengang_kz
WHERE
pre_status.status_kurzbz ='Abbrecher'
AND benutzer.aktiv=true";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,143 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class AbschlussstatusFehlt extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getAbschlussstatusFehlt(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Prestudent should have a final status.
* @param studiensemester_kurzbz string if check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getAbschlussstatusFehlt(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
DISTINCT ON (pre.prestudent_id)
pre.person_id, pre.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, status.studiensemester_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE
NOT EXISTS( /*student does not study anymore*/
SELECT
1
FROM
public.tbl_prestudentstatus ps
JOIN public.tbl_studiensemester USING(studiensemester_kurzbz)
WHERE
prestudent_id=pre.prestudent_id
/* 4 months: There might be Diplomanden, in summer months end status is often not entered yet */
AND tbl_studiensemester.ende>now() - interval '4 months'
)
/* check only valid begininng with 2018 */
AND '2018-01-01'<(SELECT max(datum) FROM public.tbl_prestudentstatus WHERE prestudent_id=pre.prestudent_id)
AND NOT EXISTS( /* no end status */
SELECT 1
FROM public.tbl_prestudentstatus ps
WHERE
prestudent_id=pre.prestudent_id
AND status_kurzbz IN('Abbrecher','Abgewiesener','Absolvent','Incoming')
)
AND stg.melderelevant
AND pre.bismelden";
if (isset($studiensemester_kurzbz))
{
$prevStudiensemesterRes = $this->_ci->StudiensemesterModel->getPreviousFrom($studiensemester_kurzbz);
if (isError($prevStudiensemesterRes)) return $prevStudiensemesterRes;
if (hasData($prevStudiensemesterRes))
{
// if Studiensemester given, check only if has status in current or previous semester
$prevStudiensemester = getData($prevStudiensemesterRes)[0]->studiensemester_kurzbz;
$qry .= " AND EXISTS (
SELECT 1
FROM public.tbl_prestudentstatus ps
WHERE studiensemester_kurzbz IN (?, ?)
AND ps.prestudent_id = pre.prestudent_id
)";
$params[] = $prevStudiensemester;
$params[] = $studiensemester_kurzbz;
}
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,100 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class AktSemesterNull extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getAktSemesterNull($studiensemester_kurzbz, $studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Current Ausbildungssemester shouldn't be 0.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getAktSemesterNull($studiensemester_kurzbz, $studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
DISTINCT pre.person_id, pre.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, prestat.studiensemester_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_prestudentstatus prestat USING(prestudent_id)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE
prestat.status_kurzbz != 'Incoming'
AND prestat.studiensemester_kurzbz = ?
AND ausbildungssemester = 0
AND stg.melderelevant
AND pre.bismelden";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,99 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class AktiverStudentOhneStatus extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getAktiverStudentOhneStatus($studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Students with active Benutzer should have a status in the current semester.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getAktiverStudentOhneStatus($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
$qry = "
SELECT
DISTINCT (student_uid), prestudent.person_id, prestudent.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_student student
JOIN public.tbl_benutzer benutzer on (benutzer.uid = student.student_uid)
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
WHERE
benutzer.aktiv=TRUE
AND stg.melderelevant
AND prestudent.bismelden
AND NOT EXISTS (
SELECT 1
FROM public.tbl_prestudentstatus
JOIN public.tbl_studiensemester sem USING (studiensemester_kurzbz)
WHERE prestudent_id = prestudent.prestudent_id
/* buffer of four months, as status are often entered later */
AND sem.ende::date > NOW() - interval '4 months'
)";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,120 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
* Student with active status should have been charged, i.e. have a Kontobuchung with negative or zero value.
*/
class AktiverStudentstatusOhneKontobuchung extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getAktiverStudentstatusOhneKontobuchung(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Student with active status should have been charged, i.e. have a Kontobuchung with a negative or zero value.
* @param studiensemester_kurzbz string if check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getAktiverStudentstatusOhneKontobuchung(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
DISTINCT ON (pre.prestudent_id)
pre.person_id, pre.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, status.studiensemester_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_person pers USING(person_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE
status.studiensemester_kurzbz = ?
AND status.status_kurzbz IN ('Student', 'Incoming')
AND NOT EXISTS (
SELECT 1
FROM
public.tbl_konto
WHERE
person_id = pers.person_id
AND studiensemester_kurzbz = status.studiensemester_kurzbz
AND buchungsnr_verweis IS NULL
AND betrag <= 0
)
AND stg.melderelevant
AND pre.bismelden";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,116 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class AusbildungssemPrestudentUngleichAusbildungssemStatus extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getAusbildungssemPrestudentUngleichAusbildungssemStatus(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'status_ausbildungssemester' => $prestudent->status_ausbildungssemester,
'student_ausbildungssemester' => $prestudent->student_ausbildungssemester,
'student_uid' => $prestudent->student_uid,
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Ausbildungssemester of prestudent (lehrverband) must be the same as Ausbildungssemester of prestudentstatus.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getAusbildungssemPrestudentUngleichAusbildungssemStatus(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array($studiensemester_kurzbz, $studiensemester_kurzbz, $studiensemester_kurzbz);
$qry = "
SELECT
DISTINCT(student.student_uid), student.student_uid, prestudent.person_id, prestudent.prestudent_id,
status.ausbildungssemester AS status_ausbildungssemester, lv.semester AS student_ausbildungssemester, status.studiensemester_kurzbz,
stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_student student
JOIN public.tbl_studentlehrverband lv USING(student_uid)
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
WHERE
status.studiensemester_kurzbz = ?
AND lv.studiensemester_kurzbz = ?
AND status.status_kurzbz NOT IN ('Interessent','Bewerber','Aufgenommener','Wartender','Abgewiesener','Unterbrecher')
AND get_rolle_prestudent (prestudent_id, ?)='Student'
AND status.ausbildungssemester != lv.semester";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,123 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class BewerberNichtZumRtAngetreten extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getBewerberNichtZumRtAngetreten(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array(
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz,
'prestudent_id' => $prestudent->prestudent_id
)
);
}
}
// return the results
return success($results);
}
/**
* Bewerber should have participated in Reihungstest.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getBewerberNichtZumRtAngetreten(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$this->_ci->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$previousStudiensemesterRes = $this->_ci->StudiensemesterModel->getPreviousFrom($studiensemester_kurzbz);
if (isError($previousStudiensemesterRes)) return $previousStudiensemesterRes;
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
prestudent.person_id, prestudent.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, status.studiensemester_kurzbz
FROM
public.tbl_prestudent prestudent
JOIN public.tbl_prestudentstatus status ON(prestudent.prestudent_id=status.prestudent_id)
JOIN public.tbl_person USING(person_id)
LEFT JOIN bis.tbl_orgform USING(orgform_kurzbz)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE
status_kurzbz='Bewerber'
AND reihungstestangetreten=false
AND stg.melderelevant
AND prestudent.bismelden";
if (hasData($previousStudiensemesterRes))
{
$previousStudiensemester = getData($previousStudiensemesterRes)[0]->studiensemester_kurzbz;
$qry .= " AND (studiensemester_kurzbz=? OR studiensemester_kurzbz=?)";
$params[] = $previousStudiensemester;
}
else
{
$qry .= " AND studiensemester_kurzbz=?";
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,123 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class DatumAbschlusspruefungFehlt extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getDatumAbschlusspruefungFehlt(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'abschlusspruefung_id' => $prestudent->abschlusspruefung_id
),
'resolution_params' => array('abschlusspruefung_id' => $prestudent->abschlusspruefung_id)
);
}
}
// return the results
return success($results);
}
/**
* Date of final exam shouldn't be missing for Absolvent.
* @param studiensemester_kurzbz string if check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param abschlusspruefung_id int if check is to be executed for a certain Abschlussprüfung
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getDatumAbschlusspruefungFehlt(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$abschlusspruefung_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
pre.person_id, pre.prestudent_id,
pruefung.sponsion, pruefung.datum, pruefung.abschlusspruefung_id,
stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_student stud USING(prestudent_id)
JOIN public.tbl_prestudentstatus prestatus USING(prestudent_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
JOIN lehre.tbl_abschlusspruefung pruefung ON stud.student_uid = pruefung.student_uid
WHERE
status_kurzbz = 'Absolvent'
AND NOT EXISTS ( /* exclude gs */
SELECT 1
FROM bis.tbl_mobilitaet
WHERE prestudent_id = pre.prestudent_id
AND studiensemester_kurzbz = prestatus.studiensemester_kurzbz
)
AND abschlussbeurteilung_kurzbz!='nicht'
AND abschlussbeurteilung_kurzbz IS NOT NULL
AND pruefung.datum IS NULL
AND pre.bismelden
AND stg.melderelevant";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND prestatus.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($abschlusspruefung_id))
{
$qry .= " AND pruefung.abschlusspruefung_id = ?";
$params[] = $abschlusspruefung_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,123 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class DatumSponsionFehlt extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getDatumSponsionFehlt(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'abschlusspruefung_id' => $prestudent->abschlusspruefung_id
),
'resolution_params' => array('abschlusspruefung_id' => $prestudent->abschlusspruefung_id)
);
}
}
// return the results
return success($results);
}
/**
* Date of sponsion shouldn't be missing for Absolvent.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param abschlusspruefung_id int if check is to be executed only for a certain Abschlussprüfung
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getDatumSponsionFehlt(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$abschlusspruefung_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
pre.person_id, pre.prestudent_id,
pruefung.sponsion, pruefung.datum, pruefung.abschlusspruefung_id,
stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_student stud USING(prestudent_id)
JOIN public.tbl_prestudentstatus prestatus USING(prestudent_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
JOIN lehre.tbl_abschlusspruefung pruefung ON stud.student_uid = pruefung.student_uid
WHERE
status_kurzbz = 'Absolvent'
AND NOT EXISTS ( /* exclude gs */
SELECT 1
FROM bis.tbl_mobilitaet
WHERE prestudent_id = pre.prestudent_id
AND studiensemester_kurzbz = prestatus.studiensemester_kurzbz
)
AND abschlussbeurteilung_kurzbz!='nicht'
AND abschlussbeurteilung_kurzbz IS NOT NULL
AND pruefung.sponsion IS NULL
AND pre.bismelden
AND stg.melderelevant";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND prestatus.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($abschlusspruefung_id))
{
$qry .= " AND pruefung.abschlusspruefung_id = ?";
$params[] = $abschlusspruefung_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,108 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class DatumStudiensemesterFalscheReihenfolge extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getDatumStudiensemesterFalscheReihenfolge($studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id
)
);
}
}
// return the results
return success($results);
}
/**
* Status Dates and status studysemester dates should be in correct order.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if check is to be executed only for certain Studiengaenge
* @return success with prestudents or error
*/
public function getDatumStudiensemesterFalscheReihenfolge($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
// all active students with Status student in current semester
$qry = "
SELECT DISTINCT ON (prestudent_id) *
FROM (
SELECT
prestudent.person_id, prestudent.prestudent_id,
stg.studiengang_kz, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz,
ROW_NUMBER () OVER (
PARTITION BY prestudent.prestudent_id
ORDER BY sem.start DESC, status.datum DESC, status.insertamum DESC, status.ext_id DESC
) AS reihenfolge_semester,
ROW_NUMBER () OVER (
PARTITION BY prestudent.prestudent_id
ORDER BY status.datum DESC, status.insertamum DESC, status.ext_id DESC
) AS reihenfolge_datum
FROM
public.tbl_student student
JOIN public.tbl_benutzer benutzer on(student.student_uid = benutzer.uid)
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiensemester sem USING(studiensemester_kurzbz)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
WHERE
benutzer.aktiv=true
AND status.status_kurzbz='Student'
) reihenfolge
WHERE reihenfolge_semester <> reihenfolge_datum";
if (isset($studiengang_kz))
{
$qry .= " AND studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,125 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class FalscheAnzahlAbschlusspruefungen extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getFalscheAnzahlAbschlusspruefungen(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Students with finished studies should have exactly one final exam.
* @param studiensemester_kurzbz string if check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getFalscheAnzahlAbschlusspruefungen(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT * FROM (
SELECT
DISTINCT ON(pre.prestudent_id) pre.person_id, pre.prestudent_id, student_uid, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz,
(
SELECT COUNT(*)
FROM lehre.tbl_abschlusspruefung
WHERE student_uid = stud.student_uid
AND abschlussbeurteilung_kurzbz != 'nicht'
AND abschlussbeurteilung_kurzbz IS NOT NULL
) AS anzahl_abschlusspruefungen
FROM
public.tbl_prestudent pre
JOIN public.tbl_student stud USING(prestudent_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
WHERE
status_kurzbz = 'Absolvent'
AND pre.bismelden
AND stg.melderelevant
AND NOT EXISTS ( /* exclude gs */
SELECT 1
FROM bis.tbl_mobilitaet
WHERE prestudent_id = pre.prestudent_id
AND studiensemester_kurzbz = status.studiensemester_kurzbz
)";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND status.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
$qry .= ") studenten
WHERE anzahl_abschlusspruefungen != 1";
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,113 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class FalscheAnzahlHeimatadressen extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$personRes = $this->getFalscheAnzahlHeimatadressen(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($personRes)) return $personRes;
if (hasData($personRes))
{
$persons = getData($personRes);
// populate results with data necessary for writing issues
foreach ($persons as $person)
{
$results[] = array(
'person_id' => $person->person_id,
'resolution_params' => array('person_id' => $person->person_id)
);
}
}
// return the results
return success($results);
}
/**
* Students should have exactly one home address.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param person_id int if check is to be executed only for one person
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getFalscheAnzahlHeimatadressen(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$person_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
DISTINCT person_id
FROM
(
SELECT person_id, COUNT(adresse_id) AS anzahl_adressen
FROM public.tbl_adresse addr
WHERE heimatadresse IS TRUE
GROUP BY person_id
) adressen
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_prestudent pre USING(person_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_student USING(prestudent_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
WHERE
anzahl_adressen != 1
AND stg.melderelevant
AND pre.bismelden";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND status.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($person_id))
{
$qry .= " AND person_id = ?";
$params[] = $person_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,113 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class FalscheAnzahlZustelladressen extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$personRes = $this->getFalscheAnzahlZustelladressen(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($personRes)) return $personRes;
if (hasData($personRes))
{
$persons = getData($personRes);
// populate results with data necessary for writing issues
foreach ($persons as $person)
{
$results[] = array(
'person_id' => $person->person_id,
'resolution_params' => array('person_id' => $person->person_id)
);
}
}
// return the results
return success($results);
}
/**
* Students should have exactly one delivery address.
* @param studiensemester_kurzbz string if check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param person_id int if check is to be executed only for one person
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getFalscheAnzahlZustelladressen(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$person_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
DISTINCT person_id
FROM
(
SELECT person_id, COUNT(adresse_id) AS anzahl_adressen
FROM public.tbl_adresse addr
WHERE zustelladresse IS TRUE
GROUP BY person_id
) adressen
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_prestudent pre USING(person_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_student USING(prestudent_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
WHERE
anzahl_adressen != 1
AND stg.melderelevant
AND pre.bismelden";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND status.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($person_id))
{
$qry .= " AND person_id = ?";
$params[] = $person_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,104 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class GbDatumWeitZurueck extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$personRes = $this->getGbDatumWeitZurueck($studiensemester_kurzbz, $studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($personRes)) return $personRes;
if (hasData($personRes))
{
$persons = getData($personRes);
// populate results with data necessary for writing issues
foreach ($persons as $person)
{
$results[] = array(
'person_id' => $person->person_id,
'resolution_params' => array('person_id' => $person->person_id)
);
}
}
// return the results
return success($results);
}
/**
* Birthdate is too long ago.
* @param studiensemester_kurzbz string if check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param person_id int if check is to be executed only for one person
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getGbDatumWeitZurueck(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$person_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
pers.person_id
FROM
public.tbl_person pers
WHERE
pers.gebdatum < '1920-01-01'
AND EXISTS (
SELECT 1
FROM public.tbl_prestudent
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE person_id = pers.person_id";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND status.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
$qry .= ")";
if (isset($person_id))
{
$qry .= " AND pers.person_id = ?";
$params[] = $person_id;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,113 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class InaktiverStudentAktiverStatus extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getInaktiverStudentAktiverStatus(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Students with active status should have an active Benutzer.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getInaktiverStudentAktiverStatus(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$aktStudiensemesterRes = $this->_ci->StudiensemesterModel->getAkt();
if (isError($aktStudiensemesterRes)) return $aktStudiensemesterRes;
$studiensemester_kurzbz = hasData($aktStudiensemesterRes) ? getData($aktStudiensemesterRes)[0]->studiensemester_kurzbz : '';
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
DISTINCT(student.student_uid), prestudent.person_id, prestudent.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_benutzer benutzer
JOIN public.tbl_student student on(benutzer.uid = student.student_uid)
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
WHERE
benutzer.aktiv=false
AND EXISTS (SELECT 1 FROM public.tbl_prestudentstatus WHERE prestudent_id = prestudent.prestudent_id AND studiensemester_kurzbz = ?)
AND get_rolle_prestudent(prestudent_id, NULL) IN ('Student', 'Diplomand', 'Unterbrecher', 'Praktikant')
AND stg.melderelevant
AND prestudent.bismelden";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,104 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class IncomingHeimatNationOesterreich extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$personRes = $this->getIncomingHeimatNationOesterreich(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($personRes)) return $personRes;
if (hasData($personRes))
{
$persons = getData($personRes);
// populate results with data necessary for writing issues
foreach ($persons as $person)
{
$results[] = array(
'person_id' => $person->person_id,
'resolution_params' => array('person_id' => $person->person_id, 'studiensemester_kurzbz' => $studiensemester_kurzbz)
);
}
}
// return the results
return success($results);
}
/**
* Incoming shouldn't have austrian home address.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param person_id int if check is to be executed only for one person
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getIncomingHeimatNationOesterreich(
$studiensemester_kurzbz,
$studiengang_kz = null,
$person_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
DISTINCT pers.person_id, status.studiensemester_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_person pers USING(person_id)
JOIN public.tbl_adresse addr USING(person_id)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE
status.status_kurzbz = 'Incoming'
AND addr.nation = 'A'
AND addr.heimatadresse
AND status.studiensemester_kurzbz = ?
AND stg.melderelevant
AND pre.bismelden";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($person_id))
{
$qry .= " AND pers.person_id = ?";
$params[] = $person_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,96 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class IncomingOhneIoDatensatz extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getIncomingOhneIoDatensatz($studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Incoming should have IN/OUT data.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getIncomingOhneIoDatensatz($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
$qry = "
SELECT
DISTINCT ON(student_uid, nachname, vorname)
tbl_person.person_id,
tbl_prestudent.prestudent_id,
stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
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)
JOIN public.tbl_studiengang stg ON(stg.studiengang_kz=tbl_student.studiengang_kz)
WHERE
bismelden=TRUE
AND status_kurzbz='Incoming' AND NOT EXISTS (SELECT 1 FROM bis.tbl_bisio WHERE student_uid=tbl_student.student_uid)
AND stg.melderelevant";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND tbl_prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,125 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class IncomingOrGsFoerderrelevant extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getIncomingOrGsFoerderrelevant(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Incoming or gemeinsame Studien students should not receive funding (not be förderrelevant).
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return object success or error
*/
public function getIncomingOrGsFoerderrelevant(
$studiensemester_kurzbz = null,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
DISTINCT ON(prestudent_id)
pers.person_id,
ps.prestudent_id,
stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_student stud
JOIN public.tbl_benutzer ON(student_uid=uid)
JOIN public.tbl_person pers USING(person_id)
JOIN public.tbl_prestudent ps USING(prestudent_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg ON(stg.studiengang_kz=stud.studiengang_kz)
WHERE
(
status.status_kurzbz = 'Incoming'
OR EXISTS (
SELECT 1
FROM
bis.tbl_mobilitaet
JOIN public.tbl_prestudent USING(prestudent_id)
WHERE
prestudent_id = ps.prestudent_id
AND gsstudientyp_kurzbz = 'Extern'
)
)
AND (ps.foerderrelevant <> FALSE OR ps.foerderrelevant IS NULL)
AND bismelden=TRUE
AND stg.melderelevant";
if (isset($studiensemester_kurzbz))
{
$qry .= " AND status.studiensemester_kurzbz = ?";
$params[] = $studiensemester_kurzbz;
}
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND ps.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,148 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class InskriptionVorLetzerBismeldung extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getInskriptionVorLetzerBismeldung(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'datum_bismeldung' => date_format(date_create($prestudent->datum_bismeldung), 'd.m.Y'),
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Students of a semester shouldn't start studies before the date of Bismeldung.
* e.g. If student studies in WS2022 datum of status shouldn't be before 15.4.2020
* e.g. If student studies in SS2022 datum of status shouldn't be before 15.11.2022
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getInskriptionVorLetzerBismeldung(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
// get Bismeldedatum
$datumBis = $this->_getBisdateFromSemester($studiensemester_kurzbz);
$params = array($datumBis, $studiensemester_kurzbz, $datumBis);
// get active students
$qry = "
SELECT
DISTINCT ON (student.student_uid) ? AS datum_bismeldung,
prestudent.person_id, prestudent.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, status.studiensemester_kurzbz
FROM
public.tbl_benutzer benutzer
JOIN public.tbl_student student on(benutzer.uid = student.student_uid)
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
WHERE
benutzer.aktiv=true
AND status.studiensemester_kurzbz = ?
/* inscription date before date of first student status */
AND (
SELECT datum
FROM public.tbl_prestudentstatus
WHERE prestudent_id = prestudent.prestudent_id
AND studiensemester_kurzbz = status.studiensemester_kurzbz
AND status_kurzbz = 'Student'
ORDER BY datum, insertamum, ext_id
LIMIT 1
) < ?
AND stg.melderelevant
AND prestudent.bismelden";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
/**
* Gets Bismeldedate from Studiensemester.
* @param studiensemester_kurzbz string
*/
private function _getBisdateFromSemester($studiensemester_kurzbz)
{
$semesterYear = substr($studiensemester_kurzbz, 2, 6);
$semesterType = substr($studiensemester_kurzbz, 0, 2);
if ($semesterType == 'SS')
{
return date_format(date_create(($semesterYear - 1)."-11-15"), 'Y-m-d');
}
if ($semesterType == 'WS')
{
return date_format(date_create($semesterYear."-04-15"), 'Y-m-d');
}
}
}
@@ -0,0 +1,94 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class NationNichtOesterreichAberGemeinde extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$personRes = $this->getNationNichtOesterreichAberGemeinde(
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($personRes)) return $personRes;
if (hasData($personRes))
{
$persons = getData($personRes);
// populate results with data necessary for writing issues
foreach ($persons as $person)
{
$results[] = array(
'person_id' => $person->person_id,
'fehlertext_params' => array('gemeinde' => $person->gemeinde, 'adresse_id' => $person->adresse_id),
'resolution_params' => array('adresse_id' => $person->adresse_id)
);
}
}
// return the results
return success($results);
}
/**
* Nation is not Austria, but address has austrian Gemeinde.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param person_id int if check is to be executed only for one person
* @return success with prestudents or error
*/
public function getNationNichtOesterreichAberGemeinde($studiengang_kz = null, $person_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
$qry = "SELECT DISTINCT tbl_person.person_id, adr.gemeinde, adr.adresse_id
FROM
public.tbl_adresse adr
JOIN public.tbl_prestudent USING(person_id)
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_student USING(prestudent_id)
JOIN public.tbl_benutzer ON(uid=student_uid)
JOIN public.tbl_studiengang stg ON tbl_prestudent.studiengang_kz = stg.studiengang_kz
WHERE
adr.nation!='A'
AND tbl_benutzer.aktiv
AND gemeinde NOT IN ('Münster')
AND EXISTS(SELECT 1 FROM bis.tbl_gemeinde WHERE name = adr.gemeinde)";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($person_id))
{
$qry .= " AND tbl_person.person_id = ?";
$params[] = $person_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,130 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class OrgformStgUngleichOrgformPrestudent extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getOrgformStgUngleichOrgformPrestudent(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'student_studiengang' => $prestudent->student_studiengang,
'student_orgform' => $prestudent->student_orgform,
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Orgform of a Studiengang in Studienplan should be the same as orgform of student.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getOrgformStgUngleichOrgformPrestudent(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
prestudent.person_id, prestudent.prestudent_id, status.studiensemester_kurzbz,
studiengang.orgform_kurzbz AS stg_orgform, status.orgform_kurzbz AS student_orgform,
prestudent.studiengang_kz AS student_studiengang, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_studiengang studiengang
JOIN public.tbl_student student USING(studiengang_kz)
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_benutzer benutzer on(benutzer.uid = student.student_uid)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
LEFT JOIN lehre.tbl_studienplan stpl USING (studienplan_id)
WHERE
benutzer.aktiv = true
AND status.status_kurzbz IN ('Student', 'Unterbrecher', 'Abbrecher', 'Diplomand', 'Absolvent')
AND studiengang.studiengang_kz < 10000
AND status.studiensemester_kurzbz = ?
AND NOT (status.orgform_kurzbz IS NULL AND studiengang.mischform = FALSE)
AND NOT EXISTS(
SELECT 1
FROM
lehre.tbl_studienplan
JOIN
lehre.tbl_studienordnung USING(studienordnung_id)
WHERE
tbl_studienplan.studienplan_id = stpl.studienplan_id
AND tbl_studienordnung.studiengang_kz = prestudent.studiengang_kz
AND tbl_studienplan.orgform_kurzbz = status.orgform_kurzbz)";
if (isset($studiengang_kz))
{
$qry .= " AND studiengang.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
$qry .= "
ORDER BY student_uid";
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,29 @@
<?php
/**
* class defining ressources and method to use for plausicheck issue producer
*/
abstract class PlausiChecker
{
protected $_ci; // code igniter instance
protected $_config; // configuration parameters for this plausicheck
protected $_db; // database for queries
public function __construct($configurationParams = null)
{
$this->_ci =& get_instance(); // get code igniter instance
// set configuration
$this->_config = $configurationParams;
// get database for queries
$this->_db = new DB_Model();
}
/**
* Executes a plausi check.
* @param $paramsForChecking array parameters needed for executing the check
* @return array with objects which failed the plausi check
*/
abstract public function executePlausiCheck($paramsForChecking);
}
@@ -0,0 +1,109 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class PrestudentMischformOhneOrgform extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getPrestudentMischformOhneOrgform(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Students in "mixed" Studiengang should have Orgform.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getPrestudentMischformOhneOrgform(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
pre.person_id, pre.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz, status.studiensemester_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_studiengang stg USING(studiengang_kz)
WHERE
status.status_kurzbz IN ('Bewerber', 'Student')
AND stg.mischform
AND (status.orgform_kurzbz='' OR status.orgform_kurzbz IS NULL)
AND status.studiensemester_kurzbz=?";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,90 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class StgPrestudentUngleichStgStudent extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getStgPrestudentUngleichStgStudent($studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* Studiengang should be the same for prestudent and student.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getStgPrestudentUngleichStgStudent($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
$qry = "
SELECT
pre.person_id, pre.prestudent_id, stg.oe_kurzbz prestudent_stg_oe_kurzbz, student_stg.oe_kurzbz student_stg_oe_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_student stud USING(prestudent_id)
JOIN public.tbl_person pers USING(person_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
JOIN public.tbl_studiengang student_stg ON stud.studiengang_kz = student_stg.studiengang_kz
WHERE
stud.studiengang_kz != pre.studiengang_kz";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND pre.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,104 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class StgPrestudentUngleichStgStudienplan extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getStgPrestudentUngleichStgStudienplan($studiengang_kz, null, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id, 'studienplan' => $prestudent->studienplan),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id, 'studienordnung_id' => $prestudent->studienordnung_id)
);
}
}
// return the results
return success($results);
}
/**
* Studiengang should be the same for prestudent and studienplan.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param studienordnung_id int if check is to be executed only for a certain studienordnung_id
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getStgPrestudentUngleichStgStudienplan(
$studiengang_kz = null,
$prestudent_id = null,
$studienordnung_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array();
$qry = "
SELECT
DISTINCT ON (ps.prestudent_id) ps.person_id, ps.prestudent_id, stordnung.studienordnung_id,
stplan.bezeichnung AS studienplan, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_prestudent ps
JOIN public.tbl_prestudentstatus USING(prestudent_id)
JOIN lehre.tbl_studienplan stplan USING(studienplan_id)
JOIN lehre.tbl_studienordnung stordnung USING(studienordnung_id)
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_studiengang stg ON ps.studiengang_kz = stg.studiengang_kz
WHERE
ps.studiengang_kz<>stordnung.studiengang_kz
AND stg.melderelevant";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND ps.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($studienordnung_id))
{
$qry .= " AND stordnung.studienordnung_id = ?";
$params[] = $studienordnung_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,90 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class StudentstatusNachAbbrecher extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getStudentstatusNachAbbrecher($studiengang_kz, null, $exkludierte_studiengang_kz);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array('prestudent_id' => $prestudent->prestudent_id),
'resolution_params' => array('prestudent_id' => $prestudent->prestudent_id)
);
}
}
// return the results
return success($results);
}
/**
* There shouldn't be any status after Abbrecher status.
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getStudentstatusNachAbbrecher($studiengang_kz = null, $prestudent_id = null, $exkludierte_studiengang_kz = null)
{
$params = array();
$qry = "
SELECT
prestudent.person_id, prestudent.prestudent_id, stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_student student
JOIN public.tbl_prestudent prestudent USING(prestudent_id)
JOIN public.tbl_prestudentstatus prestatus USING(prestudent_id)
JOIN public.tbl_studiengang stg ON prestudent.studiengang_kz = stg.studiengang_kz
WHERE
prestatus.status_kurzbz = 'Abbrecher'
AND get_rolle_prestudent(prestudent.prestudent_id, prestatus.studiensemester_kurzbz) <> 'Abbrecher'";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -0,0 +1,126 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
require_once('PlausiChecker.php');
/**
*
*/
class StudienplanUngueltig extends PlausiChecker
{
public function executePlausiCheck($params)
{
$results = array();
// get parameters from config
$exkludierte_studiengang_kz = isset($this->_config['exkludierteStudiengaenge']) ? $this->_config['exkludierteStudiengaenge'] : null;
// pass parameters needed for plausicheck
$studiensemester_kurzbz = isset($params['studiensemester_kurzbz']) ? $params['studiensemester_kurzbz'] : null;
$studiengang_kz = isset($params['studiengang_kz']) ? $params['studiengang_kz'] : null;
// get all students failing the plausicheck
$prestudentRes = $this->getStudienplanUngueltig(
$studiensemester_kurzbz,
$studiengang_kz,
null,
$exkludierte_studiengang_kz
);
if (isError($prestudentRes)) return $prestudentRes;
if (hasData($prestudentRes))
{
$prestudents = getData($prestudentRes);
// populate results with data necessary for writing issues
foreach ($prestudents as $prestudent)
{
$results[] = array(
'person_id' => $prestudent->person_id,
'oe_kurzbz' => $prestudent->prestudent_stg_oe_kurzbz,
'fehlertext_params' => array(
'studienplan' => $prestudent->studienplan,
'ausbildungssemester' => $prestudent->ausbildungssemester,
'prestudent_id' => $prestudent->prestudent_id
),
'resolution_params' => array(
'prestudent_id' => $prestudent->prestudent_id,
'studiensemester_kurzbz' => $prestudent->studiensemester_kurzbz
)
);
}
}
// return the results
return success($results);
}
/**
* Studienplan should be valid in current Ausbildungssemester of prestudent.
* @param studiensemester_kurzbz string check is to be executed for certain Studiensemester
* @param studiengang_kz int if check is to be executed for certain Studiengang
* @param prestudent_id int if check is to be executed only for one prestudent
* @param exkludierte_studiengang_kz array if certain Studiengänge have to be excluded from check
* @return success with prestudents or error
*/
public function getStudienplanUngueltig(
$studiensemester_kurzbz,
$studiengang_kz = null,
$prestudent_id = null,
$exkludierte_studiengang_kz = null
) {
$params = array($studiensemester_kurzbz);
$qry = "
SELECT
DISTINCT pre.person_id, pre.prestudent_id,
tbl_studienplan.bezeichnung AS studienplan,
status.status_kurzbz,
status.studiensemester_kurzbz,
status.ausbildungssemester,
stg.oe_kurzbz AS prestudent_stg_oe_kurzbz
FROM
public.tbl_prestudent pre
JOIN public.tbl_prestudentstatus status USING(prestudent_id)
JOIN public.tbl_person USING(person_id)
JOIN lehre.tbl_studienplan USING(studienplan_id)
JOIN public.tbl_studiengang stg ON pre.studiengang_kz = stg.studiengang_kz
WHERE
status_kurzbz in('Student', 'Interessent','Bewerber','Aufgenommener')
AND NOT EXISTS (
SELECT
1
FROM
lehre.tbl_studienplan_semester
WHERE
studienplan_id=status.studienplan_id
AND tbl_studienplan_semester.semester = status.ausbildungssemester
AND tbl_studienplan_semester.studiensemester_kurzbz = status.studiensemester_kurzbz
)
AND status.studiensemester_kurzbz=?
AND pre.bismelden
AND stg.melderelevant";
if (isset($studiengang_kz))
{
$qry .= " AND stg.studiengang_kz = ?";
$params[] = $studiengang_kz;
}
if (isset($prestudent_id))
{
$qry .= " AND tbl_prestudent.prestudent_id = ?";
$params[] = $prestudent_id;
}
if (isset($exkludierte_studiengang_kz) && !isEmptyArray($exkludierte_studiengang_kz))
{
$qry .= " AND stg.studiengang_kz NOT IN ?";
$params[] = $exkludierte_studiengang_kz;
}
return $this->_db->execReadOnlyQuery($qry, $params);
}
}
@@ -15,7 +15,6 @@ class CORE_INOUT_0006 implements IIssueResolvedChecker
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->model('codex/Bisio_model', 'BisioModel');
//$this->_ci->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
// get all Zwecke
$this->_ci->BisioModel->addSelect('ects_erworben');
@@ -0,0 +1,32 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming shouldn't have austrian home address.
*/
class CORE_INOUT_0007 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
if (!isset($params['studiensemester_kurzbz']) || isEmptyString($params['studiensemester_kurzbz']))
return error('Studiensemester missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/IncomingHeimatNationOesterreich');
// check if issue persists
$checkRes = $this->_ci->incomingheimatnationoesterreich->getIncomingHeimatNationOesterreich($params['studiensemester_kurzbz'], null, $params['issue_person_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming should have IN/OUT data entry.
*/
class CORE_INOUT_0008 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/IncomingOhneIoDatensatz');
// check if issue persists
$checkRes = $this->_ci->incomingohneiodatensatz->getIncomingOhneIoDatensatz(null, $params['prestudent_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Incoming or external GS student should not be foerderrelevant.
*/
class CORE_INOUT_0009 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['prestudent_id']) || !is_numeric($params['prestudent_id']))
return error('Prestudent Id missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/IncomingOrGsFoerderrelevant');
// check if issue persists
$checkRes = $this->_ci->incomingorgsfoerderrelevant->getIncomingOrGsFoerderrelevant(null, null, $params['prestudent_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Birth date of person shouldn't be too long ago.
*/
class CORE_PERSON_0001 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/GbDatumWeitZurueck');
// check if issue persists
$checkRes = $this->_ci->gbdatumweitzurueck->getGbDatumWeitZurueck(null, null, $params['issue_person_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Nation of person should be austria if Gemeinde (city) is austrian.
*/
class CORE_PERSON_0002 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/NationNichtOesterreichAberGemeinde');
// check if issue persists
$checkRes = $this->_ci->nationnichtoesterreichabergemeinde->getNationNichtOesterreichAberGemeinde(null, $params['issue_person_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Person should have only one home adress.
*/
class CORE_PERSON_0003 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/FalscheAnzahlHeimatadressen');
// check if issue persists
$checkRes = $this->_ci->falscheanzahlheimatadressen->getFalscheAnzahlHeimatadressen(null, null, $params['issue_person_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}
@@ -0,0 +1,29 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Person should have only one delivery adress.
*/
class CORE_PERSON_0004 implements IIssueResolvedChecker
{
public function checkIfIssueIsResolved($params)
{
if (!isset($params['issue_person_id']) || !is_numeric($params['issue_person_id']))
return error('Person Id missing, issue_id: '.$params['issue_id']);
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->library('issues/plausichecks/FalscheAnzahlZustelladressen');
// check if issue persists
$checkRes = $this->_ci->falscheanzahlzustelladressen->getFalscheAnzahlZustelladressen(null, null, $params['issue_person_id']);
if (isError($checkRes)) return $checkRes;
if (hasData($checkRes))
return success(false); // not resolved if issue is still present
else
return success(true); // resolved otherwise
}
}

Some files were not shown because too many files have changed in this diff Show More