diff --git a/application/config/anrechnung.php b/application/config/anrechnung.php
new file mode 100644
index 000000000..d1f4f0958
--- /dev/null
+++ b/application/config/anrechnung.php
@@ -0,0 +1,22 @@
+ LDAP_BASE_DN,
'username' => LDAP_BIND_USER,
'password' => LDAP_BIND_PASSWORD,
- 'usf' => LDAP_USER_SEARCH_FILTER
+ 'usf' => LDAP_USER_SEARCH_FILTER,
+ 'timeout' => 1
);
}
@@ -30,7 +31,8 @@ if (defined('LDAP2_SERVER')) // 2nd LDAP server
'basedn' => LDAP2_BASE_DN,
'username' => LDAP2_BIND_USER,
'password' => LDAP2_BIND_PASSWORD,
- 'usf' => LDAP2_USER_SEARCH_FILTER
+ 'usf' => LDAP2_USER_SEARCH_FILTER,
+ 'timeout' => 1
);
}
@@ -45,7 +47,8 @@ if (defined('LDAP_SERVER')) // 1st LDAP server
'basedn' => LDAP_BASE_DN,
'username' => LDAP_BIND_USER,
'password' => LDAP_BIND_PASSWORD,
- 'usf' => LDAP_USER_SEARCH_FILTER
+ 'usf' => LDAP_USER_SEARCH_FILTER,
+ 'timeout' => 1
);
}
@@ -58,6 +61,8 @@ if (defined('LDAP2_SERVER')) // 2nd LDAP server
'basedn' => LDAP2_BASE_DN,
'username' => LDAP2_BIND_USER,
'password' => LDAP2_BIND_PASSWORD,
- 'usf' => LDAP2_USER_SEARCH_FILTER
+ 'usf' => LDAP2_USER_SEARCH_FILTER,
+ 'timeout' => 1
);
}
+
diff --git a/application/config/navigation.php b/application/config/navigation.php
index 84004b58e..c2d221a80 100644
--- a/application/config/navigation.php
+++ b/application/config/navigation.php
@@ -62,6 +62,15 @@ $config['navigation_header'] = array(
'lehre/lehrauftrag_bestellen:r',
'lehre/lehrauftrag_erteilen:r'
)
+ ),
+ 'zgvueberpruefung' => array(
+ 'link' => site_url('system/infocenter/ZGVUeberpruefung'),
+ 'description' => 'ZGV Überprüfung',
+ 'expand' => true,
+ 'sort' => 50,
+ 'requiredPermissions' => array(
+ 'lehre/zgvpruefung:r'
+ )
)
)
),
diff --git a/application/controllers/api/v1/CheckUserAuth.php b/application/controllers/api/v1/CheckUserAuth.php
index ee751e886..c82df9065 100644
--- a/application/controllers/api/v1/CheckUserAuth.php
+++ b/application/controllers/api/v1/CheckUserAuth.php
@@ -12,7 +12,7 @@ class CheckUserAuth extends RESTFul_Controller
parent::__construct();
// Loads helper message to manage returning messages
- // NOTE: loaded here because it does not extend the APIv1_Controller
+ // NOTE: loaded here because it does not extend the API_Controller
$this->load->helper('hlp_return_object');
}
diff --git a/application/controllers/api/v1/accounting/Aufteilung.php b/application/controllers/api/v1/accounting/Aufteilung.php
index cc9c2826f..9cf4e3474 100644
--- a/application/controllers/api/v1/accounting/Aufteilung.php
+++ b/application/controllers/api/v1/accounting/Aufteilung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aufteilung extends APIv1_Controller
+class Aufteilung extends API_Controller
{
/**
* Aufteilung API constructor.
diff --git a/application/controllers/api/v1/accounting/Bestelldetail.php b/application/controllers/api/v1/accounting/Bestelldetail.php
index 191ba95a0..f21b1bee6 100644
--- a/application/controllers/api/v1/accounting/Bestelldetail.php
+++ b/application/controllers/api/v1/accounting/Bestelldetail.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bestelldetail extends APIv1_Controller
+class Bestelldetail extends API_Controller
{
/**
* Bestelldetail API constructor.
diff --git a/application/controllers/api/v1/accounting/Bestelldetailtag.php b/application/controllers/api/v1/accounting/Bestelldetailtag.php
index 36229d47c..c7c534cc4 100644
--- a/application/controllers/api/v1/accounting/Bestelldetailtag.php
+++ b/application/controllers/api/v1/accounting/Bestelldetailtag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bestelldetailtag extends APIv1_Controller
+class Bestelldetailtag extends API_Controller
{
/**
* Bestelldetailtag API constructor.
diff --git a/application/controllers/api/v1/accounting/Bestellstatus.php b/application/controllers/api/v1/accounting/Bestellstatus.php
index dc3695ff2..e52dedab2 100644
--- a/application/controllers/api/v1/accounting/Bestellstatus.php
+++ b/application/controllers/api/v1/accounting/Bestellstatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bestellstatus extends APIv1_Controller
+class Bestellstatus extends API_Controller
{
/**
* Bestellstatus API constructor.
diff --git a/application/controllers/api/v1/accounting/Bestellung.php b/application/controllers/api/v1/accounting/Bestellung.php
index 018b77180..96ae689e8 100644
--- a/application/controllers/api/v1/accounting/Bestellung.php
+++ b/application/controllers/api/v1/accounting/Bestellung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bestellung extends APIv1_Controller
+class Bestellung extends API_Controller
{
/**
* Bestellung API constructor.
diff --git a/application/controllers/api/v1/accounting/Bestellungtag.php b/application/controllers/api/v1/accounting/Bestellungtag.php
index 7b404fa05..7609975ab 100644
--- a/application/controllers/api/v1/accounting/Bestellungtag.php
+++ b/application/controllers/api/v1/accounting/Bestellungtag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bestellungtag extends APIv1_Controller
+class Bestellungtag extends API_Controller
{
/**
* Bestellungtag API constructor.
diff --git a/application/controllers/api/v1/accounting/Buchung.php b/application/controllers/api/v1/accounting/Buchung.php
index 12fa02c33..44c91f1a4 100644
--- a/application/controllers/api/v1/accounting/Buchung.php
+++ b/application/controllers/api/v1/accounting/Buchung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Buchung extends APIv1_Controller
+class Buchung extends API_Controller
{
/**
* Buchung API constructor.
diff --git a/application/controllers/api/v1/accounting/Buchungstyp.php b/application/controllers/api/v1/accounting/Buchungstyp.php
index 3e9718469..20b69bec9 100644
--- a/application/controllers/api/v1/accounting/Buchungstyp.php
+++ b/application/controllers/api/v1/accounting/Buchungstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Buchungstyp extends APIv1_Controller
+class Buchungstyp extends API_Controller
{
/**
* Buchungstyp API constructor.
diff --git a/application/controllers/api/v1/accounting/Budget.php b/application/controllers/api/v1/accounting/Budget.php
index 31ee3ef1c..9ffbb3656 100644
--- a/application/controllers/api/v1/accounting/Budget.php
+++ b/application/controllers/api/v1/accounting/Budget.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Budget extends APIv1_Controller
+class Budget extends API_Controller
{
/**
* Budget API constructor.
diff --git a/application/controllers/api/v1/accounting/Konto.php b/application/controllers/api/v1/accounting/Konto.php
index 0b78ff98f..ba9b44558 100644
--- a/application/controllers/api/v1/accounting/Konto.php
+++ b/application/controllers/api/v1/accounting/Konto.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Konto extends APIv1_Controller
+class Konto extends API_Controller
{
/**
* Konto API constructor.
diff --git a/application/controllers/api/v1/accounting/Kostenstelle.php b/application/controllers/api/v1/accounting/Kostenstelle.php
index 2ebf554c0..a90445b76 100644
--- a/application/controllers/api/v1/accounting/Kostenstelle.php
+++ b/application/controllers/api/v1/accounting/Kostenstelle.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Kostenstelle extends APIv1_Controller
+class Kostenstelle extends API_Controller
{
/**
* Kostenstelle API constructor.
diff --git a/application/controllers/api/v1/accounting/Rechnung.php b/application/controllers/api/v1/accounting/Rechnung.php
index 5ac77b36b..18d0e36dd 100644
--- a/application/controllers/api/v1/accounting/Rechnung.php
+++ b/application/controllers/api/v1/accounting/Rechnung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Rechnung extends APIv1_Controller
+class Rechnung extends API_Controller
{
/**
* Rechnung API constructor.
diff --git a/application/controllers/api/v1/accounting/Rechnungsbetrag.php b/application/controllers/api/v1/accounting/Rechnungsbetrag.php
index 2f02c794d..57f2803a4 100644
--- a/application/controllers/api/v1/accounting/Rechnungsbetrag.php
+++ b/application/controllers/api/v1/accounting/Rechnungsbetrag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Rechnungsbetrag extends APIv1_Controller
+class Rechnungsbetrag extends API_Controller
{
/**
* Rechnungsbetrag API constructor.
diff --git a/application/controllers/api/v1/accounting/Rechnungstyp.php b/application/controllers/api/v1/accounting/Rechnungstyp.php
index f85dae43e..37efdd784 100644
--- a/application/controllers/api/v1/accounting/Rechnungstyp.php
+++ b/application/controllers/api/v1/accounting/Rechnungstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Rechnungstyp extends APIv1_Controller
+class Rechnungstyp extends API_Controller
{
/**
* Rechnungstyp API constructor.
diff --git a/application/controllers/api/v1/accounting/Vertrag.php b/application/controllers/api/v1/accounting/Vertrag.php
index 3b3d3fac2..164dd05a0 100644
--- a/application/controllers/api/v1/accounting/Vertrag.php
+++ b/application/controllers/api/v1/accounting/Vertrag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Vertrag extends APIv1_Controller
+class Vertrag extends API_Controller
{
/**
* Vertrag API constructor.
diff --git a/application/controllers/api/v1/accounting/Vertragsstatus.php b/application/controllers/api/v1/accounting/Vertragsstatus.php
index c6125e609..876a2912a 100644
--- a/application/controllers/api/v1/accounting/Vertragsstatus.php
+++ b/application/controllers/api/v1/accounting/Vertragsstatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Vertragsstatus extends APIv1_Controller
+class Vertragsstatus extends API_Controller
{
/**
* Vertragsstatus API constructor.
diff --git a/application/controllers/api/v1/accounting/Vertragstyp.php b/application/controllers/api/v1/accounting/Vertragstyp.php
index 69b0907dd..40d826af2 100644
--- a/application/controllers/api/v1/accounting/Vertragstyp.php
+++ b/application/controllers/api/v1/accounting/Vertragstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Vertragstyp extends APIv1_Controller
+class Vertragstyp extends API_Controller
{
/**
* Vertragstyp API constructor.
diff --git a/application/controllers/api/v1/accounting/Zahlungstyp.php b/application/controllers/api/v1/accounting/Zahlungstyp.php
index e7abf74df..bef1e14e1 100644
--- a/application/controllers/api/v1/accounting/Zahlungstyp.php
+++ b/application/controllers/api/v1/accounting/Zahlungstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zahlungstyp extends APIv1_Controller
+class Zahlungstyp extends API_Controller
{
/**
* Zahlungstyp API constructor.
diff --git a/application/controllers/api/v1/codex/Akadgrad.php b/application/controllers/api/v1/codex/Akadgrad.php
index 2aeb01e59..3d99d16be 100644
--- a/application/controllers/api/v1/codex/Akadgrad.php
+++ b/application/controllers/api/v1/codex/Akadgrad.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Akadgrad extends APIv1_Controller
+class Akadgrad extends API_Controller
{
/**
* Akadgrad API constructor.
diff --git a/application/controllers/api/v1/codex/Archiv.php b/application/controllers/api/v1/codex/Archiv.php
index b35ec840d..38fbb1710 100644
--- a/application/controllers/api/v1/codex/Archiv.php
+++ b/application/controllers/api/v1/codex/Archiv.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Archiv extends APIv1_Controller
+class Archiv extends API_Controller
{
/**
* Archiv API constructor.
diff --git a/application/controllers/api/v1/codex/Aufmerksamdurch.php b/application/controllers/api/v1/codex/Aufmerksamdurch.php
index dc27d4dd8..ce9cf25ba 100644
--- a/application/controllers/api/v1/codex/Aufmerksamdurch.php
+++ b/application/controllers/api/v1/codex/Aufmerksamdurch.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aufmerksamdurch extends APIv1_Controller
+class Aufmerksamdurch extends API_Controller
{
/**
* Aufmerksamdurch API constructor.
diff --git a/application/controllers/api/v1/codex/Ausbildung.php b/application/controllers/api/v1/codex/Ausbildung.php
index 4fea8add4..5886ed724 100644
--- a/application/controllers/api/v1/codex/Ausbildung.php
+++ b/application/controllers/api/v1/codex/Ausbildung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Ausbildung extends APIv1_Controller
+class Ausbildung extends API_Controller
{
/**
* Ausbildung API constructor.
diff --git a/application/controllers/api/v1/codex/Berufstaetigkeit.php b/application/controllers/api/v1/codex/Berufstaetigkeit.php
index 0941eba9e..02d62ae5d 100644
--- a/application/controllers/api/v1/codex/Berufstaetigkeit.php
+++ b/application/controllers/api/v1/codex/Berufstaetigkeit.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Berufstaetigkeit extends APIv1_Controller
+class Berufstaetigkeit extends API_Controller
{
/**
* Berufstaetigkeit API constructor.
diff --git a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php
index 115aa37fd..f10fe9d51 100644
--- a/application/controllers/api/v1/codex/Beschaeftigungsausmass.php
+++ b/application/controllers/api/v1/codex/Beschaeftigungsausmass.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Beschaeftigungsausmass extends APIv1_Controller
+class Beschaeftigungsausmass extends API_Controller
{
/**
* Beschaeftigungsausmass API constructor.
diff --git a/application/controllers/api/v1/codex/Besqual.php b/application/controllers/api/v1/codex/Besqual.php
index 6bad18ff7..f4b5c8a16 100644
--- a/application/controllers/api/v1/codex/Besqual.php
+++ b/application/controllers/api/v1/codex/Besqual.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Besqual extends APIv1_Controller
+class Besqual extends API_Controller
{
/**
* Besqual API constructor.
diff --git a/application/controllers/api/v1/codex/Bisfunktion.php b/application/controllers/api/v1/codex/Bisfunktion.php
index 85a7fca7b..c7318c51c 100644
--- a/application/controllers/api/v1/codex/Bisfunktion.php
+++ b/application/controllers/api/v1/codex/Bisfunktion.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bisfunktion extends APIv1_Controller
+class Bisfunktion extends API_Controller
{
/**
* Bisfunktion API constructor.
diff --git a/application/controllers/api/v1/codex/Bisio.php b/application/controllers/api/v1/codex/Bisio.php
index 1b0999bb1..3cbb0ca4f 100644
--- a/application/controllers/api/v1/codex/Bisio.php
+++ b/application/controllers/api/v1/codex/Bisio.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bisio extends APIv1_Controller
+class Bisio extends API_Controller
{
/**
* Bisio API constructor.
diff --git a/application/controllers/api/v1/codex/Bisorgform.php b/application/controllers/api/v1/codex/Bisorgform.php
index af72644c8..8ead76ecf 100644
--- a/application/controllers/api/v1/codex/Bisorgform.php
+++ b/application/controllers/api/v1/codex/Bisorgform.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bisorgform extends APIv1_Controller
+class Bisorgform extends API_Controller
{
/**
* Bisorgform API constructor.
diff --git a/application/controllers/api/v1/codex/Bisverwendung.php b/application/controllers/api/v1/codex/Bisverwendung.php
index ee2b0d5ca..8e6a1a310 100644
--- a/application/controllers/api/v1/codex/Bisverwendung.php
+++ b/application/controllers/api/v1/codex/Bisverwendung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bisverwendung extends APIv1_Controller
+class Bisverwendung extends API_Controller
{
/**
* Bisverwendung API constructor.
diff --git a/application/controllers/api/v1/codex/Bundesland.php b/application/controllers/api/v1/codex/Bundesland.php
index ccff4f047..53fbda2ba 100644
--- a/application/controllers/api/v1/codex/Bundesland.php
+++ b/application/controllers/api/v1/codex/Bundesland.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bundesland extends APIv1_Controller
+class Bundesland extends API_Controller
{
/**
* Course API constructor.
diff --git a/application/controllers/api/v1/codex/Entwicklungsteam.php b/application/controllers/api/v1/codex/Entwicklungsteam.php
index bf376a842..5ad2fb453 100644
--- a/application/controllers/api/v1/codex/Entwicklungsteam.php
+++ b/application/controllers/api/v1/codex/Entwicklungsteam.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Entwicklungsteam extends APIv1_Controller
+class Entwicklungsteam extends API_Controller
{
/**
* Entwicklungsteam API constructor.
diff --git a/application/controllers/api/v1/codex/Gemeinde.php b/application/controllers/api/v1/codex/Gemeinde.php
index 340d1ed9b..8f8e76854 100644
--- a/application/controllers/api/v1/codex/Gemeinde.php
+++ b/application/controllers/api/v1/codex/Gemeinde.php
@@ -14,7 +14,7 @@
if (!defined("BASEPATH")) exit("No direct script access allowed");
-class Gemeinde extends APIv1_Controller
+class Gemeinde extends API_Controller
{
/**
* Gemeinde API constructor.
diff --git a/application/controllers/api/v1/codex/Hauptberuf.php b/application/controllers/api/v1/codex/Hauptberuf.php
index 05396c473..4fdf8a687 100644
--- a/application/controllers/api/v1/codex/Hauptberuf.php
+++ b/application/controllers/api/v1/codex/Hauptberuf.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Hauptberuf extends APIv1_Controller
+class Hauptberuf extends API_Controller
{
/**
* Hauptberuf API constructor.
diff --git a/application/controllers/api/v1/codex/Lehrform.php b/application/controllers/api/v1/codex/Lehrform.php
index e789e76ec..25b5a4253 100644
--- a/application/controllers/api/v1/codex/Lehrform.php
+++ b/application/controllers/api/v1/codex/Lehrform.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrform extends APIv1_Controller
+class Lehrform extends API_Controller
{
/**
* Lehrform API constructor.
diff --git a/application/controllers/api/v1/codex/Lgartcode.php b/application/controllers/api/v1/codex/Lgartcode.php
index 5be7cab59..2ee1bbf6f 100644
--- a/application/controllers/api/v1/codex/Lgartcode.php
+++ b/application/controllers/api/v1/codex/Lgartcode.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lgartcode extends APIv1_Controller
+class Lgartcode extends API_Controller
{
/**
* Lgartcode API constructor.
diff --git a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php
index 70f0c3dc6..2215ebf92 100644
--- a/application/controllers/api/v1/codex/Mobilitaetsprogramm.php
+++ b/application/controllers/api/v1/codex/Mobilitaetsprogramm.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Mobilitaetsprogramm extends APIv1_Controller
+class Mobilitaetsprogramm extends API_Controller
{
/**
* Mobilitaetsprogramm API constructor.
diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php
index ad6c5e10e..16d9bf59a 100644
--- a/application/controllers/api/v1/codex/Nation.php
+++ b/application/controllers/api/v1/codex/Nation.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Nation extends APIv1_Controller
+class Nation extends API_Controller
{
/**
* Course API constructor.
diff --git a/application/controllers/api/v1/codex/Note.php b/application/controllers/api/v1/codex/Note.php
index f42032fe5..d6f9c919a 100644
--- a/application/controllers/api/v1/codex/Note.php
+++ b/application/controllers/api/v1/codex/Note.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Note extends APIv1_Controller
+class Note extends API_Controller
{
/**
* Note API constructor.
diff --git a/application/controllers/api/v1/codex/Orgform.php b/application/controllers/api/v1/codex/Orgform.php
index ad5d94185..481f01d2e 100644
--- a/application/controllers/api/v1/codex/Orgform.php
+++ b/application/controllers/api/v1/codex/Orgform.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Orgform extends APIv1_Controller
+class Orgform extends API_Controller
{
/**
* Orgform API constructor.
diff --git a/application/controllers/api/v1/codex/Verwendung.php b/application/controllers/api/v1/codex/Verwendung.php
index 9823d3915..0eab46414 100644
--- a/application/controllers/api/v1/codex/Verwendung.php
+++ b/application/controllers/api/v1/codex/Verwendung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Verwendung extends APIv1_Controller
+class Verwendung extends API_Controller
{
/**
* Verwendung API constructor.
diff --git a/application/controllers/api/v1/codex/Zgv.php b/application/controllers/api/v1/codex/Zgv.php
index b1a0981dc..670ffc190 100644
--- a/application/controllers/api/v1/codex/Zgv.php
+++ b/application/controllers/api/v1/codex/Zgv.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zgv extends APIv1_Controller
+class Zgv extends API_Controller
{
/**
* Zgv API constructor.
diff --git a/application/controllers/api/v1/codex/Zgvdoktor.php b/application/controllers/api/v1/codex/Zgvdoktor.php
index aeaf56463..63059356e 100644
--- a/application/controllers/api/v1/codex/Zgvdoktor.php
+++ b/application/controllers/api/v1/codex/Zgvdoktor.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zgvdoktor extends APIv1_Controller
+class Zgvdoktor extends API_Controller
{
/**
* Zgvdoktor API constructor.
diff --git a/application/controllers/api/v1/codex/Zgvgruppe.php b/application/controllers/api/v1/codex/Zgvgruppe.php
index 38b1fe520..95ac6c6fc 100644
--- a/application/controllers/api/v1/codex/Zgvgruppe.php
+++ b/application/controllers/api/v1/codex/Zgvgruppe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zgvgruppe extends APIv1_Controller
+class Zgvgruppe extends API_Controller
{
/**
* Zgvgruppe API constructor.
diff --git a/application/controllers/api/v1/codex/Zgvmaster.php b/application/controllers/api/v1/codex/Zgvmaster.php
index b8e7ee86d..ff737dd7f 100644
--- a/application/controllers/api/v1/codex/Zgvmaster.php
+++ b/application/controllers/api/v1/codex/Zgvmaster.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zgvmaster extends APIv1_Controller
+class Zgvmaster extends API_Controller
{
/**
* Zgvmaster API constructor.
diff --git a/application/controllers/api/v1/codex/Zweck.php b/application/controllers/api/v1/codex/Zweck.php
index c5710c7a5..75333fa6d 100644
--- a/application/controllers/api/v1/codex/Zweck.php
+++ b/application/controllers/api/v1/codex/Zweck.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zweck extends APIv1_Controller
+class Zweck extends API_Controller
{
/**
* Zweck API constructor.
diff --git a/application/controllers/api/v1/content/Ampel.php b/application/controllers/api/v1/content/Ampel.php
index f550eafdd..661af47cc 100644
--- a/application/controllers/api/v1/content/Ampel.php
+++ b/application/controllers/api/v1/content/Ampel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Ampel extends APIv1_Controller
+class Ampel extends API_Controller
{
/**
* Ampel API constructor.
diff --git a/application/controllers/api/v1/content/Content.php b/application/controllers/api/v1/content/Content.php
index 5d0854c2e..8d2474457 100644
--- a/application/controllers/api/v1/content/Content.php
+++ b/application/controllers/api/v1/content/Content.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Content extends APIv1_Controller
+class Content extends API_Controller
{
/**
* Content API constructor.
diff --git a/application/controllers/api/v1/content/Contentchild.php b/application/controllers/api/v1/content/Contentchild.php
index 95dbc4ab0..d4647e3d3 100644
--- a/application/controllers/api/v1/content/Contentchild.php
+++ b/application/controllers/api/v1/content/Contentchild.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Contentchild extends APIv1_Controller
+class Contentchild extends API_Controller
{
/**
* Contentchild API constructor.
diff --git a/application/controllers/api/v1/content/Contentgruppe.php b/application/controllers/api/v1/content/Contentgruppe.php
index 794400dc1..18c245288 100644
--- a/application/controllers/api/v1/content/Contentgruppe.php
+++ b/application/controllers/api/v1/content/Contentgruppe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Contentgruppe extends APIv1_Controller
+class Contentgruppe extends API_Controller
{
/**
* Contentgruppe API constructor.
diff --git a/application/controllers/api/v1/content/Contentlog.php b/application/controllers/api/v1/content/Contentlog.php
index ef4738828..d6e6ff940 100644
--- a/application/controllers/api/v1/content/Contentlog.php
+++ b/application/controllers/api/v1/content/Contentlog.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Contentlog extends APIv1_Controller
+class Contentlog extends API_Controller
{
/**
* Contentlog API constructor.
diff --git a/application/controllers/api/v1/content/Contentsprache.php b/application/controllers/api/v1/content/Contentsprache.php
index f3696d2ad..15430d405 100644
--- a/application/controllers/api/v1/content/Contentsprache.php
+++ b/application/controllers/api/v1/content/Contentsprache.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Contentsprache extends APIv1_Controller
+class Contentsprache extends API_Controller
{
/**
* Contentsprache API constructor.
diff --git a/application/controllers/api/v1/content/Dms.php b/application/controllers/api/v1/content/Dms.php
index e73254888..1109bd3ca 100644
--- a/application/controllers/api/v1/content/Dms.php
+++ b/application/controllers/api/v1/content/Dms.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Dms extends APIv1_Controller
+class Dms extends API_Controller
{
/**
*
diff --git a/application/controllers/api/v1/content/Infoscreen.php b/application/controllers/api/v1/content/Infoscreen.php
index 3012af304..4b648c753 100644
--- a/application/controllers/api/v1/content/Infoscreen.php
+++ b/application/controllers/api/v1/content/Infoscreen.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Infoscreen extends APIv1_Controller
+class Infoscreen extends API_Controller
{
/**
* Infoscreen API constructor.
diff --git a/application/controllers/api/v1/content/News.php b/application/controllers/api/v1/content/News.php
index b085afb7d..e7c0b3797 100644
--- a/application/controllers/api/v1/content/News.php
+++ b/application/controllers/api/v1/content/News.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class News extends APIv1_Controller
+class News extends API_Controller
{
/**
* News API constructor.
diff --git a/application/controllers/api/v1/content/Template.php b/application/controllers/api/v1/content/Template.php
index e15156b14..bfd9fcd08 100644
--- a/application/controllers/api/v1/content/Template.php
+++ b/application/controllers/api/v1/content/Template.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Template extends APIv1_Controller
+class Template extends API_Controller
{
/**
* Template API constructor.
diff --git a/application/controllers/api/v1/content/Veranstaltung.php b/application/controllers/api/v1/content/Veranstaltung.php
index 5f922e65a..5447e538d 100644
--- a/application/controllers/api/v1/content/Veranstaltung.php
+++ b/application/controllers/api/v1/content/Veranstaltung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Veranstaltung extends APIv1_Controller
+class Veranstaltung extends API_Controller
{
/**
* Veranstaltung API constructor.
diff --git a/application/controllers/api/v1/content/Veranstaltungskategorie.php b/application/controllers/api/v1/content/Veranstaltungskategorie.php
index 20af408c5..afc2c4968 100644
--- a/application/controllers/api/v1/content/Veranstaltungskategorie.php
+++ b/application/controllers/api/v1/content/Veranstaltungskategorie.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Veranstaltungskategorie extends APIv1_Controller
+class Veranstaltungskategorie extends API_Controller
{
/**
* Veranstaltungskategorie API constructor.
diff --git a/application/controllers/api/v1/crm/Akte.php b/application/controllers/api/v1/crm/Akte.php
index e9c892da5..a24d7abcc 100644
--- a/application/controllers/api/v1/crm/Akte.php
+++ b/application/controllers/api/v1/crm/Akte.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Akte extends APIv1_Controller
+class Akte extends API_Controller
{
/**
* Akte API constructor.
diff --git a/application/controllers/api/v1/crm/Aufnahmeschluessel.php b/application/controllers/api/v1/crm/Aufnahmeschluessel.php
index f2724481c..f055f1d20 100644
--- a/application/controllers/api/v1/crm/Aufnahmeschluessel.php
+++ b/application/controllers/api/v1/crm/Aufnahmeschluessel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aufnahmeschluessel extends APIv1_Controller
+class Aufnahmeschluessel extends API_Controller
{
/**
* Aufnahmeschluessel API constructor.
diff --git a/application/controllers/api/v1/crm/Aufnahmetermin.php b/application/controllers/api/v1/crm/Aufnahmetermin.php
index e199adbf8..31b1d8ef4 100644
--- a/application/controllers/api/v1/crm/Aufnahmetermin.php
+++ b/application/controllers/api/v1/crm/Aufnahmetermin.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aufnahmetermin extends APIv1_Controller
+class Aufnahmetermin extends API_Controller
{
/**
* Aufnahmetermin API constructor.
diff --git a/application/controllers/api/v1/crm/Aufnahmetermintyp.php b/application/controllers/api/v1/crm/Aufnahmetermintyp.php
index 7219598bf..ccc5d5901 100644
--- a/application/controllers/api/v1/crm/Aufnahmetermintyp.php
+++ b/application/controllers/api/v1/crm/Aufnahmetermintyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aufnahmetermintyp extends APIv1_Controller
+class Aufnahmetermintyp extends API_Controller
{
/**
* Aufnahmetermintyp API constructor.
diff --git a/application/controllers/api/v1/crm/Bewerbungstermine.php b/application/controllers/api/v1/crm/Bewerbungstermine.php
index 55d49ff58..f39623b6b 100644
--- a/application/controllers/api/v1/crm/Bewerbungstermine.php
+++ b/application/controllers/api/v1/crm/Bewerbungstermine.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bewerbungstermine extends APIv1_Controller
+class Bewerbungstermine extends API_Controller
{
/**
* Bewerbungstermine API constructor.
diff --git a/application/controllers/api/v1/crm/Buchungstyp.php b/application/controllers/api/v1/crm/Buchungstyp.php
index 0253050f3..90129f1c3 100644
--- a/application/controllers/api/v1/crm/Buchungstyp.php
+++ b/application/controllers/api/v1/crm/Buchungstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Buchungstyp extends APIv1_Controller
+class Buchungstyp extends API_Controller
{
/**
* Buchungstyp API constructor.
diff --git a/application/controllers/api/v1/crm/Dokument.php b/application/controllers/api/v1/crm/Dokument.php
index 11a603496..c94413f55 100644
--- a/application/controllers/api/v1/crm/Dokument.php
+++ b/application/controllers/api/v1/crm/Dokument.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Dokument extends APIv1_Controller
+class Dokument extends API_Controller
{
/**
* Dokument API constructor.
diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php
index e05815d33..20ebe37bc 100644
--- a/application/controllers/api/v1/crm/Dokumentprestudent.php
+++ b/application/controllers/api/v1/crm/Dokumentprestudent.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Dokumentprestudent extends APIv1_Controller
+class Dokumentprestudent extends API_Controller
{
/**
* Dokumentprestudent API constructor.
diff --git a/application/controllers/api/v1/crm/Dokumentstudiengang.php b/application/controllers/api/v1/crm/Dokumentstudiengang.php
index 3e908d455..81b84c888 100644
--- a/application/controllers/api/v1/crm/Dokumentstudiengang.php
+++ b/application/controllers/api/v1/crm/Dokumentstudiengang.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Dokumentstudiengang extends APIv1_Controller
+class Dokumentstudiengang extends API_Controller
{
/**
* Dokumentstudiengang API constructor.
diff --git a/application/controllers/api/v1/crm/Konto.php b/application/controllers/api/v1/crm/Konto.php
index 5a2cdafe2..135d36ab7 100644
--- a/application/controllers/api/v1/crm/Konto.php
+++ b/application/controllers/api/v1/crm/Konto.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Konto extends APIv1_Controller
+class Konto extends API_Controller
{
/**
* Konto API constructor.
diff --git a/application/controllers/api/v1/crm/Preincoming.php b/application/controllers/api/v1/crm/Preincoming.php
index 14da2b9c3..f319218ae 100644
--- a/application/controllers/api/v1/crm/Preincoming.php
+++ b/application/controllers/api/v1/crm/Preincoming.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Preincoming extends APIv1_Controller
+class Preincoming extends API_Controller
{
/**
* Preincoming API constructor.
diff --git a/application/controllers/api/v1/crm/Preinteressent.php b/application/controllers/api/v1/crm/Preinteressent.php
index 62c29dfda..ab3ee68d6 100644
--- a/application/controllers/api/v1/crm/Preinteressent.php
+++ b/application/controllers/api/v1/crm/Preinteressent.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Preinteressent extends APIv1_Controller
+class Preinteressent extends API_Controller
{
/**
* Person API constructor.
diff --git a/application/controllers/api/v1/crm/Preinteressentstudiengang.php b/application/controllers/api/v1/crm/Preinteressentstudiengang.php
index e4e834ef9..4a97077d0 100644
--- a/application/controllers/api/v1/crm/Preinteressentstudiengang.php
+++ b/application/controllers/api/v1/crm/Preinteressentstudiengang.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Preinteressentstudiengang extends APIv1_Controller
+class Preinteressentstudiengang extends API_Controller
{
/**
* Preinteressentstudiengang API constructor.
diff --git a/application/controllers/api/v1/crm/Preoutgoing.php b/application/controllers/api/v1/crm/Preoutgoing.php
index 733bd2eb9..0f2829dfd 100644
--- a/application/controllers/api/v1/crm/Preoutgoing.php
+++ b/application/controllers/api/v1/crm/Preoutgoing.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Preoutgoing extends APIv1_Controller
+class Preoutgoing extends API_Controller
{
/**
* Preoutgoing API constructor.
diff --git a/application/controllers/api/v1/crm/Prestudent.php b/application/controllers/api/v1/crm/Prestudent.php
index 072ba3eea..6376ef94f 100644
--- a/application/controllers/api/v1/crm/Prestudent.php
+++ b/application/controllers/api/v1/crm/Prestudent.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Prestudent extends APIv1_Controller
+class Prestudent extends API_Controller
{
/**
* Prestudent API constructor.
diff --git a/application/controllers/api/v1/crm/Prestudentstatus.php b/application/controllers/api/v1/crm/Prestudentstatus.php
index b72ac2fe9..5c3c38e1c 100644
--- a/application/controllers/api/v1/crm/Prestudentstatus.php
+++ b/application/controllers/api/v1/crm/Prestudentstatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Prestudentstatus extends APIv1_Controller
+class Prestudentstatus extends API_Controller
{
/**
* Prestudentstatus API constructor.
diff --git a/application/controllers/api/v1/crm/Reihungstest.php b/application/controllers/api/v1/crm/Reihungstest.php
index e9012d740..81dc32cec 100644
--- a/application/controllers/api/v1/crm/Reihungstest.php
+++ b/application/controllers/api/v1/crm/Reihungstest.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Reihungstest extends APIv1_Controller
+class Reihungstest extends API_Controller
{
/**
* Reihungstest API constructor.
diff --git a/application/controllers/api/v1/crm/RtPerson.php b/application/controllers/api/v1/crm/RtPerson.php
index f9610722a..ed84de90e 100644
--- a/application/controllers/api/v1/crm/RtPerson.php
+++ b/application/controllers/api/v1/crm/RtPerson.php
@@ -14,7 +14,7 @@
if (!defined("BASEPATH")) exit("No direct script access allowed");
-class RtPerson extends APIv1_Controller
+class RtPerson extends API_Controller
{
/**
* Status API constructor.
diff --git a/application/controllers/api/v1/crm/Status.php b/application/controllers/api/v1/crm/Status.php
index 37a8fbd11..6a9a89ec3 100644
--- a/application/controllers/api/v1/crm/Status.php
+++ b/application/controllers/api/v1/crm/Status.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Status extends APIv1_Controller
+class Status extends API_Controller
{
/**
* Status API constructor.
diff --git a/application/controllers/api/v1/crm/Statusgrund.php b/application/controllers/api/v1/crm/Statusgrund.php
index 3f19f2f82..fbf225e42 100644
--- a/application/controllers/api/v1/crm/Statusgrund.php
+++ b/application/controllers/api/v1/crm/Statusgrund.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Statusgrund extends APIv1_Controller
+class Statusgrund extends API_Controller
{
/**
* Status API constructor.
diff --git a/application/controllers/api/v1/crm/Student.php b/application/controllers/api/v1/crm/Student.php
index 6227cb6e3..34920021c 100644
--- a/application/controllers/api/v1/crm/Student.php
+++ b/application/controllers/api/v1/crm/Student.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Student extends APIv1_Controller
+class Student extends API_Controller
{
/**
* Student API constructor.
diff --git a/application/controllers/api/v1/education/Abgabe.php b/application/controllers/api/v1/education/Abgabe.php
index e3fd64530..676414d70 100644
--- a/application/controllers/api/v1/education/Abgabe.php
+++ b/application/controllers/api/v1/education/Abgabe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Abgabe extends APIv1_Controller
+class Abgabe extends API_Controller
{
/**
* Abgabe API constructor.
diff --git a/application/controllers/api/v1/education/Abschlussbeurteilung.php b/application/controllers/api/v1/education/Abschlussbeurteilung.php
index 1987e276f..1c4f3fb90 100644
--- a/application/controllers/api/v1/education/Abschlussbeurteilung.php
+++ b/application/controllers/api/v1/education/Abschlussbeurteilung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Abschlussbeurteilung extends APIv1_Controller
+class Abschlussbeurteilung extends API_Controller
{
/**
* Abschlussbeurteilung API constructor.
diff --git a/application/controllers/api/v1/education/Abschlusspruefung.php b/application/controllers/api/v1/education/Abschlusspruefung.php
index cadea53ca..a47adc992 100644
--- a/application/controllers/api/v1/education/Abschlusspruefung.php
+++ b/application/controllers/api/v1/education/Abschlusspruefung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Abschlusspruefung extends APIv1_Controller
+class Abschlusspruefung extends API_Controller
{
/**
* Abschlusspruefung API constructor.
diff --git a/application/controllers/api/v1/education/Anrechnung.php b/application/controllers/api/v1/education/Anrechnung.php
index 5a99b08ab..743ff7e5b 100644
--- a/application/controllers/api/v1/education/Anrechnung.php
+++ b/application/controllers/api/v1/education/Anrechnung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Anrechnung extends APIv1_Controller
+class Anrechnung extends API_Controller
{
/**
* Anrechnung API constructor.
diff --git a/application/controllers/api/v1/education/Anwesenheit.php b/application/controllers/api/v1/education/Anwesenheit.php
index 2e915f071..2403220e0 100644
--- a/application/controllers/api/v1/education/Anwesenheit.php
+++ b/application/controllers/api/v1/education/Anwesenheit.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Anwesenheit extends APIv1_Controller
+class Anwesenheit extends API_Controller
{
/**
* Anwesenheit API constructor.
diff --git a/application/controllers/api/v1/education/Beispiel.php b/application/controllers/api/v1/education/Beispiel.php
index b2c06047b..4bcd6ac55 100644
--- a/application/controllers/api/v1/education/Beispiel.php
+++ b/application/controllers/api/v1/education/Beispiel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Beispiel extends APIv1_Controller
+class Beispiel extends API_Controller
{
/**
* Beispiel API constructor.
diff --git a/application/controllers/api/v1/education/Betreuerart.php b/application/controllers/api/v1/education/Betreuerart.php
index 43b4c51f6..b4cf34b7b 100644
--- a/application/controllers/api/v1/education/Betreuerart.php
+++ b/application/controllers/api/v1/education/Betreuerart.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Betreuerart extends APIv1_Controller
+class Betreuerart extends API_Controller
{
/**
* Betreuerart API constructor.
diff --git a/application/controllers/api/v1/education/Feedback.php b/application/controllers/api/v1/education/Feedback.php
index abef22d77..8179181bc 100644
--- a/application/controllers/api/v1/education/Feedback.php
+++ b/application/controllers/api/v1/education/Feedback.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Feedback extends APIv1_Controller
+class Feedback extends API_Controller
{
/**
* Feedback API constructor.
diff --git a/application/controllers/api/v1/education/Legesamtnote.php b/application/controllers/api/v1/education/Legesamtnote.php
index 96ff25c4f..c4f51b7ff 100644
--- a/application/controllers/api/v1/education/Legesamtnote.php
+++ b/application/controllers/api/v1/education/Legesamtnote.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Legesamtnote extends APIv1_Controller
+class Legesamtnote extends API_Controller
{
/**
* Legesamtnote API constructor.
diff --git a/application/controllers/api/v1/education/Lehreinheit.php b/application/controllers/api/v1/education/Lehreinheit.php
index f229de846..05741b6c7 100644
--- a/application/controllers/api/v1/education/Lehreinheit.php
+++ b/application/controllers/api/v1/education/Lehreinheit.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehreinheit extends APIv1_Controller
+class Lehreinheit extends API_Controller
{
/**
* Lehreinheit API constructor.
diff --git a/application/controllers/api/v1/education/Lehreinheitgruppe.php b/application/controllers/api/v1/education/Lehreinheitgruppe.php
index 6ef949d3e..a8d996c4e 100644
--- a/application/controllers/api/v1/education/Lehreinheitgruppe.php
+++ b/application/controllers/api/v1/education/Lehreinheitgruppe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehreinheitgruppe extends APIv1_Controller
+class Lehreinheitgruppe extends API_Controller
{
/**
* Lehreinheitgruppe API constructor.
diff --git a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php
index 5237ca849..6861c7b77 100644
--- a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php
+++ b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehreinheitmitarbeiter extends APIv1_Controller
+class Lehreinheitmitarbeiter extends API_Controller
{
/**
* Lehreinheitmitarbeiter API constructor.
diff --git a/application/controllers/api/v1/education/Lehrfach.php b/application/controllers/api/v1/education/Lehrfach.php
index 81ce519e1..e65776e08 100644
--- a/application/controllers/api/v1/education/Lehrfach.php
+++ b/application/controllers/api/v1/education/Lehrfach.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrfach extends APIv1_Controller
+class Lehrfach extends API_Controller
{
/**
* Lehrfach API constructor.
diff --git a/application/controllers/api/v1/education/Lehrfunktion.php b/application/controllers/api/v1/education/Lehrfunktion.php
index e29f1227d..93f504fa7 100644
--- a/application/controllers/api/v1/education/Lehrfunktion.php
+++ b/application/controllers/api/v1/education/Lehrfunktion.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrfunktion extends APIv1_Controller
+class Lehrfunktion extends API_Controller
{
/**
* Lehrfunktion API constructor.
diff --git a/application/controllers/api/v1/education/Lehrtyp.php b/application/controllers/api/v1/education/Lehrtyp.php
index dfcfd3033..bd73d14c4 100644
--- a/application/controllers/api/v1/education/Lehrtyp.php
+++ b/application/controllers/api/v1/education/Lehrtyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrtyp extends APIv1_Controller
+class Lehrtyp extends API_Controller
{
/**
* Lehrtyp API constructor.
diff --git a/application/controllers/api/v1/education/Lehrveranstaltung.php b/application/controllers/api/v1/education/Lehrveranstaltung.php
index 2e2fffb66..676b6478d 100644
--- a/application/controllers/api/v1/education/Lehrveranstaltung.php
+++ b/application/controllers/api/v1/education/Lehrveranstaltung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrveranstaltung extends APIv1_Controller
+class Lehrveranstaltung extends API_Controller
{
/**
* Lehrveranstaltung API constructor.
diff --git a/application/controllers/api/v1/education/Lenotenschluessel.php b/application/controllers/api/v1/education/Lenotenschluessel.php
index 9477172a3..980258859 100644
--- a/application/controllers/api/v1/education/Lenotenschluessel.php
+++ b/application/controllers/api/v1/education/Lenotenschluessel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lenotenschluessel extends APIv1_Controller
+class Lenotenschluessel extends API_Controller
{
/**
* LeNotenschluessel API constructor.
diff --git a/application/controllers/api/v1/education/Lepruefung.php b/application/controllers/api/v1/education/Lepruefung.php
index 52e1d81b6..3234a30c0 100644
--- a/application/controllers/api/v1/education/Lepruefung.php
+++ b/application/controllers/api/v1/education/Lepruefung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lepruefung extends APIv1_Controller
+class Lepruefung extends API_Controller
{
/**
* LePruefung API constructor.
diff --git a/application/controllers/api/v1/education/Lvangebot.php b/application/controllers/api/v1/education/Lvangebot.php
index ecd917233..1a364bea3 100644
--- a/application/controllers/api/v1/education/Lvangebot.php
+++ b/application/controllers/api/v1/education/Lvangebot.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lvangebot extends APIv1_Controller
+class Lvangebot extends API_Controller
{
/**
* Lvangebot API constructor.
diff --git a/application/controllers/api/v1/education/Lvgesamtnote.php b/application/controllers/api/v1/education/Lvgesamtnote.php
index 464ef99a9..10c5c8577 100644
--- a/application/controllers/api/v1/education/Lvgesamtnote.php
+++ b/application/controllers/api/v1/education/Lvgesamtnote.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lvgesamtnote extends APIv1_Controller
+class Lvgesamtnote extends API_Controller
{
/**
* Lvgesamtnote API constructor.
diff --git a/application/controllers/api/v1/education/Lvinfo.php b/application/controllers/api/v1/education/Lvinfo.php
index 8631583b9..d0cdb637b 100644
--- a/application/controllers/api/v1/education/Lvinfo.php
+++ b/application/controllers/api/v1/education/Lvinfo.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lvinfo extends APIv1_Controller
+class Lvinfo extends API_Controller
{
/**
* Lvinfo API constructor.
diff --git a/application/controllers/api/v1/education/Lvregel.php b/application/controllers/api/v1/education/Lvregel.php
index 33410cb88..0334c8ff2 100644
--- a/application/controllers/api/v1/education/Lvregel.php
+++ b/application/controllers/api/v1/education/Lvregel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lvregel extends APIv1_Controller
+class Lvregel extends API_Controller
{
/**
* Lvregel API constructor.
diff --git a/application/controllers/api/v1/education/Lvregeltyp.php b/application/controllers/api/v1/education/Lvregeltyp.php
index 22fe0a9ff..9e7b90f22 100644
--- a/application/controllers/api/v1/education/Lvregeltyp.php
+++ b/application/controllers/api/v1/education/Lvregeltyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lvregeltyp extends APIv1_Controller
+class Lvregeltyp extends API_Controller
{
/**
* Lvregeltyp API constructor.
diff --git a/application/controllers/api/v1/education/Notenschluessel.php b/application/controllers/api/v1/education/Notenschluessel.php
index 91c7c513e..415a6c252 100644
--- a/application/controllers/api/v1/education/Notenschluessel.php
+++ b/application/controllers/api/v1/education/Notenschluessel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Notenschluessel extends APIv1_Controller
+class Notenschluessel extends API_Controller
{
/**
* Notenschluessel API constructor.
diff --git a/application/controllers/api/v1/education/Notenschluesselaufteilung.php b/application/controllers/api/v1/education/Notenschluesselaufteilung.php
index 1e4b168ef..11d325183 100644
--- a/application/controllers/api/v1/education/Notenschluesselaufteilung.php
+++ b/application/controllers/api/v1/education/Notenschluesselaufteilung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Notenschluesselaufteilung extends APIv1_Controller
+class Notenschluesselaufteilung extends API_Controller
{
/**
* Notenschluesselaufteilung API constructor.
diff --git a/application/controllers/api/v1/education/Notenschluesseluebung.php b/application/controllers/api/v1/education/Notenschluesseluebung.php
index bb907f4ff..c1f13633e 100644
--- a/application/controllers/api/v1/education/Notenschluesseluebung.php
+++ b/application/controllers/api/v1/education/Notenschluesseluebung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Notenschluesseluebung extends APIv1_Controller
+class Notenschluesseluebung extends API_Controller
{
/**
* Notenschluesseluebung API constructor.
diff --git a/application/controllers/api/v1/education/Notenschluesselzuordnung.php b/application/controllers/api/v1/education/Notenschluesselzuordnung.php
index a4e7d757a..af4295fcd 100644
--- a/application/controllers/api/v1/education/Notenschluesselzuordnung.php
+++ b/application/controllers/api/v1/education/Notenschluesselzuordnung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Notenschluesselzuordnung extends APIv1_Controller
+class Notenschluesselzuordnung extends API_Controller
{
/**
* Notenschluesselzuordnung API constructor.
diff --git a/application/controllers/api/v1/education/Paabgabe.php b/application/controllers/api/v1/education/Paabgabe.php
index 87e9c2ec7..716fb7574 100644
--- a/application/controllers/api/v1/education/Paabgabe.php
+++ b/application/controllers/api/v1/education/Paabgabe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Paabgabe extends APIv1_Controller
+class Paabgabe extends API_Controller
{
/**
* Paabgabe API constructor.
diff --git a/application/controllers/api/v1/education/Paabgabetyp.php b/application/controllers/api/v1/education/Paabgabetyp.php
index 999cbd57b..117c4ffd1 100644
--- a/application/controllers/api/v1/education/Paabgabetyp.php
+++ b/application/controllers/api/v1/education/Paabgabetyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Paabgabetyp extends APIv1_Controller
+class Paabgabetyp extends API_Controller
{
/**
* Paabgabetyp API constructor.
diff --git a/application/controllers/api/v1/education/Projektarbeit.php b/application/controllers/api/v1/education/Projektarbeit.php
index 1b09fa4e7..0a77a9e64 100644
--- a/application/controllers/api/v1/education/Projektarbeit.php
+++ b/application/controllers/api/v1/education/Projektarbeit.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projektarbeit extends APIv1_Controller
+class Projektarbeit extends API_Controller
{
/**
* Projektarbeit API constructor.
diff --git a/application/controllers/api/v1/education/Projektbetreuer.php b/application/controllers/api/v1/education/Projektbetreuer.php
index b395b7e5f..e0a078a51 100644
--- a/application/controllers/api/v1/education/Projektbetreuer.php
+++ b/application/controllers/api/v1/education/Projektbetreuer.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projektbetreuer extends APIv1_Controller
+class Projektbetreuer extends API_Controller
{
/**
* Projektbetreuer API constructor.
diff --git a/application/controllers/api/v1/education/Projekttyp.php b/application/controllers/api/v1/education/Projekttyp.php
index bf4c5d73a..f75fd6477 100644
--- a/application/controllers/api/v1/education/Projekttyp.php
+++ b/application/controllers/api/v1/education/Projekttyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projekttyp extends APIv1_Controller
+class Projekttyp extends API_Controller
{
/**
* Projekttyp API constructor.
diff --git a/application/controllers/api/v1/education/Pruefung.php b/application/controllers/api/v1/education/Pruefung.php
index 23fc97c8d..8218b63b0 100644
--- a/application/controllers/api/v1/education/Pruefung.php
+++ b/application/controllers/api/v1/education/Pruefung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefung extends APIv1_Controller
+class Pruefung extends API_Controller
{
/**
* Pruefung API constructor.
diff --git a/application/controllers/api/v1/education/Pruefungsanmeldung.php b/application/controllers/api/v1/education/Pruefungsanmeldung.php
index d65ded0b4..8ffbbc0cf 100644
--- a/application/controllers/api/v1/education/Pruefungsanmeldung.php
+++ b/application/controllers/api/v1/education/Pruefungsanmeldung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefungsanmeldung extends APIv1_Controller
+class Pruefungsanmeldung extends API_Controller
{
/**
* Pruefungsanmeldung API constructor.
diff --git a/application/controllers/api/v1/education/Pruefungsfenster.php b/application/controllers/api/v1/education/Pruefungsfenster.php
index 50d13cff5..8e4c3af99 100644
--- a/application/controllers/api/v1/education/Pruefungsfenster.php
+++ b/application/controllers/api/v1/education/Pruefungsfenster.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefungsfenster extends APIv1_Controller
+class Pruefungsfenster extends API_Controller
{
/**
* Pruefungsfenster API constructor.
diff --git a/application/controllers/api/v1/education/Pruefungsstatus.php b/application/controllers/api/v1/education/Pruefungsstatus.php
index cbfbfb044..c2bfe6f9b 100644
--- a/application/controllers/api/v1/education/Pruefungsstatus.php
+++ b/application/controllers/api/v1/education/Pruefungsstatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefungsstatus extends APIv1_Controller
+class Pruefungsstatus extends API_Controller
{
/**
* Pruefungsstatus API constructor.
diff --git a/application/controllers/api/v1/education/Pruefungstermin.php b/application/controllers/api/v1/education/Pruefungstermin.php
index fd16159dc..d6b61e7f7 100644
--- a/application/controllers/api/v1/education/Pruefungstermin.php
+++ b/application/controllers/api/v1/education/Pruefungstermin.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefungstermin extends APIv1_Controller
+class Pruefungstermin extends API_Controller
{
/**
* Pruefungstermin API constructor.
diff --git a/application/controllers/api/v1/education/Pruefungstyp.php b/application/controllers/api/v1/education/Pruefungstyp.php
index 4c460d5cd..7e0707c17 100644
--- a/application/controllers/api/v1/education/Pruefungstyp.php
+++ b/application/controllers/api/v1/education/Pruefungstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefungstyp extends APIv1_Controller
+class Pruefungstyp extends API_Controller
{
/**
* Pruefungstyp API constructor.
diff --git a/application/controllers/api/v1/education/Studentbeispiel.php b/application/controllers/api/v1/education/Studentbeispiel.php
index 45012231a..504614334 100644
--- a/application/controllers/api/v1/education/Studentbeispiel.php
+++ b/application/controllers/api/v1/education/Studentbeispiel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studentbeispiel extends APIv1_Controller
+class Studentbeispiel extends API_Controller
{
/**
* Studentbeispiel API constructor.
diff --git a/application/controllers/api/v1/education/Studentlehrverband.php b/application/controllers/api/v1/education/Studentlehrverband.php
index 4793b0b1b..7bae1e375 100644
--- a/application/controllers/api/v1/education/Studentlehrverband.php
+++ b/application/controllers/api/v1/education/Studentlehrverband.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studentlehrverband extends APIv1_Controller
+class Studentlehrverband extends API_Controller
{
/**
* Studentlehrverband API constructor.
diff --git a/application/controllers/api/v1/education/Studentuebung.php b/application/controllers/api/v1/education/Studentuebung.php
index 2a086610c..e36add29e 100644
--- a/application/controllers/api/v1/education/Studentuebung.php
+++ b/application/controllers/api/v1/education/Studentuebung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studentuebung extends APIv1_Controller
+class Studentuebung extends API_Controller
{
/**
* Studentuebung API constructor.
diff --git a/application/controllers/api/v1/education/Uebung.php b/application/controllers/api/v1/education/Uebung.php
index 41d8f8448..e6e27560d 100644
--- a/application/controllers/api/v1/education/Uebung.php
+++ b/application/controllers/api/v1/education/Uebung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Uebung extends APIv1_Controller
+class Uebung extends API_Controller
{
/**
* Uebung API constructor.
diff --git a/application/controllers/api/v1/education/Zeugnis.php b/application/controllers/api/v1/education/Zeugnis.php
index 86af07284..a58eadcce 100644
--- a/application/controllers/api/v1/education/Zeugnis.php
+++ b/application/controllers/api/v1/education/Zeugnis.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeugnis extends APIv1_Controller
+class Zeugnis extends API_Controller
{
/**
* Zeugnis API constructor.
diff --git a/application/controllers/api/v1/education/Zeugnisnote.php b/application/controllers/api/v1/education/Zeugnisnote.php
index 10083865e..9a00e0c23 100644
--- a/application/controllers/api/v1/education/Zeugnisnote.php
+++ b/application/controllers/api/v1/education/Zeugnisnote.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeugnisnote extends APIv1_Controller
+class Zeugnisnote extends API_Controller
{
/**
* Zeugnisnote API constructor.
diff --git a/application/controllers/api/v1/organisation/Erhalter.php b/application/controllers/api/v1/organisation/Erhalter.php
index 0098f7fcc..e4b2532de 100644
--- a/application/controllers/api/v1/organisation/Erhalter.php
+++ b/application/controllers/api/v1/organisation/Erhalter.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Erhalter extends APIv1_Controller
+class Erhalter extends API_Controller
{
/**
* Erhalter API constructor.
diff --git a/application/controllers/api/v1/organisation/Fachbereich2.php b/application/controllers/api/v1/organisation/Fachbereich2.php
index a2d3d3838..dc6af4253 100644
--- a/application/controllers/api/v1/organisation/Fachbereich2.php
+++ b/application/controllers/api/v1/organisation/Fachbereich2.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Fachbereich2 extends APIv1_Controller
+class Fachbereich2 extends API_Controller
{
/**
* Fachbereich API constructor.
diff --git a/application/controllers/api/v1/organisation/Ferien.php b/application/controllers/api/v1/organisation/Ferien.php
index e943a7e66..f74ab37c1 100644
--- a/application/controllers/api/v1/organisation/Ferien.php
+++ b/application/controllers/api/v1/organisation/Ferien.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Ferien extends APIv1_Controller
+class Ferien extends API_Controller
{
/**
* Ferien API constructor.
diff --git a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php
index 2dfa9f400..9284f7d47 100644
--- a/application/controllers/api/v1/organisation/Geschaeftsjahr2.php
+++ b/application/controllers/api/v1/organisation/Geschaeftsjahr2.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Geschaeftsjahr2 extends APIv1_Controller
+class Geschaeftsjahr2 extends API_Controller
{
/**
* Geschaeftsjahr API constructor.
diff --git a/application/controllers/api/v1/organisation/Gruppe.php b/application/controllers/api/v1/organisation/Gruppe.php
index e3ef92fa4..41727dfcf 100644
--- a/application/controllers/api/v1/organisation/Gruppe.php
+++ b/application/controllers/api/v1/organisation/Gruppe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Gruppe extends APIv1_Controller
+class Gruppe extends API_Controller
{
/**
* Gruppe API constructor.
diff --git a/application/controllers/api/v1/organisation/Lehrverband.php b/application/controllers/api/v1/organisation/Lehrverband.php
index 9b12dcf90..b9981a1cd 100644
--- a/application/controllers/api/v1/organisation/Lehrverband.php
+++ b/application/controllers/api/v1/organisation/Lehrverband.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrverband extends APIv1_Controller
+class Lehrverband extends API_Controller
{
/**
* Lehrverband API constructor.
diff --git a/application/controllers/api/v1/organisation/Organisationseinheit2.php b/application/controllers/api/v1/organisation/Organisationseinheit2.php
index 3f62bbdf1..a828da0ae 100644
--- a/application/controllers/api/v1/organisation/Organisationseinheit2.php
+++ b/application/controllers/api/v1/organisation/Organisationseinheit2.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Organisationseinheit2 extends APIv1_Controller
+class Organisationseinheit2 extends API_Controller
{
/**
* Organisationseinheit API constructor.
diff --git a/application/controllers/api/v1/organisation/Organisationseinheittyp.php b/application/controllers/api/v1/organisation/Organisationseinheittyp.php
index 62a723b1e..3f5925f63 100644
--- a/application/controllers/api/v1/organisation/Organisationseinheittyp.php
+++ b/application/controllers/api/v1/organisation/Organisationseinheittyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Organisationseinheittyp extends APIv1_Controller
+class Organisationseinheittyp extends API_Controller
{
/**
* Organisationseinheittyp API constructor.
diff --git a/application/controllers/api/v1/organisation/Semesterwochen.php b/application/controllers/api/v1/organisation/Semesterwochen.php
index 2dbd26ab0..0bab990bd 100644
--- a/application/controllers/api/v1/organisation/Semesterwochen.php
+++ b/application/controllers/api/v1/organisation/Semesterwochen.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Semesterwochen extends APIv1_Controller
+class Semesterwochen extends API_Controller
{
/**
* Semesterwochen API constructor.
diff --git a/application/controllers/api/v1/organisation/Service.php b/application/controllers/api/v1/organisation/Service.php
index 4d1988430..80c971ba4 100644
--- a/application/controllers/api/v1/organisation/Service.php
+++ b/application/controllers/api/v1/organisation/Service.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Service extends APIv1_Controller
+class Service extends API_Controller
{
/**
* Service API constructor.
diff --git a/application/controllers/api/v1/organisation/Standort.php b/application/controllers/api/v1/organisation/Standort.php
index 16c206401..a9b7a76ec 100644
--- a/application/controllers/api/v1/organisation/Standort.php
+++ b/application/controllers/api/v1/organisation/Standort.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Standort extends APIv1_Controller
+class Standort extends API_Controller
{
/**
* Standort API constructor.
diff --git a/application/controllers/api/v1/organisation/Statistik.php b/application/controllers/api/v1/organisation/Statistik.php
index b85c27f42..0c0cbe133 100644
--- a/application/controllers/api/v1/organisation/Statistik.php
+++ b/application/controllers/api/v1/organisation/Statistik.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Statistik extends APIv1_Controller
+class Statistik extends API_Controller
{
/**
* Statistik API constructor.
diff --git a/application/controllers/api/v1/organisation/Studiengang2.php b/application/controllers/api/v1/organisation/Studiengang2.php
index 2e1b549ff..5e8ddfe9e 100644
--- a/application/controllers/api/v1/organisation/Studiengang2.php
+++ b/application/controllers/api/v1/organisation/Studiengang2.php
@@ -13,7 +13,7 @@
// ------------------------------------------------------------------------
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studiengang2 extends APIv1_Controller
+class Studiengang2 extends API_Controller
{
/**
*
diff --git a/application/controllers/api/v1/organisation/Studiengangstyp.php b/application/controllers/api/v1/organisation/Studiengangstyp.php
index b10811636..e637e0c9d 100644
--- a/application/controllers/api/v1/organisation/Studiengangstyp.php
+++ b/application/controllers/api/v1/organisation/Studiengangstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studiengangstyp extends APIv1_Controller
+class Studiengangstyp extends API_Controller
{
/**
* Studiengangstyp API constructor.
diff --git a/application/controllers/api/v1/organisation/Studienjahr.php b/application/controllers/api/v1/organisation/Studienjahr.php
index eb7c38847..b681e8864 100644
--- a/application/controllers/api/v1/organisation/Studienjahr.php
+++ b/application/controllers/api/v1/organisation/Studienjahr.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studienjahr extends APIv1_Controller
+class Studienjahr extends API_Controller
{
/**
* Studienjahr API constructor.
diff --git a/application/controllers/api/v1/organisation/Studienordnung.php b/application/controllers/api/v1/organisation/Studienordnung.php
index 122c8f099..541eccbf2 100644
--- a/application/controllers/api/v1/organisation/Studienordnung.php
+++ b/application/controllers/api/v1/organisation/Studienordnung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studienordnung extends APIv1_Controller
+class Studienordnung extends API_Controller
{
/**
* Studienordnung API constructor.
diff --git a/application/controllers/api/v1/organisation/Studienordnungstatus.php b/application/controllers/api/v1/organisation/Studienordnungstatus.php
index 30d38c4ad..8de5cf126 100644
--- a/application/controllers/api/v1/organisation/Studienordnungstatus.php
+++ b/application/controllers/api/v1/organisation/Studienordnungstatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studienordnungstatus extends APIv1_Controller
+class Studienordnungstatus extends API_Controller
{
/**
* Studienordnungstatus API constructor.
diff --git a/application/controllers/api/v1/organisation/Studienplan.php b/application/controllers/api/v1/organisation/Studienplan.php
index 05d8d7837..f461565d3 100644
--- a/application/controllers/api/v1/organisation/Studienplan.php
+++ b/application/controllers/api/v1/organisation/Studienplan.php
@@ -14,7 +14,7 @@
if (!defined("BASEPATH")) exit("No direct script access allowed");
-class Studienplan extends APIv1_Controller
+class Studienplan extends API_Controller
{
/**
* Course API constructor.
diff --git a/application/controllers/api/v1/organisation/Studienplatz.php b/application/controllers/api/v1/organisation/Studienplatz.php
index 88ce6a12d..217fa40a7 100644
--- a/application/controllers/api/v1/organisation/Studienplatz.php
+++ b/application/controllers/api/v1/organisation/Studienplatz.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studienplatz extends APIv1_Controller
+class Studienplatz extends API_Controller
{
/**
* Studienplatz API constructor.
diff --git a/application/controllers/api/v1/organisation/Studiensemester.php b/application/controllers/api/v1/organisation/Studiensemester.php
index f714214d9..619bc2dba 100644
--- a/application/controllers/api/v1/organisation/Studiensemester.php
+++ b/application/controllers/api/v1/organisation/Studiensemester.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Studiensemester extends APIv1_Controller
+class Studiensemester extends API_Controller
{
/**
* Studiensemester API constructor.
diff --git a/application/controllers/api/v1/person/Adresse.php b/application/controllers/api/v1/person/Adresse.php
index ddbbfe554..153423ac0 100644
--- a/application/controllers/api/v1/person/Adresse.php
+++ b/application/controllers/api/v1/person/Adresse.php
@@ -15,7 +15,7 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
-class Adresse extends APIv1_Controller
+class Adresse extends API_Controller
{
/**
* Person API constructor.
diff --git a/application/controllers/api/v1/person/Bankverbindung.php b/application/controllers/api/v1/person/Bankverbindung.php
index 06f6b040d..2c524e0ab 100644
--- a/application/controllers/api/v1/person/Bankverbindung.php
+++ b/application/controllers/api/v1/person/Bankverbindung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Bankverbindung extends APIv1_Controller
+class Bankverbindung extends API_Controller
{
/**
* Bankverbindung API constructor.
diff --git a/application/controllers/api/v1/person/Benutzer.php b/application/controllers/api/v1/person/Benutzer.php
index f1ea4f149..d983103c8 100644
--- a/application/controllers/api/v1/person/Benutzer.php
+++ b/application/controllers/api/v1/person/Benutzer.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Benutzer extends APIv1_Controller
+class Benutzer extends API_Controller
{
/**
* Benutzer API constructor.
diff --git a/application/controllers/api/v1/person/Benutzerfunktion.php b/application/controllers/api/v1/person/Benutzerfunktion.php
index 98fd8654a..75b338df0 100644
--- a/application/controllers/api/v1/person/Benutzerfunktion.php
+++ b/application/controllers/api/v1/person/Benutzerfunktion.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Benutzerfunktion extends APIv1_Controller
+class Benutzerfunktion extends API_Controller
{
/**
* Benutzerfunktion API constructor.
diff --git a/application/controllers/api/v1/person/Benutzergruppe.php b/application/controllers/api/v1/person/Benutzergruppe.php
index 0adc8c73a..cf14d6d5a 100644
--- a/application/controllers/api/v1/person/Benutzergruppe.php
+++ b/application/controllers/api/v1/person/Benutzergruppe.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Benutzergruppe extends APIv1_Controller
+class Benutzergruppe extends API_Controller
{
/**
* Benutzergruppe API constructor.
diff --git a/application/controllers/api/v1/person/Fotostatus.php b/application/controllers/api/v1/person/Fotostatus.php
index acd1ef5b6..1b64f43f7 100644
--- a/application/controllers/api/v1/person/Fotostatus.php
+++ b/application/controllers/api/v1/person/Fotostatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Fotostatus extends APIv1_Controller
+class Fotostatus extends API_Controller
{
/**
* Fotostatus API constructor.
diff --git a/application/controllers/api/v1/person/Freebusy.php b/application/controllers/api/v1/person/Freebusy.php
index eb1651c00..435073d2f 100644
--- a/application/controllers/api/v1/person/Freebusy.php
+++ b/application/controllers/api/v1/person/Freebusy.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Freebusy extends APIv1_Controller
+class Freebusy extends API_Controller
{
/**
* Freebusy API constructor.
diff --git a/application/controllers/api/v1/person/Freebusytyp.php b/application/controllers/api/v1/person/Freebusytyp.php
index 0187035d1..a05c4d142 100644
--- a/application/controllers/api/v1/person/Freebusytyp.php
+++ b/application/controllers/api/v1/person/Freebusytyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Freebusytyp extends APIv1_Controller
+class Freebusytyp extends API_Controller
{
/**
* Freebusytyp API constructor.
diff --git a/application/controllers/api/v1/person/Kontakt.php b/application/controllers/api/v1/person/Kontakt.php
index fceeaaeaf..0d925b7ac 100644
--- a/application/controllers/api/v1/person/Kontakt.php
+++ b/application/controllers/api/v1/person/Kontakt.php
@@ -15,7 +15,7 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
-class Kontakt extends APIv1_Controller
+class Kontakt extends API_Controller
{
/**
* Person API constructor.
diff --git a/application/controllers/api/v1/person/Kontaktmedium.php b/application/controllers/api/v1/person/Kontaktmedium.php
index b732d6eee..bfda0d7fe 100644
--- a/application/controllers/api/v1/person/Kontaktmedium.php
+++ b/application/controllers/api/v1/person/Kontaktmedium.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Kontaktmedium extends APIv1_Controller
+class Kontaktmedium extends API_Controller
{
/**
* Kontaktmedium API constructor.
diff --git a/application/controllers/api/v1/person/Kontakttyp.php b/application/controllers/api/v1/person/Kontakttyp.php
index c3d2b6e94..f4951e09a 100644
--- a/application/controllers/api/v1/person/Kontakttyp.php
+++ b/application/controllers/api/v1/person/Kontakttyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Kontakttyp extends APIv1_Controller
+class Kontakttyp extends API_Controller
{
/**
* Kontakttyp API constructor.
diff --git a/application/controllers/api/v1/person/Notiz.php b/application/controllers/api/v1/person/Notiz.php
index 29755d7d3..96a527c93 100644
--- a/application/controllers/api/v1/person/Notiz.php
+++ b/application/controllers/api/v1/person/Notiz.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Notiz extends APIv1_Controller
+class Notiz extends API_Controller
{
/**
* Notiz API constructor.
diff --git a/application/controllers/api/v1/person/Notizzuordnung.php b/application/controllers/api/v1/person/Notizzuordnung.php
index da185e20f..39b388a3a 100644
--- a/application/controllers/api/v1/person/Notizzuordnung.php
+++ b/application/controllers/api/v1/person/Notizzuordnung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Notizzuordnung extends APIv1_Controller
+class Notizzuordnung extends API_Controller
{
/**
* Notizzuordnung API constructor.
diff --git a/application/controllers/api/v1/person/Person.php b/application/controllers/api/v1/person/Person.php
index ca8a66bea..a686f6060 100644
--- a/application/controllers/api/v1/person/Person.php
+++ b/application/controllers/api/v1/person/Person.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Person extends APIv1_Controller
+class Person extends API_Controller
{
/**
* Person API constructor.
diff --git a/application/controllers/api/v1/project/Aktivitaet.php b/application/controllers/api/v1/project/Aktivitaet.php
index 7aa647058..f188448a5 100644
--- a/application/controllers/api/v1/project/Aktivitaet.php
+++ b/application/controllers/api/v1/project/Aktivitaet.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aktivitaet extends APIv1_Controller
+class Aktivitaet extends API_Controller
{
/**
* Aktivitaet API constructor.
diff --git a/application/controllers/api/v1/project/Aufwandstyp.php b/application/controllers/api/v1/project/Aufwandstyp.php
index 96be6ab55..ee2df5b29 100644
--- a/application/controllers/api/v1/project/Aufwandstyp.php
+++ b/application/controllers/api/v1/project/Aufwandstyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Aufwandstyp extends APIv1_Controller
+class Aufwandstyp extends API_Controller
{
/**
* Aufwandstyp API constructor.
diff --git a/application/controllers/api/v1/project/Projekt.php b/application/controllers/api/v1/project/Projekt.php
index 64533f36f..370876ed3 100644
--- a/application/controllers/api/v1/project/Projekt.php
+++ b/application/controllers/api/v1/project/Projekt.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projekt extends APIv1_Controller
+class Projekt extends API_Controller
{
/**
* Projekt API constructor.
diff --git a/application/controllers/api/v1/project/Projekt_ressource.php b/application/controllers/api/v1/project/Projekt_ressource.php
index 2869f935a..030a7f73c 100644
--- a/application/controllers/api/v1/project/Projekt_ressource.php
+++ b/application/controllers/api/v1/project/Projekt_ressource.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projekt_ressource extends APIv1_Controller
+class Projekt_ressource extends API_Controller
{
/**
* Projekt_ressource API constructor.
diff --git a/application/controllers/api/v1/project/Projektphase.php b/application/controllers/api/v1/project/Projektphase.php
index c48893948..d4754fccb 100644
--- a/application/controllers/api/v1/project/Projektphase.php
+++ b/application/controllers/api/v1/project/Projektphase.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projektphase extends APIv1_Controller
+class Projektphase extends API_Controller
{
/**
* Projektphase API constructor.
diff --git a/application/controllers/api/v1/project/Projekttask.php b/application/controllers/api/v1/project/Projekttask.php
index 5793c85a1..048c7f9fd 100644
--- a/application/controllers/api/v1/project/Projekttask.php
+++ b/application/controllers/api/v1/project/Projekttask.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Projekttask extends APIv1_Controller
+class Projekttask extends API_Controller
{
/**
* Projekttask API constructor.
diff --git a/application/controllers/api/v1/project/Ressource.php b/application/controllers/api/v1/project/Ressource.php
index fddf77c57..45ebe2089 100644
--- a/application/controllers/api/v1/project/Ressource.php
+++ b/application/controllers/api/v1/project/Ressource.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Ressource extends APIv1_Controller
+class Ressource extends API_Controller
{
/**
* Ressource API constructor.
diff --git a/application/controllers/api/v1/project/Scrumsprint.php b/application/controllers/api/v1/project/Scrumsprint.php
index ff0e75b09..6be2ba152 100644
--- a/application/controllers/api/v1/project/Scrumsprint.php
+++ b/application/controllers/api/v1/project/Scrumsprint.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Scrumsprint extends APIv1_Controller
+class Scrumsprint extends API_Controller
{
/**
* Scrumsprint API constructor.
diff --git a/application/controllers/api/v1/ressource/Betriebsmittel.php b/application/controllers/api/v1/ressource/Betriebsmittel.php
index 63e003cfd..3f7306167 100644
--- a/application/controllers/api/v1/ressource/Betriebsmittel.php
+++ b/application/controllers/api/v1/ressource/Betriebsmittel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Betriebsmittel extends APIv1_Controller
+class Betriebsmittel extends API_Controller
{
/**
* Betriebsmittel API constructor.
diff --git a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php
index 71b5af77a..ba3a304c4 100644
--- a/application/controllers/api/v1/ressource/Betriebsmittelperson2.php
+++ b/application/controllers/api/v1/ressource/Betriebsmittelperson2.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Betriebsmittelperson2 extends APIv1_Controller
+class Betriebsmittelperson2 extends API_Controller
{
/**
* Betriebsmittelperson API constructor.
diff --git a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php
index 8dcfad8c6..11b485f97 100644
--- a/application/controllers/api/v1/ressource/Betriebsmittelstatus.php
+++ b/application/controllers/api/v1/ressource/Betriebsmittelstatus.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Betriebsmittelstatus extends APIv1_Controller
+class Betriebsmittelstatus extends API_Controller
{
/**
* Betriebsmittelstatus API constructor.
diff --git a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php
index 9902ec032..bc383fd9c 100644
--- a/application/controllers/api/v1/ressource/Betriebsmitteltyp.php
+++ b/application/controllers/api/v1/ressource/Betriebsmitteltyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Betriebsmitteltyp extends APIv1_Controller
+class Betriebsmitteltyp extends API_Controller
{
/**
* Betriebsmitteltyp API constructor.
diff --git a/application/controllers/api/v1/ressource/Coodle.php b/application/controllers/api/v1/ressource/Coodle.php
index bd7cfcf7f..b9c92e1bb 100644
--- a/application/controllers/api/v1/ressource/Coodle.php
+++ b/application/controllers/api/v1/ressource/Coodle.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Coodle extends APIv1_Controller
+class Coodle extends API_Controller
{
/**
* Coodle API constructor.
diff --git a/application/controllers/api/v1/ressource/Erreichbarkeit.php b/application/controllers/api/v1/ressource/Erreichbarkeit.php
index 291451faf..080ac258c 100644
--- a/application/controllers/api/v1/ressource/Erreichbarkeit.php
+++ b/application/controllers/api/v1/ressource/Erreichbarkeit.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Erreichbarkeit extends APIv1_Controller
+class Erreichbarkeit extends API_Controller
{
/**
* Erreichbarkeit API constructor.
diff --git a/application/controllers/api/v1/ressource/Firma.php b/application/controllers/api/v1/ressource/Firma.php
index 159d63642..e18799253 100644
--- a/application/controllers/api/v1/ressource/Firma.php
+++ b/application/controllers/api/v1/ressource/Firma.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Firma extends APIv1_Controller
+class Firma extends API_Controller
{
/**
* Firma API constructor.
diff --git a/application/controllers/api/v1/ressource/Firmatag.php b/application/controllers/api/v1/ressource/Firmatag.php
index b9df31896..e2e98d7a8 100644
--- a/application/controllers/api/v1/ressource/Firmatag.php
+++ b/application/controllers/api/v1/ressource/Firmatag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Firmatag extends APIv1_Controller
+class Firmatag extends API_Controller
{
/**
* Firmatag API constructor.
diff --git a/application/controllers/api/v1/ressource/Firmentyp.php b/application/controllers/api/v1/ressource/Firmentyp.php
index 2d13ae845..268428f40 100644
--- a/application/controllers/api/v1/ressource/Firmentyp.php
+++ b/application/controllers/api/v1/ressource/Firmentyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Firmentyp extends APIv1_Controller
+class Firmentyp extends API_Controller
{
/**
* Firmentyp API constructor.
diff --git a/application/controllers/api/v1/ressource/Funktion.php b/application/controllers/api/v1/ressource/Funktion.php
index 0ff059d2a..0f18b7649 100644
--- a/application/controllers/api/v1/ressource/Funktion.php
+++ b/application/controllers/api/v1/ressource/Funktion.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Funktion extends APIv1_Controller
+class Funktion extends API_Controller
{
/**
* Funktion API constructor.
diff --git a/application/controllers/api/v1/ressource/Lehrmittel.php b/application/controllers/api/v1/ressource/Lehrmittel.php
index 36d0d7a2f..6cb5ea9bb 100644
--- a/application/controllers/api/v1/ressource/Lehrmittel.php
+++ b/application/controllers/api/v1/ressource/Lehrmittel.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Lehrmittel extends APIv1_Controller
+class Lehrmittel extends API_Controller
{
/**
* Lehrmittel API constructor.
diff --git a/application/controllers/api/v1/ressource/Mitarbeiter.php b/application/controllers/api/v1/ressource/Mitarbeiter.php
index 70f4b441c..359088074 100644
--- a/application/controllers/api/v1/ressource/Mitarbeiter.php
+++ b/application/controllers/api/v1/ressource/Mitarbeiter.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Mitarbeiter extends APIv1_Controller
+class Mitarbeiter extends API_Controller
{
/**
* Mitarbeiter API constructor.
diff --git a/application/controllers/api/v1/ressource/Ort.php b/application/controllers/api/v1/ressource/Ort.php
index a49bbe2fb..7937c3816 100644
--- a/application/controllers/api/v1/ressource/Ort.php
+++ b/application/controllers/api/v1/ressource/Ort.php
@@ -14,7 +14,7 @@
if (!defined("BASEPATH")) exit("No direct script access allowed");
-class Ort extends APIv1_Controller
+class Ort extends API_Controller
{
/**
* Ort API constructor.
diff --git a/application/controllers/api/v1/ressource/Ortraumtyp.php b/application/controllers/api/v1/ressource/Ortraumtyp.php
index cbf9c3d9b..fe3c628b6 100644
--- a/application/controllers/api/v1/ressource/Ortraumtyp.php
+++ b/application/controllers/api/v1/ressource/Ortraumtyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Ortraumtyp extends APIv1_Controller
+class Ortraumtyp extends API_Controller
{
/**
* Ortraumtyp API constructor.
diff --git a/application/controllers/api/v1/ressource/Personfunktionstandort.php b/application/controllers/api/v1/ressource/Personfunktionstandort.php
index 1c7551984..251d2c7ae 100644
--- a/application/controllers/api/v1/ressource/Personfunktionstandort.php
+++ b/application/controllers/api/v1/ressource/Personfunktionstandort.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Personfunktionstandort extends APIv1_Controller
+class Personfunktionstandort extends API_Controller
{
/**
* Personfunktionstandort API constructor.
diff --git a/application/controllers/api/v1/ressource/Raumtyp.php b/application/controllers/api/v1/ressource/Raumtyp.php
index 71b7bf5d8..7ff7b5ccd 100644
--- a/application/controllers/api/v1/ressource/Raumtyp.php
+++ b/application/controllers/api/v1/ressource/Raumtyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Raumtyp extends APIv1_Controller
+class Raumtyp extends API_Controller
{
/**
* Raumtyp API constructor.
diff --git a/application/controllers/api/v1/ressource/Reservierung.php b/application/controllers/api/v1/ressource/Reservierung.php
index 633f61036..50a0528c7 100644
--- a/application/controllers/api/v1/ressource/Reservierung.php
+++ b/application/controllers/api/v1/ressource/Reservierung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Reservierung extends APIv1_Controller
+class Reservierung extends API_Controller
{
/**
* Reservierung API constructor.
diff --git a/application/controllers/api/v1/ressource/Stunde.php b/application/controllers/api/v1/ressource/Stunde.php
index 5d2f37049..2844860f4 100644
--- a/application/controllers/api/v1/ressource/Stunde.php
+++ b/application/controllers/api/v1/ressource/Stunde.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Stunde extends APIv1_Controller
+class Stunde extends API_Controller
{
/**
* Stunde API constructor.
diff --git a/application/controllers/api/v1/ressource/Stundenplan.php b/application/controllers/api/v1/ressource/Stundenplan.php
index 2d4b3c705..9a6614f21 100644
--- a/application/controllers/api/v1/ressource/Stundenplan.php
+++ b/application/controllers/api/v1/ressource/Stundenplan.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Stundenplan extends APIv1_Controller
+class Stundenplan extends API_Controller
{
/**
* Stundenplan API constructor.
diff --git a/application/controllers/api/v1/ressource/Stundenplandev.php b/application/controllers/api/v1/ressource/Stundenplandev.php
index 385f2bf9e..fa6e788c3 100644
--- a/application/controllers/api/v1/ressource/Stundenplandev.php
+++ b/application/controllers/api/v1/ressource/Stundenplandev.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Stundenplandev extends APIv1_Controller
+class Stundenplandev extends API_Controller
{
/**
* Stundenplandev API constructor.
diff --git a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php
index 8c30390e6..74290898d 100644
--- a/application/controllers/api/v1/ressource/Zeitaufzeichnung.php
+++ b/application/controllers/api/v1/ressource/Zeitaufzeichnung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeitaufzeichnung extends APIv1_Controller
+class Zeitaufzeichnung extends API_Controller
{
/**
* Zeitaufzeichnung API constructor.
diff --git a/application/controllers/api/v1/ressource/Zeitfenster.php b/application/controllers/api/v1/ressource/Zeitfenster.php
index e180d0d75..d2dd864cc 100644
--- a/application/controllers/api/v1/ressource/Zeitfenster.php
+++ b/application/controllers/api/v1/ressource/Zeitfenster.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeitfenster extends APIv1_Controller
+class Zeitfenster extends API_Controller
{
/**
* Zeitfenster API constructor.
diff --git a/application/controllers/api/v1/ressource/Zeitsperre.php b/application/controllers/api/v1/ressource/Zeitsperre.php
index 626a88d79..a3eafd525 100644
--- a/application/controllers/api/v1/ressource/Zeitsperre.php
+++ b/application/controllers/api/v1/ressource/Zeitsperre.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeitsperre extends APIv1_Controller
+class Zeitsperre extends API_Controller
{
/**
* Zeitsperre API constructor.
diff --git a/application/controllers/api/v1/ressource/Zeitsperretyp.php b/application/controllers/api/v1/ressource/Zeitsperretyp.php
index c70a9b2f4..aaa8ad656 100644
--- a/application/controllers/api/v1/ressource/Zeitsperretyp.php
+++ b/application/controllers/api/v1/ressource/Zeitsperretyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeitsperretyp extends APIv1_Controller
+class Zeitsperretyp extends API_Controller
{
/**
* Zeitsperretyp API constructor.
diff --git a/application/controllers/api/v1/ressource/Zeitwunsch.php b/application/controllers/api/v1/ressource/Zeitwunsch.php
index 8d9646edc..08f031eef 100644
--- a/application/controllers/api/v1/ressource/Zeitwunsch.php
+++ b/application/controllers/api/v1/ressource/Zeitwunsch.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Zeitwunsch extends APIv1_Controller
+class Zeitwunsch extends API_Controller
{
/**
* Zeitwunsch API constructor.
diff --git a/application/controllers/api/v1/system/Appdaten.php b/application/controllers/api/v1/system/Appdaten.php
index 3395ec9b6..34b53524b 100644
--- a/application/controllers/api/v1/system/Appdaten.php
+++ b/application/controllers/api/v1/system/Appdaten.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Appdaten extends APIv1_Controller
+class Appdaten extends API_Controller
{
/**
* Appdaten API constructor.
diff --git a/application/controllers/api/v1/system/Benutzerrolle.php b/application/controllers/api/v1/system/Benutzerrolle.php
index 99ec3d79e..4ad4d0c25 100644
--- a/application/controllers/api/v1/system/Benutzerrolle.php
+++ b/application/controllers/api/v1/system/Benutzerrolle.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Benutzerrolle extends APIv1_Controller
+class Benutzerrolle extends API_Controller
{
/**
* Benutzerrolle API constructor.
diff --git a/application/controllers/api/v1/system/Berechtigung.php b/application/controllers/api/v1/system/Berechtigung.php
index e94bf30f3..f88c01731 100644
--- a/application/controllers/api/v1/system/Berechtigung.php
+++ b/application/controllers/api/v1/system/Berechtigung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Berechtigung extends APIv1_Controller
+class Berechtigung extends API_Controller
{
/**
* Berechtigung API constructor.
diff --git a/application/controllers/api/v1/system/Cronjob.php b/application/controllers/api/v1/system/Cronjob.php
index 4b3bcba82..12ebe62d7 100644
--- a/application/controllers/api/v1/system/Cronjob.php
+++ b/application/controllers/api/v1/system/Cronjob.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Cronjob extends APIv1_Controller
+class Cronjob extends API_Controller
{
/**
* Cronjob API constructor.
diff --git a/application/controllers/api/v1/system/Filter.php b/application/controllers/api/v1/system/Filter.php
index bc217d385..eb611da64 100644
--- a/application/controllers/api/v1/system/Filter.php
+++ b/application/controllers/api/v1/system/Filter.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Filter extends APIv1_Controller
+class Filter extends API_Controller
{
/**
* Filter API constructor.
diff --git a/application/controllers/api/v1/system/Log.php b/application/controllers/api/v1/system/Log.php
index c270922c5..7dbee8f38 100644
--- a/application/controllers/api/v1/system/Log.php
+++ b/application/controllers/api/v1/system/Log.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Log extends APIv1_Controller
+class Log extends API_Controller
{
/**
* Log API constructor.
diff --git a/application/controllers/api/v1/system/Message.php b/application/controllers/api/v1/system/Message.php
index 1825b7db9..59d6a0b2c 100644
--- a/application/controllers/api/v1/system/Message.php
+++ b/application/controllers/api/v1/system/Message.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Message extends APIv1_Controller
+class Message extends API_Controller
{
/**
* Message API constructor.
diff --git a/application/controllers/api/v1/system/Phrase.php b/application/controllers/api/v1/system/Phrase.php
index 1a7846cb5..ff64dbce3 100644
--- a/application/controllers/api/v1/system/Phrase.php
+++ b/application/controllers/api/v1/system/Phrase.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Phrase extends APIv1_Controller
+class Phrase extends API_Controller
{
/**
* Phrase API constructor.
diff --git a/application/controllers/api/v1/system/Rolle.php b/application/controllers/api/v1/system/Rolle.php
index ba257145f..e5344539e 100644
--- a/application/controllers/api/v1/system/Rolle.php
+++ b/application/controllers/api/v1/system/Rolle.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Rolle extends APIv1_Controller
+class Rolle extends API_Controller
{
/**
* Rolle API constructor.
diff --git a/application/controllers/api/v1/system/Rolleberechtigung.php b/application/controllers/api/v1/system/Rolleberechtigung.php
index 3838dc6de..9fca1509f 100644
--- a/application/controllers/api/v1/system/Rolleberechtigung.php
+++ b/application/controllers/api/v1/system/Rolleberechtigung.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Rolleberechtigung extends APIv1_Controller
+class Rolleberechtigung extends API_Controller
{
/**
* Rolleberechtigung API constructor.
diff --git a/application/controllers/api/v1/system/Server.php b/application/controllers/api/v1/system/Server.php
index 0f3c76655..fe6a175f1 100644
--- a/application/controllers/api/v1/system/Server.php
+++ b/application/controllers/api/v1/system/Server.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Server extends APIv1_Controller
+class Server extends API_Controller
{
/**
* Server API constructor.
diff --git a/application/controllers/api/v1/system/Sprache2.php b/application/controllers/api/v1/system/Sprache2.php
index 3a3b7e6de..f84d9070b 100644
--- a/application/controllers/api/v1/system/Sprache2.php
+++ b/application/controllers/api/v1/system/Sprache2.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Sprache2 extends APIv1_Controller
+class Sprache2 extends API_Controller
{
/**
* Sprache API constructor.
diff --git a/application/controllers/api/v1/system/Tag.php b/application/controllers/api/v1/system/Tag.php
index 2bcb2dec2..7ce375217 100644
--- a/application/controllers/api/v1/system/Tag.php
+++ b/application/controllers/api/v1/system/Tag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Tag extends APIv1_Controller
+class Tag extends API_Controller
{
/**
* Tag API constructor.
diff --git a/application/controllers/api/v1/system/UDF.php b/application/controllers/api/v1/system/UDF.php
index 57d22600c..566a4c5bc 100644
--- a/application/controllers/api/v1/system/UDF.php
+++ b/application/controllers/api/v1/system/UDF.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class UDF extends APIv1_Controller
+class UDF extends API_Controller
{
/**
* UDF API constructor.
diff --git a/application/controllers/api/v1/system/Variable.php b/application/controllers/api/v1/system/Variable.php
index 8a4e196dc..b84888b7e 100644
--- a/application/controllers/api/v1/system/Variable.php
+++ b/application/controllers/api/v1/system/Variable.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Variable extends APIv1_Controller
+class Variable extends API_Controller
{
/**
* Variable API constructor.
diff --git a/application/controllers/api/v1/system/Vorlage.php b/application/controllers/api/v1/system/Vorlage.php
index 48a73ac4f..24db38570 100644
--- a/application/controllers/api/v1/system/Vorlage.php
+++ b/application/controllers/api/v1/system/Vorlage.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Vorlage extends APIv1_Controller
+class Vorlage extends API_Controller
{
/**
* Vorlage API constructor.
diff --git a/application/controllers/api/v1/system/Vorlagestudiengang.php b/application/controllers/api/v1/system/Vorlagestudiengang.php
index dbbe23e1e..e28533f99 100644
--- a/application/controllers/api/v1/system/Vorlagestudiengang.php
+++ b/application/controllers/api/v1/system/Vorlagestudiengang.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Vorlagestudiengang extends APIv1_Controller
+class Vorlagestudiengang extends API_Controller
{
/**
* Vorlagestudiengang API constructor.
diff --git a/application/controllers/api/v1/system/Webservicelog.php b/application/controllers/api/v1/system/Webservicelog.php
index ece2e2ff6..cb7882ad6 100644
--- a/application/controllers/api/v1/system/Webservicelog.php
+++ b/application/controllers/api/v1/system/Webservicelog.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Webservicelog extends APIv1_Controller
+class Webservicelog extends API_Controller
{
/**
* Webservicelog API constructor.
diff --git a/application/controllers/api/v1/system/Webservicerecht.php b/application/controllers/api/v1/system/Webservicerecht.php
index 4f281edaa..0031675ce 100644
--- a/application/controllers/api/v1/system/Webservicerecht.php
+++ b/application/controllers/api/v1/system/Webservicerecht.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Webservicerecht extends APIv1_Controller
+class Webservicerecht extends API_Controller
{
/**
* Webservicerecht API constructor.
diff --git a/application/controllers/api/v1/system/Webservicetyp.php b/application/controllers/api/v1/system/Webservicetyp.php
index 09303c87c..c77745319 100644
--- a/application/controllers/api/v1/system/Webservicetyp.php
+++ b/application/controllers/api/v1/system/Webservicetyp.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Webservicetyp extends APIv1_Controller
+class Webservicetyp extends API_Controller
{
/**
* Webservicetyp API constructor.
diff --git a/application/controllers/api/v1/testtool/Ablauf.php b/application/controllers/api/v1/testtool/Ablauf.php
index f2e7d9d63..9d5ae9a8d 100644
--- a/application/controllers/api/v1/testtool/Ablauf.php
+++ b/application/controllers/api/v1/testtool/Ablauf.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Ablauf extends APIv1_Controller
+class Ablauf extends API_Controller
{
/**
* Ablauf API constructor.
diff --git a/application/controllers/api/v1/testtool/Antwort.php b/application/controllers/api/v1/testtool/Antwort.php
index 7730dd3e9..db7d970a5 100644
--- a/application/controllers/api/v1/testtool/Antwort.php
+++ b/application/controllers/api/v1/testtool/Antwort.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Antwort extends APIv1_Controller
+class Antwort extends API_Controller
{
/**
* Antwort API constructor.
diff --git a/application/controllers/api/v1/testtool/Frage.php b/application/controllers/api/v1/testtool/Frage.php
index 83989956a..e6f7a7ea7 100644
--- a/application/controllers/api/v1/testtool/Frage.php
+++ b/application/controllers/api/v1/testtool/Frage.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Frage extends APIv1_Controller
+class Frage extends API_Controller
{
/**
* Frage API constructor.
diff --git a/application/controllers/api/v1/testtool/Gebiet.php b/application/controllers/api/v1/testtool/Gebiet.php
index 12cba24ab..dda2b98a1 100644
--- a/application/controllers/api/v1/testtool/Gebiet.php
+++ b/application/controllers/api/v1/testtool/Gebiet.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Gebiet extends APIv1_Controller
+class Gebiet extends API_Controller
{
/**
* Gebiet API constructor.
diff --git a/application/controllers/api/v1/testtool/Kategorie.php b/application/controllers/api/v1/testtool/Kategorie.php
index 5058ac76d..c0e84a61b 100644
--- a/application/controllers/api/v1/testtool/Kategorie.php
+++ b/application/controllers/api/v1/testtool/Kategorie.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Kategorie extends APIv1_Controller
+class Kategorie extends API_Controller
{
/**
* Kategorie API constructor.
diff --git a/application/controllers/api/v1/testtool/Kriterien.php b/application/controllers/api/v1/testtool/Kriterien.php
index 2420dcb62..e00932afe 100644
--- a/application/controllers/api/v1/testtool/Kriterien.php
+++ b/application/controllers/api/v1/testtool/Kriterien.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Kriterien extends APIv1_Controller
+class Kriterien extends API_Controller
{
/**
* Kriterien API constructor.
diff --git a/application/controllers/api/v1/testtool/Pruefling.php b/application/controllers/api/v1/testtool/Pruefling.php
index 3a471035e..626bb2760 100644
--- a/application/controllers/api/v1/testtool/Pruefling.php
+++ b/application/controllers/api/v1/testtool/Pruefling.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Pruefling extends APIv1_Controller
+class Pruefling extends API_Controller
{
/**
* Pruefling API constructor.
diff --git a/application/controllers/api/v1/testtool/Vorschlag.php b/application/controllers/api/v1/testtool/Vorschlag.php
index 0874b384a..5392c8aa2 100644
--- a/application/controllers/api/v1/testtool/Vorschlag.php
+++ b/application/controllers/api/v1/testtool/Vorschlag.php
@@ -14,7 +14,7 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
-class Vorschlag extends APIv1_Controller
+class Vorschlag extends API_Controller
{
/**
* Vorschlag API constructor.
diff --git a/application/controllers/crm/Statusgrund.php b/application/controllers/crm/Statusgrund.php
index 344ac06dc..3c7e43736 100644
--- a/application/controllers/crm/Statusgrund.php
+++ b/application/controllers/crm/Statusgrund.php
@@ -129,6 +129,7 @@ class Statusgrund extends Auth_Controller
$aktiv = $this->input->post("aktiv") != null && $this->input->post("aktiv") == "on" ? true : false;
$bezeichnung_mehrsprachig = $this->input->post("bezeichnung_mehrsprachig");
$beschreibung = $this->input->post("beschreibung");
+ $statusgrund_kurzbz = $this->input->post("statusgrund_kurzbz");
for ($i = 0; $i < count($bezeichnung_mehrsprachig); $i++)
{
@@ -177,7 +178,8 @@ class Statusgrund extends Auth_Controller
$data = array(
"aktiv" => $aktiv,
"bezeichnung_mehrsprachig" => $bezeichnung_mehrsprachig,
- "beschreibung" => $beschreibung
+ "beschreibung" => $beschreibung,
+ "statusgrund_kurzbz" => $statusgrund_kurzbz
);
$statusgrund = $this->StatusgrundModel->update($statusgrund_id, $data);
@@ -196,6 +198,7 @@ class Statusgrund extends Auth_Controller
$bezeichnung_mehrsprachig = $this->input->post("bezeichnung_mehrsprachig");
$beschreibung = $this->input->post("beschreibung");
$status_kurzbz = $this->input->post("status_kurzbz");
+ $statusgrund_kurzbz = $this->input->post("statusgrund_kurzbz");
for ($i = 0; $i < count($bezeichnung_mehrsprachig); $i++)
{
@@ -245,7 +248,8 @@ class Statusgrund extends Auth_Controller
"status_kurzbz" => $status_kurzbz,
"aktiv" => $aktiv,
"bezeichnung_mehrsprachig" => $bezeichnung_mehrsprachig,
- "beschreibung" => $beschreibung
+ "beschreibung" => $beschreibung,
+ "statusgrund_kurzbz" => $statusgrund_kurzbz
);
$statusgrund = $this->StatusgrundModel->insert($data);
diff --git a/application/controllers/jobs/AnrechnungJob.php b/application/controllers/jobs/AnrechnungJob.php
index 2868a8052..f92410dbc 100644
--- a/application/controllers/jobs/AnrechnungJob.php
+++ b/application/controllers/jobs/AnrechnungJob.php
@@ -15,6 +15,11 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
class AnrechnungJob extends JOB_Controller
{
+ const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht';
+
+ const ANRECHNUNGSTATUS_APPROVED = 'approved';
+ const ANRECHNUNGSTATUS_REJECTED = 'rejected';
+ const ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL = 'AnrechnungNotizSTGL';
/**
* Constructor
@@ -23,6 +28,11 @@ class AnrechnungJob extends JOB_Controller
{
parent::__construct();
$this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
+ $this->load->model('education/Anrechnung_model', 'AnrechnungModel');
+ $this->load->model('organisation/Studiengang_model', 'StudiengangModel');
+
+ $this->load->helper('url');
+ $this->load->helper('hlp_sancho_helper');
}
/**
@@ -84,4 +94,320 @@ class AnrechnungJob extends JOB_Controller
}
$this->logInfo('End Anrechnung Grades Job', array('Number of Grades added'=>$cnt));
}
+
+ /**
+ * Deletes Zeugnisnoten 'angerechnet', when Anrechnung is rejected afterwards.
+ * E.g., when STGL first accepts, then withdraws and finally rejects the approvement.
+ */
+ public function deleteAnrechnungGrades()
+ {
+ $this->logInfo('Start AnrechnungJob to delete Grades');
+
+ // Get all Zeungisnoten,
+ // WHERE note is angerechnet
+ // AND Anrechnung was rejected AFTER the Zeugnisnote was created
+ $qry = '
+ SELECT DISTINCT ON (status.anrechnung_id) anrechnung_id,
+ status.status_kurzbz AS "last_anrechnungstatus",
+ status.insertamum AS "last_anrechnungstatus_insertamum",
+ zeugnisnote.insertamum AS "zeugnisdatum_insertamum",
+ student.student_uid,
+ zeugnisnote.lehrveranstaltung_id,
+ zeugnisnote.studiensemester_kurzbz,
+ note
+ FROM lehre.tbl_zeugnisnote zeugnisnote
+ JOIN public.tbl_student student USING (student_uid)
+ JOIN lehre.tbl_anrechnung anrechnung
+ ON (zeugnisnote.lehrveranstaltung_id = anrechnung.lehrveranstaltung_id)
+ AND (student.prestudent_id = anrechnung.prestudent_id)
+ AND (zeugnisnote.studiensemester_kurzbz = anrechnung.studiensemester_kurzbz)
+ JOIN lehre.tbl_anrechnung_anrechnungstatus status USING (anrechnung_id)
+ WHERE note = 6
+ AND status.insertamum > zeugnisnote.insertamum
+ AND status.status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_REJECTED). '
+ ORDER BY status.anrechnung_id, status.insertamum DESC
+ ';
+
+ $db = new DB_Model();
+ $result = $db->execReadOnlyQuery($qry);
+ $cnt = 0;
+
+ if (hasData($result))
+ {
+ $this->load->model('education/Zeugnisnote_model', 'ZeugnisnoteModel');
+
+ foreach (getData($result) as $row)
+ {
+ // Delete Zeugnisnote
+ $this->ZeugnisnoteModel->delete(array(
+ 'lehrveranstaltung_id' => $row->lehrveranstaltung_id,
+ 'student_uid' => $row->student_uid,
+ 'studiensemester_kurzbz' => $row->studiensemester_kurzbz
+ ));
+
+ // Count up
+ $cnt++;
+ }
+ }
+
+ $this->logInfo('End AnrechnungJob to delete Grades', array('Number of Grades deleted: ' => $cnt));
+ }
+
+ // Send Sancho mail to STGL with yesterdays new Anrechnungen
+ public function sendMailToSTGL()
+ {
+ $this->logInfo('Start AnrechnungJob to send emails to STGL about yesterdays new Anrechnungen.');
+
+ // Get all yesterdays Anrechnungen, that did not process further than first status
+ // (If Anrechnung is new, but STGL already started the process yesterday,
+ // he does not need to be informed about this new Anrechnung anymore)
+ $this->AnrechnungModel->addSelect('anrechnung_id, studiensemester_kurzbz, lv.studiengang_kz, lv.bezeichnung, vorname, nachname');
+ $this->AnrechnungModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
+ $this->AnrechnungModel->addJoin('public.tbl_student student', 'prestudent_id');
+ $this->AnrechnungModel->addJoin('public.tbl_benutzer benutzer', 'ON (benutzer.uid = student.student_uid)');
+ $this->AnrechnungModel->addJoin('public.tbl_person person', 'person_id');
+ $this->AnrechnungModel->addOrder('lv.studiengang_kz, lv.bezeichnung');
+
+ $result = $this->AnrechnungModel->loadWhere(
+ '(lehre.tbl_anrechnung.insertamum)::date = (NOW() - INTERVAL \'24 HOURS\')::DATE
+ AND 1 = (SELECT COUNT(*) FROM lehre.tbl_anrechnung_anrechnungstatus status WHERE status.anrechnung_id = tbl_anrechnung.anrechnung_id)'
+ );
+
+ // Exit if there are no Anrechnungen
+ if (!$anrechnungen = getData($result)) {
+ $this->logInfo('ABORTED: Sending emails to STGL about yesterdays new Anrechnungen aborted - No new Anrechnungen found.');
+ exit;
+ }
+
+ $unique_studiengang_kz_arr = array_unique(array_column($anrechnungen, 'studiengang_kz'));
+
+ foreach ($unique_studiengang_kz_arr as $studiengang_kz)
+ {
+ // Get STG bezeichnung
+ $this->StudiengangModel->addSelect('UPPER( typ || kurzbz ) AS "stg_bezeichnung"');
+ $studiengang_bezeichnung = $this->StudiengangModel->load($studiengang_kz)->retval[0]->stg_bezeichnung;
+
+ // Get STGL mail address
+ list ($to, $vorname) = self::_getSTGLMailAddress($studiengang_kz);
+
+ // Get HTML table with new Anrechnungen of that STG plus amount of them
+ list ($anrechnungen_amount, $anrechnungen_table) = self::_getSTGLMailDataTable($studiengang_kz, $anrechnungen);
+
+ // Link to Antrag genehmigen dashboard
+ $url =
+ CIS_ROOT. 'cis/index.php?menu='.
+ CIS_ROOT. 'cis/menu.php?content_id=&content='.
+ CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
+
+ // Prepare mail content
+ $body_fields = array(
+ 'vorname' => $vorname,
+ 'studiengang' => $studiengang_bezeichnung,
+ 'anzahl' => $anrechnungen_amount,
+ 'datentabelle' => $anrechnungen_table,
+ 'link' => anchor($url, 'Anrechnungsanträge Übersicht')
+ );
+
+ // Send mail
+ sendSanchoMail(
+ 'AnrechnungAntragStellen',
+ $body_fields,
+ $to,
+ 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt'
+ );
+ }
+
+ $this->logInfo('SUCCEDED: Sending emails to STGL about yesterdays new Anrechnungen succeded.');
+ }
+
+ /**
+ * Send Sancho mail to students, whose Anrechnungen were approved 24 hours ago.
+ */
+ public function sendMailApproved(){
+
+ $this->logInfo('Start AnrechnungJob to send emails to students, whose Anrechnungen were approved.');
+
+ // Get all yesterdays approvements
+ $this->AnrechnungModel->addSelect('student.student_uid, vorname, nachname, geschlecht, lv.bezeichnung');
+ $this->AnrechnungModel->addJoin('lehre.tbl_anrechnung_anrechnungstatus status', 'anrechnung_id');
+ $this->AnrechnungModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
+ $this->AnrechnungModel->addJoin('public.tbl_student student', 'prestudent_id');
+ $this->AnrechnungModel->addJoin('public.tbl_benutzer benutzer', 'ON (benutzer.uid = student.student_uid)');
+ $this->AnrechnungModel->addJoin('public.tbl_person person', 'person_id');
+
+ $result = $this->AnrechnungModel->loadWhere(
+ '(status.insertamum)::date = (NOW() - INTERVAL \'24 HOURS\')::DATE AND
+ status.status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_APPROVED)
+ );
+
+ // Exit if there are no approved Anrechnungen
+ if (!hasData($result))
+ {
+ $this->logInfo('ABORTED sending emails to students, whose Anrechnungen were approved. No new approvements found.');
+ exit;
+ }
+
+ // Loop through students
+ foreach ($result->retval as $student)
+ {
+ $to = $student->student_uid. '@'. DOMAIN;
+
+ $anrede = $student->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr ';
+
+ $text = 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'.
+ $student->bezeichnung. '" wurde stattgegeben.';
+
+ // Prepare mail content
+ $body_fields = array(
+ 'anrede_name' => $anrede. $student->vorname. ' '. $student->nachname,
+ 'text' => $text
+ );
+
+ // Send mail
+ sendSanchoMail(
+ 'AnrechnungGenehmigen',
+ $body_fields,
+ $to,
+ 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen'
+ );
+ }
+ }
+
+ /**
+ * Send Sancho mail to students, whose Anrechnungen were rejected 24 hours ago.
+ */
+ public function sendMailRejected(){
+
+ $this->logInfo('Start AnrechnungJob to send emails to students, whose Anrechnungen were rejected.');
+
+ $qry = '
+ SELECT
+ student.student_uid, vorname, nachname, geschlecht, lv.bezeichnung,
+ (SELECT text FROM public.tbl_notizzuordnung JOIN public.tbl_notiz USING(notiz_id)
+ WHERE tbl_notizzuordnung.anrechnung_id=tbl_anrechnung.anrechnung_id
+ AND tbl_notiz.titel='. $this->db->escape(self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL).'
+ ORDER BY tbl_notiz.insertamum DESC LIMIT 1) as text
+ FROM lehre.tbl_anrechnung
+ JOIN lehre.tbl_lehrveranstaltung lv USING(lehrveranstaltung_id)
+ JOIN public.tbl_student student USING(prestudent_id)
+ JOIN public.tbl_benutzer benutzer ON (benutzer.uid = student.student_uid)
+ JOIN public.tbl_person person USING(person_id)
+
+ WHERE EXISTS(SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatus status WHERE
+ anrechnung_id=tbl_anrechnung.anrechnung_id AND
+ (status.insertamum)::date = (NOW() - INTERVAL \'24 HOURS\')::DATE AND
+ status_kurzbz = '. $this->db->escape(self::ANRECHNUNGSTATUS_REJECTED). ')
+ ';
+
+ $db = new DB_Model();
+ $result = $db->execReadOnlyQuery($qry);
+
+ // Exit if there are no rejected Anrechnungen
+ if (!hasData($result))
+ {
+ $this->logInfo('ABORTED sending emails to students, whose Anrechnungen were rejected. No new rejectments found.');
+ exit;
+ }
+
+ // Loop through students
+ foreach ($result->retval as $student)
+ {
+ $to = $student->student_uid. '@'. DOMAIN;
+
+ $anrede = $student->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr ';
+
+ $text = <<bezeichnung" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.
+ Begründung: $student->text
+html;
+
+ // Prepare mail content
+ $body_fields = array(
+ 'anrede_name' => $anrede. $student->vorname. ' '. $student->nachname,
+ 'text' => $text
+ );
+
+ // Send mail
+ sendSanchoMail(
+ 'AnrechnungGenehmigen',
+ $body_fields,
+ $to,
+ 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen'
+ );
+ }
+
+ }
+
+ // Get STGL mail address
+ private function _getSTGLMailAddress($studiengang_kz)
+ {
+ $result = $this->StudiengangModel->getLeitung($studiengang_kz);
+
+ // Get STGL mail address
+ if (hasData($result))
+ {
+ return array(
+ $result->retval[0]->uid. '@'. DOMAIN,
+ $result->retval[0]->vorname
+ );
+ }
+ // If not available, get assistance mail address
+ else
+ {
+ $result = $this->StudiengangModel->load($studiengang_kz);
+
+ if (hasData($result))
+ {
+ return array(
+ $result->retval[0]->email,
+ ''
+ );
+ }
+ }
+ }
+
+ // Build HTML table with yesterdays new Anrechnungen of the given STG
+ private function _getSTGLMailDataTable($studiengang_kz, $anrechnungen)
+ {
+ $html = '';
+ $lv_bezeichnung = '';
+
+ // Filter Anrechnungen of given STG
+ $anrechnungen = array_filter(
+ $anrechnungen,
+ function ($anrechnung) use (&$studiengang_kz) {
+ return $anrechnung->studiengang_kz == $studiengang_kz;
+ });
+
+ // Amount of Anrechnungen
+ $amount = count($anrechnungen);
+
+ // HTML table body
+ $html .= '
+
+
+ ';
+
+ foreach ($anrechnungen as $anrechnung)
+ {
+ // Head line for each LV bezeichnung
+ if ($anrechnung->bezeichnung != $lv_bezeichnung)
+ {
+ $html .= '| ' . $anrechnung->bezeichnung . ' |
';
+ }
+
+ $lv_bezeichnung = $anrechnung->bezeichnung;
+
+ // Row for each Anrechnung / student
+ $html .= '| '. $anrechnung->vorname. ' '. $anrechnung->nachname. ' |
';
+ }
+
+ $html .= '
+
+
+ ';
+
+ return array($amount, $html);
+ }
}
diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php
index c5e4b94d8..d76c0d79b 100644
--- a/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php
+++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungDetail.php
@@ -1,6 +1,6 @@
'lehre/anrechnung_genehmigen:rw',
'approve' => 'lehre/anrechnung_genehmigen:rw',
'reject' => 'lehre/anrechnung_genehmigen:rw',
- 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw'
+ 'requestRecommendation' => 'lehre/anrechnung_genehmigen:rw',
+ 'withdraw' => 'lehre/anrechnung_genehmigen:rw',
+ 'withdrawRequestRecommendation' => 'lehre/anrechnung_genehmigen:rw',
+ 'saveEmpfehlungsNotiz' => 'lehre/anrechnung_genehmigen:rw'
)
);
@@ -80,29 +84,23 @@ class approveAnrechnungDetail extends Auth_Controller
self::_checkIfEntitledToReadAnrechnung($anrechnung_id);
// Get Anrechung data
- if (!$anrechnungData = getData($this->anrechnunglib->getAnrechnungData($anrechnung_id)))
- {
- show_error('Missing data for Anrechnung.');
- }
+ $anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
+
+ // Get Antrag data
+ $antragData = $this->anrechnunglib->getAntragData(
+ $anrechnungData->prestudent_id,
+ $anrechnungData->studiensemester_kurzbz,
+ $anrechnungData->lehrveranstaltung_id
+ );
// Get Empfehlung data
- if(!$empfehlungData = getData($this->anrechnunglib->getEmpfehlungData($anrechnung_id)))
- {
- show_error('Missing data for recommendation');
- }
+ $empfehlungData = $this->anrechnunglib->getEmpfehlungData($anrechnung_id);
// Get Genehmigung data
- if(!$genehmigungData = getData($this->anrechnunglib->getGenehmigungData($anrechnung_id)))
- {
- show_error('Missing data for recommendation');
- }
-
+ $genehmigungData = $this->anrechnunglib->getGenehmigungData($anrechnung_id);
+
$viewData = array(
- 'antragData' => $this->anrechnunglib->getAntragData(
- $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id),
- $anrechnungData->studiensemester_kurzbz,
- $anrechnungData->lehrveranstaltung_id
- ),
+ 'antragData' => $antragData,
'anrechnungData' => $anrechnungData,
'empfehlungData' => $empfehlungData,
'genehmigungData' => $genehmigungData
@@ -118,40 +116,30 @@ class approveAnrechnungDetail extends Auth_Controller
{
$data = $this->input->post('data');
- if(isEmptyArray($data))
+ // Validate data
+ if (isEmptyArray($data))
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
-
- // Get statusbezeichnung for 'approved'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $approved = getData($this->AnrechnungstatusModel->load('approved'))[0];
- $approved = getUserLanguage() == 'German'
- ? $approved->bezeichnung_mehrsprachig[0]
- : $approved->bezeichnung_mehrsprachig[1];
-
+
+ // Get STGLs person data
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
{
show_error('Failed retrieving person data');
}
-
+
+ // Approve Anrechnung
foreach ($data as $item)
{
- // Approve Anrechnung
- if(getData($this->anrechnunglib->approveAnrechnung($item['anrechnung_id'])))
+ if ($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED,
- 'status_bezeichnung' => $approved,
- 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'),
- 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED),
+ 'abgeschlossen_am' => (new DateTime())->format('d.m.Y'),
+ 'abgeschlossen_von' => $person->vorname. ' '. $person->nachname
);
-
- if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED))
- {
- show_error('Failed sending mail');
- }
}
}
@@ -173,40 +161,30 @@ class approveAnrechnungDetail extends Auth_Controller
{
$data = $this->input->post('data');
- if(isEmptyArray($data))
+ // Validate data
+ if (isEmptyArray($data))
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
-
- // Get statusbezeichnung for 'rejected'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $rejected = getData($this->AnrechnungstatusModel->load('rejected'))[0];
- $rejected = getUserLanguage() == 'German'
- ? $rejected->bezeichnung_mehrsprachig[0]
- : $rejected->bezeichnung_mehrsprachig[1];
-
+
+ // Get STGLs person data
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
{
show_error('Failed retrieving person data');
}
-
+
+ // Reject Anrechnung
foreach ($data as $item)
{
- // Reject Anrechnung
- if(getData($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung'])))
+ if ($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED,
- 'status_bezeichnung' => $rejected,
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_REJECTED),
'abgeschlossen_am' => (new DateTime())->format('d.m.Y'),
'abgeschlossen_von' => $person->vorname. ' '. $person->nachname
);
-
- if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED))
- {
- show_error('Failed sending mail');
- }
}
}
@@ -217,7 +195,7 @@ class approveAnrechnungDetail extends Auth_Controller
}
else
{
- return $this->outputJsonError('Es wurden keine Anrechnungen genehmigt.');
+ return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
}
}
@@ -232,48 +210,166 @@ class approveAnrechnungDetail extends Auth_Controller
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
-
- // Get statusbezeichnung for 'inProgressLektor'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $inProgressLektor = getData($this->AnrechnungstatusModel->load('inProgressLektor'))[0];
- $inProgressLektor = getUserLanguage() == 'German'
- ? $inProgressLektor->bezeichnung_mehrsprachig[0]
- : $inProgressLektor->bezeichnung_mehrsprachig[1];
-
+
+ $retval = array();
+ $counter = 0;
+
foreach ($data as $item)
{
- // Approve Anrechnung
- if(getData($this->anrechnunglib->requestRecommendation($item['anrechnung_id'])))
+ // Check if Anrechnungs-LV has lector
+ if (!$this->anrechnunglib->LVhasLector($item['anrechnung_id']))
{
- $json[]= array(
+ // Count up LV with no lector
+ $counter++;
+
+ // Break, if LV has no lector
+ break;
+ }
+
+ // 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' => $inProgressLektor,
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR),
'empfehlung_anrechnung' => null,
- 'empfehlung_angefordert_am' => (new DateTime())->format('d.m.Y')
+ 'empfehlungsanfrageAm' => (new DateTime())->format('d.m.Y'),
+ 'empfehlungsanfrageAn' => $empfehlungsanfrage_an
);
}
}
-
+
+ /**
+ * Send mails to lectors
+ * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
+ * even if they are required for more recommendations
+ * */
+ if (!isEmptyArray($retval))
+ {
+ self::_sendSanchoMailToLectors($retval);
+
+ // Output json to ajax
+ return $this->outputJsonSuccess($retval);
+ }
+
// Output json to ajax
- if (isset($json) && !isEmptyArray($json))
+ if (isEmptyArray($retval) && $counter > 0)
{
- /**
- * Send mails to lectors
- * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
- * even if they are required for more recommendations
- * */
- if (!$this->_sendSanchoMailToLectors($json))
- {
- show_error('Failed sending emails');
- }
+ return $this->outputJsonError(
+ "Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
+ );
+ }
+
+ return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
+ }
+
+ /**
+ * Withdraw approved / rejected Anrechnung and reset to 'inProgressDP'.
+ */
+ public function withdraw()
+ {
+ $anrechnung_id = $this->input->post('anrechnung_id');
+
+ if (!is_numeric($anrechnung_id))
+ {
+ $this->terminateWithJsonError($this->p->t('ui', 'errorFelderFehlen'));
+ }
+
+ // Delete last status approved / rejected.
+ // If last status is 'approved', Genehmigung is resetted.
+ $result = $this->AnrechnungModel->withdrawApprovement($anrechnung_id);
- return $this->outputJsonSuccess($json);
- }
- else
+ if (isError($result))
{
- return $this->outputJsonError('Es wurden keine Empfehlungen angefordert');
+ $this->terminateWithJsonError(getError($result));
}
+
+ // Success output to AJAX
+ $this->outputJsonSuccess(array(
+ 'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id))
+ );
+ }
+
+ /**
+ * Withdraw request for reommendation and reset to 'inProgressDP'.
+ * This is only possible if the lector has not provided a recommendation yet.
+ */
+ public function withdrawRequestRecommendation()
+ {
+ $anrechnung_id = $this->input->post('anrechnung_id');
+
+ if (!is_numeric($anrechnung_id))
+ {
+ show_error('Wrong parameter.');
+ }
+
+ // Get boolean empfehlung of given Anrechnung
+ if (!$result = getData($this->AnrechnungModel->load($anrechnung_id))[0])
+ {
+ show_error('Failed loading Anrechnung');
+ }
+
+ $empfehlung = $result->empfehlung_anrechnung;
+
+ // Get last Anrechnungstatus
+ if (!$result = getData($this->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0])
+ {
+ show_error('Failed loading last Anrechnungstatus');
+ }
+
+ $last_status = $result->status_kurzbz;
+ $anrechnungstatus_id = $result->anrechnungstatus_id;
+
+ // Return if Anrechnung was not waiting for recommendation or if Anrechnung has already been recommended
+ if ($last_status != self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR && !is_null($empfehlung))
+ {
+ return $this->outputJsonError('No recommendation to withdraw.');
+ }
+
+ // Reset status to 'inProgressDP'
+ $result = $this->AnrechnungModel->deleteAnrechnungstatus($anrechnungstatus_id);
+
+ if (isError($result))
+ {
+ return $this->outputJsonError('Could not withdraw this application.');
+ }
+
+ // Success output to AJAX
+ return $this->outputJsonSuccess(array(
+ 'status_bezeichnung' => $this->anrechnunglib->getLastAnrechnungstatus($anrechnung_id))
+ );
+ }
+
+ public function saveEmpfehlungsNotiz()
+ {
+ $anrechnung_id = $this->input->post('anrechnung_id');
+ $notiz_id = $this->input->post('notiz_id');
+ $empfehlungstext = $this->input->post('empfehlung_text');
+
+ // Validate data
+ if (isEmptyString($anrechnung_id))
+ {
+ $this->terminateWithJsonError($this->p->t('ui', 'systemFehler'));
+ }
+
+ // Save Empfehlungstext
+ $result = self::_saveEmpfehlungsNotiz($anrechnung_id, $empfehlungstext, $notiz_id);
+
+ if (isError($result))
+ {
+ $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
+ }
+
+ // Output success message
+ $this->outputJsonSuccess($this->p->t('ui', 'gespeichert'));
}
/**
@@ -290,8 +386,12 @@ class approveAnrechnungDetail extends Auth_Controller
// Check if user is entitled to read dms doc
self::_checkIfEntitledToReadDMSDoc($dms_id);
-
- $this->dmslib->download($dms_id);
+
+ // Set filename to be used on downlaod
+ $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
+
+ // Download file
+ $this->dmslib->download($dms_id, $filename);
}
/**
@@ -375,42 +475,7 @@ class approveAnrechnungDetail extends Auth_Controller
show_error('You are not entitled to read this document');
}
-
- /**
- * Send mail to student to inform if Anrechnung was approved or rejected
- * @param $mail_params
- */
- private function _sendSanchoMailToStudent($anrechnung_id, $status_kurzbz)
- {
- $result = getData($this->anrechnunglib->getStudentData($anrechnung_id))[0];
-
- // Get student name and mail address
- $to = $result->uid. '@'. DOMAIN;
-
- $anrede = $result->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr ';
-
- $text = $status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED
- ? 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'.
- $result->lv_bezeichnung. '" wurde stattgegeben.'
- : 'wir haben Ihren Antrag auf Anerkennung nachgewiesener Kenntnisse geprüft und können die Lehrveranstaltung "'.
- $result->lv_bezeichnung. '" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.';
-
- // Prepare mail content
- $body_fields = array(
- 'anrede_name' => $anrede. $result->vorname. ' '. $result->nachname,
- 'text' => $text
- );
-
- sendSanchoMail(
- 'AnrechnungGenehmigen',
- $body_fields,
- $to,
- 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen'
- );
-
- return true;
- }
-
+
/**
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
* @param $mail_params
@@ -438,6 +503,8 @@ class approveAnrechnungDetail extends Auth_Controller
* 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);
+
+
// Send mail to lectors
foreach ($lector_arr as $lector)
@@ -476,8 +543,8 @@ class approveAnrechnungDetail extends Auth_Controller
}
/**
- * Get lectors (prio for LV-Leitung, if not present to all lectors of LV.
- * Anyway this function will receive a unique array to avoid sending more mails to one and the same lector.
+ * Get unique array of LV lectors.
+ * Only get LV Leitung if present, otherwise all lectors of LV.
* @param $anrechnung_arr
* @return array
*/
@@ -521,11 +588,37 @@ class approveAnrechnungDetail extends Auth_Controller
unset($lector->lvleiter);
}
- // Now make the lector array aka mail receivers unique
+ // Make the lector array unique
$lector_arr = array_unique($lector_arr, SORT_REGULAR);
return $lector_arr;
}
+
+ private function _saveEmpfehlungsNotiz($anrechnung_id, $empfehlungstext, $notiz_id)
+ {
+ $this->load->model('person/Notiz_model', 'NotizModel');
+
+ if (!isEmptyString($notiz_id))
+ {
+ return $this->NotizModel->update(
+ $notiz_id,
+ array(
+ 'text' => $empfehlungstext,
+ 'updateamum' => (new DateTime())->format('Y-m-d H:i:s'),
+ 'updatevon' => $this->_uid
+ )
+ );
+ }
+
+ return $this->NotizModel->addNotizForAnrechnung(
+ $anrechnung_id,
+ self::ANRECHNUNG_NOTIZTITEL_EMPFEHLUNGSNOTIZ_BY_STGL,
+ trim($empfehlungstext),
+ $this->_uid
+ );
+
+
+ }
}
diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
index b2d09fbe1..d59d97514 100644
--- a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
+++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
@@ -62,27 +62,21 @@ class approveAnrechnungUebersicht extends Auth_Controller
public function index()
{
+ // Get study semester
$studiensemester_kurzbz = $this->input->get('studiensemester');
- // Retrieve studiengaenge the user is entitled for
+ if (isEmptyString($studiensemester_kurzbz))
+ {
+ $result = $this->StudiensemesterModel->getNearest();
+ $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
+ }
+
+ // Get studiengaenge the user is entitled for
if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_GENEHMIGEN))
{
show_error(getError($studiengang_kz_arr));
}
- if (!is_string($studiensemester_kurzbz))
- {
- $studiensemester = $this->StudiensemesterModel->getNearest();
- if (hasData($studiensemester))
- {
- $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz;
- }
- elseif (isError($studiensemester))
- {
- show_error(getError($studiensemester));
- }
- }
-
$viewData = array(
'studiensemester_selected' => $studiensemester_kurzbz,
'studiengaenge_entitled' => $studiengang_kz_arr
@@ -98,33 +92,22 @@ class approveAnrechnungUebersicht extends Auth_Controller
{
$data = $this->input->post('data');
- if(isEmptyArray($data))
+ // Validate data
+ if (isEmptyArray($data))
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
- // Get statusbezeichnung for 'approved'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $approved = getData($this->AnrechnungstatusModel->load('approved'))[0];
- $approved = getUserLanguage() == 'German'
- ? $approved->bezeichnung_mehrsprachig[0]
- : $approved->bezeichnung_mehrsprachig[1];
-
+ // Approve Anrechnung
foreach ($data as $item)
{
- // Approve Anrechnung
- if(getData($this->anrechnunglib->approveAnrechnung($item['anrechnung_id'])))
+ if ($this->anrechnunglib->approveAnrechnung($item['anrechnung_id']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'status_kurzbz' => self::ANRECHNUNGSTATUS_APPROVED,
- 'status_bezeichnung' => $approved
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_APPROVED)
);
-
- if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_APPROVED))
- {
- show_error('Failed sending mail');
- }
}
}
@@ -146,33 +129,22 @@ class approveAnrechnungUebersicht extends Auth_Controller
{
$data = $this->input->post('data');
- if(isEmptyArray($data))
+ // Validate data
+ if (isEmptyArray($data))
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
- // Get statusbezeichnung for 'rejected'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $rejected = getData($this->AnrechnungstatusModel->load('rejected'))[0];
- $rejected = getUserLanguage() == 'German'
- ? $rejected->bezeichnung_mehrsprachig[0]
- : $rejected->bezeichnung_mehrsprachig[1];
-
+ // Reject Anrechnung
foreach ($data as $item)
{
- // Reject Anrechnung
- if(getData($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung'])))
+ if ($this->anrechnunglib->rejectAnrechnung($item['anrechnung_id'], $item['begruendung']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'status_kurzbz' => self::ANRECHNUNGSTATUS_REJECTED,
- 'status_bezeichnung' => $rejected
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_REJECTED)
);
-
- if(!$this->_sendSanchoMailToStudent($item['anrechnung_id'], self::ANRECHNUNGSTATUS_REJECTED))
- {
- show_error('Failed sending mail');
- }
}
}
@@ -199,46 +171,59 @@ class approveAnrechnungUebersicht extends Auth_Controller
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
- // Get statusbezeichnung for 'inProgressLektor'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $inProgressLektor = getData($this->AnrechnungstatusModel->load('inProgressLektor'))[0];
- $inProgressLektor = getUserLanguage() == 'German'
- ? $inProgressLektor->bezeichnung_mehrsprachig[0]
- : $inProgressLektor->bezeichnung_mehrsprachig[1];
+ $retval = array();
+ $counter = 0;
foreach ($data as $item)
{
- // Approve Anrechnung
- if(getData($this->anrechnunglib->requestRecommendation($item['anrechnung_id'])))
+ // Check if Anrechnungs-LV has lector
+ if (!$this->anrechnunglib->LVhasLector($item['anrechnung_id']))
{
- $json[]= array(
+ // Count up LV with no lector
+ $counter++;
+
+ // Continue loop, if LV has no lector
+ continue;
+ }
+
+ // Request Recommendation
+ if($this->anrechnunglib->requestRecommendation($item['anrechnung_id']))
+ {
+ // 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'))
+ : '';
+
+ $retval[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR,
- 'status_bezeichnung' => $inProgressLektor,
- 'empfehlung_anrechnung' => null
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR),
+ 'empfehlung_anrechnung' => null,
+ 'empfehlungsanfrageAm' => (new DateTime())->format('Y-m-d H:i:s'),
+ 'empfehlungsanfrageAn' => $empfehlungsanfrage_an
);
}
}
- // Output json to ajax
- if (isset($json) && !isEmptyArray($json))
+ /**
+ * Send mails to lectors
+ * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
+ * even if they are required for more recommendations
+ * */
+ if (!isEmptyArray($retval))
{
- /**
- * Send mails to lectors
- * NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
- * even if they are required for more recommendations
- * */
- if (!$this->_sendSanchoMailToLectors($json))
- {
- show_error('Failed sending emails');
- }
-
- return $this->outputJsonSuccess($json);
+ self::_sendSanchoMailToLectors($retval);
}
- else
+
+ // Output json to ajax
+ if (isEmptyArray($retval) && $counter == 0)
{
return $this->outputJsonError('Es wurden keine Empfehlungen angefordert');
}
+
+ return $this->outputJsonSuccess($retval);
}
/**
@@ -256,7 +241,11 @@ class approveAnrechnungUebersicht extends Auth_Controller
// Check if user is entitled to read dms doc
self::_checkIfEntitledToReadDMSDoc($dms_id);
- $this->dmslib->download($dms_id);
+ // Set filename to be used on downlaod
+ $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
+
+ // Download file
+ $this->dmslib->download($dms_id, $filename);
}
@@ -307,41 +296,6 @@ class approveAnrechnungUebersicht extends Auth_Controller
show_error('You are not entitled to read this document');
}
- /**
- * Send mail to student to inform if Anrechnung was approved or rejected
- * @param $mail_params
- */
- private function _sendSanchoMailToStudent($anrechnung_id, $status_kurzbz)
- {
- $result = getData($this->anrechnunglib->getStudentData($anrechnung_id))[0];
-
- // Get student name and mail address
- $to = $result->uid. '@'. DOMAIN;
-
- $anrede = $result->geschlecht == 'w' ? 'Sehr geehrte Frau ' : 'Sehr geehrter Herr ';
-
- $text = $status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED
- ? 'Ihrem Antrag auf Anerkennung nachgewiesener Kenntnisse der Lehrveranstaltung "'.
- $result->lv_bezeichnung. '" wurde stattgegeben.'
- : 'wir haben Ihren Antrag auf Anerkennung nachgewiesener Kenntnisse geprüft und können die Lehrveranstaltung "'.
- $result->lv_bezeichnung. '" leider nicht anrechnen, weil die Gleichwertigkeit nicht festgestellt werden konnte.';
-
- // Prepare mail content
- $body_fields = array(
- 'anrede_name' => $anrede. $result->vorname. ' '. $result->nachname,
- 'text' => $text
- );
-
- sendSanchoMail(
- 'AnrechnungGenehmigen',
- $body_fields,
- $to,
- 'Anerkennung nachgewiesener Kenntnisse: Ihr Antrag ist abgeschlossen'
- );
-
- return true;
- }
-
/**
* Send mail to lectors asking for recommendation. (first to LV-Leitung, if not present to all lectors of lv)
* @param $mail_params
@@ -456,6 +410,5 @@ class approveAnrechnungUebersicht extends Auth_Controller
$lector_arr = array_unique($lector_arr, SORT_REGULAR);
return $lector_arr;
-
}
}
\ No newline at end of file
diff --git a/application/controllers/lehre/anrechnung/CreateAnrechnung.php b/application/controllers/lehre/anrechnung/CreateAnrechnung.php
new file mode 100644
index 000000000..bc594371d
--- /dev/null
+++ b/application/controllers/lehre/anrechnung/CreateAnrechnung.php
@@ -0,0 +1,271 @@
+ 'lehre/anrechnung_anlegen:r',
+ 'getLVsByStudent' => 'lehre/anrechnung_anlegen:r',
+ 'create' => 'lehre/anrechnung_anlegen:rw'
+ )
+ );
+
+ // Load models
+ $this->load->model('education/Anrechnung_model', 'AnrechnungModel');
+ $this->load->model('education/Anrechnungstatus_model', 'AnrechnungstatusModel');
+ $this->load->model('content/DmsVersion_model', 'DmsVersionModel');
+ $this->load->model('crm/Student_model', 'StudentModel');
+ $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
+
+ // Load libraries
+ $this->load->library('WidgetLib');
+ $this->load->library('PermissionLib');
+ $this->load->library('AnrechnungLib');
+ $this->load->library('DmsLib');
+
+ // Load helpers
+ $this->load->helper('form');
+ $this->load->helper('url');
+
+ // Load language phrases
+ $this->loadPhrases(
+ array(
+ 'global',
+ 'ui',
+ 'anrechnung',
+ 'person',
+ 'lehre'
+ )
+ );
+
+ // Load configs
+ $this->load->config('anrechnung');
+
+ $this->_setAuthUID();
+
+ $this->setControllerId();
+ }
+
+ public function index()
+ {
+ // Get Studiensemester
+ $studiensemester_kurzbz = $this->input->get('studiensemester');
+
+ // If no Studiensemester is given
+ if (isEmptyString($studiensemester_kurzbz))
+ {
+ //...use the nearest Studiensemester
+ $result = $this->StudiensemesterModel->getNearest();
+ $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
+ }
+
+ // Get Studiengaenge the user is entitled for
+ if (!$studiengang_kz_arr = $this->permissionlib->getSTG_isEntitledFor(self::BERECHTIGUNG_ANRECHNUNG_ANLEGEN))
+ {
+ show_error('Failed retrieving Studiengaenge');
+ }
+
+ // Get Anrechnungsbegruendungen
+ $this->load->model('education/Anrechnungbegruendung_model', 'AnrechnungbegruendungModel');
+ $begruendung_arr = getData($this->AnrechnungbegruendungModel->load());
+
+ $viewData = array(
+ 'studiensemester_selected' => $studiensemester_kurzbz,
+ 'studiengaenge_entitled' => $studiengang_kz_arr,
+ 'begruendungen' => $begruendung_arr
+ );
+
+ $this->load->view('lehre/anrechnung/createAnrechnung.php', $viewData);
+ }
+
+ /**
+ * Get Lehrveranstaltungen from Student.
+ */
+ public function getLVsByStudent()
+ {
+ $prestudent_id = $this->input->post('prestudent_id');
+ $studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
+
+ // Get Student UID
+ $student_uid = $this->StudentModel->getUID($prestudent_id);
+
+ // Retrieve Lehrveranstaltungen from student
+ $result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid, $studiensemester_kurzbz);
+
+ // Exit, if student has no Lehrveranstaltungen
+ if (!hasData($result))
+ {
+ $this->terminateWithJsonError($this->p->t('ui', 'keineLVzugeteilt'));
+ }
+
+ // Success response to AJAX
+ $this->outputJsonSuccess(getData($result));
+ }
+
+ /**
+ * Create Anrechnungsantrag.
+ *
+ * Saves Anrechnung and Anrechnungstatus.
+ * Also saves Nachweisdokument to DMS.
+ */
+ public function create()
+ {
+ $prestudent_id = $this->input->post('prestudent_id');
+ $studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
+ $lehrveranstaltung_id = $this->input->post('lehrveranstaltung_id');
+ $begruendung_id = $this->input->post('begruendung_id');
+ $herkunftKenntnisse = $this->input->post('herkunftKenntnisse');
+
+ // Validate upload file
+ if (empty($_FILES['uploadfile']['name']))
+ {
+ $this->terminateWithJsonError($this->p->t('ui', 'errorUploadFehlt'));
+ }
+
+ // Validate required data
+ if (isEmptyString($begruendung_id) || isEmptyString($lehrveranstaltung_id))
+ {
+ $this->terminateWithJsonError($this->p->t('ui', 'errorFelderFehlen'));
+ }
+
+ // Exit if application already exists
+ if (self::_applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id))
+ {
+ $this->terminateWithJsonError($this->p->t('global', 'antragBereitsGestellt'));
+ }
+
+ // Exit if Lehrveranstaltung was already graded with application blocking grades
+ if (self::_LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id, $prestudent_id))
+ {
+ $this->terminateWithJsonError($this->p->t('anrechnung', 'antragBenotungBlockiert'));
+ }
+
+ // Upload document
+ $result = self::_uploadFile();
+
+ if (isError($result))
+ {
+ $this->terminateWithJsonError($result->retval);
+ }
+
+ // Hold just inserted DMS ID
+ $lastInsert_dms_id = $result->retval['dms_id'];
+
+ // Save Anrechnung and Anrechnungstatus
+ $result = $this->AnrechnungModel->createAnrechnungsantrag(
+ $prestudent_id,
+ $studiensemester_kurzbz,
+ $lehrveranstaltung_id,
+ $begruendung_id,
+ $lastInsert_dms_id,
+ $herkunftKenntnisse
+ );
+
+ if (isError($result))
+ {
+ $this->terminateWithJsonError(getError($result));
+ }
+
+ $lastInsert_anrechnung_id = getData($result);
+
+ // Success response to AJAX
+ $this->outputJsonSuccess(array(
+ 'anrechnung_id' => $lastInsert_anrechnung_id,
+ 'msg' => $this->p->t('global', 'antragWurdeAngelegt')
+ ));
+ }
+
+
+ /**
+ * Retrieve the UID of the logged user and checks if it is valid
+ */
+ private function _setAuthUID()
+ {
+ $this->_uid = getAuthUID();
+
+ if (!$this->_uid) show_error('User authentification failed');
+ }
+
+ /**
+ * Check if application already exists.
+ *
+ * @param $lehrveranstaltung_id
+ * @param $studiensemester_kurzbz
+ * @param $prestudent_id
+ * @return bool
+ */
+ private function _applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)
+ {
+ $result = $this->AnrechnungModel->loadWhere(array(
+ 'lehrveranstaltung_id' => $lehrveranstaltung_id,
+ 'studiensemester_kurzbz' => $studiensemester_kurzbz,
+ 'prestudent_id' => $prestudent_id
+ ));
+
+ if (isError($result))
+ {
+ show_error(getError($result));
+ }
+
+ return hasData($result);
+ }
+
+ /**
+ * Upload file via DMS library.
+ *
+ * @return mixed
+ * @throws Exception
+ */
+ private function _uploadFile()
+ {
+ $dms = array(
+ 'kategorie_kurzbz' => 'anrechnung',
+ 'version' => 0,
+ 'name' => $_FILES['uploadfile']['name'],
+ 'mimetype' => $_FILES['uploadfile']['type'],
+ 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'),
+ 'insertvon' => $this->_uid
+ );
+
+ // Upload document
+ return $this->dmslib->upload($dms, 'uploadfile', array('pdf'));
+ }
+
+ private function _LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id, $prestudent_id)
+ {
+ // Get Student UID
+ $student_uid = $this->StudentModel->getUID($prestudent_id);
+
+ // Get Note of Lehrveranstaltung
+ $this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
+ $result = $this->LvgesamtnoteModel->load(array(
+ 'student_uid' => $student_uid,
+ 'studiensemester_kurzbz' => $studiensemester_kurzbz,
+ 'lehrveranstaltung_id' => $lehrveranstaltung_id
+ )
+ );
+
+ // If Lehrveranstaltung has Note
+ if (hasData($result))
+ {
+ $note = getData($result)[0]->note;
+
+ // Check if Note is a blocking grade
+ if (in_array($note, $this->config->item('grades_blocking_application')))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
\ No newline at end of file
diff --git a/application/controllers/lehre/anrechnung/RequestAnrechnung.php b/application/controllers/lehre/anrechnung/RequestAnrechnung.php
index 4f589e5f5..45a770cf5 100644
--- a/application/controllers/lehre/anrechnung/RequestAnrechnung.php
+++ b/application/controllers/lehre/anrechnung/RequestAnrechnung.php
@@ -6,15 +6,13 @@ class requestAnrechnung extends Auth_Controller
{
const REQUEST_ANRECHNUNG_URI = '/lehre/anrechnung/RequestAnrechnung';
const APPROVE_ANRECHNUNG_URI = '/lehre/anrechnung/ApproveAnrechnungUebersicht';
-
+
const ANRECHNUNGSTATUS_PROGRESSED_BY_STGL = 'inProgressDP';
const ANRECHNUNGSTATUS_PROGRESSED_BY_KF = 'inProgressKF';
const ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR = 'inProgressLektor';
const ANRECHNUNGSTATUS_APPROVED = 'approved';
const ANRECHNUNGSTATUS_REJECTED = 'rejected';
-
- const DEADLINE_INTERVAL_NACH_SEMESTERSTART = 'P1M'; // Deadline for application
-
+
public function __construct()
{
// Set required permissions
@@ -25,22 +23,25 @@ class requestAnrechnung extends Auth_Controller
'download' => 'student/anrechnung_beantragen:rw',
)
);
-
+
// Load models
$this->load->model('education/Anrechnung_model', 'AnrechnungModel');
$this->load->model('content/DmsVersion_model', 'DmsVersionModel');
-
+
// Load libraries
$this->load->library('WidgetLib');
$this->load->library('PermissionLib');
$this->load->library('AnrechnungLib');
$this->load->library('DmsLib');
-
+
// Load helpers
$this->load->helper('form');
$this->load->helper('url');
$this->load->helper('hlp_sancho_helper');
-
+
+ // Load configs
+ $this->load->config('anrechnung');
+
// Load language phrases
$this->loadPhrases(
array(
@@ -51,63 +52,59 @@ class requestAnrechnung extends Auth_Controller
'lehre'
)
);
-
+
$this->_setAuthUID();
-
+
$this->setControllerId();
}
-
+
public function index()
{
$studiensemester_kurzbz = $this->input->get('studiensemester');
$lehrveranstaltung_id = $this->input->get('lv_id');
-
- if (!is_numeric($lehrveranstaltung_id) || !is_string($studiensemester_kurzbz))
+
+ if (isEmptyString($lehrveranstaltung_id) || isEmptyString($studiensemester_kurzbz))
{
show_error('Missing correct parameter');
}
-
+
+ // Exit if user is not a student
+ $result = $this->StudentModel->load(array('student_uid' => $this->_uid));
+
+ if (!hasData($result))
+ {
+ show_error('Cant load user');
+ }
+
+ // Get Prestudent ID
+ $prestudent_id = getData($result)[0]->prestudent_id;
+
// Check if application deadline is expired
- // $is_expired = $this->_checkAntragDeadline($studiensemester_kurzbz);
- $is_expired = false; // Set to false until Deadline is defined
-
- $student = $this->StudentModel->load(array('student_uid' => $this->_uid));
- if (isSuccess($student) && hasData($student))
- {
- $prestudent_id = getData($student)[0]->prestudent_id;
- }
- else
- show_error('Cant load User');
-
+ $is_expired = self::_checkAntragDeadline(
+ $this->config->item('submit_application_start'),
+ $this->config->item('submit_application_end'),
+ $studiensemester_kurzbz
+ );
+
+ // Check if Lehrveranstaltung was already graded with application blocking grades
+ $is_blocked = self::_LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id);
+
// Get Anrechung data
- $result = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id);
- if (!$anrechnungData = getData($result))
- {
- show_error(getError($anrechnungData));
- }
-
- // Dont show who is progressing the application to the student
- if ($anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL ||
- $anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR ||
- $anrechnungData->status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_KF)
- {
- $anrechnungData->status = getUserLanguage() == 'German' ? 'in Bearbeitung' : 'in process';
- }
-
- $antragData = $this->anrechnunglib->getAntragData($this->_uid, $studiensemester_kurzbz, $lehrveranstaltung_id);
+ $anrechnungData = $this->anrechnunglib->getAnrechnungDataByLv($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id);
+ // Get Antrag data
+ $antragData = $this->anrechnunglib->getAntragData($prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id);
+
$viewData = array(
'antragData' => $antragData,
'anrechnungData' => $anrechnungData,
'is_expired' => $is_expired,
- 'disabled' => $is_expired && empty($anrechnungData->anrechnung_id) || !empty($anrechnungData->anrechnung_id)
- ? 'disabled'
- : ''
+ 'is_blocked' => $is_blocked
);
-
+
$this->load->view('lehre/anrechnung/requestAnrechnung.php', $viewData);
}
-
+
/**
* Apply Anrechnungsantrag and send to STGL
*/
@@ -117,104 +114,82 @@ class requestAnrechnung extends Auth_Controller
$begruendung_id = $this->input->post('begruendung');
$lehrveranstaltung_id = $this->input->post('lv_id');
$studiensemester_kurzbz = $this->input->post('studiensemester');
+ $bestaetigung = $this->input->post('bestaetigung');
+ // Validate data
if (empty($_FILES['uploadfile']['name']))
{
- show_error('Missing upload file');
+ return $this->outputJsonError($this->p->t('ui', 'errorUploadFehlt'));
}
- if (!is_numeric($begruendung_id) || !is_numeric($lehrveranstaltung_id) || !is_string($studiensemester_kurzbz))
+ if (isEmptyString($begruendung_id) ||
+ isEmptyString($anmerkung) ||
+ isEmptyString($lehrveranstaltung_id) ||
+ isEmptyString($studiensemester_kurzbz))
{
- show_error('Missing correct parameter');
+ return $this->outputJsonError($this->p->t('ui', 'errorFelderFehlen'));
}
-
- $student = $this->StudentModel->load(array('student_uid' => $this->_uid));
- if (isSuccess($student) && hasData($student))
+
+ if (isEmptyString($bestaetigung))
{
- $prestudent_id = getData($student)[0]->prestudent_id;
+ return $this->outputJsonError($this->p->t('ui', 'errorBestaetigungFehlt'));
}
- else
- show_error('Cant load User');
-
- $result = $this->_getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id);
- if (hasData($result))
+
+ // Exit if user is not a student
+ $result = $this->StudentModel->load(array('student_uid' => $this->_uid));
+
+ if (!hasData($result))
{
- show_error('Der Antrag wurde bereits gestellt');
+ return $this->outputJsonError('Cant load user');
}
-
- // Start DB transaction
- $this->db->trans_start(false);
-
+
+ // Get Prestudent ID
+ $prestudent_id = getData($result)[0]->prestudent_id;
+
+ // Exit if application already exists
+ if (self::_applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id))
+ {
+ return $this->outputJsonError($this->p->t('anrechnung', 'antragBereitsGestellt'));
+ }
+
+ // Exit if application is not for actual studysemester
+ if (!self::_applicationIsForActualSS($studiensemester_kurzbz))
+ {
+ return $this->outputJsonError($this->p->t('anrechnung', 'antragNurImAktSS'));
+ }
+
// Upload document
- $dms = array(
- 'kategorie_kurzbz' => 'anrechnung',
- 'version' => 0,
- 'name' => $_FILES['uploadfile']['name'],
- 'mimetype' => $_FILES['uploadfile']['type'],
- 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'),
- 'insertvon' => $this->_uid
+ $result = self::_uploadFile();
+
+ if (isError($result))
+ {
+ return $this->outputJsonError($result->retval);
+ }
+
+ // Hold just inserted DMS ID
+ $lastInsert_dms_id = $result->retval['dms_id'];
+
+ // Save Anrechnung and Anrechnungstatus
+ $result = $this->AnrechnungModel->createAnrechnungsantrag(
+ $prestudent_id,
+ $studiensemester_kurzbz,
+ $lehrveranstaltung_id,
+ $begruendung_id,
+ $lastInsert_dms_id,
+ $anmerkung
);
-
- if(isError($uploaddata = $this->dmslib->upload($dms, array('pdf'))))
+
+ if (isError($result))
{
- show_error(getError($uploaddata));
+ $this->terminateWithJsonError(getError($result));
}
-
- // Get PrestudentID
- $result = $this->_loadPrestudent($this->_uid, $studiensemester_kurzbz);
-
- if (!$prestudent = getData($result)[0])
- {
- show_error('Failed retrieving prestudent');
- }
-
- // Save Anrechnung
- $result = $this->AnrechnungModel->insert(array(
- 'prestudent_id' => $prestudent->prestudent_id,
- 'lehrveranstaltung_id' => $lehrveranstaltung_id,
- 'begruendung_id' => $begruendung_id,
- 'dms_id' => $uploaddata->retval['dms_id'],
- 'studiensemester_kurzbz' => $studiensemester_kurzbz,
- 'anmerkung_student' => $anmerkung,
- 'insertvon' => $this->_uid
+
+ // Output to AJAX
+ $this->outputJsonSuccess(array(
+ 'antragdatum' => (new DateTime())->format('d.m.Y'),
+ 'dms_id' => $lastInsert_dms_id,
+ 'filename' => $_FILES['uploadfile']['name']
));
-
- if (isError($result))
- {
- show_error('Failed inserting Anrechnung');
- }
-
- // Save Anrechnungstatus 'inProgressSTGL'
- $result = $this->AnrechnungModel->saveAnrechnungstatus($result->retval, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL);
-
- if (isError($result))
- {
- show_error('Failed saving Anrechnungstatus');
- }
-
- // Transaction complete!
- $this->db->trans_complete();
-
- if ($this->db->trans_status() === false || isError($result))
- {
- $this->db->trans_rollback();
- show_error($result->msg, EXIT_ERROR);
- }
-
- // Send mail to STGL
- $mail_params = array(
- 'studiengang_kz' => $prestudent->studiengang_kz,
- 'lehrveranstaltung_id' => $lehrveranstaltung_id
- );
-
- if(!$this->_sendSanchoMail($mail_params))
- {
- show_error('Failed sending mail');
- }
- else
- {
- redirect(site_url(). self::REQUEST_ANRECHNUNG_URI. '?studiensemester='. $studiensemester_kurzbz. '&lv_id='. $lehrveranstaltung_id);
- }
}
/**
@@ -241,53 +216,50 @@ class requestAnrechnung extends Auth_Controller
private function _setAuthUID()
{
$this->_uid = getAuthUID();
-
+
if (!$this->_uid) show_error('User authentification failed');
}
-
- /**
- * Load Prestudent by uid and Studiensemester.
- * @param $uid
- * @param $studiensemester_kurzbz
- * @return mixed
- */
- private function _loadPrestudent($uid, $studiensemester_kurzbz)
- {
- $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
- $this->load->model('crm/Student_model', 'StudentModel');
-
- $this->PrestudentstatusModel->addJoin('public.tbl_student', 'prestudent_id');
- return $this->PrestudentstatusModel->loadWhere(array(
- 'student_uid' => $uid,
- 'studiensemester_kurzbz' => $studiensemester_kurzbz
- )
- );
- }
-
+
/**
* Check if application deadline is expired.
+ *
+ * @param $start Start date for application submission.
+ * @param $ende End date for application submission.
* @param $studiensemester_kurzbz
- * @return bool True if semester start is more then 1 week ago
+ * @return bool True if today is not during the start- and ending deadlines (= if is expired)
* @throws Exception
*/
- private function _checkAntragDeadline($studiensemester_kurzbz)
+ private function _checkAntragDeadline($start, $ende, $studiensemester_kurzbz)
{
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
- $this->StudiensemesterModel->addSelect('start');
- if (!$start = getData($this->StudiensemesterModel->load($studiensemester_kurzbz)))
+
+ // If start is not given, set to Semesterstart.
+ if (!isset($start) || isEmptyString($start))
{
- show_error(getError($start));
+ $this->StudiensemesterModel->addSelect('start');
+ $result = $this->StudiensemesterModel->load($studiensemester_kurzbz);
+ $start = getData($result)[0]->start;
}
-
- $start = new DateTime($start[0]->start);
+
+ // 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;
+ }
+
$today = new DateTime('today midnight');
-
- // True if today > application deadline
- return ($today > $start->add((new DateInterval(self::DEADLINE_INTERVAL_NACH_SEMESTERSTART))));
+ $start = new DateTime($start);
+ $ende = new DateTime($ende);
+
+ // True if today is not during the start- and ending deadlines (= if is expired)
+ return ($today <= $start || $today >= $ende);
}
-
+
/**
- * Check if user is entitled to read dms doc
+ * Check if user is entitled to read dms doc.
+ *
* @param $dms_id
*/
private function _checkIfEntitledToReadDMSDoc($dms_id)
@@ -298,7 +270,7 @@ class requestAnrechnung extends Auth_Controller
}
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
-
+
if($result = getData($result)[0])
{
if ($result->prestudent_id == $student->prestudent_id)
@@ -306,104 +278,92 @@ class requestAnrechnung extends Auth_Controller
return;
}
}
-
+
show_error('You are not entitled to read this document');
}
-
+
/**
- * Get Anrechnung by Lehrveranstaltung
+ * Check if application already exists.
+ *
* @param $lehrveranstaltung_id
- * @return mixed
+ * @param $studiensemester_kurzbz
+ * @param $prestudent_id
+ * @return bool
*/
- private function _getAnrechnung($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)
+ private function _applicationExists($lehrveranstaltung_id, $studiensemester_kurzbz, $prestudent_id)
{
$result = $this->AnrechnungModel->loadWhere(array(
'lehrveranstaltung_id' => $lehrveranstaltung_id,
'studiensemester_kurzbz' => $studiensemester_kurzbz,
'prestudent_id' => $prestudent_id
));
-
+
if (isError($result))
{
show_error(getError($result));
}
-
- return $result;
+
+ return hasData($result);
}
-
+
/**
- * Send mail to STGL (if not available, send to STGL assistance)
- * @param $mail_params
+ * Check if applications' study semester is actual study semester.
+ *
+ * @param $studiensemester_kurzbz
+ * @return bool
*/
- private function _sendSanchoMail($mail_params)
+ private function _applicationIsForActualSS($studiensemester_kurzbz)
{
- // Get STGL mail address, if available, otherwise get assistance mail address
- list ($to, $vorname) = $this->_getSTGLMailAddress($mail_params['studiengang_kz']);
-
- // Get full name of student
- $this->load->model('person/Person_model', 'PersonModel');
- if (!$student_name = getData($this->PersonModel->getFullName($this->_uid)))
- {
- show_error ('Failed retrieving person');
- }
-
- // Get lehrveranstaltung bezeichnung
- $this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
- if (!$lehrveranstaltung = getData($this->LehrveranstaltungModel->load($mail_params['lehrveranstaltung_id']))[0])
- {
- show_error ('Failed retrieving person');
- }
-
- // Link to Antrag genehmigen
- $url =
- CIS_ROOT. 'cis/index.php?menu='.
- CIS_ROOT. 'cis/menu.php?content_id=&content='.
- CIS_ROOT. index_page(). self::APPROVE_ANRECHNUNG_URI;
-
- // Prepare mail content
- $body_fields = array(
- 'vorname' => $vorname,
- 'student_name' => $student_name,
- 'lehrveranstaltung_bezeichnung' => $lehrveranstaltung->bezeichnung,
- 'link' => anchor($url, 'Anrechnungsanträge Übersicht')
- );
-
- sendSanchoMail(
- 'AnrechnungAntragStellen',
- $body_fields,
- $to,
- 'Anerkennung nachgewiesener Kenntnisse: Neuer Antrag wurde gestellt'
- );
-
- return true;
+ $this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
+ $result = $this->StudiensemesterModel->getNearest();
+ $actual_ss = getData($result)[0]->studiensemester_kurzbz;
+
+ return $studiensemester_kurzbz == $actual_ss;
}
-
- // Get STGL mail address, if available, otherwise get assistance mail address
- private function _getSTGLMailAddress($stg_kz)
+
+ private function _LVhasBlockingGrades($studiensemester_kurzbz, $lehrveranstaltung_id)
{
- $this->load->model('organisation/Studiengang_model', 'StudiengangModel');
- $result = $this->StudiengangModel->getLeitung($stg_kz);
-
- // Get STGL mail address, if available
+ // Get Note of Lehrveranstaltung
+ $this->load->model('education/Lvgesamtnote_model', 'LvgesamtnoteModel');
+ $result = $this->LvgesamtnoteModel->load(array(
+ 'student_uid' => $this->_uid,
+ 'studiensemester_kurzbz' => $studiensemester_kurzbz,
+ 'lehrveranstaltung_id' => $lehrveranstaltung_id
+ )
+ );
+
+ // If Lehrveranstaltung has Note
if (hasData($result))
{
- return array(
- $result->retval[0]->uid. '@'. DOMAIN,
- $result->retval[0]->vorname
- );
- }
- // ...otherwise get assistance mail address
- else
- {
- $result = $this->StudiengangModel->load($stg_kz);
-
- if (hasData($result))
+ $note = getData($result)[0]->note;
+
+ // Check if Note is a blocking grade
+ if (in_array($note, $this->config->item('grades_blocking_application')))
{
- return array(
- $result->retval[0]->email,
- ''
- );
+ return true;
}
}
+ return false;
}
-}
+
+ /**
+ * Upload file via DMS library.
+ *
+ * @return mixed
+ * @throws Exception
+ */
+ private function _uploadFile()
+ {
+ $dms = array(
+ 'kategorie_kurzbz' => 'anrechnung',
+ 'version' => 0,
+ 'name' => $_FILES['uploadfile']['name'],
+ 'mimetype' => $_FILES['uploadfile']['type'],
+ 'insertamum' => (new DateTime())->format('Y-m-d H:i:s'),
+ 'insertvon' => $this->_uid
+ );
+
+ // Upload document
+ return $this->dmslib->upload($dms, 'uploadfile', array('pdf'));
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php
index b9c723eee..78175f4e6 100644
--- a/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php
+++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungDetail.php
@@ -1,6 +1,6 @@
anrechnunglib->getAnrechnungData($anrechnung_id)))
- {
- show_error('Missing data for Anrechnung.');
- }
+ $anrechnungData = $this->anrechnunglib->getAnrechnungData($anrechnung_id);
+
+ // Get Antrag data
+ $antragData = $this->anrechnunglib->getAntragData(
+ $anrechnungData->prestudent_id,
+ $anrechnungData->studiensemester_kurzbz,
+ $anrechnungData->lehrveranstaltung_id
+ );
// Get Empfehlung data
- if(!$empfehlungData = getData($this->anrechnunglib->getEmpfehlungData($anrechnung_id)))
- {
- show_error('Missing data for recommendation');
- }
+ $empfehlungData = $this->anrechnunglib->getEmpfehlungData($anrechnung_id);
$viewData = array(
- 'antragData' => $this->anrechnunglib->getAntragData(
- $student_uid = $this->StudentModel->getUID($anrechnungData->prestudent_id),
- $anrechnungData->studiensemester_kurzbz,
- $anrechnungData->lehrveranstaltung_id
- ),
+ 'antragData' => $antragData,
'anrechnungData' => $anrechnungData,
'empfehlungData' => $empfehlungData
);
@@ -113,29 +110,23 @@ class reviewAnrechnungDetail extends Auth_Controller
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
-
- // Get statusbezeichnung for 'inProgressDP'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0];
- $inProgressDP = getUserLanguage() == 'German'
- ? $inProgressDP->bezeichnung_mehrsprachig[0]
- : $inProgressDP->bezeichnung_mehrsprachig[1];
-
+
+ // Get lectors person data
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
{
- show_error('Failed retrieving person data');
+ return $this->outputJsonError('Failed retrieving person data');
}
foreach ($data as $item)
{
// Approve Anrechnung
- if(getData($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id'])))
+ if($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'empfehlung_anrechnung' => 'true',
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL,
- 'status_bezeichnung' => $inProgressDP,
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL),
'empfehlung_am' => (new DateTime())->format('d.m.Y'),
'empfehlung_von' => $person->vorname. ' '. $person->nachname
);
@@ -151,14 +142,14 @@ class reviewAnrechnungDetail extends Auth_Controller
* */
if (!$this->_sendSanchoMails($json, true))
{
- show_error('Failed sending emails');
+ return $this->outputJsonError('Failed sending emails');
}
return $this->outputJsonSuccess($json);
}
else
{
- return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt');
+ return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
}
}
@@ -174,29 +165,23 @@ class reviewAnrechnungDetail extends Auth_Controller
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
- // Get statusbezeichnung for 'inProgressDP'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0];
- $inProgressDP = getUserLanguage() == 'German'
- ? $inProgressDP->bezeichnung_mehrsprachig[0]
- : $inProgressDP->bezeichnung_mehrsprachig[1];
-
+ // Get lectors person data
if (!$person = getData($this->PersonModel->getByUID($this->_uid))[0])
{
- show_error('Failed retrieving person data');
+ return $this->outputJsonError('Failed retrieving person data');
}
foreach ($data as $item)
{
// Approve Anrechnung
- if(getData($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung'])))
+ if($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'empfehlung_anrechnung' => 'false',
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL,
- 'status_bezeichnung' => $inProgressDP,
- 'empfehlumg_am' => (new DateTime())->format('d.m.Y'),
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL),
+ 'empfehlung_am' => (new DateTime())->format('d.m.Y'),
'empfehlung_von' => $person->vorname. ' '. $person->nachname
);
}
@@ -208,14 +193,14 @@ class reviewAnrechnungDetail extends Auth_Controller
// Send mails to STGL (if not present STGL, send to STGL assistance)
if (!$this->_sendSanchoMails($json, false))
{
- show_error('Failed sending emails');
+ return $this->outputJsonError('Failed sending emails');
}
return $this->outputJsonSuccess($json);
}
else
{
- return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt');
+ return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
}
}
@@ -233,8 +218,12 @@ class reviewAnrechnungDetail extends Auth_Controller
// Check if user is entitled to read dms doc
self::_checkIfEntitledToReadDMSDoc($dms_id);
-
- $this->dmslib->download($dms_id);
+
+ // Set filename to be used on downlaod
+ $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
+
+ // Download file
+ $this->dmslib->download($dms_id, $filename);
}
diff --git a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php
index 005cde97a..cd0b7afaf 100644
--- a/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php
+++ b/application/controllers/lehre/anrechnung/ReviewAnrechnungUebersicht.php
@@ -62,19 +62,13 @@ class reviewAnrechnungUebersicht extends Auth_Controller
public function index()
{
+ // Get study semester
$studiensemester_kurzbz = $this->input->get('studiensemester');
- if (!is_string($studiensemester_kurzbz))
+ if (isEmptyString($studiensemester_kurzbz))
{
- $studiensemester = $this->StudiensemesterModel->getNearest();
- if (hasData($studiensemester))
- {
- $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz;
- }
- elseif (isError($studiensemester))
- {
- show_error(getError($studiensemester));
- }
+ $result = $this->StudiensemesterModel->getNearest();
+ $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
}
$viewData = array(
@@ -95,24 +89,17 @@ class reviewAnrechnungUebersicht extends Auth_Controller
{
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
-
- // Get statusbezeichnung for 'inProgressDP'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0];
- $inProgressDP = getUserLanguage() == 'German'
- ? $inProgressDP->bezeichnung_mehrsprachig[0]
- : $inProgressDP->bezeichnung_mehrsprachig[1];
foreach ($data as $item)
{
// Approve Anrechnung
- if(getData($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id'])))
+ if($this->anrechnunglib->recommendAnrechnung($item['anrechnung_id']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'empfehlung_anrechnung' => 'true',
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL,
- 'status_bezeichnung' => $inProgressDP
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL)
);
}
}
@@ -133,7 +120,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
}
else
{
- return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt');
+ return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
}
}
@@ -149,24 +136,16 @@ class reviewAnrechnungUebersicht extends Auth_Controller
return $this->outputJsonError('Fehler beim Übertragen der Daten.');
}
- // Get statusbezeichnung for 'inProgressDP'
- $this->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
- $inProgressDP = getData($this->AnrechnungstatusModel->load('inProgressDP'))[0];
- $inProgressDP = getUserLanguage() == 'German'
- ? $inProgressDP->bezeichnung_mehrsprachig[0]
- : $inProgressDP->bezeichnung_mehrsprachig[1];
-
foreach ($data as $item)
{
// Approve Anrechnung
- if(getData($this->anrechnunglib
- ->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung'])))
+ if($this->anrechnunglib->dontRecommendAnrechnung($item['anrechnung_id'], $item['begruendung']))
{
$json[]= array(
'anrechnung_id' => $item['anrechnung_id'],
'empfehlung_anrechnung' => 'false',
'status_kurzbz' => self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL,
- 'status_bezeichnung' => $inProgressDP
+ 'status_bezeichnung' => $this->anrechnunglib->getStatusbezeichnung(self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL)
);
}
}
@@ -184,7 +163,7 @@ class reviewAnrechnungUebersicht extends Auth_Controller
}
else
{
- return $this->outputJsonError('Empfehlungen wurden nicht durchgeführt');
+ return $this->outputJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
}
}
@@ -203,7 +182,11 @@ class reviewAnrechnungUebersicht extends Auth_Controller
// Check if user is entitled to read dms doc
self::_checkIfEntitledToReadDMSDoc($dms_id);
- $this->dmslib->download($dms_id);
+ // Set filename to be used on downlaod
+ $filename = $this->anrechnunglib->setFilenameOnDownload($dms_id);
+
+ // Download file
+ $this->dmslib->download($dms_id, $filename);
}
diff --git a/application/controllers/system/Variables.php b/application/controllers/system/Variables.php
index 20303118b..c56407416 100644
--- a/application/controllers/system/Variables.php
+++ b/application/controllers/system/Variables.php
@@ -20,7 +20,8 @@ class Variables extends Auth_Controller
array(
'setVar' => 'basis/variable:rw',
'getVar' => 'basis/variable:rw',
- 'changeStudiensemesterVar' => 'basis/variable:rw'
+ 'changeStudiensemesterVar' => 'basis/variable:rw',
+ 'changeStudengangsTypVar' => 'basis/variable:rw'
)
);
@@ -50,7 +51,9 @@ class Variables extends Auth_Controller
public function getVar()
{
$name = $this->input->get('name');
- $this->outputJson($this->VariableModel->getVariables($this->_uid, array($name)));
+ $typ = $this->input->get('typ');
+
+ $this->outputJson($this->VariableModel->getVariables($this->_uid, array($name, $typ)));
}
/**
@@ -66,6 +69,15 @@ class Variables extends Auth_Controller
$this->outputJson($result);
}
+ public function changeStudengangsTypVar()
+ {
+ $name = $this->input->post('name');
+ $change = $this->input->post('change');
+
+ $result = $this->variablelib->changeStudengangsTypVar($this->_uid, $name, $change);
+ $this->outputJson($result);
+ }
+
/**
* Retrieve the UID of the logged user and checks if it is valid
*/
diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php
index 7d36690e7..44a1cf327 100644
--- a/application/controllers/system/infocenter/InfoCenter.php
+++ b/application/controllers/system/infocenter/InfoCenter.php
@@ -12,12 +12,17 @@ class InfoCenter extends Auth_Controller
const APP = 'infocenter';
const TAETIGKEIT = 'bewerbung';
const FREIGABE_MAIL_VORLAGE = 'InfocenterMailFreigabeAssistenz';
+ const ZGVPRUEFUNG_MAIL_VORLAGE = 'InfocenterMailZgvUeberpruefung';
+ const ZGVPRUEFUNG_MAIL_VORLAGE_MASTER = 'InfocenterMailZgvUeberpruefungM';
const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller
+ const ZGV_UEBERPRUEFUNG_URI = 'system/infocenter/ZGVUeberpruefung';
const INDEX_PAGE = 'index';
const FREIGEGEBEN_PAGE = 'freigegeben';
const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert';
const SHOW_DETAILS_PAGE = 'showDetails';
+ const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails';
+ const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung';
const NAVIGATION_PAGE = 'navigation_page';
const ORIGIN_PAGE = 'origin_page';
@@ -63,7 +68,25 @@ class InfoCenter extends Auth_Controller
'name' => 'Note updated',
'message' => 'Note with title %s was updated',
'success' => null
- )
+ ),
+ 'updatezgv' => array(
+ 'logtype' => 'Action',
+ 'name' => 'ZGV pruefung updated',
+ 'message' => 'ZGV with the ID %s was updated to %s',
+ 'success' => null
+ ),
+ 'newzgv' => array(
+ 'logtype' => 'Action',
+ 'name' => 'ZGV pruefung added',
+ 'message' => 'ZGV with the ID %s was added',
+ 'success' => null
+ ),
+ 'updatedoctyp' => array(
+ 'logtype' => 'Action',
+ 'name' => 'Document type updated',
+ 'message' => 'Type of Document %s was updated, set to %s',
+ 'success' => null
+ ),
);
// Name of Interessentenstatus
@@ -86,13 +109,18 @@ class InfoCenter extends Auth_Controller
'freigegeben' => 'infocenter:r',
'reihungstestAbsolviert' => 'infocenter:r',
'showDetails' => 'infocenter:r',
+ 'showZGVDetails' => 'lehre/zgvpruefung:r',
'unlockPerson' => 'infocenter:rw',
'saveFormalGeprueft' => 'infocenter:rw',
+ 'saveDocTyp' => 'infocenter:rw',
+ 'saveNachreichung' => 'infocenter:rw',
'getPrestudentData' => 'infocenter:r',
'getLastPrestudentWithZgvJson' => 'infocenter:r',
'getZgvInfoForPrestudent' => 'infocenter:r',
'saveBewPriorisierung' => 'infocenter:rw',
'saveZgvPruefung' => 'infocenter:rw',
+ 'zgvRueckfragen' => 'infocenter:rw',
+ 'zgvStatusUpdate' => 'lehre/zgvpruefung:rw',
'saveAbsage' => 'infocenter:rw',
'saveFreigabe' => 'infocenter:rw',
'getNotiz' => 'infocenter:r',
@@ -100,6 +128,7 @@ class InfoCenter extends Auth_Controller
'updateNotiz' => 'infocenter:rw',
'reloadZgvPruefungen' => 'infocenter:r',
'reloadMessages' => 'infocenter:r',
+ 'reloadDoks' => 'infocenter:r',
'reloadNotizen' => 'infocenter:r',
'reloadLogs' => 'infocenter:r',
'outputAkteContent' => 'infocenter:r',
@@ -117,9 +146,12 @@ class InfoCenter extends Auth_Controller
// Loads models
$this->load->model('crm/Akte_model', 'AkteModel');
+ $this->load->model('crm/Dokument_model', 'DokumentModel');
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$this->load->model('crm/Statusgrund_model', 'StatusgrundModel');
+ $this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel');
+ $this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel');
$this->load->model('person/Notiz_model', 'NotizModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->model('system/Message_model', 'MessageModel');
@@ -181,6 +213,59 @@ class InfoCenter extends Auth_Controller
$this->load->view('system/infocenter/infocenterReihungstestAbsolviert.php');
}
+ /**
+ * Prestudenten/ZGV übersicht
+ * Holt sich die Informationen zu den ZGV vom Prestudenten und zeigt die dann an
+ */
+ public function showZGVDetails()
+ {
+ $this->_setNavigationMenuShowDetails(self::SHOW_ZGV_DETAILS_PAGE);
+
+ $prestudent_id = $this->input->get('prestudent_id');
+
+ if (!is_numeric($prestudent_id))
+ show_error('prestudent id is not numeric!');
+
+ $prestudentexists = $this->PrestudentModel->load($prestudent_id);
+
+ if (isError($prestudentexists))
+ show_error(getError($prestudentexists));
+
+ if (!hasData($prestudentexists))
+ show_error('Prestudent does not exist!');
+
+ $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id);
+
+ if (isError($zgv))
+ show_error(getError($zgv));
+
+ if (!hasData($zgv))
+ show_error('ZGV has no status.');
+
+ $persondata = $this->_loadPersonData(getData($prestudentexists)[0]->person_id);
+ $prestudent_id = array('prestudent_id' => $prestudent_id);
+ $status = array('status' => getData($zgv)[0]->status);
+ $prestudent_data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
+
+ $this->DokumentModel->addOrder('bezeichnung');
+ $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load())));
+
+ $data = array_merge(
+ $persondata,
+ $prestudent_id,
+ $status,
+ $dokumentdata,
+ $prestudent_data
+ );
+
+ $origin_page = $this->input->get(self::ORIGIN_PAGE);
+
+ $data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
+ $data[self::ORIGIN_PAGE] = $origin_page;
+ $data[self::PREV_FILTER_ID] = $this->input->get(self::PREV_FILTER_ID);
+
+ $this->load->view('system/infocenter/infocenterZgvDetails.php', $data);
+ }
/**
* Personal details page of the InfoCenter tool
* Initialization function, gets person and prestudent data and loads the view with the data
@@ -214,9 +299,13 @@ class InfoCenter extends Auth_Controller
$persondata = $this->_loadPersonData($person_id);
$prestudentdata = $this->_loadPrestudentData($person_id);
+ $this->DokumentModel->addOrder('bezeichnung');
+ $dokumentdata = array('dokumententypen' => (getData($this->DokumentModel->load())));
+
$data = array_merge(
$persondata,
- $prestudentdata
+ $prestudentdata,
+ $dokumentdata
);
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
@@ -377,12 +466,18 @@ class InfoCenter extends Auth_Controller
$zgvdatum = isEmptyString($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d');
$zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation');
- // zgvmasterdata
- $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas');
- $zgvmaort = $this->input->post('zgvmaort');
- $zgvmadatum = $this->input->post('zgvmadatum');
- $zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d');
- $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation');
+ $prestudent = $this->PrestudentModel->getPrestudentWithZgv($prestudent_id);
+ $prestudentdata = getData($prestudent);
+
+ if ($prestudentdata->studiengangtyp === 'm')
+ {
+ // zgvmasterdata
+ $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas');
+ $zgvmaort = $this->input->post('zgvmaort');
+ $zgvmadatum = $this->input->post('zgvmadatum');
+ $zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d');
+ $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation');
+ }
$lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id, '', self::INTERESSENTSTATUS);
@@ -398,19 +493,29 @@ class InfoCenter extends Auth_Controller
);
}
- $prestresult = $this->PrestudentModel->update(
- $prestudent_id,
- array(
- 'zgv_code' => $zgv_code,
- 'zgvort' => $zgvort,
- 'zgvdatum' => $zgvdatum,
- 'zgvnation' => $zgvnation_code,
+ $updateArray = array(
+ 'zgv_code' => $zgv_code,
+ 'zgvort' => $zgvort,
+ 'zgvdatum' => $zgvdatum,
+ 'zgvnation' => $zgvnation_code,
+ 'updateamum' => date('Y-m-d H:i:s')
+ );
+
+ if ($prestudentdata->studiengangtyp === 'm')
+ {
+ $updateMasterArray = array(
'zgvmas_code' => $zgvmas_code,
'zgvmaort' => $zgvmaort,
'zgvmadatum' => $zgvmadatum,
- 'zgvmanation' => $zgvmanation_code,
- 'updateamum' => date('Y-m-d H:i:s')
- )
+ 'zgvmanation' => $zgvmanation_code
+ );
+
+ $updateArray = array_merge($updateArray, $updateMasterArray);
+ }
+
+ $prestresult = $this->PrestudentModel->update(
+ $prestudent_id,
+ $updateArray
);
if (isError($prestresult))
@@ -432,6 +537,183 @@ class InfoCenter extends Auth_Controller
$this->outputJson($json);
}
+ /**
+ * Sendet bei einer neuen ZGV Prüfung die Mail raus an den Studiengang
+ */
+ private function sendZgvMail($mail, $typ){
+ $data = array(
+ 'link' => site_url('system/infocenter/ZGVUeberpruefung')
+ );
+
+ $this->load->helper('hlp_sancho');
+
+ sendSanchoMail(
+ ($typ === 'm' ? self::ZGVPRUEFUNG_MAIL_VORLAGE_MASTER : self::ZGVPRUEFUNG_MAIL_VORLAGE),
+ $data,
+ $mail,
+ 'ZGV Ueberpruefung',
+ 'sancho_header_min_bw.jpg',
+ 'sancho_footer_min_bw.jpg'
+ );
+ }
+
+ /**
+ * Der Status von den ZGV wird geupdated
+ */
+ public function zgvStatusUpdate()
+ {
+ $prestudent_id = $this->input->post('prestudent_id');
+ $person_id = $this->input->post('person_id');
+ $status = $this->input->post('status');
+
+ if (isEmptyString($prestudent_id) || isEmptyString($person_id) || isEmptyString($status))
+ $this->terminateWithJsonError('Some data is missing');
+
+ $personInfos = $this->PrestudentModel->getPrestudentWithZgv($prestudent_id);
+
+ if (!hasData($personInfos))
+ $this->terminateWithJsonError('Person id nicht gefunden');
+
+ $personInfos = getData($personInfos);
+
+ $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id);
+
+ if (!hasData($zgv))
+ $this->terminateWithJsonError('ZGV-Status nicht gefunden');
+
+ $zgv = getData($zgv);
+
+ if ($zgv[0]->status === 'rejected' && $status === 'rejected')
+ $this->terminateWithJsonError('Bereits abgelehnt worden');
+ elseif ($zgv[0]->status === 'accepted' && $status === 'accepted')
+ $this->terminateWithJsonError('Bereits akzeptiert worden');
+
+ $insert = $this->ZGVPruefungStatusModel->insert(
+ array(
+ 'zgvpruefung_id' => $zgv[0]->zgvpruefung_id,
+ 'status' => $status
+ )
+ );
+
+ $update = $this->ZGVPruefungModel->update(
+ $zgv[0]->zgvpruefung_id,
+ array(
+ 'updateamum' => date('Y-m-d H:i:s'),
+ 'updatevon' => $this->_uid
+ )
+ );
+
+ if (isError($insert) || isError($update))
+ $this->terminateWithJsonError('Fehler beim Speichern');
+
+ $allZgvs = $this->ZGVPruefungStatusModel->getOpenZgvByPerson($personInfos->person_id, array('pruefung_stg'));
+ $openZgv = false;
+
+ if (hasData($allZgvs))
+ $openZgv = true;
+
+ $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, $status));
+
+ $this->outputJsonSuccess(
+ array
+ (
+ 'msg' => 'Erfolgreich gespeichert',
+ 'person_id' => $personInfos->person_id,
+ 'openZgv' => $openZgv
+ )
+ );
+
+ }
+
+ /**
+ * Fügt einen neuen ZGV Status hinzu oder updated einen bestehenden
+ * Falls es erfolgreich war, sendet er die Mail raus
+ */
+ public function zgvRueckfragen()
+ {
+ $prestudent_id = $this->input->post('prestudent_id');
+ $person_id = $this->input->post('person_id');
+
+ if (isEmptyString($prestudent_id) || isEmptyString($person_id))
+ $this->terminateWithJsonError('Prestudentid OR/AND Personid missing');
+
+ $zgv = $this->ZGVPruefungStatusModel->getZgvStatusByPrestudent($prestudent_id);
+
+ $data = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
+ $mail = $data['studiengang_mail'];
+ $typ = $data['studiengang_typ'];
+
+ if (hasData($zgv))
+ {
+ $zgv = getData($zgv);
+
+ if ($zgv[0]->status === 'pruefung_stg')
+ $this->terminateWithJsonError('Bereits in Prüfung');
+
+ $insert = $this->ZGVPruefungStatusModel->insert(
+ array(
+ 'zgvpruefung_id' => $zgv[0]->zgvpruefung_id,
+ 'status' => 'pruefung_stg'
+ )
+ );
+
+ $this->ZGVPruefungModel->update(
+ $zgv[0]->zgvpruefung_id,
+ array(
+ 'updateamum' => date('Y-m-d H:i:s'),
+ 'updatevon' => $this->_uid
+ )
+ );
+
+ $this->_log($person_id, 'updatezgv', array($zgv[0]->zgvpruefung_id, 'pruefung_stg'));
+
+ if (isSuccess($insert))
+ $this->sendZgvMail($mail, $typ);
+ elseif (isError($insert))
+ $this->terminateWithJsonError('Fehler beim Speichern');
+ }else
+ {
+ $insert = $this->ZGVPruefungModel->insert(
+ array(
+ 'prestudent_id' => $prestudent_id,
+ 'insertamum' => date('Y-m-d H:i:s'),
+ 'insertvon' => $this->_uid
+ )
+ );
+
+ if (isSuccess($insert))
+ {
+ $zgvpruefung_id = $this->ZGVPruefungModel->db->insert_id();
+ $result = $this->ZGVPruefungStatusModel->insert(
+ array(
+ 'zgvpruefung_id' => $zgvpruefung_id,
+ 'status' => 'pruefung_stg'
+ )
+ );
+
+ $this->_log($person_id, 'newzgv', array($zgvpruefung_id));
+
+ if (isSuccess($result))
+ $this->sendZgvMail($mail, $typ);
+ elseif (isError($result))
+ $this->terminateWithJsonError('Fehler beim Speichern');
+ }
+ }
+
+ $hold = false;
+ if ($this->personloglib->getOnHoldDate($person_id) !== null)
+ $hold = true;
+
+ $this->outputJsonSuccess(
+ array
+ (
+ 'msg' => 'Erfolgreich gespeichert',
+ 'person_id' => $data['person_id'],
+ 'hold' => $hold
+ )
+ );
+ }
+
/**
* Saves Absage for Prestudent including the reason for the Absage (statusgrund).
* inserts Studiensemester and Ausbildungssemester for the new Absage of (chronologically) last status.
@@ -752,6 +1034,13 @@ class InfoCenter extends Auth_Controller
$this->load->view('system/infocenter/logs.php', array('logs' => $logs));
}
+ public function reloadDoks($person_id)
+ {
+ $dokumente_nachgereicht = $this->AkteModel->getAktenWithDokInfo($person_id, null, true);
+
+ $this->load->view('system/infocenter/dokNachzureichend.php', array('dokumente_nachgereicht' => $dokumente_nachgereicht->retval));
+ }
+
/**
* Outputs content of an Akte, sends appropriate headers (so the document can be downloaded)
* @param $akte_id
@@ -906,6 +1195,117 @@ class InfoCenter extends Auth_Controller
$this->outputJsonSuccess('success');
}
+ public function saveDocTyp($person_id)
+ {
+ $akte_id = $this->input->post('akte_id');
+ $typ = $this->input->post('typ');
+
+ if (!isset($akte_id) || !isset($typ) || !isset($person_id))
+ $this->terminateWithJsonError("Nicht alle sind Parameter übergeben worden");
+
+ $akte = $this->AkteModel->load($akte_id);
+
+ if (!hasData($akte))
+ $this->terminateWithJsonError("Fehler beim Laden der Akte");
+
+ $result = $this->AkteModel->update($akte_id, array('dokument_kurzbz' => $typ));
+
+ if (!isSuccess($result))
+ $this->terminateWithJsonError("Fehler beim Update aufgetreten");
+
+ $dokument = $this->DokumentModel->load($akte->retval[0]->dokument_kurzbz);
+
+ if (!hasData($dokument))
+ $this->terminateWithJsonError("Fehler beim Laden des Dokumententypes");
+
+ $this->_log(
+ $person_id,
+ 'updatedoctyp',
+ array(
+ isEmptyString($akte->retval[0]->titel) ? $akte->retval[0]->bezeichnung : $akte->retval[0]->titel,
+ isEmptyString($dokument->retval[0]->bezeichnung) ? $dokument->retval[0]->dokument_kurbz : $dokument->retval[0]->bezeichnung
+ )
+ );
+
+ $this->outputJsonSuccess('success');
+ }
+
+ public function saveNachreichung($person_id)
+ {
+ $nachreichungAm = $this->input->post('nachreichungAm');
+ $nachreichungAnmerkung = empty($this->input->post('nachreichungAnmerkung')) ? NULL : $this->input->post('nachreichungAnmerkung');
+ $typ = $this->input->post('typ');
+
+ $allowedTypes = [
+ 'VorlSpB2' => 'SprachB2',
+ 'ZgvBaPre' => 'zgv_bakk',
+ 'ZgvMaPre' => 'zgv_mast'
+ ];
+
+ if (!in_array($typ, array_keys($allowedTypes)))
+ $this->terminateWithJsonError($this->p->t('ui', 'fehlerBeimSpeichern'));
+
+ if (empty($nachreichungAm))
+ $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig'));
+
+ if (!preg_match('/^\d{2}\.\d{2}\.(\d{2}|\d{4})$/ ', $nachreichungAm))
+ {
+ $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig'));
+ }
+ else
+ {
+ $ds = explode('.', $nachreichungAm);
+ if (! checkdate($ds[1], $ds[0], $ds[2]))
+ {
+ $this->terminateWithJsonError($this->p->t('infocenter', 'datumUngueltig'));
+ }
+ }
+
+ $nachreichungAm = (date_format(date_create($nachreichungAm), 'Y-m-d'));
+
+ $today = date('Y-m-d H:i:s');
+
+ if($nachreichungAm < $today)
+ $this->terminateWithJsonError($this->p->t('infocenter', 'nachreichDatumNichtVergangenheit'));
+
+
+ $akte = $this->AkteModel->loadWhere(array('person_id' => $person_id, 'dokument_kurzbz' => $allowedTypes[$typ]));
+
+ if (hasData($akte)) {
+ $akte = getData($akte)[0];
+ $this->AkteModel->update(
+ $akte->akte_id,
+ array(
+ 'anmerkung' => $nachreichungAnmerkung,
+ 'updateamum' => $today,
+ 'updatevon' => get_uid(),
+ 'nachgereicht' => true,
+ 'nachgereicht_am' => $nachreichungAm
+ )
+ );
+ }
+ else
+ {
+ $this->AkteModel->insert(
+ array(
+ 'dokument_kurzbz' => $allowedTypes[$typ],
+ 'person_id' => $person_id,
+ 'erstelltam' => NULL,
+ 'gedruckt' => false,
+ 'anmerkung' => $nachreichungAnmerkung,
+ 'updateamum' => $today,
+ 'updatevon' => get_uid(),
+ 'insertamum' => $today,
+ 'insertvon' => get_uid(),
+ 'uid' => NULL,
+ 'nachgereicht' => true,
+ 'nachgereicht_am' => $nachreichungAm
+ )
+ );
+ }
+
+ $this->outputJsonSuccess("Done!");
+ }
// -----------------------------------------------------------------------------------------------------------------
// Private methods
@@ -1066,9 +1466,9 @@ class InfoCenter extends Auth_Controller
/**
* Define the navigation menu for the showDetails page
*/
- private function _setNavigationMenuShowDetails()
+ private function _setNavigationMenuShowDetails($page = self::SHOW_DETAILS_PAGE)
{
- $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::SHOW_DETAILS_PAGE));
+ $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.$page));
$origin_page = $this->input->get(self::ORIGIN_PAGE);
@@ -1081,6 +1481,8 @@ class InfoCenter extends Auth_Controller
{
$link = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE);
}
+ if ($origin_page === self::ZGV_UBERPRUEFUNG_PAGE)
+ $link = site_url(self::ZGV_UEBERPRUEFUNG_URI);
$prevFilterId = $this->input->get(self::PREV_FILTER_ID);
if (isset($prevFilterId))
@@ -1431,8 +1833,20 @@ class InfoCenter extends Auth_Controller
$zgvpruefung->changedown = $this->PrestudentModel->checkPrioChange($zgvpruefung->prestudent_id, $studiensemester, 1);
}
}
+ $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $zgvpruefung->prestudent_id));
- $zgvpruefungen[] = $zgvpruefung;
+ if (isSuccess($zgvExist) && hasData($zgvExist))
+ {
+ $this->ZGVPruefungStatusModel->addOrder('datum', 'DESC');
+ $this->ZGVPruefungStatusModel->addLimit(1);
+
+ $statusZGV = $this->ZGVPruefungStatusModel->loadWhere(array('zgvpruefung_id' => $zgvExist->retval[0]->zgvpruefung_id));
+
+ if (isSuccess($statusZGV) && hasData($statusZGV))
+ $zgvpruefung->statusZGV = $statusZGV->retval[0]->status;
+ }
+
+ $zgvpruefungen[] = $zgvpruefung;
}
$this->_sortPrestudents($zgvpruefungen);
@@ -1555,8 +1969,10 @@ class InfoCenter extends Auth_Controller
$person_id = $prestudentdata->person_id;
$studiengang_kurzbz = $prestudentdata->studiengang;
$studiengang_bezeichnung = $prestudentdata->studiengangbezeichnung;
+ $studiengang_mail = $prestudentdata->studiengangmail;
+ $studiengang_typ = $prestudentdata->studiengangtyp;
- return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung);
+ return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz, 'studiengang_bezeichnung' => $studiengang_bezeichnung, 'studiengang_mail' => $studiengang_mail, 'studiengang_typ' => $studiengang_typ);
}
/**
diff --git a/application/controllers/system/infocenter/ZGVUeberpruefung.php b/application/controllers/system/infocenter/ZGVUeberpruefung.php
new file mode 100644
index 000000000..bb0c36b66
--- /dev/null
+++ b/application/controllers/system/infocenter/ZGVUeberpruefung.php
@@ -0,0 +1,55 @@
+ 'lehre/zgvpruefung:r',
+ 'getZgvStatusByPrestudent' => 'lehre/zgvpruefung:r'
+ )
+ );
+ $this->load->model('crm/ZGVPruefungStatus_model', 'ZGVPruefungStatusModel');
+ $this->load->model('crm/ZGVPruefung_model', 'ZGVPruefungModel');
+
+ $this->load->library('WidgetLib');
+
+ $this->setControllerId();
+ $this->loadPhrases(
+ array(
+ 'infocenter'
+ )
+ );
+ }
+
+ public function index()
+ {
+ $this->load->view('system/infocenter/infocenterZgvUeberpruefung.php');
+ }
+
+ public function getZgvStatusByPrestudent()
+ {
+ $prestudent_id = $this->input->get('prestudent_id');
+
+ $zgvExist = $this->ZGVPruefungModel->loadWhere(array('prestudent_id' => $prestudent_id));
+
+ if (!hasData($zgvExist))
+ $this->terminateWithJsonError('no ZGV exist');
+
+ $status = $this->ZGVPruefungStatusModel->getZgvStatus(getData($zgvExist)[0]->zgvpruefung_id);
+
+ if (!hasData($status))
+ $this->terminateWithJsonError('No status');
+
+ $status = getData($status)[0]->status;
+
+ $this->outputJsonSuccess($status);
+ }
+}
\ No newline at end of file
diff --git a/application/controllers/widgets/Filters.php b/application/controllers/widgets/Filters.php
index 748272f09..e87b2d331 100644
--- a/application/controllers/widgets/Filters.php
+++ b/application/controllers/widgets/Filters.php
@@ -211,7 +211,7 @@ class Filters extends FHC_Controller
public function setNavigationMenu()
{
// Generates the filters structure array
- $filterMenu = $this->filterwidgetlib->generateFilterMenu($this->input->get(FilterWidgetLib::NAVIGATION_PAGE));
+ $this->filterwidgetlib->generateFilterMenu($this->input->get(FilterWidgetLib::NAVIGATION_PAGE));
$this->outputJsonSuccess('Success');
}
@@ -271,3 +271,4 @@ class Filters extends FHC_Controller
}
}
}
+
diff --git a/application/core/API_Controller.php b/application/core/API_Controller.php
new file mode 100644
index 000000000..db78ac6ad
--- /dev/null
+++ b/application/core/API_Controller.php
@@ -0,0 +1,124 @@
+_requiredPermissions = $requiredPermissions;
+
+ // Loads LogLib with different debug trace levels to get data of the job that extends this class
+ // It also specify parameters to set database fields
+ $this->load->library('LogLib', array(
+ 'classIndex' => 5,
+ 'functionIndex' => 5,
+ 'lineIndex' => 4,
+ 'dbLogType' => 'API', // required
+ 'dbExecuteUser' => 'RESTful API'
+ ));
+ }
+
+ /**
+ * This method is automatically called by CodeIgniter after the execution of the constructor is completed
+ * - Cheks if the Authlib was loaded, if not it means that the authentication failed
+ * - Loads the permsission lib and calls permissionlib->isEntitled
+ * - Checks if the caller is allowed to access to this content with the given permissions
+ * if it is not allowed will set the HTTP header with code 401
+ * - Calls the parent (REST_Controller) _remap method to performs other checks
+ * NOTE: this methods override the parent method!!!
+ */
+ public function _remap($object_called, $arguments = [])
+ {
+ if (isset($this->authlib)) // if set then the authentication is ok
+ {
+ // Loads permission lib
+ $this->load->library('PermissionLib');
+
+ // Cheks if the user has the permission to call a method
+ if (!$this->permissionlib->isEntitled($this->_requiredPermissions, $this->router->method))
+ {
+ // If not...
+ $this->response(error('You are not allowed to access to this content'), REST_Controller::HTTP_UNAUTHORIZED);
+ }
+ }
+
+ // Finally calls the parent _remap to perform other checks
+ parent::_remap($object_called, $arguments);
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ // Protected methods
+
+ /**
+ * Writes a REST call info log
+ */
+ protected function logInfo($response, $parameters = null)
+ {
+ $this->_log(LogLib::INFO, 'RESTful API info', $response, $parameters);
+ }
+
+ /**
+ * Writes a REST call debug log
+ */
+ protected function logDebug($response, $parameters = null)
+ {
+ $this->_log(LogLib::DEBUG, 'RESTful API debug', $response, $parameters);
+ }
+
+ /**
+ * Writes a REST call warning log
+ */
+ protected function logWarning($response, $parameters = null)
+ {
+ $this->_log(LogLib::WARNING, 'RESTful API warning', $response, $parameters);
+ }
+
+ /**
+ * Writes a REST call error log
+ */
+ protected function logError($response, $parameters = null)
+ {
+ $this->_log(LogLib::ERROR, 'RESTful API error', $response, $parameters);
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ // Private methods
+
+ /**
+ * Writes a log to database
+ */
+ private function _log($level, $requestId, $response, $parameters)
+ {
+ $data = new stdClass();
+
+ $data->response = $response;
+ if ($parameters != null) $data->parameters = $parameters;
+
+ switch($level)
+ {
+ case LogLib::INFO:
+ $this->loglib->logInfoDB($requestId, json_encode(success($data, LogLib::INFO)));
+ break;
+ case LogLib::DEBUG:
+ $this->loglib->logDebugDB($requestId, json_encode(success($data, LogLib::DEBUG)));
+ break;
+ case LogLib::WARNING:
+ $this->loglib->logWarningDB($requestId, json_encode(error($data, LogLib::WARNING)));
+ break;
+ case LogLib::ERROR:
+ $this->loglib->logErrorDB($requestId, json_encode(error($data, LogLib::ERROR)));
+ break;
+ }
+ }
+}
diff --git a/application/core/APIv1_Controller.php b/application/core/APIv1_Controller.php
deleted file mode 100644
index 14b4b626d..000000000
--- a/application/core/APIv1_Controller.php
+++ /dev/null
@@ -1,51 +0,0 @@
-_requiredPermissions = $requiredPermissions;
-
- log_message('debug', 'Called API: '.$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']);
- }
-
- /**
- * This method is automatically called by CodeIgniter after the execution of the constructor is completed
- * - Cheks if the Authlib was loaded, if not it means that the authentication failed
- * - Loads the permsission lib and calls permissionlib->isEntitled
- * - Checks if the caller is allowed to access to this content with the given permissions
- * if it is not allowed will set the HTTP header with code 401
- * - Calls the parent (REST_Controller) _remap method to performs other checks
- * NOTE: this methods override the parent method!!!
- */
- public function _remap($object_called, $arguments = [])
- {
- if (isset($this->authlib)) // if set then the authentication is ok
- {
- // Loads permission lib
- $this->load->library('PermissionLib');
-
- // Cheks if the user has the permission to call a method
- if (!$this->permissionlib->isEntitled($this->_requiredPermissions, $this->router->method))
- {
- // If not...
- $this->response(error('You are not allowed to access to this content'), REST_Controller::HTTP_UNAUTHORIZED);
- }
- }
-
- // Finally calls the parent _remap to perform other checks
- parent::_remap($object_called, $arguments);
- }
-}
diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php
index 93c324b21..ce8748c5a 100644
--- a/application/core/FHC_Controller.php
+++ b/application/core/FHC_Controller.php
@@ -132,6 +132,32 @@ abstract class FHC_Controller extends CI_Controller
{
$this->output->set_content_type('application/json')->set_output(json_encode($mixed));
}
+
+ protected function outputFile($fileObj)
+ {
+ if (file_exists($fileObj->file))
+ {
+ $finfo = new finfo(FILEINFO_MIME);
+
+ header('Content-Description: File Transfer');
+ header('Content-Type: '. $finfo->file($fileObj->file));
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate');
+ header('Pragma: public');
+ header('Content-Length: ' . filesize($fileObj->file));
+
+ if (isset($fileObj->disposition) && ($fileObj->disposition == 'inline' || $fileObj->disposition == 'attachment'))
+ {
+ header('Content-Disposition: '. $fileObj->disposition. '; filename="'. $fileObj->name. '"');
+ }
+
+ readfile($fileObj->file);
+
+ exit;
+ }
+
+ return false;
+ }
//------------------------------------------------------------------------------------------------------------------
// Private methods
diff --git a/application/core/JQW_Controller.php b/application/core/JQW_Controller.php
index 1b78a2a70..361efd998 100644
--- a/application/core/JQW_Controller.php
+++ b/application/core/JQW_Controller.php
@@ -49,10 +49,20 @@ abstract class JQW_Controller extends JOB_Controller
/**
* To get the oldest added job using the given job type
+ * NOTE: just a wrapper
*/
protected function getOldestJob($type)
{
- $jobs = $this->jobsqueuelib->getOldestJob($type);
+ return $this->getOldestJobs($type, 1);
+ }
+
+ /**
+ * To get the oldest added jobs using the given job type
+ * It is eventually specify the maximum amount of jobs to be retrieved
+ */
+ protected function getOldestJobs($type, $maxAmount)
+ {
+ $jobs = $this->jobsqueuelib->getOldestJobs($type, $maxAmount);
// If an error occurred then log it in database
if (isError($jobs)) $this->logError(getError($jobs), $type);
@@ -131,12 +141,7 @@ abstract class JQW_Controller extends JOB_Controller
*/
protected function generateJobs($status, $input)
{
- $job = new stdClass();
-
- $job->{JobsQueueLib::PROPERTY_STATUS} = $status;
- $job->{JobsQueueLib::PROPERTY_INPUT} = $input;
-
- return array($job);
+ return JobsQueueLib::generateJobs($status, $input);
}
}
diff --git a/application/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php
index c32b8a91c..3bec62dce 100644
--- a/application/libraries/AnrechnungLib.php
+++ b/application/libraries/AnrechnungLib.php
@@ -12,6 +12,7 @@ class AnrechnungLib
const ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_LEKTOR = 'AnrechnungNotizLektor';
const ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_STGL = 'AnrechnungNotizSTGL';
+ const ANRECHNUNG_NOTIZTITEL_EMPFEHLUNGSNOTIZ_BY_STGL = 'AnrechnungEmpfehlungsnotizSTGL';
public function __construct()
{
@@ -23,6 +24,10 @@ class AnrechnungLib
$this->ci->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->ci->load->model('crm/Student_model', 'StudentModel');
$this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel');
+ $this->ci->load->model('crm/Prestudent_model', 'PrestudentModel');
+ $this->ci->load->model('person/Notiz_model', 'NotizModel');
+
+ $this->ci->load->library('DmsLib');
}
/**
@@ -32,16 +37,19 @@ class AnrechnungLib
* @param $lv_id
* @return StdClass
*/
- public function getAntragData($uid, $studiensemester_kurzbz, $lv_id)
+ public function getAntragData($prestudent_id, $studiensemester_kurzbz, $lv_id)
{
$antrag_data = new StdClass();
-
+
+ // Get students UID.
+ $uid = $this->ci->StudentModel->getUID($prestudent_id);
+
// Get lehrveranstaltung data. Break, if course is not assigned to student.
if(!$lv = getData($this->ci->LehrveranstaltungModel->getLvByStudent($uid, $studiensemester_kurzbz, $lv_id))[0])
{
show_error('You are not assigned to this course yet.');
}
-
+
// Get the students personal data
if (!$person = getData($this->ci->PersonModel->getByUid($uid))[0])
{
@@ -61,12 +69,18 @@ class AnrechnungLib
}
// Get lectors of lehrveranstaltung
- $antrag_data->lektoren = array();
- if (!$lv_lektoren = getData($this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lv_id)))
+ $result = $this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lv_id);
+ if (isError($result))
{
show_error('Failed loading course lectors.');
}
-
+
+ $lv_lektoren_arr = hasData($result) ? getData($result) : array();
+
+ // Get latest ZGV
+ $result = $this->ci->PrestudentModel->getLatestZGVBezeichnung($prestudent_id);
+ $latest_zgv_bezeichnung = hasData($result) ? getData($result)[0]->bezeichnung : '';
+
// Set the given studiensemester
$antrag_data->lv_id = $lv_id;
$antrag_data->lv_bezeichnung = $lv->bezeichnung;
@@ -76,7 +90,8 @@ class AnrechnungLib
$antrag_data->nachname = $person->nachname;
$antrag_data->matrikelnr = $student->matrikelnr;
$antrag_data->stg_bezeichnung = $studiengang->bezeichnung;
- $antrag_data->lektoren = $lv_lektoren;
+ $antrag_data->lektoren = $lv_lektoren_arr;
+ $antrag_data->zgv = $latest_zgv_bezeichnung;
return $antrag_data;
}
@@ -107,8 +122,12 @@ class AnrechnungLib
{
$anrechnung_data = $this->_setAnrechnungDataObject($anrechnung);
}
+ else
+ {
+ show_error('No Anrechnung with this anrechnung_id.');
+ }
- return success($anrechnung_data);
+ return $anrechnung_data;
}
@@ -153,7 +172,7 @@ class AnrechnungLib
$anrechnung_data = $this->_setAnrechnungDataObject($anrechnung);
}
- return success($anrechnung_data);
+ return $anrechnung_data;
}
/**
@@ -171,8 +190,8 @@ class AnrechnungLib
$this->ci->AnrechnungModel->addSelect('tbl_benutzer.uid, tbl_prestudent.prestudent_id, tbl_person.person_id, tbl_anrechnung.studiensemester_kurzbz, vorname, nachname, geschlecht, tbl_lehrveranstaltung.bezeichnung AS "lv_bezeichnung"');
$this->ci->AnrechnungModel->addJoin('public.tbl_prestudent', 'prestudent_id');
$this->ci->AnrechnungModel->addJoin('public.tbl_student', 'prestudent_id');
- $this->ci->AnrechnungModel->addJoin('public.tbl_benutzer', 'uid=student_uid');
- $this->ci->AnrechnungModel->addJoin('public.tbl_person', 'tbl_benutzer.person_id=tbl_person.person_id');
+ $this->ci->AnrechnungModel->addJoin('public.tbl_benutzer', 'uid = student_uid');
+ $this->ci->AnrechnungModel->addJoin('public.tbl_person', 'tbl_benutzer.person_id = tbl_person.person_id');
$this->ci->AnrechnungModel->addJoin('lehre.tbl_lehrveranstaltung', 'lehrveranstaltung_id');
$result = $this->ci->AnrechnungModel->load($anrechnung_id);
@@ -207,28 +226,53 @@ class AnrechnungLib
$empfehlung_data->empfehlung = null;
$empfehlung_data->empfehlung_von = '-';
$empfehlung_data->empfehlung_am = '-';
- $empfehlung_data->empfehlung_angefordert_am = '-';
- $empfehlung_data->notiz = ''; // Begruendung, if not recommended
-
+ $empfehlung_data->empfehlungsanfrageAm = '-';
+ $empfehlung_data->empfehlungsanfrageAn = '-';
+ $empfehlung_data->begruendung = '-'; // Begruendung, if not recommended
+ $empfehlung_data->notiz_id = ''; // Empfehlungsnotiz from STGL
+ $empfehlung_data->notiz = ''; // Empfehlungsnotiz from STGL
+
if(!$anrechnung = getData($this->ci->AnrechnungModel->load($anrechnung_id))[0])
{
show_error('Failed loading Anrechnung');
}
+
+ // Get Empfehlungsnotiz
+ $result = $this->ci->NotizModel->getNotizByAnrechnung(
+ $anrechnung_id,
+ self::ANRECHNUNG_NOTIZTITEL_EMPFEHLUNGSNOTIZ_BY_STGL
+ );
+
+ if ($notiz = getData($result)[0])
+ {
+ $empfehlung_data->notiz_id = $notiz->notiz_id;
+ $empfehlung_data->notiz = $notiz->text;
+ }
// Get date, where recommendation was last requested
$result = $this->ci->AnrechnungModel->getLastAnrechnungstatus(
$anrechnung_id,
self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR // when STLG asks for recommendation, status is set to in progress lektor
);
- if ($result = getData($result)[0])
+
+ // If request for recommendation exists
+ if (hasData($result))
{
- $empfehlung_data->empfehlung_angefordert_am = (new DateTime($result->insertamum))->format('d.m.Y');
+ $empfehlung_data->empfehlungsanfrageAm = (new DateTime($result->retval[0]->insertamum))->format('d.m.Y');
+
+ // Get lectors who received request for recommendation
+ $lector_arr = self::getLectors($anrechnung_id);
+
+ if (!isEmptyArray($lector_arr))
+ {
+ $empfehlung_data->empfehlungsanfrageAn = implode(', ', array_column($lector_arr, 'fullname'));
+ }
}
if (is_null($anrechnung->empfehlung_anrechnung))
{
- return success($empfehlung_data);
+ return $empfehlung_data;
}
// If Empfehlung is true or false
@@ -260,15 +304,14 @@ class AnrechnungLib
if (!$anrechnung->empfehlung_anrechnung)
{
// Get Ablehnungsbegruendung (only set, if Anrechnung was not recommended yet)
- $this->ci->load->model('person/Notiz_model', 'NotizModel');
$result = $this->ci->NotizModel->getNotizByAnrechnung($anrechnung_id, self::ANRECHNUNG_NOTIZTITEL_NOTIZ_BY_LEKTOR);
if ($notiz = getData($result)[0])
{
- $empfehlung_data->notiz = $notiz->text;
+ $empfehlung_data->begruendung = $notiz->text;
}
}
- return success($empfehlung_data);
+ return $empfehlung_data;
}
@@ -300,9 +343,10 @@ class AnrechnungLib
// Get date of approvement or rejection
$result = $this->ci->AnrechnungModel->getApprovedOrRejected($anrechnung_id);
+ // If no approved or rejected Anrechnung exist, return basic genehmigung data object
if (!$result = getData($result)[0])
{
- return success($genehmigung_data);
+ return $genehmigung_data;
}
@@ -331,9 +375,30 @@ class AnrechnungLib
}
}
- return success($genehmigung_data);
+ return $genehmigung_data;
}
+
+ /**
+ * Get Anrechnungstatusbezeichnung of given status_kurzbz in users language.
+ *
+ * @param $status_kurzbz
+ * @return mixed
+ */
+ public function getStatusbezeichnung ($status_kurzbz)
+ {
+ $this->ci->AnrechnungstatusModel->addSelect('bezeichnung_mehrsprachig');
+ $result = $this->ci->AnrechnungstatusModel->load($status_kurzbz);
+
+ if (!hasData($result))
+ {
+ show_error('Failed retrieving Anrechnungstatusbezeichung');
+ }
+
+ return getUserLanguage() == 'German'
+ ? $result->retval[0]->bezeichnung_mehrsprachig[0]
+ : $result->retval[0]->bezeichnung_mehrsprachig[1];
+ }
/**
* Get last Anrechnungstatusbezeichnung in users language.
@@ -370,7 +435,7 @@ class AnrechnungLib
// Exit if already approved or rejected
if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED)
{
- return success(false); // dont approve
+ return false; // dont approve
}
// Start DB transaction
@@ -395,10 +460,10 @@ class AnrechnungLib
if ($this->ci->db->trans_status() === false)
{
$this->ci->db->trans_rollback();
- return error($result->msg, EXIT_ERROR);
+ return false;
}
- return success(true); // approved
+ return true; // approved
}
/**
@@ -419,16 +484,14 @@ class AnrechnungLib
// Exit if already approved or rejected
if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED)
{
- return success(false); // dont reject
+ return false; // dont reject
}
+
+ // Start DB transaction
+ $this->ci->db->trans_start(false);
// Insert new status rejected
- $result = $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED);
-
- if (isError($result))
- {
- show_error(getError($result));
- }
+ $this->ci->AnrechnungModel->saveAnrechnungstatus($anrechnung_id, self::ANRECHNUNGSTATUS_REJECTED);
// Add begruendung as notiz
$this->ci->load->model('person/Notiz_model', 'NotizModel');
@@ -438,8 +501,17 @@ class AnrechnungLib
$begruendung,
getAuthUID()
);
+
+ // Transaction complete
+ $this->ci->db->trans_complete();
+
+ if ($this->ci->db->trans_status() === false)
+ {
+ $this->ci->db->trans_rollback();
+ return false;
+ }
- return success(true); // rejected
+ return true; // rejected
}
/**
@@ -462,7 +534,7 @@ class AnrechnungLib
|| $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED
|| $status_kurzbz == self::ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR)
{
- return success(false); // dont ask for recommendation
+ return false; // dont ask for recommendation
}
// Start DB transaction
@@ -492,7 +564,7 @@ class AnrechnungLib
return error($result->msg, EXIT_ERROR);
}
- return success(true); // recommended
+ return true; // recommended
}
/**
@@ -537,10 +609,10 @@ class AnrechnungLib
if ($this->ci->db->trans_status() === false)
{
$this->ci->db->trans_rollback();
- return error($result->msg, EXIT_ERROR);
+ return false;
}
- return success(true); // recommended
+ return true; // recommended
}
/**
@@ -562,7 +634,7 @@ class AnrechnungLib
// Exit if already approved or rejected
if ($status_kurzbz == self::ANRECHNUNGSTATUS_APPROVED || $status_kurzbz == self::ANRECHNUNGSTATUS_REJECTED)
{
- return success(false); // dont approve
+ return false; // dont approve
}
// Start DB transaction
@@ -596,10 +668,125 @@ class AnrechnungLib
if ($this->ci->db->trans_status() === false)
{
$this->ci->db->trans_rollback();
- return error($result->msg, EXIT_ERROR);
+ return false;
}
- return success(true); // recommended
+ return true; // recommended
+ }
+
+ /**
+ * Set Filename that should be used on download
+ * @param $dms_id
+ * @return string|null
+ */
+ public function setFilenameOnDownload($dms_id)
+ {
+ // Load Anrechnung
+ $result = $this->ci->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
+
+ // Return null if no data found
+ if (!hasData($result))
+ {
+ return null;
+ }
+
+ $prestudent_id = $result->retval[0]->prestudent_id;
+ $lehrveranstaltung_id = $result->retval[0]->lehrveranstaltung_id;
+
+ // Get LV OrgForm
+ $this->ci->LehrveranstaltungModel->addSelect('stg.orgform_kurzbz');
+ $this->ci->LehrveranstaltungModel->addJoin('public.tbl_studiengang AS stg', 'studiengang_kz');
+ $result = $this->ci->LehrveranstaltungModel->load($lehrveranstaltung_id);
+ $orgform_kurzbz = hasData($result) ? '_'. $result->retval[0]->orgform_kurzbz : '';
+
+ // Get full name of student
+ $this->ci->load->model('crm/Prestudent_model', 'PrestudentModel');
+ $this->ci->PrestudentModel->addSelect('vorname, nachname');
+ $this->ci->PrestudentModel->addJoin('public.tbl_person', 'person_id');
+ $result = $this->ci->PrestudentModel->load($prestudent_id);
+ $fullname = hasData($result) ? $result->retval[0]->vorname. $result->retval[0]->nachname : '';
+
+ // Return filename
+ return 'Anrechnungsantrag'. $orgform_kurzbz .'_LV-'. $lehrveranstaltung_id. '_'. $fullname;
+ }
+
+ public function LVhasLector($anrechnung_id)
+ {
+ $result = $this->ci->AnrechnungModel->load($anrechnung_id);
+ if (!hasData($result))
+ {
+ showError('Anrechnung existiert nicht');
+ }
+
+ // Get lectors of lehrveranstaltung
+ $result = $this->ci->LehrveranstaltungModel->getLecturersByLv(
+ $result->retval[0]->studiensemester_kurzbz,
+ $result->retval[0]->lehrveranstaltung_id
+ );
+
+ // Continue, if LV has no lector (there is no one to ask for recommendation)
+ return hasData($result) ? true : false;
+ }
+
+ /**
+ * Get LV Leitung. If not present, get all LV lectors.
+ *
+ * @param $anrechnung_id
+ * @return array|bool
+ */
+ public function getLectors($anrechnung_id)
+ {
+ $this->ci->AnrechnungModel->addSelect('lehrveranstaltung_id, studiensemester_kurzbz');
+ $result = $this->ci->AnrechnungModel->load($anrechnung_id);
+
+ if (!hasData($result))
+ {
+ return false;
+ }
+
+ $lehrveranstaltung_id = getData($result)[0]->lehrveranstaltung_id;
+ $studiensemester_kurzbz = getData($result)[0]->studiensemester_kurzbz;
+
+ // Get lectors
+ $lector_arr = array();
+
+ $this->ci->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
+ $result = $this->ci->LehrveranstaltungModel->getLecturersByLv($studiensemester_kurzbz, $lehrveranstaltung_id);
+
+ if (!$result = getData($result))
+ {
+ return false;
+ }
+
+ // Check if lv has LV-Leitung
+ $key = array_search(true, array_column($result, 'lvleiter'));
+
+ // If lv has LV-Leitung, keep only the one
+ if ($key !== false)
+ {
+ $lector_arr[]= $result[$key];
+ }
+ // ...otherwise keep all lectors
+ else
+ {
+ $lector_arr = array_merge($lector_arr, $result);
+ }
+
+ /**
+ * NOTE: This step is only done to make the array unique by uid, vorname and nachname in the following step
+ * (e.g. if same lector is ones LV-Leitung and another time not, then array_unique would leave both.
+ * But we wish to send only one email by to that one person)
+ * **/
+ foreach ($lector_arr as $lector)
+ {
+ unset($lector->lvleiter);
+ $lector->fullname = $lector->vorname. ' '. $lector->nachname;
+ }
+
+ // Now make the lector array aka mail receivers unique
+ $lector_arr = array_unique($lector_arr, SORT_REGULAR);
+
+ return $lector_arr;
}
// Return an object with Anrechnungdata
@@ -631,12 +818,7 @@ class AnrechnungLib
$this->ci->DmsVersionModel->addSelect('name');
$result = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $anrechnung->dms_id));
- if (isError($result))
- {
- show_error(getError($result));
- }
-
- $anrechnung_data->dokumentname = $result->retval[0]->name;
+ $anrechnung_data->dokumentname = hasData($result) ? getData($result)[0]->name : '';
return $anrechnung_data;
}
diff --git a/application/libraries/AuthLDAPLib.php b/application/libraries/AuthLDAPLib.php
new file mode 100644
index 000000000..711b7f5b9
--- /dev/null
+++ b/application/libraries/AuthLDAPLib.php
@@ -0,0 +1,309 @@
+_ci =& get_instance();
+
+ // Loads the LogLib
+ $this->_ci->load->library('LogLib');
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ // Public methods
+
+ /**
+ * Checks if the given credentials are valid on one of the configured LDAP servers
+ */
+ public function checkUsernamePassword($username, $password)
+ {
+ $authenticated = false;
+
+ if (isEmptyString($username) || isEmptyString($password)) return error('Wrong username and password');
+
+ $ldapConfigArrays = $this->_loadConfig(); // NOTE: always the last to be called!
+
+ // For each configured LDAP server
+ foreach ($ldapConfigArrays as $ldapConfigs)
+ {
+ // Check if the LDAP server is up and running
+ if (!$this->_servicePing($ldapConfigs))
+ {
+ // If not available log debug and skip to the next configured server
+ $this->_ci->loglib->logError('This LDAP server is not available: '.$ldapConfigs[self::SERVER]);
+ continue;
+ }
+
+ // Connection without username and passoword _or_ with the configured username and password
+ $noCredentialsConnectResult = $this->_connect($ldapConfigs);
+ if (isError($noCredentialsConnectResult)) // If an error occurred
+ {
+ // If the error is due to invalid credentials or
+ // the LDAP server does not support anonymous authentication
+ if (getCode($noCredentialsConnectResult) == AUTH_INVALID_CREDENTIALS)
+ {
+ $this->_ci->loglib->logDebug(getError($noCredentialsConnectResult).' on server '.$ldapConfigs[self::SERVER]);
+ }
+ else // otherwise if it was due to a fatal error
+ {
+ $this->_ci->loglib->logError(getError($noCredentialsConnectResult).' on server '.$ldapConfigs[self::SERVER]);
+ }
+
+ continue; // anyway skip to the next configured server
+ }
+
+ // If it is a success
+ $noCredentialsConnection = getData($noCredentialsConnectResult);
+
+ // Check if the user exists on this LDAP server
+ $userDNResult = $this->_getUserDN(
+ $noCredentialsConnection,
+ $ldapConfigs[self::BASEDN],
+ $ldapConfigs[self::USF],
+ $username
+ );
+ // If an error occurred or the user was not found or many users were found
+ if (isError($userDNResult))
+ {
+ // Log debug and skip to the next configured server
+ // If the error is due to invalid credentials or
+ // the LDAP server does not support anonymous authentication
+ if (getCode($userDNResult) == self::LDAP_NO_USER_DN)
+ {
+ $this->_ci->loglib->logDebug(getError($userDNResult).' on server '.$ldapConfigs[self::SERVER]);
+ }
+ elseif (getCode($userDNResult) == self::LDAP_TOO_MANY_USER_DN)
+ {
+ $this->_ci->loglib->logDebug(getError($userDNResult).' on server '.$ldapConfigs[self::SERVER]);
+ }
+ else // otherwise if it was due to a fatal error
+ {
+ $this->_ci->loglib->logError(getError($userDNResult).' on server '.$ldapConfigs[self::SERVER]);
+ }
+
+ $this->_close($noCredentialsConnection); // Close the current LDAP connection
+ continue; // anyway skip to the next configured server
+ }
+
+ $this->_close($noCredentialsConnection); // Close the current LDAP connection
+
+ // Connect to LDAP with the userDN and password
+ $credentialsConnectResult = $this->_connect($ldapConfigs, getData($userDNResult), $password);
+ if (isError($credentialsConnectResult)) // If an error occurred
+ {
+ // Log debug and skip to the next configured server
+ $this->_ci->loglib->logError(getError($credentialsConnectResult).' on server '.$ldapConfigs[self::SERVER]);
+ continue;
+ }
+ else // otherwise the user is authenticated
+ {
+ $this->_close(getData($credentialsConnectResult));
+ $authenticated = true;
+ break;
+ }
+ }
+
+ return $authenticated;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ // Private methods
+
+ /**
+ * Loads the LDAP configuration file and returns the LDAP configuration array
+ */
+ private function _loadConfig()
+ {
+ // Tries to require the LDAP configuration file...
+ // ...first in the ENVIRONMENT subdirectory...
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php'))
+ {
+ require_once(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php');
+ }
+ else // ...then in the default config directory
+ {
+ require_once(APPPATH.'config/'.self::LDAP_CONF_FILE.'.php');
+ }
+
+ return $ldap[$ldap_active_group];
+ }
+
+ /**
+ * Establish a connection to LDAP with the given LDAP configuration array and eventually with
+ * with a given username and password
+ */
+ private function _connect($ldapConfigs, $username = null, $password = null)
+ {
+ // Checks if the LDAP configuraion is empty
+ if (isEmptyArray($ldapConfigs)) return error('Wrong parameters given');
+
+ // LDAP connection
+ $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]);
+ if ($ldapConnection) // if success
+ {
+ // Sets the LDAP protocol version
+ if (!@ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, self::LDAP_PROTOCOL_VERSION))
+ {
+ return error('Was not possible to set the protocol version using LDAP sever '.$ldapConfigs[self::SERVER]);
+ }
+
+ // Enable/disable the LDAP referrals
+ if (!@ldap_set_option($ldapConnection, LDAP_OPT_REFERRALS, self::LDAP_REFERRALS))
+ {
+ return error('Was not possible to enable referrals using LDAP sever '.$ldapConfigs[self::SERVER]);
+ }
+
+ // Starts TLS if required
+ if ($ldapConfigs[self::STARTTLS] === true && !@ldap_start_tls($ldapConnection))
+ {
+ return error('Was not possible to enable TLS using LDAP sever '.$ldapConfigs[self::SERVER]);
+ }
+
+ // If username or password are not provided...
+ if (isEmptyString($username) || isEmptyString($password))
+ {
+ // ...use those provided by the configuration
+ $username = $ldapConfigs[self::USERNAME];
+ $password = $ldapConfigs[self::PASSWORD];
+ }
+
+ // Binds to LDAP directory
+ if (!@ldap_bind($ldapConnection, $username, $password))
+ {
+ // Wrong username and/or password
+ if (ldap_errno($ldapConnection) == self::LDAP_INVALID_CREDENTIALS)
+ {
+ return error('Invalid credentials', AUTH_INVALID_CREDENTIALS);
+ }
+ else // Error
+ {
+ return error('Was not possible to bind to the LDAP sever '.$ldapConfigs[self::SERVER]);
+ }
+ }
+
+ return success($ldapConnection); // connected!!!
+ }
+ else // Connection error
+ {
+ return error('An error occurred while connecting to the LDAP server '.$ldapConfigs[self::SERVER]);
+ }
+ }
+
+ /**
+ * Check if the network service is up and running
+ */
+ private function _servicePing($ldapConfigs)
+ {
+ // Set the default timeout
+ $timeout = self::LDAP_DEFAULT_TIMEOUT;
+
+ // If a timeout was configured for this server then use it
+ if (isset($ldapConfigs[self::TIMEOUT])) $timeout = $ldapConfigs[self::TIMEOUT];
+
+ // The LDAP server name or URL
+ $host = $ldapConfigs[self::SERVER];
+
+ // If it is a URL
+ if (strpos($ldapConfigs[self::SERVER], 'ldap://') !== false
+ || strpos($ldapConfigs[self::SERVER], 'ldaps://') !== false)
+ {
+ // Get the host from the URL
+ $host = parse_url($ldapConfigs[self::SERVER], PHP_URL_HOST);
+ }
+
+ // Check if the given host answers on the given port using the given timeout
+ if ($op = @fsockopen($host, $ldapConfigs[self::PORT], $errno, $errstr, $timeout))
+ {
+ // If it works then close the socket connection
+ fclose($op);
+ return true;
+ }
+
+ return false; // otherwise this server is not up or LDAP service is not running on the given port
+ }
+
+ /**
+ * Close the current connection to LDAP if present
+ */
+ private function _close($connection)
+ {
+ @ldap_unbind($connection);
+ }
+
+ /**
+ * Get the user DN from LDAP using the given username
+ */
+ private function _getUserDN($connection, $baseDN, $usf, $username)
+ {
+ $userDN = error('AuthLDAPLib->_getUserDN() failed');
+
+ // Tries to search for a user DN using the given username
+ $searchResultIdentifier = @ldap_search(
+ $connection,
+ $baseDN,
+ $usf.'='.$username
+ );
+ if (!$searchResultIdentifier) // Error
+ {
+ $userDN = error(ldap_error($connection));
+ }
+
+ // Counts the number of found entries
+ $countEntries = @ldap_count_entries($connection, $searchResultIdentifier);
+ if ($countEntries === false) // Error
+ {
+ $userDN = error(ldap_error($connection));
+ }
+ elseif ($countEntries == 0)
+ {
+ $userDN = error('No user DN were found with username: '.$username, self::LDAP_NO_USER_DN);
+ }
+ elseif ($countEntries > 1)
+ {
+ $userDN = error('Too many users DN were found with username: '.$username, self::LDAP_TOO_MANY_USER_DN);
+ }
+ else // One entry was found
+ {
+ $entries = @ldap_get_entries($connection, $searchResultIdentifier);
+ if (!$entries) // Error
+ {
+ $userDN = error(ldap_error($connection));
+ }
+ else
+ {
+ $userDN = success($entries[0][self::DN]);
+ }
+ }
+
+ return $userDN;
+ }
+}
+
diff --git a/application/libraries/AuthLib.php b/application/libraries/AuthLib.php
index 67a527655..ae30d41fa 100644
--- a/application/libraries/AuthLib.php
+++ b/application/libraries/AuthLib.php
@@ -385,7 +385,7 @@ class AuthLib
// Invalid credentials
// NOTE: this is a corner case because of the HTTP basic authentication
if (getCode($hta) == AUTH_NOT_AUTHENTICATED || getCode($hta) == AUTH_INVALID_CREDENTIALS
- || getCode($hta) == LDAP_NO_USER_DN || getCode($hta) == LDAP_TOO_MANY_USER_DN)
+ || getCode($hta) == AuthLDAPLib::LDAP_NO_USER_DN || getCode($hta) == AuthLDAPLib::LDAP_TOO_MANY_USER_DN)
{
$this->_showInvalidAuthentication(); // this also stop the execution
}
@@ -404,37 +404,12 @@ class AuthLib
{
$ldap = error('Not authenticated', AUTH_NOT_AUTHENTICATED); // by default is NOT authenticated
- $this->_ci->load->library('LDAPLib'); // Loads the LDAP library
+ $this->_ci->load->library('AuthLDAPLib'); // Loads the LDAP library
- $ldapConnection = $this->_ci->ldaplib->anonymousConnect(); // connect anonymously!
- if (isSuccess($ldapConnection)) // connected!!
+ // If it is possible to authenticate on LDAP with the given username and password
+ if ($this->_ci->authldaplib->checkUsernamePassword($username, $password) === true)
{
- // Get the user DN from LDAP
- $userDN = $this->_ci->ldaplib->getUserDN($username);
- if (isSuccess($userDN)) // got it!
- {
- $this->_ci->ldaplib->close(); // close the previous LDAP anonymous connection
-
- // Connects to LDAP using the last working configuration + the retrieved user DN + the provided password
- $ldapConnection = $this->_ci->ldaplib->connectUsernamePassword(getData($userDN), $password);
- if (isSuccess($ldapConnection)) // connected!
- {
- $this->_ci->ldaplib->close(); // close the previous connection
- $ldap = success('Authenticated', AUTH_SUCCESS); // authenticated!
- }
- else // blocking error
- {
- $ldap = $ldapConnection;
- }
- }
- else // blocking error
- {
- $ldap = $userDN;
- }
- }
- else // blocking error
- {
- $ldap = $ldapConnection;
+ $ldap = success('Authenticated', AUTH_SUCCESS); // authenticated!
}
return $ldap;
diff --git a/application/libraries/DmsLib.php b/application/libraries/DmsLib.php
index da0dd84b6..eae1a9ac4 100644
--- a/application/libraries/DmsLib.php
+++ b/application/libraries/DmsLib.php
@@ -2,11 +2,10 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
-class DmsLib
+class DmsLib extends FHC_Controller
{
const FILE_CONTENT_PROPERTY = 'file_content';
-
- const FILE_INPUT_NAME = 'uploadfile'; // name of the HTML input tag containing the uploaded file
+
private $UPLOAD_PATH = DMS_PATH; // temporary directory to store the upload file
/**
@@ -21,6 +20,34 @@ class DmsLib
$this->ci->load->model('content/DmsVersion_model', 'DmsVersionModel');
$this->ci->load->model('content/DmsFS_model', 'DmsFSModel');
}
+
+ /**
+ * Load a DMS Document.
+ * If no version is particularly given, the latest version is loaded.
+ *
+ * @param $dms_id
+ * @param integer $version
+ * @return array
+ */
+ public function load($dms_id, $version = null)
+ {
+ if (is_numeric($dms_id))
+ {
+ $this->ci->DmsModel->addJoin('campus.tbl_dms_version', 'dms_id');
+ $this->ci->DmsModel->addOrder('version', 'DESC');
+ $this->ci->DmsModel->addLimit(1);
+
+ if (!is_numeric($version))
+ {
+ return $this->ci->DmsModel->load($dms_id);
+ }
+ else
+ {
+ return $this->ci->DmsModel->loadWhere(array('dms_id' => $dms_id, 'version' => $version));
+ }
+ }
+ return error('The parameter DMS ID must be a number');
+ }
/**
* Read a DMS Document from the Filesystem
@@ -95,19 +122,20 @@ class DmsLib
return $result;
}
-
+
/**
* Uploads a document and saves it to DMS
* @param $dms DMS assoc array
- * @param array $allowed_types Default: all. Param example: array(jpg, pdf)
+ * @param $field_name Name of the HTML uploadfile input name attribute
+ * @param array $allowed_types Default: all. Param example: array(jpg, pdf)
* @return array
*/
- public function upload($dms, $allowed_types = array('*'))
+ public function upload($dms, $field_name, $allowed_types = array('*'))
{
// Init upload configs
$this->_loadUploadLibrary($allowed_types);
- if (!$this->ci->upload->do_upload(DmsLib::FILE_INPUT_NAME))
+ if (!$this->ci->upload->do_upload($field_name))
{
return error($this->ci->upload->display_errors());
}
@@ -132,46 +160,80 @@ class DmsLib
// return result of uploaded data
return success($upload_data); // data about the uploaded file
}
-
+
/**
- * Download a document
+ * Download a document.
+ *
* @param $dms_id
+ * @param string $filename $filename If String is given, it will be used as filename on download
+ * @param string $disposition [inline | attachment]
+ * Inline opens doc in new tab. Attachment displays download dialog box.
*/
- public function download($dms_id)
+ public function download($dms_id, $filename = null, $disposition = 'inline')
{
- if (!is_numeric($dms_id))
- {
- show_error('Wrong parameter');
- }
-
- $this->ci->DmsVersionModel->addSelect('filename');
- $result = $this->ci->DmsVersionModel->loadWhere(array('dms_id' => $dms_id));
-
+ $result = $this->getFileInfo($dms_id);
+
if (isError($result))
{
- show_error(getError($result));
+ return error(getError($result));
}
- $filename = $result->retval[0]->filename;
- $file = DMS_PATH. $filename;
-
- if (file_exists($file))
+ $fileObj = getData($result);
+
+ // Change filename, if filename is provided
+ if (is_string($filename))
{
- $finfo = new finfo(FILEINFO_MIME);
-
- header('Content-Description: File Transfer');
- header('Content-Type: '.$finfo->file($file));
- header('Expires: 0');
- header('Cache-Control: must-revalidate');
- header('Pragma: public');
- header('Content-Length: ' . filesize($file));
- readfile($file);
- exit;
+ $fileObj->name = $filename;
+ }
+
+ // Add file disposition
+ if ($disposition == 'attachment')
+ {
+ $fileObj->disposition = 'attachment';
}
else
{
- show_error('File does not exist');
+ $fileObj->disposition = 'inline';
}
+
+ // Output file
+ if(!$this->outputFile($fileObj))
+ {
+ return error('Error on file output');
+ }
+ }
+
+ /**
+ * Get file information.
+ *
+ * @param $dms_id
+ * @param integer $version
+ * @return array with File Object.
+ */
+ public function getFileInfo($dms_id, $version = null)
+ {
+ if (!is_numeric($dms_id))
+ {
+ return error('Wrong parameter');
+ }
+
+ // Load file
+ $result = $this->load($dms_id, $version);
+
+ if (isError($result))
+ {
+ return error(getError($result));
+ }
+
+ // Store file information in fileObj
+ $fileObj = new StdClass();
+ $fileObj->filename = getData($result)[0]->filename;
+ $fileObj->file = DMS_PATH. getData($result)[0]->filename;
+ $fileObj->name = DMS_PATH. getData($result)[0]->name; // original users filename
+ $fileObj->mimetype = DMS_PATH. getData($result)[0]->mimetype;
+
+ return success($fileObj);
+
}
/**
diff --git a/application/libraries/FilterWidgetLib.php b/application/libraries/FilterWidgetLib.php
index 0a4526680..cdf0cac3c 100644
--- a/application/libraries/FilterWidgetLib.php
+++ b/application/libraries/FilterWidgetLib.php
@@ -266,6 +266,7 @@ class FilterWidgetLib
$whereParameters = array(
'app' => $app,
'dataset_name' => $datasetName,
+ 'person_id' => null,
'default_filter' => true
);
@@ -738,8 +739,10 @@ class FilterWidgetLib
$this->_ci->load->model('system/Filters_model', 'FiltersModel');
// Loads all the filters related to this page (same dataset_name and same app name)
- $filters = $this->_ci->FiltersModel->getFiltersByAppDatasetName(
- $session[self::APP], $session[self::DATASET_NAME]
+ $filters = $this->_ci->FiltersModel->getFiltersByAppDatasetNamePersonId(
+ $session[self::APP],
+ $session[self::DATASET_NAME],
+ getAuthPersonId()
);
// If filters were loaded
@@ -813,9 +816,6 @@ class FilterWidgetLib
}
}
- //------------------------------------------------------------------------------------------------------------------
- // Private methods
-
/**
* Return an unique string that identify this filter widget
* NOTE: The default value is the URI where the FilterWidget is called
@@ -857,6 +857,9 @@ class FilterWidgetLib
$this->_filterUniqueId = $filterUniqueId;
}
+ //------------------------------------------------------------------------------------------------------------------
+ // Private methods
+
/**
* Generates a condition for a SQL where clause using the given applied filter definition.
* By default an empty string is returned.
@@ -972,3 +975,4 @@ class FilterWidgetLib
return $pos;
}
}
+
diff --git a/application/libraries/JobsQueueLib.php b/application/libraries/JobsQueueLib.php
index a65bb0d29..d264f7119 100644
--- a/application/libraries/JobsQueueLib.php
+++ b/application/libraries/JobsQueueLib.php
@@ -58,13 +58,16 @@ class JobsQueueLib
/**
* To get the oldest added jobs using the given job type
+ * It is eventually specify the maximum amount of jobs to be retrieved
*/
- public function getOldestJob($type)
+ public function getOldestJobs($type, $maxAmount = null)
{
$this->_ci->JobsQueueModel->resetQuery();
$this->_ci->JobsQueueModel->addOrder('creationtime', 'ASC');
- $this->_ci->JobsQueueModel->addLimit('1');
+
+ // If the maximum amount of jobs to retrieve have been specified
+ if (is_numeric($maxAmount)) $this->_ci->JobsQueueModel->addLimit($maxAmount);
return $this->_ci->JobsQueueModel->loadWhere(array('status' => self::STATUS_NEW, 'type' => $type));
}
@@ -221,6 +224,23 @@ class JobsQueueLib
return success($results); // otherwise return results in a success object
}
+ //------------------------------------------------------------------------------------------------------------------
+ // Public static methods
+
+ /**
+ * Utility method to generate a job with the given parameters and return it inside an array
+ * ready to be used by addNewJobsToQueue and updateJobsQueue
+ */
+ public static function generateJobs($status, $input)
+ {
+ $job = new stdClass();
+
+ $job->{self::PROPERTY_STATUS} = $status;
+ $job->{self::PROPERTY_INPUT} = $input;
+
+ return array($job);
+ }
+
//------------------------------------------------------------------------------------------------------------------
// Private methods
diff --git a/application/libraries/LDAPLib.php b/application/libraries/LDAPLib.php
deleted file mode 100644
index 195dddc88..000000000
--- a/application/libraries/LDAPLib.php
+++ /dev/null
@@ -1,228 +0,0 @@
-_connection = null;
- $this->_workingConfigArray = null;
- $this->_ldapConfigArray = null;
-
- $this->_loadConfig(); // NOTE: always the last to be called!
- }
-
- //------------------------------------------------------------------------------------------------------------------
- // Public methods
-
- /**
- * Tries to connect to LDAP using configurations in property _ldapConfigArray
- * The first that works is used and stored in property _workingConfigArray
- * The LDAP connection link is stored in _connection
- */
- public function anonymousConnect()
- {
- $connect = error('Did not found a working LDAP configuration');
-
- // Loops through LDAP configurations
- foreach ($this->_ldapConfigArray as $ldapConfigs)
- {
- // Tries to establish a connection
- $connect = $this->_connect($ldapConfigs);
- if (isSuccess($connect))
- {
- break; // found a working LDAP configuration and successfully connected!
- }
- else
- {
- $this->close(); // close the eventually established connection
- }
- }
-
- return $connect;
- }
-
- /**
- * Tries to connect using the given username and password and the last working configuration with anonymous connection
- */
- public function connectUsernamePassword($username, $password)
- {
- if (isEmptyString($username) || isEmptyString($password)) return error('Wrong username and password');
-
- return $this->_connect($this->_workingConfigArray, $username, $password);
- }
-
- /**
- * Close the current connection to LDAP if present
- */
- public function close()
- {
- if ($this->_connection != null) @ldap_unbind($this->_connection);
- }
-
- /**
- * Get the user DN from LDAP using the given username
- */
- public function getUserDN($username)
- {
- $userDN = error('No user DN were found', LDAP_NO_USER_DN);
-
- // Tries to search for a user DN using the given username
- $searchResultIdentifier = @ldap_search(
- $this->_connection,
- $this->_workingConfigArray[self::BASEDN],
- $this->_workingConfigArray[self::USF].'='.$username
- );
- if (!$searchResultIdentifier) // Error
- {
- $userDN = error(ldap_error($this->_connection));
- }
-
- // Counts the number of found entries
- $countEntries = @ldap_count_entries($this->_connection, $searchResultIdentifier);
- if ($countEntries === false) // Error
- {
- $userDN = error(ldap_error($this->_connection));
- }
- elseif ($countEntries == 0)
- {
- $userDN = error('No user DN were found', LDAP_NO_USER_DN);
- }
- elseif ($countEntries > 1)
- {
- $userDN = error('Too many users DN were found', LDAP_TOO_MANY_USER_DN);
- }
- else // One entry was found
- {
- $entries = @ldap_get_entries($this->_connection, $searchResultIdentifier);
- if (!$entries) // Error
- {
- $userDN = error(ldap_error($this->_connection));
- }
- else
- {
- $userDN = success($entries[0][self::DN]);
- }
- }
-
- return $userDN;
- }
-
- //------------------------------------------------------------------------------------------------------------------
- // Private methods
-
- /**
- * Loads the LDAP configuration file and store the LDAP configuration array into _ldapConfigArray property
- */
- private function _loadConfig()
- {
- // Tries to require the LDAP configuration file...
- // ...first in the ENVIRONMENT subdirectory...
- if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php'))
- {
- require_once(APPPATH.'config/'.ENVIRONMENT.'/'.self::LDAP_CONF_FILE.'.php');
- }
- else // ...then in the default config directory
- {
- require_once(APPPATH.'config/'.self::LDAP_CONF_FILE.'.php');
- }
-
- $this->_ldapConfigArray = $ldap[$ldap_active_group]; // store the active LDAP configuration array
- }
-
- /**
- * Establish a connection to LDAP with the given LDAP configuration array and eventually with
- * with a given username and password
- */
- private function _connect($ldapConfigs, $username = null, $password = null)
- {
- // Checks if the LDAP configuraion is empty
- if (isEmptyArray($ldapConfigs))
- {
- return error('Wrong parameters given');
- }
-
- // LDAP connection
- $ldapConnection = @ldap_connect($ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]);
- if ($ldapConnection) // if success
- {
- // Sets the LDAP protocol version
- if (!@ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, self::LDAP_PROTOCOL_VERSION))
- {
- return error(ldap_error($ldapConnection));
- }
-
- // Enable/disable the LDAP referrals
- if (!@ldap_set_option($ldapConnection, LDAP_OPT_REFERRALS, self::LDAP_REFERRALS))
- {
- return error(ldap_error($ldapConnection));
- }
-
- // Starts TLS if required
- if ($ldapConfigs[self::STARTTLS] === true)
- {
- if (!@ldap_start_tls($ldapConnection))
- {
- return error(ldap_error($ldapConnection));
- }
- }
-
- // If username and password are not provided...
- if ($username == null || $password == null)
- {
- // ...uses those provided by the configuration
- $username = $ldapConfigs[self::USERNAME];
- $password = $ldapConfigs[self::PASSWORD];
- }
-
- // Binds to LDAP directory
- if (!@ldap_bind($ldapConnection, $username, $password))
- {
- // Wrong username and/or password
- if (ldap_errno($ldapConnection) == self::LDAP_INVALID_CREDENTIALS)
- {
- return error('Invalid credentials', AUTH_INVALID_CREDENTIALS);
- }
- else // Error
- {
- return error(ldap_error($ldapConnection));
- }
- }
-
- $this->_connection = $ldapConnection; // save the connection into _connection property
- $this->_workingConfigArray = $ldapConfigs; // save the working LDAP configuration into _workingConfigArray property
-
- return success('Connected'); // connected!!!
- }
- else // Connection error
- {
- return error(
- 'An error occurred while connecting to the LDAP server: '.$ldapConfigs[self::SERVER].':'.$ldapConfigs[self::PORT]
- );
- }
- }
-}
diff --git a/application/libraries/VariableLib.php b/application/libraries/VariableLib.php
index 2f038531b..a503eb999 100644
--- a/application/libraries/VariableLib.php
+++ b/application/libraries/VariableLib.php
@@ -100,6 +100,18 @@ class VariableLib
return $result;
}
+ public function changeStudengangsTypVar($uid, $name, $change)
+ {
+ $result = error('error when setting variable!');
+
+ if (isEmptyString($uid) || isEmptyString($name) || isEmptyString($change))
+ return $result;
+
+ $result = $this->_ci->VariableModel->setVariable($uid, $name, $change);
+ $this->_setVariable($uid, $name);
+ return $result;
+ }
+
/**
* "Refreshes" variable value with given name by retrieving current value from db and saving it.
* @param $uid
diff --git a/application/models/codex/Bisioaufenthaltfoerderung_model.php b/application/models/codex/Bisioaufenthaltfoerderung_model.php
new file mode 100644
index 000000000..7a817d67c
--- /dev/null
+++ b/application/models/codex/Bisioaufenthaltfoerderung_model.php
@@ -0,0 +1,15 @@
+dbTable = 'bis.tbl_bisio_aufenthaltfoerderung';
+ $this->pk = array('bisio_id', 'aufenthaltfoerderung_code');
+ $this->hasSequence = false;
+ }
+}
diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php
index 52ba4d9f3..2553fd5fa 100644
--- a/application/models/crm/Prestudent_model.php
+++ b/application/models/crm/Prestudent_model.php
@@ -581,6 +581,35 @@ class Prestudent_model extends DB_Model
return $this->execQuery($query, array($person_id));
}
+
+ /**
+ * Get latest ZGV Bezeichnung of Prestudent.
+ *
+ * @param $prestudent_id
+ */
+ public function getLatestZGVBezeichnung($prestudent_id)
+ {
+ if (!is_numeric($prestudent_id))
+ {
+ show_error('Prestudent_id is not numeric.');
+ }
+
+ $language_index = getUserLanguage() == 'German' ? 0 : 1;
+
+ $this->addSelect('
+ COALESCE(
+ array_to_json(zgvmaster.bezeichnung::varchar[])->>' . $language_index . ',
+ array_to_json(zgv.bezeichnung::varchar[])->>' . $language_index . '
+ ) AS bezeichnung'
+ );
+
+ $this->addJoin('bis.tbl_zgv zgv', 'zgv_code', 'LEFT');
+ $this->addJoin('bis.tbl_zgvmaster zgvmaster', 'zgvmas_code', 'LEFT');
+
+ return $this->loadWhere(array(
+ 'prestudent_id' => $prestudent_id
+ ));
+ }
public function getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester)
{
diff --git a/application/models/crm/Statusgrund_model.php b/application/models/crm/Statusgrund_model.php
index 7ab17a45b..d488e12d1 100644
--- a/application/models/crm/Statusgrund_model.php
+++ b/application/models/crm/Statusgrund_model.php
@@ -12,7 +12,7 @@ class Statusgrund_model extends DB_Model
$this->pk = "statusgrund_id";
}
- public function getStatus($status_kurzbz = null, $aktiv = null)
+ public function getStatus($status_kurzbz = null, $aktiv = null, $statusgrund_kurzbz = null)
{
$this->addOrder('bezeichnung_mehrsprachig');
$where = array();
@@ -20,6 +20,8 @@ class Statusgrund_model extends DB_Model
$where['status_kurzbz'] = $status_kurzbz;
if (!is_null($aktiv))
$where['aktiv'] = $aktiv;
+ if (!is_null($statusgrund_kurzbz))
+ $where['statusgrund_kurzbz'] = $statusgrund_kurzbz;
$status = $this->loadWhere($where);
diff --git a/application/models/crm/ZGVPruefungStatus_model.php b/application/models/crm/ZGVPruefungStatus_model.php
new file mode 100644
index 000000000..5c51e45d8
--- /dev/null
+++ b/application/models/crm/ZGVPruefungStatus_model.php
@@ -0,0 +1,50 @@
+dbTable = 'public.tbl_zgvpruefungstatus_status';
+ $this->pk = 'zgv_pruefung_status_id';
+ $this->hasSequence = true;
+ }
+
+ public function getZgvStatus($zgvpruefung_id)
+ {
+ $this->addOrder('datum', 'DESC');
+ $this->addLimit(1);
+
+ return $this->loadWhere(array('zgvpruefung_id' => $zgvpruefung_id));
+ }
+
+ public function getZgvStatusByPrestudent($prestudent_id)
+ {
+ $this->addJoin('public.tbl_zgvpruefung', 'zgvpruefung_id');
+ $this->addOrder($this->dbTable . '.datum', 'DESC');
+ $this->addLimit(1);
+ return $this->loadWhere(array('prestudent_id' => $prestudent_id));
+ }
+
+ public function getOpenZgvByPerson($person_id, $status)
+ {
+ $query = 'SELECT status.zgvpruefung_id, status.datum, status.status
+ FROM public.tbl_zgvpruefungstatus_status status
+ INNER JOIN
+ (
+ SELECT zgvpruefung_id, max(datum) as MaxDate
+ FROM public.tbl_zgvpruefungstatus_status
+ GROUP BY zgvpruefung_id
+ ) sub ON status.zgvpruefung_id = sub.zgvpruefung_id AND status.datum = sub.MaxDate
+ JOIN public.tbl_zgvpruefung ON status.zgvpruefung_id = public.tbl_zgvpruefung.zgvpruefung_id
+ JOIN public.tbl_prestudent USING (prestudent_id)
+ WHERE person_id = ?
+ AND status.status IN ?';
+
+ return $this->execQuery($query, array($person_id, $status));
+ }
+}
\ No newline at end of file
diff --git a/application/models/crm/ZGVPruefung_model.php b/application/models/crm/ZGVPruefung_model.php
new file mode 100644
index 000000000..f8fd0a9ad
--- /dev/null
+++ b/application/models/crm/ZGVPruefung_model.php
@@ -0,0 +1,17 @@
+dbTable = 'public.tbl_zgvpruefung';
+ $this->pk = 'zgvpruefung_id';
+ $this->hasSequence = true;
+ }
+
+}
\ No newline at end of file
diff --git a/application/models/education/Anrechnung_model.php b/application/models/education/Anrechnung_model.php
index b4c7de835..ebecf4118 100644
--- a/application/models/education/Anrechnung_model.php
+++ b/application/models/education/Anrechnung_model.php
@@ -1,7 +1,11 @@
pk = 'anrechnung_id';
}
+ /**
+ * Creates new Anrechnungsantrag.
+ * Saves new Anrechnung and sets Anrechnungstatus for the new Anrechnung.
+ *
+ * @param $prestudent_id
+ * @param $studiensemester_kurzbz
+ * @param $lehrveranstaltung_id
+ * @param $begruendung_id
+ * @param $dms_id DMS ID of uploaded Nachweisdokument
+ * @param null $anmerkung_student = Herkunft der Kenntnisse
+ * @return array
+ */
+ public function createAnrechnungsantrag(
+ $prestudent_id, $studiensemester_kurzbz, $lehrveranstaltung_id,
+ $begruendung_id, $dms_id, $anmerkung_student = null
+ )
+ {
+ // Start DB transaction
+ $this->db->trans_start(false);
+
+ // Save Anrechnung
+ $result = $this->AnrechnungModel->insert(array(
+ 'prestudent_id' => $prestudent_id,
+ 'lehrveranstaltung_id' => $lehrveranstaltung_id,
+ 'begruendung_id' => $begruendung_id,
+ 'dms_id' => $dms_id,
+ 'studiensemester_kurzbz' => $studiensemester_kurzbz,
+ 'anmerkung_student' => $anmerkung_student,
+ 'insertvon' => $this->_uid
+ ));
+
+ // Store just inserted Anrechnung ID
+ $lastInsert_anrechnung_id = $result->retval;
+
+ // Save Anrechnungstatus
+ $this->AnrechnungModel->saveAnrechnungstatus($lastInsert_anrechnung_id, self::ANRECHNUNGSTATUS_PROGRESSED_BY_STGL);
+
+ // Transaction complete
+ $this->db->trans_complete();
+
+ if ($this->db->trans_status() === false)
+ {
+ $this->db->trans_rollback();
+ return error('Failed inserting Anrechnung', EXIT_ERROR);
+ }
+
+ return success($lastInsert_anrechnung_id);
+ }
+
/**
* Save Anrechnungstatus.
* @param $anrechnung_id
@@ -83,4 +136,68 @@ class Anrechnung_model extends DB_Model
return $this->execQuery($qry, array($anrechnung_id));
}
+
+ /**
+ * Delete Anrechnungstatus.
+ *
+ * @param $anrechnungstatus_id
+ */
+ public function deleteAnrechnungstatus($anrechnungstatus_id){
+
+ $qry = '
+ DELETE FROM lehre.tbl_anrechnung_anrechnungstatus
+ WHERE anrechnungstatus_id = ?
+ ';
+
+ return $this->execQuery($qry, array($anrechnungstatus_id));
+ }
+
+ /**
+ * Delete last status approved / rejected.
+ * If last status is 'approved', Genehmigung is resetted.
+ *
+ * @param $anrechnung_id
+ * @return array
+ */
+ public function withdrawApprovement($anrechnung_id)
+ {
+ // Get last Anrechnungstatus
+ if (!$result = getData($this->AnrechnungModel->getLastAnrechnungstatus($anrechnung_id))[0])
+ {
+ return error('Failed loading Anrechnung');
+ }
+
+ $last_status = $result->status_kurzbz;
+ $anrechnungstatus_id = $result->anrechnungstatus_id;
+
+ // Exit, if last status is not approved / rejected
+ if ($last_status != self::ANRECHNUNGSTATUS_APPROVED && $last_status != self::ANRECHNUNGSTATUS_REJECTED)
+ {
+ return error('Nothing to withdraw. Application is still in progress');
+ }
+
+ // Start DB transaction
+ $this->db->trans_start(false);
+
+ // If Anrechnung was approved
+ if ($last_status == self::ANRECHNUNGSTATUS_APPROVED)
+ {
+ // Reset Genehmigung
+ $this->AnrechnungModel->update($anrechnung_id, array('genehmigt_von' => NULL));
+ }
+
+ // Delete last status approved / rejected
+ $this->AnrechnungModel->deleteAnrechnungstatus($anrechnungstatus_id);
+
+ // Transaction complete
+ $this->db->trans_complete();
+
+ if ($this->db->trans_status() === false)
+ {
+ $this->db->trans_rollback();
+ return error('Failed withdrawing Genehmigung', EXIT_ERROR);
+ }
+ return success();
+
+ }
}
diff --git a/application/models/education/Anrechnungbegruendung_model.php b/application/models/education/Anrechnungbegruendung_model.php
new file mode 100644
index 000000000..81f1ef614
--- /dev/null
+++ b/application/models/education/Anrechnungbegruendung_model.php
@@ -0,0 +1,15 @@
+dbTable = 'lehre.tbl_anrechnung_begruendung';
+ $this->pk = 'begruendung_id';
+ }
+}
diff --git a/application/models/organisation/Geschaeftsjahr_model.php b/application/models/organisation/Geschaeftsjahr_model.php
index 9c856f40e..4f0d03b73 100644
--- a/application/models/organisation/Geschaeftsjahr_model.php
+++ b/application/models/organisation/Geschaeftsjahr_model.php
@@ -20,8 +20,8 @@ class Geschaeftsjahr_model extends DB_Model
{
$query = 'SELECT *
FROM public.tbl_geschaeftsjahr
- WHERE start <= now()
- AND ende >= now()
+ WHERE start <= CURRENT_DATE
+ AND ende >= CURRENT_DATE
ORDER BY start DESC
LIMIT 1';
diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php
index 41bdabd11..6358ca81e 100644
--- a/application/models/organisation/Studiengang_model.php
+++ b/application/models/organisation/Studiengang_model.php
@@ -475,7 +475,7 @@ class Studiengang_model extends DB_Model
funktion_kurzbz = \'Leitung\'
AND ( datum_von <= NOW() OR datum_von IS NULL )
AND ( datum_bis >= NOW() OR datum_bis IS NULL )
- AND studiengang_kz = ' . $this->db->escape($studiengang_kz, FHC_INTEGER)
+ AND studiengang_kz = ' . $this->db->escape($studiengang_kz)
;
}
diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php
index 2e09875d8..fd08cc384 100644
--- a/application/models/person/Notiz_model.php
+++ b/application/models/person/Notiz_model.php
@@ -154,9 +154,11 @@ class Notiz_model extends DB_Model
{
// Join with the table public.tbl_notizzuordnung using notiz_id
$this->addJoin('public.tbl_notizzuordnung', 'notiz_id');
- $this->addOrder('insertamum', 'DESC');
+ $this->addJoin('public.tbl_prestudent', 'prestudent_id', 'LEFT');
+ $this->addJoin('public.tbl_studiengang', 'studiengang_kz', 'LEFT');
+ $this->addOrder('public.tbl_notiz.insertamum', 'DESC');
- return $this->loadWhere(array('person_id' => $person_id, 'titel LIKE' => $titel));
+ return $this->loadWhere(array('public.tbl_notizzuordnung.person_id' => $person_id, 'titel LIKE' => $titel));
}
/**
diff --git a/application/models/system/Filters_model.php b/application/models/system/Filters_model.php
index 20394b36d..581be65e1 100644
--- a/application/models/system/Filters_model.php
+++ b/application/models/system/Filters_model.php
@@ -57,19 +57,34 @@ class Filters_model extends DB_Model
/**
* Loads all filters by their app and dataset_name
*/
- public function getFiltersByAppDatasetName($app, $dataset_name)
+ public function getFiltersByAppDatasetNamePersonId($app, $dataset_name, $person_id)
{
- $this->resetQuery(); // reset any previous built query
+ $query = '
+ (
+ -- Global filters
+ SELECT gs.filter_id,
+ gs.person_id,
+ gs.description
+ FROM system.tbl_filters gs
+ WHERE gs.app = ?
+ AND gs.dataset_name = ?
+ AND gs.person_id IS NULL
+ ORDER BY gs.person_id DESC, gs.sort ASC
+ )
+ UNION ALL
+ (
+ -- Personal filters
+ SELECT ps.filter_id,
+ ps.person_id,
+ ps.description
+ FROM system.tbl_filters ps
+ WHERE ps.app = ?
+ AND ps.dataset_name = ?
+ AND ps.person_id = ?
+ ORDER BY ps.person_id DESC, ps.sort ASC
+ )';
- $this->addSelect('filter_id, person_id, description');
- $this->addOrder('person_id', 'DESC'); // sort descending on column person_id
- $this->addOrder('sort', 'ASC'); // sort on column sort
-
- $filterParametersArray = array(
- 'app' => $app,
- 'dataset_name' => $dataset_name
- );
-
- return $this->loadWhere($filterParametersArray);
+ return $this->execQuery($query, array($app, $dataset_name, $app, $dataset_name, $person_id));
}
}
+
diff --git a/application/models/system/Variablenname_model.php b/application/models/system/Variablenname_model.php
index 7b2a2cf88..869a03275 100644
--- a/application/models/system/Variablenname_model.php
+++ b/application/models/system/Variablenname_model.php
@@ -11,7 +11,8 @@ class Variablenname_model extends DB_Model
ORDER BY studienjahr_kurzbz, start
) sem
WHERE start > now()
- LIMIT 1;'
+ LIMIT 1;',
+ 'infocenter_studiensgangtyp' => 'SELECT infocenter_studiensgangtyp FROM public.tbl_variablenname LIMIT 1'
);
/**
diff --git a/application/views/crm/statusGrundList.php b/application/views/crm/statusGrundList.php
index e128856d3..ab8f096bb 100644
--- a/application/views/crm/statusGrundList.php
+++ b/application/views/crm/statusGrundList.php
@@ -15,6 +15,7 @@
Aktiv |
Bezeichnung mehrsprachig |
Beschreibung |
+ Statusgrund |
|
@@ -25,6 +26,7 @@
aktiv); ?> |
bezeichnung_mehrsprachig); ?> |
beschreibung); ?> |
+ statusgrund_kurzbz); ?> |
Edit |
@@ -33,4 +35,4 @@
-