diff --git a/application/config/infocenter.php b/application/config/infocenter.php
index 555c30996..15889ef78 100644
--- a/application/config/infocenter.php
+++ b/application/config/infocenter.php
@@ -3,3 +3,4 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
$config['infocenter_studiengang_kz'] = '10021, 10027, 10002';
+$config['infocenter_qualifikationskurs_kz'] = '10002';
diff --git a/application/controllers/api/frontend/v1/CisMenu.php b/application/controllers/api/frontend/v1/CisMenu.php
index 5324f348b..debab48a4 100644
--- a/application/controllers/api/frontend/v1/CisMenu.php
+++ b/application/controllers/api/frontend/v1/CisMenu.php
@@ -67,8 +67,11 @@ class CisMenu extends FHCAPI_Controller
private function generateUrlForMenuItem($menuItem)
{
- $menuItem->url = $this->menuItemUrlHelper($menuItem);
- unset($menuItem->content);
+ if(!isset($menuItem->url))
+ {
+ $menuItem->url = $this->menuItemUrlHelper($menuItem);
+ unset($menuItem->content);
+ }
if ($menuItem->childs && count($menuItem->childs)) {
$menuItem->childs = $this->generateUrlsForMenuItems($menuItem->childs);
diff --git a/application/controllers/api/frontend/v1/stv/LvTermine.php b/application/controllers/api/frontend/v1/stv/LvTermine.php
index b9e23e77d..0d070ffd3 100644
--- a/application/controllers/api/frontend/v1/stv/LvTermine.php
+++ b/application/controllers/api/frontend/v1/stv/LvTermine.php
@@ -370,6 +370,7 @@ class LvTermine extends FHCAPI_Controller
$result->semester = $item->semester;
$result->verband = $item->verband;
$result->gruppe = $item->gruppe;
+ $result->studiensemester_kurzbz = $item->studiensemester_kurzbz;
return $result;
},
$lehrverband_query_result));
diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php
index eaa207ff1..f10d94a8a 100644
--- a/application/controllers/system/infocenter/InfoCenter.php
+++ b/application/controllers/system/infocenter/InfoCenter.php
@@ -34,6 +34,9 @@ class InfoCenter extends Auth_Controller
const PREV_FILTER_ID = 'prev_filter_id';
const KEEP_TABLESORTER_FILTER = 'keepTsFilter';
+ const ONBOARDING_INSERTVON = 'onboarding';
+ const ONBOARDING_KENNZEICHENTYP = 'eobRegistrierungsId';
+
private $_uid; // contains the UID of the logged user
// Used to log with PersonLogLib
@@ -175,6 +178,7 @@ class InfoCenter extends Auth_Controller
$this->load->model('person/Kontakt_model', 'KontaktModel');
$this->load->model('person/Geschlecht_model', 'GeschlechtModel');
$this->load->model('person/adresse_model', 'AdresseModel');
+ $this->load->model('person/Kennzeichen_model', 'KennzeichenModel');
// Loads libraries
$this->load->library('PersonLogLib');
@@ -1452,6 +1456,100 @@ class InfoCenter extends Auth_Controller
$this->outputJsonSuccess("Done!");
}
+
+ public function getAbsageData()
+ {
+ $stg_typ = $this->getStudienArtBerechtigung(['b', 'm']);
+
+ if (!is_null($stg_typ))
+ {
+ $statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
+ $studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
+ $studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester);
+
+ $data = array (
+ 'statusgruende' => $statusgruende,
+ 'studiengaenge' => $studiengaenge->retval
+ );
+
+ $this->outputJsonSuccess($data);
+ }
+ else
+ $this->outputJsonSuccess(null);
+ }
+
+ public function getStudienArtBerechtigung($typ = null)
+ {
+ $studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
+ $stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, $typ);
+ return getData($stg_typ);
+ }
+
+ public function getStudienartData()
+ {
+ $this->outputJsonSuccess($this->getStudienArtBerechtigung(['b', 'm', 'l']));
+ }
+
+ public function saveAbsageForAll()
+ {
+ $statusgrund = $this->input->post('statusgrund');
+ $studiengang = $this->input->post('studiengang');
+ $abgeschickt = $this->input->post('abgeschickt');
+ $personen = $this->input->post('personen');
+ $studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
+
+ if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen))
+ $this->terminateWithJsonError("Bitte füllen Sie alle Felder aus");
+
+ if ($studiengang === 'all' && $abgeschickt === 'all')
+ {
+ foreach($personen as $person)
+ {
+ $prestudenten = $this->PrestudentModel->getByPersonWithoutLehrgang($person, $studienSemester);
+
+ if (!hasData($prestudenten))
+ continue;
+
+ $prestudentenData = getData($prestudenten);
+
+ foreach ($prestudentenData as $prestudent)
+ {
+ $this->saveAbsage($prestudent->prestudent_id, $statusgrund);
+ }
+ }
+ }
+ else
+ {
+ $this->load->model('organisation/Studienplan_model', 'StudienplanModel');
+
+ $this->StudienplanModel->addSelect('1');
+ $this->StudienplanModel->addJoin('lehre.tbl_studienordnung so', 'studienordnung_id');
+ $escaped = $this->StudienplanModel->db->escape(strtoupper($studiengang));
+ $this->StudienplanModel->db->where("UPPER(so.studiengangkurzbzlang || ':' || tbl_studienplan.orgform_kurzbz) = $escaped");
+ $this->StudienplanModel->addLimit(1);
+ $studiengangResult = $this->StudienplanModel->load();
+
+ if (hasData($studiengangResult))
+ {
+ foreach($personen as $person)
+ {
+ $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt, $abgeschickt === 'all');
+
+ if (!hasData($prestudent))
+ continue;
+
+ $prestudentData = getData($prestudent);
+ $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund);
+ }
+ }
+ else
+ $this->terminateWithJsonError("Falschen Studiengang übergeben!");
+
+ }
+
+ $this->outputJsonSuccess("Success");
+ }
+
// -----------------------------------------------------------------------------------------------------------------
// Private methods
@@ -1946,6 +2044,17 @@ class InfoCenter extends Auth_Controller
show_error(getError($user_person));
}
+ // add info about first electronig onboarding login
+ $this->KennzeichenModel->addSelect('insertamum');
+ $onboarding_first_login = $this->KennzeichenModel->loadWhere(
+ array('person_id' => $person_id, 'kennzeichentyp_kurzbz' => self::ONBOARDING_KENNZEICHENTYP)
+ );
+
+ if (isError($onboarding_first_login))
+ {
+ show_error(getError($onboarding_first_login));
+ }
+
$data = array (
'lockedby' => $lockedby,
'lockedbyother' => $lockedbyother,
@@ -1955,7 +2064,9 @@ class InfoCenter extends Auth_Controller
'messages' => $messages->retval,
'logs' => $logs,
'notizen' => $notizen->retval,
- 'notizenbewerbung' => $notizen_bewerbung->retval
+ 'notizenbewerbung' => $notizen_bewerbung->retval,
+ 'created_by_onboarding' => $stammdaten->retval->insertvon == self::ONBOARDING_INSERTVON,
+ 'onboarding_first_login' => hasData($onboarding_first_login) ? getData($onboarding_first_login)[0]->insertamum : null
);
return $data;
@@ -2375,97 +2486,4 @@ class InfoCenter extends Auth_Controller
$this->loglib->logError('Studiengang has no mail for sending Freigabe mail');
}
}
-
- public function getAbsageData()
- {
- $stg_typ = $this->getStudienArtBerechtigung(['b', 'm']);
-
- if (!is_null($stg_typ))
- {
- $statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
- $studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
- $studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(array_column($stg_typ, 'typ'), $studienSemester);
-
- $data = array (
- 'statusgruende' => $statusgruende,
- 'studiengaenge' => $studiengaenge->retval
- );
-
- $this->outputJsonSuccess($data);
- }
- else
- $this->outputJsonSuccess(null);
- }
-
- public function getStudienArtBerechtigung($typ = null)
- {
- $studiengang_kz_all = $this->permissionlib->getSTG_isEntitledFor('infocenter');
- $stg_typ = $this->StudiengangModel->getStudiengangTyp($studiengang_kz_all, $typ);
- return getData($stg_typ);
- }
-
- public function getStudienartData()
- {
- $this->outputJsonSuccess($this->getStudienArtBerechtigung(['b', 'm', 'l']));
- }
-
- public function saveAbsageForAll()
- {
- $statusgrund = $this->input->post('statusgrund');
- $studiengang = $this->input->post('studiengang');
- $abgeschickt = $this->input->post('abgeschickt');
- $personen = $this->input->post('personen');
- $studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
-
- if ($statusgrund === 'null' || $studiengang === 'null' || $abgeschickt === 'null' || empty($personen))
- $this->terminateWithJsonError("Bitte füllen Sie alle Felder aus");
-
- if ($studiengang === 'all' && $abgeschickt === 'all')
- {
- foreach($personen as $person)
- {
- $prestudenten = $this->PrestudentModel->getByPersonWithoutLehrgang($person, $studienSemester);
-
- if (!hasData($prestudenten))
- continue;
-
- $prestudentenData = getData($prestudenten);
-
- foreach ($prestudentenData as $prestudent)
- {
- $this->saveAbsage($prestudent->prestudent_id, $statusgrund);
- }
- }
- }
- else
- {
- $this->load->model('organisation/Studienplan_model', 'StudienplanModel');
-
- $this->StudienplanModel->addSelect('1');
- $this->StudienplanModel->addJoin('lehre.tbl_studienordnung so', 'studienordnung_id');
- $escaped = $this->StudienplanModel->db->escape(strtoupper($studiengang));
- $this->StudienplanModel->db->where("UPPER(so.studiengangkurzbzlang || ':' || tbl_studienplan.orgform_kurzbz) = $escaped");
- $this->StudienplanModel->addLimit(1);
- $studiengangResult = $this->StudienplanModel->load();
-
- if (hasData($studiengangResult))
- {
- foreach($personen as $person)
- {
- $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester, $abgeschickt, $abgeschickt === 'all');
-
- if (!hasData($prestudent))
- continue;
-
- $prestudentData = getData($prestudent);
- $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund);
- }
- }
- else
- $this->terminateWithJsonError("Falschen Studiengang übergeben!");
-
- }
-
- $this->outputJsonSuccess("Success");
- }
}
\ No newline at end of file
diff --git a/application/controllers/system/infocenter/Rueckstellung.php b/application/controllers/system/infocenter/Rueckstellung.php
index b1f2b60b7..2a122348f 100644
--- a/application/controllers/system/infocenter/Rueckstellung.php
+++ b/application/controllers/system/infocenter/Rueckstellung.php
@@ -7,6 +7,8 @@ class Rueckstellung extends Auth_Controller
private $_ci; // Code igniter instance
private $_uid;
+ const ZGV_UEBERPRUEFUNG_MAIL_VORLAGE = 'ZGVUEP';
+
public function __construct()
{
parent::__construct(
@@ -23,6 +25,7 @@ class Rueckstellung extends Auth_Controller
$this->load->model('crm/RueckstellungStatus_model', 'RueckstellungStatusModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->library('PersonLogLib');
+ $this->load->library('MessageLib');
$this->_setAuthUID(); // sets property uid
@@ -78,6 +81,8 @@ class Rueckstellung extends Auth_Controller
$this->_log($person_id, $status_kurzbz);
+ if ($status_kurzbz === 'onhold_zgv')
+ $this->sendRueckstellungMessage($person_id);
$this->outputJson($result);
}
@@ -104,6 +109,10 @@ class Rueckstellung extends Auth_Controller
if (isError($result))
$this->terminateWithJsonError(getError($result));
$this->_log($person, $status_kurzbz);
+
+ if ($status_kurzbz === 'onhold_zgv')
+ $this->sendRueckstellungMessage($person);
+
}
$this->outputJsonSuccess("Erfolgreich gespeichert!");
}
@@ -160,4 +169,26 @@ class Rueckstellung extends Auth_Controller
$this->_uid
);
}
+
+ private function sendRueckstellungMessage($person_id)
+ {
+ $person = $this->_ci->PersonModel->load($person_id);
+
+ if (hasData($person))
+ {
+ $person = getData($person)[0];
+
+ return $this->messagelib->sendMessageUserTemplate(
+ $person_id,
+ self::ZGV_UEBERPRUEFUNG_MAIL_VORLAGE,
+ array(
+ 'anrede' => $person->anrede,
+ 'nachname' => $person->nachname
+ ),
+ null,
+ getAuthPersonId(),
+ 'infocenter'
+ );
+ }
+ }
}
\ No newline at end of file
diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php
index 1dc09caaf..de3900d2b 100644
--- a/application/models/person/Notiz_model.php
+++ b/application/models/person/Notiz_model.php
@@ -98,7 +98,7 @@ class Notiz_model extends DB_Model
/**
* Add a Notiz for a given person
*/
- public function addNotizForPerson($person_id, $titel, $text, $erledigt, $verfasser_uid)
+ public function addNotizForPerson($person_id, $titel, $text, $erledigt, $verfasser_uid, $insertvon = null)
{
// Loads model Notizzuordnung_model
$this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel');
@@ -106,8 +106,15 @@ class Notiz_model extends DB_Model
// Start DB transaction
$this->db->trans_start(false);
- $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => $erledigt, 'verfasser_uid' => $verfasser_uid,
- "insertvon" => $verfasser_uid));
+ $result = $this->insert(
+ array(
+ 'titel' => $titel,
+ 'text' => $text,
+ 'erledigt' => $erledigt,
+ 'verfasser_uid' => $verfasser_uid,
+ 'insertvon' => $insertvon ?? $verfasser_uid
+ )
+ );
if (isSuccess($result))
{
diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php
index 38285b6ae..55d8f403e 100644
--- a/application/views/system/infocenter/infocenterFreigegebenData.php
+++ b/application/views/system/infocenter/infocenterFreigegebenData.php
@@ -8,6 +8,7 @@
$LOGDATA_NAME = '\'Login with code\', \'Login with user\', \'Attempt to register with existing mailadress\', \'Access code sent\', \'Personal data saved\'';
$REJECTED_STATUS = '\'Abgewiesener\'';
$ADDITIONAL_STG = $this->config->item('infocenter_studiengang_kz');
+ $QUALIFIKATIONSKURS = $this->config->item('infocenter_qualifikationskurs_kz');
$STATUS_KURZBZ = '\'Wartender\', \'Bewerber\', \'Aufgenommener\', \'Student\'';
$STUDIENSEMESTER = '\''.$this->variablelib->getVar('infocenter_studiensemester').'\'';
$ORG_NAME = '\'InfoCenter\'';
@@ -277,7 +278,26 @@ $query = '
WHERE konto.person_id = p.person_id
AND konto.studiensemester_kurzbz = '. $STUDIENSEMESTER .'
AND konto.buchungstyp_kurzbz = '. $KAUTION_DRITT_STAAT .'
- ) AS "Kaution"
+ ) AS "Kaution",
+ (
+ SELECT 1
+ FROM public.tbl_prestudentstatus pss
+ JOIN public.tbl_prestudent ps USING(prestudent_id)
+ JOIN public.tbl_studiengang sg USING(studiengang_kz)
+ JOIN lehre.tbl_studienplan sp USING(studienplan_id)
+ JOIN lehre.tbl_studienordnung so USING(studienordnung_id)
+ WHERE pss.status_kurzbz = '.$INTERESSENT_STATUS.'
+ AND pss.bewerbung_abgeschicktamum IS NOT NULL
+ AND ps.person_id = p.person_id
+ AND sg.studiengang_kz in('.$QUALIFIKATIONSKURS.')
+ AND NOT EXISTS (
+ SELECT 1
+ FROM tbl_prestudentstatus spss
+ WHERE spss.prestudent_id = ps.prestudent_id
+ AND spss.status_kurzbz = '.$REJECTED_STATUS.'
+ )
+ LIMIT 1
+ ) AS "Qualikurs"
FROM public.tbl_person p
LEFT JOIN (
SELECT tpl.person_id,
@@ -351,7 +371,8 @@ $query = '
'ZGV Nation MA',
'InfoCenter Mitarbeiter',
'Identitätsnachweis',
- ucfirst($this->p->t('infocenter', 'kaution'))
+ ucfirst($this->p->t('infocenter', 'kaution')),
+ 'Qualikurs'
),
'formatRow' => function($datasetRaw) {
@@ -480,6 +501,14 @@ $query = '
$datasetRaw->{'Kaution'} = 'Offen';
}
+ if ($datasetRaw->{'Qualikurs'} === null)
+ {
+ $datasetRaw->{'Qualikurs'} = 'Nein';
+ }
+ else
+ {
+ $datasetRaw->{'Qualikurs'} = 'Ja';
+ }
return $datasetRaw;
},
'markRow' => function($datasetRaw) {
diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php
index c632b079f..73ea300ab 100644
--- a/application/views/system/infocenter/stammdaten.php
+++ b/application/views/system/infocenter/stammdaten.php
@@ -92,6 +92,14 @@
+
+
+
+
p->t('infocenter','onboardingRegistriert') ?>
+
+
p->t('infocenter','ersterOnboardingLogin').': '.date_format(date_create($onboarding_first_login), 'd.m.Y') ?>
+
+