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/Cis/Compat.php b/application/controllers/Cis/Compat.php
new file mode 100644
index 000000000..5c99d8bfc
--- /dev/null
+++ b/application/controllers/Cis/Compat.php
@@ -0,0 +1,44 @@
+ ['basis/cis:r'],
+ 'legacy' => ['basis/cis:r'],
+
+ ]);
+ }
+
+ // -----------------------------------------------------------------------------------------------------------------
+ // Public methods
+
+
+ /**
+ * @access public
+ * @return void
+ */
+ public function ci()
+ {
+ $this->load->view('CisRouterView/CisRouterView.php',['route' => 'Compat']);
+ }
+
+ /**
+ * @access public
+ * @return void
+ */
+ public function legacy()
+ {
+ $this->load->view('CisRouterView/CisRouterView.php',['route' => 'Compat']);
+ }
+
+}
diff --git a/application/controllers/api/frontend/v1/CisMenu.php b/application/controllers/api/frontend/v1/CisMenu.php
index 163c337ae..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);
@@ -83,7 +86,7 @@ class CisMenu extends FHCAPI_Controller
return site_url("/CisVue/Cms/content/" . $menuItem->content_id);
}
- if (!$menuItem->content || !mb_strlen($menuItem->content)) {
+ if (!isset($menuItem->content) || !$menuItem->content || !mb_strlen($menuItem->content)) {
return '';
}
@@ -91,6 +94,8 @@ class CisMenu extends FHCAPI_Controller
$doc->loadXML($menuItem->content);
$urlElem = $doc->getElementsByTagName('url')->item(0);
+ $this->menuItemUrlTargetHelper($menuItem, $doc);
+
if (!$urlElem) {
return '';
}
@@ -122,5 +127,18 @@ class CisMenu extends FHCAPI_Controller
return $url;
}
+ private function menuItemUrlTargetHelper($menuItem, $xmldoc)
+ {
+ if($menuItem->template_kurzbz === 'redirect')
+ {
+ $targetElem = $xmldoc->getElementsByTagName('target')->item(0);
+ $target = ($targetElem) ? $targetElem->textContent : '';
+ if(!in_array($target, array('_self', '_top', '_blank')))
+ {
+ $target = '_self';
+ }
+ $menuItem->target = $target;
+ }
+ }
}
diff --git a/application/controllers/api/frontend/v1/Lehrveranstaltung.php b/application/controllers/api/frontend/v1/Lehrveranstaltung.php
index 66bda9ebf..78e0acce3 100644
--- a/application/controllers/api/frontend/v1/Lehrveranstaltung.php
+++ b/application/controllers/api/frontend/v1/Lehrveranstaltung.php
@@ -81,7 +81,7 @@ class Lehrveranstaltung extends FHCAPI_Controller
{
$studiengang_kz = $this->getStudiengangKz($stg_kz);
- if (is_null($studiengang_kz) || !preg_match("/^-?[1-9][0-9]*$/", (string)$studiengang_kz))
+ if (is_null($studiengang_kz) || !preg_match("/^(-?[1-9][0-9]*|0)$/", (string)$studiengang_kz))
$this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
$verband = null;
diff --git a/application/controllers/api/frontend/v1/dashboard/Widget.php b/application/controllers/api/frontend/v1/dashboard/Widget.php
index ac8c682e8..99865b6db 100644
--- a/application/controllers/api/frontend/v1/dashboard/Widget.php
+++ b/application/controllers/api/frontend/v1/dashboard/Widget.php
@@ -101,6 +101,9 @@ class Widget extends FHCAPI_Controller
$tmpsetup = json_decode($widget->setup);
$tmpsetup->file = absoluteJsImportUrl($tmpsetup->file);
$widget->setup = $tmpsetup;
+ $widget->permitted = empty($widget->berechtigung_kurzbz)
+ || $this->permissionlib->isBerechtigt($widget->berechtigung_kurzbz);
+
return $widget;
}, $widgets);
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/api/frontend/v1/stv/Projektarbeit.php b/application/controllers/api/frontend/v1/stv/Projektarbeit.php
index d26d6a10c..f8131bd3a 100644
--- a/application/controllers/api/frontend/v1/stv/Projektarbeit.php
+++ b/application/controllers/api/frontend/v1/stv/Projektarbeit.php
@@ -42,6 +42,8 @@ class Projektarbeit extends FHCAPI_Controller
$this->load->model('education/Note_model', 'NoteModel');
$this->load->model('education/Projektbetreuer_model', 'BetreuerModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
+ $this->load->model('crm/Student_model', 'StudentModel');
+ $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
// load libraries
$this->load->library('PermissionLib');
@@ -100,16 +102,16 @@ class Projektarbeit extends FHCAPI_Controller
private function fetchProjektarbeitById($projektarbeit_id) {
$this->ProjektarbeitModel->resetQuery();
$this->ProjektarbeitModel->addSelect(
- 'lehre.tbl_projektarbeit.projektarbeit_id, titel, titel_english, themenbereich, projekttyp_kurzbz, lehrveranstaltung_id, lehreinheit_id,
- firma_id, beginn, ende, gesperrtbis, note, final, freigegeben, tbl_projektarbeit.anmerkung, fa.name AS firma_name'
+ 'lehre.tbl_projektarbeit.projektarbeit_id, titel, titel_english, themenbereich, projekttyp_kurzbz, lehrveranstaltung_id, lehreinheit_id,
+ tbl_projektarbeit.studiensemester_kurzbz, firma_id, beginn, ende, gesperrtbis, note, final, freigegeben, tbl_projektarbeit.anmerkung, fa.name AS firma_name'
);
- $this->ProjektarbeitModel->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id');
$this->ProjektarbeitModel->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id');
$this->ProjektarbeitModel->addJoin('public.tbl_firma fa', 'firma_id', 'LEFT');
+
+
return $this->ProjektarbeitModel->loadWhere(
array('projektarbeit_id' => $projektarbeit_id)
);
-
}
/**
@@ -246,14 +248,38 @@ class Projektarbeit extends FHCAPI_Controller
$additional_lehrveranstaltung_id = $this->input->get('additional_lehrveranstaltung_id');
if (!isset($student_uid)) $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
- if (!isset($studiensemester_kurzbz)) $this->terminateWithError('Studiensemster missing', self::ERROR_TYPE_GENERAL);
+ if (!isset($studiensemester_kurzbz)) $this->terminateWithError('Studiensemester missing', self::ERROR_TYPE_GENERAL);
- // get Lvs
+ // get prestudent_id from student model
+ $studentRes = $this->StudentModel->load(['student_uid' => $student_uid]);
+ if(hasData($studentRes)) {
+ $student = getData($studentRes);
+ } else {
+ $this->terminateWithError($studentRes, self::ERROR_TYPE_GENERAL);
+ }
+
+ // to get prestudent_status history
+ $historyRes = $this->PrestudentstatusModel->getHistoryPrestudent($student[0]->prestudent_id);
+ if(hasData($historyRes)) {
+ $history = getData($historyRes);
+ } else {
+ $this->terminateWithError($historyRes, self::ERROR_TYPE_GENERAL);
+ }
+
+ // query for every lva of a studiengang that has projektarbeit flag true
$lvsResult = $this->LehrveranstaltungModel->getLvsForProjektarbeit($student_uid, $studiengang_kz, $additional_lehrveranstaltung_id);
-
if (isError($lvsResult)) return $this->terminateWithError($lvsResult, self::ERROR_TYPE_GENERAL);
-
$lvs = hasData($lvsResult) ? getData($lvsResult) : [];
+
+ $lvsIDs = array_column($lvs, 'lehrveranstaltung_id');
+
+ // get current studienplan_id from status history to find out which lva options are actually assigned to the students studienplan
+ // important so the projektarbeit has the correct lva assigned to be able to find and print the thesis title on the degree documents!
+ $currentStatus = $history[0];
+ $lvByStudienPlanRes = $this->LehrveranstaltungModel->getLvsByStudienplanByLvaIDs($currentStatus->studienplan_id, $lvsIDs);
+ if(hasData($lvByStudienPlanRes)) {
+ $lvs = getData($lvByStudienPlanRes);
+ }
foreach ($lvs as $lv)
{
@@ -320,11 +346,18 @@ class Projektarbeit extends FHCAPI_Controller
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Projekttyp'])
]);
- $this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'required|is_natural', [
- 'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Lehreinheit']),
+ $this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'is_natural', [
'is_natural' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Lehreinheit'])
]);
+ $this->form_validation->set_rules('lehrveranstaltung_id', 'Lehrveranstaltung', 'required', [
+ 'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Lehrveranstaltung'])
+ ]);
+
+ $this->form_validation->set_rules('studiensemester_kurzbz', 'Studiensemester', 'required', [
+ 'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Studiensemester'])
+ ]);
+
$this->form_validation->set_rules('beginn', 'Beginn', 'is_valid_date', [
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Beginn'])
]);
@@ -354,6 +387,8 @@ class Projektarbeit extends FHCAPI_Controller
'projekttyp_kurzbz' => $formData['projekttyp_kurzbz'],
'firma_id' => $formData['firma_id'] ?? null,
'lehreinheit_id' => $formData['lehreinheit_id'],
+ 'lehrveranstaltung_id' => $formData['lehrveranstaltung_id'],
+ 'studiensemester_kurzbz' => $formData['studiensemester_kurzbz'],
'beginn' => isset($formData['beginn']) && !isEmptyString($formData['beginn']) ? $formData['beginn'] : null,
'ende' => isset($formData['ende']) && !isEmptyString($formData['ende']) ? $formData['ende'] : null,
'note' => $formData['note'] ?? null,
diff --git a/application/controllers/jobs/ReihungstestJob.php b/application/controllers/jobs/ReihungstestJob.php
index 6dd214fbb..83ab9b526 100644
--- a/application/controllers/jobs/ReihungstestJob.php
+++ b/application/controllers/jobs/ReihungstestJob.php
@@ -803,7 +803,7 @@ class ReihungstestJob extends JOB_Controller
{
if (!isset($studiensemester) || isEmptyString($studiensemester))
{
- $this->logError("Studiensemster not passed as parameter");
+ $this->logError("Studiensemester not passed as parameter");
return;
}
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/libraries/AnrechnungLib.php b/application/libraries/AnrechnungLib.php
index 8ee1891b5..4c27a297c 100644
--- a/application/libraries/AnrechnungLib.php
+++ b/application/libraries/AnrechnungLib.php
@@ -741,7 +741,7 @@ class AnrechnungLib
$fullname = hasData($result) ? $result->retval[0]->vorname. $result->retval[0]->nachname : '';
// Return filename
- return 'Anrechnungsantrag'. $orgform_kurzbz .'_LV-'. $lehrveranstaltung_id. '_'. $fullname;
+ return 'Anrechnungsantrag'. $orgform_kurzbz .'_LV-'. $lehrveranstaltung_id. '_'. $fullname . '.pdf';
}
public function LVhasLector($anrechnung_id)
diff --git a/application/models/accounting/Vertrag_model.php b/application/models/accounting/Vertrag_model.php
index 97b5c72b6..b49f6ef53 100644
--- a/application/models/accounting/Vertrag_model.php
+++ b/application/models/accounting/Vertrag_model.php
@@ -31,18 +31,20 @@ class Vertrag_model extends DB_Model
*/
public function save($person_id, $mitarbeiter_uid, $lehrveranstaltung_id, $lehreinheit_id, $projektarbeit_id = null, $vertragsstunden, $betrag, $studiensemester_kurzbz)
{
- $person_id = (isset($person_id) && is_numeric($person_id))
+ $vertragstyp_kurzbz = (is_null($projektarbeit_id)) ? 'Lehrauftrag' : 'Betreuung';
+
+ $person_id = (isset($person_id) && is_numeric($person_id))
? $person_id
: show_error('peron_id must be set and numeric.');
- $lehreinheit_id = (isset($lehreinheit_id) && is_numeric($lehreinheit_id))
- ? $lehreinheit_id
- : show_error('lehreinheit_id must be set and numeric.');
$lehrveranstaltung_id = (isset($lehrveranstaltung_id) && is_numeric($lehrveranstaltung_id))
? $lehrveranstaltung_id
: show_error('lehrveranstaltung_id must be set and numeric.');
$projektarbeit_id = (isset($projektarbeit_id) && is_numeric($projektarbeit_id))
? $projektarbeit_id
: null;
+ $lehreinheit_id = (isset($lehreinheit_id) && is_numeric($lehreinheit_id))
+ ? $lehreinheit_id
+ : (($vertragstyp_kurzbz == 'Betreuung') ? null : show_error('lehreinheit_id must be set and numeric.'));
$vertragsstunden = (isset($vertragsstunden) && is_numeric($vertragsstunden))
? $vertragsstunden
: 0;
@@ -53,7 +55,7 @@ class Vertrag_model extends DB_Model
? $mitarbeiter_uid
: show_error('mitarbeiter_uid must be set and a string value.');;
- $vertragstyp_kurzbz = (is_null($projektarbeit_id)) ? 'Lehrauftrag' : 'Betreuung';
+
// First check if Vertrag already exists for that Lehrauftrag or for that Projektbetreuerauftrag
if ($vertragstyp_kurzbz == 'Lehrauftrag')
@@ -257,7 +259,7 @@ class Vertrag_model extends DB_Model
}
elseif ($vertragstyp_kurzbz == 'Betreuung')
{
- $this->addSelect('lehreinheit_id');
+ $this->addSelect('lehreinheit_id, lehre.tbl_projektarbeit.lehrveranstaltung_id, lehre.tbl_projektarbeit.studiensemester_kurzbz');
$this->addJoin('lehre.tbl_projektbetreuer', 'vertrag_id');
$this->addJoin('lehre.tbl_projektarbeit', 'projektarbeit_id');
if ($result = $this->loadWhere(array('vertrag_id' => $vertrag_id)))
@@ -281,17 +283,22 @@ class Vertrag_model extends DB_Model
{
if ($result = getData($this->getLehreinheitID($vertrag_id)))
{
- $this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
- $this->LehreinheitModel->addSelect($select);
+ if (!empty($result[0]->lehreinheit_id))
+ {
+ $this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
+ $this->LehreinheitModel->addSelect($select);
- if($result = $this->LehreinheitModel->load($result[0]->lehreinheit_id))
- {
- return success($result->retval);
- }
- else
- {
- return error('Fehler beim Laden der Lehreinheit');
+ if ($result = $this->LehreinheitModel->load($result[0]->lehreinheit_id))
+ {
+ return success($result->retval);
+ }
+ else
+ {
+ return error('Fehler beim Laden der Lehreinheit');
+ }
}
+
+ return success($result);
}
else
{
@@ -563,14 +570,13 @@ SELECT
null::integer as pruefung_id,
projektarbeit_id,
(tbl_projektbetreuer.stunden*tbl_projektbetreuer.stundensatz) as betrag1,
- tbl_lehreinheit.studiensemester_kurzbz,
+ tbl_projektarbeit.studiensemester_kurzbz,
tbl_projektbetreuer.betreuerart_kurzbz,
(SELECT nachname || ' ' || vorname FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) WHERE uid=tbl_projektarbeit.student_uid)
as bezeichnung
FROM
lehre.tbl_projektbetreuer
JOIN lehre.tbl_projektarbeit USING(projektarbeit_id)
- JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
WHERE
tbl_projektbetreuer.person_id=?
AND vertrag_id IS NULL
@@ -619,14 +625,13 @@ SELECT
null::integer as pruefung_id,
projektarbeit_id,
(tbl_projektbetreuer.stunden * tbl_projektbetreuer.stundensatz) as betrag,
- tbl_lehreinheit.studiensemester_kurzbz,
+ tbl_projektarbeit.studiensemester_kurzbz,
tbl_projektbetreuer.betreuerart_kurzbz,
(SELECT nachname || ' ' || vorname FROM public.tbl_person JOIN public.tbl_benutzer USING(person_id) WHERE uid=tbl_projektarbeit.student_uid)
as bezeichnung, vertrag_id
FROM
lehre.tbl_projektbetreuer
JOIN lehre.tbl_projektarbeit USING(projektarbeit_id)
- JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
WHERE
tbl_projektbetreuer.person_id=?
AND vertrag_id = ?
diff --git a/application/models/crm/Prestudentstatus_model.php b/application/models/crm/Prestudentstatus_model.php
index c0ed8595e..618d4be51 100644
--- a/application/models/crm/Prestudentstatus_model.php
+++ b/application/models/crm/Prestudentstatus_model.php
@@ -177,7 +177,7 @@ class Prestudentstatus_model extends DB_Model
* @param prestudent_id ID of the Prestudent.
* @param $status_kurzbz kurzbz of the status.
* @param $ausbildungssemester ausbildungssemester of the status.
- * @param $studiensemester_kurzbz studiensemster of the status.
+ * @param $studiensemester_kurzbz studiensemester of the status.
*
* @return result object with all the status entries
*/
diff --git a/application/models/education/Lehreinheitmitarbeiter_model.php b/application/models/education/Lehreinheitmitarbeiter_model.php
index efdb2e74d..5dca16c95 100644
--- a/application/models/education/Lehreinheitmitarbeiter_model.php
+++ b/application/models/education/Lehreinheitmitarbeiter_model.php
@@ -85,9 +85,18 @@ class Lehreinheitmitarbeiter_model extends DB_Model
public function getLektorenByLe($lehreinheit_id)
{
- $this->addSelect('vorname, nachname, tbl_lehreinheitmitarbeiter.*, stundenplan.verplant');
+ $this->addSelect('tbl_person.vorname, tbl_person.nachname, tbl_lehreinheitmitarbeiter.*, stundenplan.verplant,
+ COALESCE(insertvonperson.vorname || \' \' || insertvonperson.nachname, tbl_lehreinheitmitarbeiter.insertvon) as insertvon,
+ COALESCE(updatevonperson.vorname || \' \' || updatevonperson.nachname, tbl_lehreinheitmitarbeiter.updatevon) as updatevon');
$this->addJoin('tbl_benutzer', 'uid = mitarbeiter_uid');
$this->addJoin('tbl_person', 'person_id');
+ $this->addJoin('tbl_benutzer insertvonbenutzer', 'insertvonbenutzer.uid = tbl_lehreinheitmitarbeiter.insertvon', 'LEFT');
+ $this->addJoin('tbl_person insertvonperson', 'insertvonperson.person_id = insertvonbenutzer.person_id', 'LEFT');
+
+ $this->addJoin('tbl_benutzer updatevonbenutzer', 'updatevonbenutzer.uid = tbl_lehreinheitmitarbeiter.updatevon', 'LEFT');
+ $this->addJoin('tbl_person updatevonperson', 'updatevonperson.person_id = updatevonbenutzer.person_id', 'LEFT');
+
+
$this->addJoin('(
SELECT 1 as verplant, lehreinheit_id, mitarbeiter_uid
diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php
index bea676b98..ffa652cbc 100644
--- a/application/models/education/Lehrveranstaltung_model.php
+++ b/application/models/education/Lehrveranstaltung_model.php
@@ -1263,6 +1263,39 @@ class Lehrveranstaltung_model extends DB_Model
";
}
+ /**
+ * Gets lehrveranstaltungen of Studienplan of a certain lva_id set
+ * used if a bigger set of lva id is already available and it needs to be checked against a certain studienplan aswell
+ * @param $studienplan_id ID des Studienplans
+ * @param $lva_ids LVA_ID welche abgegleicht werden sollen
+ * @return array|null
+ */
+ public function getLvsByStudienplanByLvaIDs($studienplan_id, $lva_ids)
+ {
+ $params = array($studienplan_id, $lva_ids);
+
+ $qry = "SELECT tbl_lehrveranstaltung.*,
+ tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
+ tbl_studienplan_lehrveranstaltung.semester as stpllv_semester,
+ tbl_studienplan_lehrveranstaltung.pflicht as stpllv_pflicht,
+ tbl_studienplan_lehrveranstaltung.koordinator as stpllv_koordinator,
+ tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent,
+ tbl_studienplan_lehrveranstaltung.sort stpllv_sort,
+ tbl_studienplan_lehrveranstaltung.curriculum,
+ tbl_studienplan_lehrveranstaltung.export,
+ tbl_studienplan_lehrveranstaltung.genehmigung
+ FROM lehre.tbl_lehrveranstaltung
+ JOIN lehre.tbl_studienplan_lehrveranstaltung
+ USING(lehrveranstaltung_id)
+ WHERE tbl_studienplan_lehrveranstaltung.studienplan_id = ?
+ AND tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id IN ?
+ ";
+
+ $qry .= " ORDER BY stpllv_sort, semester, sort";
+
+ return $this->execQuery($qry, $params);
+ }
+
public function getAllOe($lv_id)
{
$qry = "SELECT DISTINCT oe_kurzbz
diff --git a/application/models/education/Paabgabe_model.php b/application/models/education/Paabgabe_model.php
index 99b9b75f1..064a2507a 100644
--- a/application/models/education/Paabgabe_model.php
+++ b/application/models/education/Paabgabe_model.php
@@ -50,8 +50,7 @@ class Paabgabe_model extends DB_Model
JOIN lehre.tbl_projektbetreuer USING(projektarbeit_id)
JOIN public.tbl_benutzer bn_student ON(tbl_projektarbeit.student_uid=bn_student.uid)
JOIN public.tbl_person person_student ON(bn_student.person_id=person_student.person_id)
- JOIN lehre.tbl_lehreinheit ON(tbl_projektarbeit.lehreinheit_id=tbl_lehreinheit.lehreinheit_id)
- JOIN lehre.tbl_lehrveranstaltung ON(tbl_lehreinheit.lehrveranstaltung_id=tbl_lehrveranstaltung.lehrveranstaltung_id)
+ JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
JOIN public.tbl_studiengang ON(tbl_lehrveranstaltung.studiengang_kz=tbl_studiengang.studiengang_kz)
JOIN campus.tbl_paabgabetyp USING(paabgabetyp_kurzbz)
WHERE
@@ -68,14 +67,13 @@ class Paabgabe_model extends DB_Model
campus.tbl_paabgabe.insertvon, campus.tbl_paabgabe.insertamum, campus.tbl_paabgabe.updatevon, campus.tbl_paabgabe.updateamum,
campus.tbl_paabgabe.note, upload_allowed, beurteilungsnotiz, student_uid, tbl_projektarbeit.note, lehre.tbl_projektarbeit.titel,
UPPER(tbl_studiengang.typ) as stgtyp, UPPER(tbl_studiengang.kurzbz) as stgkz, public.tbl_studiengang.studiengang_kz,
- public.tbl_studiengang.oe_kurzbz as stg_oe_kurzbz, tbl_lehreinheit.studiensemester_kurzbz,
+ public.tbl_studiengang.oe_kurzbz as stg_oe_kurzbz, tbl_projektarbeit.studiensemester_kurzbz,
public.tbl_person.anrede, public.tbl_person.titelpre, public.tbl_person.vorname, public.tbl_person.nachname, public.tbl_person.titelpost
FROM campus.tbl_paabgabe
JOIN campus.tbl_paabgabetyp USING (paabgabetyp_kurzbz)
JOIN lehre.tbl_projektarbeit USING (projektarbeit_id)
- JOIN lehre.tbl_lehreinheit using(lehreinheit_id)
- JOIN lehre.tbl_lehrveranstaltung using(lehrveranstaltung_id)
- JOIN public.tbl_studiengang on(lehre.tbl_lehrveranstaltung.studiengang_kz = public.tbl_studiengang.studiengang_kz)
+ JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
+ JOIN public.tbl_studiengang ON(lehre.tbl_lehrveranstaltung.studiengang_kz = public.tbl_studiengang.studiengang_kz)
JOIN public.tbl_benutzer ON (public.tbl_benutzer.uid = student_uid)
JOIN public.tbl_person USING (person_id)
@@ -93,7 +91,7 @@ class Paabgabe_model extends DB_Model
campus.tbl_paabgabe.insertvon, campus.tbl_paabgabe.insertamum, campus.tbl_paabgabe.updatevon, campus.tbl_paabgabe.updateamum,
campus.tbl_paabgabe.note, upload_allowed, beurteilungsnotiz, student_uid, tbl_projektarbeit.note, lehre.tbl_projektarbeit.titel,
UPPER(tbl_studiengang.typ) as stgtyp, UPPER(tbl_studiengang.kurzbz) as stgkz, public.tbl_studiengang.studiengang_kz,
- public.tbl_studiengang.oe_kurzbz as stg_oe_kurzbz, tbl_lehreinheit.studiensemester_kurzbz,
+ public.tbl_studiengang.oe_kurzbz as stg_oe_kurzbz, tbl_projektarbeit.studiensemester_kurzbz,
lehre.tbl_projektbetreuer.betreuerart_kurzbz, lehre.tbl_projektbetreuer.person_id,
public.tbl_person.anrede, public.tbl_person.titelpre, public.tbl_person.vorname, public.tbl_person.nachname, public.tbl_person.titelpost
@@ -101,8 +99,7 @@ class Paabgabe_model extends DB_Model
JOIN campus.tbl_paabgabetyp USING (paabgabetyp_kurzbz)
JOIN lehre.tbl_projektarbeit USING (projektarbeit_id)
JOIN lehre.tbl_projektbetreuer USING (projektarbeit_id)
- JOIN lehre.tbl_lehreinheit using(lehreinheit_id)
- JOIN lehre.tbl_lehrveranstaltung using(lehrveranstaltung_id)
+ JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
JOIN public.tbl_studiengang on(lehre.tbl_lehrveranstaltung.studiengang_kz = public.tbl_studiengang.studiengang_kz)
JOIN public.tbl_benutzer ON (public.tbl_benutzer.uid = student_uid)
JOIN public.tbl_person ON (public.tbl_benutzer.person_id = public.tbl_person.person_id)
diff --git a/application/models/education/Projektarbeit_model.php b/application/models/education/Projektarbeit_model.php
index 0fc3710f0..43d33e4e8 100644
--- a/application/models/education/Projektarbeit_model.php
+++ b/application/models/education/Projektarbeit_model.php
@@ -25,7 +25,7 @@ class Projektarbeit_model extends DB_Model
{
$qry = "SELECT
pa.*, tbl_projekttyp.bezeichnung,
- tbl_lehreinheit.studiensemester_kurzbz, tbl_lehrveranstaltung.lehrveranstaltung_id,
+ pa.studiensemester_kurzbz, pa.lehrveranstaltung_id,
tbl_firma.name AS firma_name,
(
SELECT
@@ -41,7 +41,6 @@ class Projektarbeit_model extends DB_Model
FROM
lehre.tbl_projektarbeit pa
JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
- JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_firma USING (firma_id)
WHERE
@@ -57,7 +56,7 @@ class Projektarbeit_model extends DB_Model
if (isset($studiensemester_kurzbz))
{
- $qry .= ' AND tbl_lehreinheit.studiensemester_kurzbz=?';
+ $qry .= ' AND tbl_projektarbeit.studiensemester_kurzbz=?';
$params[] = $studiensemester_kurzbz;
}
@@ -134,7 +133,7 @@ class Projektarbeit_model extends DB_Model
projektarbeit_id,
lehre.tbl_projekttyp.bezeichnung as projekttypbezeichnung,
lehre.tbl_projekttyp.projekttyp_kurzbz as projekttypkurzbz,
- lehre.tbl_lehreinheit.studiensemester_kurzbz,
+ lehre.tbl_projektarbeit.studiensemester_kurzbz,
lehre.tbl_lehrveranstaltung.studiengang_kz,
public.tbl_studiengang.kurzbzlang,
lehre.tbl_projektarbeit.note as note,
@@ -157,7 +156,6 @@ class Projektarbeit_model extends DB_Model
LEFT JOIN public.tbl_benutzer USING(person_id)
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
LEFT JOIN lehre.tbl_betreuerart USING(betreuerart_kurzbz)
- LEFT JOIN lehre.tbl_lehreinheit USING(lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
LEFT JOIN public.tbl_mitarbeiter ON(public.tbl_mitarbeiter.mitarbeiter_uid = public.tbl_benutzer.uid)
LEFT JOIN public.tbl_studiengang USING(studiengang_kz)
@@ -366,7 +364,7 @@ class Projektarbeit_model extends DB_Model
tbl_studiengang.typ, tbl_studiengang.kurzbz,
tbl_projektarbeit.projekttyp_kurzbz, tbl_projekttyp.bezeichnung,
tbl_projektarbeit.titel, tbl_projektarbeit.projektarbeit_id, tbl_projektarbeit.note,
- student_benutzer.uid, tbl_student.matrikelnr, tbl_lehreinheit.studiensemester_kurzbz, public.tbl_student.student_uid,
+ student_benutzer.uid, tbl_student.matrikelnr, tbl_projektarbeit.studiensemester_kurzbz, public.tbl_student.student_uid,
lehre.tbl_projektarbeit.sprache,
lehre.tbl_projektarbeit.seitenanzahl,
@@ -430,7 +428,6 @@ class Projektarbeit_model extends DB_Model
LEFT JOIN public.tbl_benutzer student_benutzer ON student_benutzer.uid = lehre.tbl_projektarbeit.student_uid
LEFT JOIN public.tbl_person student_person ON student_benutzer.person_id = student_person.person_id
LEFT JOIN public.tbl_student ON student_benutzer.uid = public.tbl_student.student_uid
- LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
@@ -503,7 +500,7 @@ class Projektarbeit_model extends DB_Model
student_person.vorname AS student_vorname,
student_person.nachname AS student_nachname,
public.tbl_student.matrikelnr,
- tbl_lehreinheit.studiensemester_kurzbz,
+ tbl_projektarbeit.studiensemester_kurzbz,
betreuer_benutzer.uid AS betreuer_benutzer_uid,
betreuer_person.titelpre AS betreuer_titelpre,
betreuer_person.vorname AS betreuer_vorname,
@@ -565,7 +562,6 @@ class Projektarbeit_model extends DB_Model
LEFT JOIN public.tbl_benutzer student_benutzer ON student_benutzer.uid = lehre.tbl_projektarbeit.student_uid
LEFT JOIN public.tbl_person student_person ON student_benutzer.person_id = student_person.person_id
LEFT JOIN public.tbl_student ON student_benutzer.uid = public.tbl_student.student_uid
- LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
@@ -633,7 +629,7 @@ class Projektarbeit_model extends DB_Model
student_person.vorname AS student_vorname,
student_person.nachname AS student_nachname,
public.tbl_student.matrikelnr,
- tbl_lehreinheit.studiensemester_kurzbz,
+ tbl_projektarbeit.studiensemester_kurzbz,
betreuer_benutzer.uid AS betreuer_benutzer_uid,
betreuer_person.titelpre AS betreuer_titelpre,
betreuer_person.vorname AS betreuer_vorname,
@@ -695,7 +691,6 @@ class Projektarbeit_model extends DB_Model
LEFT JOIN public.tbl_benutzer student_benutzer ON student_benutzer.uid = lehre.tbl_projektarbeit.student_uid
LEFT JOIN public.tbl_person student_person ON student_benutzer.person_id = student_person.person_id
LEFT JOIN public.tbl_student ON student_benutzer.uid = public.tbl_student.student_uid
- LEFT JOIN lehre.tbl_lehreinheit USING (lehreinheit_id)
LEFT JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
LEFT JOIN public.tbl_studiengang ON public.tbl_student.studiengang_kz = public.tbl_studiengang.studiengang_kz
LEFT JOIN lehre.tbl_projekttyp USING (projekttyp_kurzbz)
diff --git a/application/models/organisation/Studiensemester_model.php b/application/models/organisation/Studiensemester_model.php
index 6e2abae87..e53850560 100644
--- a/application/models/organisation/Studiensemester_model.php
+++ b/application/models/organisation/Studiensemester_model.php
@@ -218,7 +218,7 @@ class Studiensemester_model extends DB_Model
*/
public function getByDate($date)
{
- // gets the studiensemster of a date or the next closest previous studiensemester if a date is not within a studiensemester
+ // gets the studiensemester of a date or the next closest previous studiensemester if a date is not within a studiensemester
$query = "
SELECT studiensemester_kurzbz, start, ende
FROM public.tbl_studiensemester
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/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php
index a36605d13..f1cc42728 100644
--- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php
@@ -232,8 +232,8 @@ FROM
SELECT
pa.lehreinheit_id,
lv.lehrveranstaltung_id,
- pa.projektarbeit_id::text AS "projektarbeit_id",
- le.studiensemester_kurzbz,
+ pa.projektarbeit_id::text AS "projektarbeit_id",
+ pa.studiensemester_kurzbz,
stg.studiengang_kz,
upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz",
lv.orgform_kurzbz,
@@ -268,8 +268,7 @@ FROM
FROM
lehre.tbl_projektbetreuer pb
JOIN lehre.tbl_projektarbeit pa USING (projektarbeit_id)
- JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id)
- JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
+ JOIN lehre.tbl_lehrveranstaltung lv ON (pa.lehrveranstaltung_id = lv.lehrveranstaltung_id)
JOIN PUBLIC.tbl_organisationseinheit oe USING (oe_kurzbz)
JOIN PUBLIC.tbl_person person USING (person_id)
LEFT JOIN lehre.tbl_vertrag vertrag USING (vertrag_id)
@@ -280,7 +279,7 @@ FROM
/* filter projektbetreuuer */
pb.person_id = \'' . $PERSON_ID . '\'
/* filter studiensemester */
- AND le.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
+ AND pa.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
/* filter active lehrveranstaltungen */
AND lv.aktiv = TRUE
/* filter active organisationseinheiten */
diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php
index 7dd3822a6..d67a37b06 100644
--- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php
@@ -242,8 +242,8 @@ FROM
pa.lehreinheit_id,
lv.lehrveranstaltung_id,
lv.bezeichnung AS "lv_bezeichnung",
- (pa.projektarbeit_id::text) AS "projektarbeit_id",
- le.studiensemester_kurzbz,
+ (pa.projektarbeit_id::text) AS "projektarbeit_id",
+ pa.studiensemester_kurzbz,
stg.studiengang_kz,
upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz",
lv.orgform_kurzbz,
@@ -270,7 +270,7 @@ FROM
ELSE (oe.organisationseinheittyp_kurzbz ||
\' \' || oe.bezeichnung)
END AS "lv_oe_kurzbz",
- (nachname || \' \' || vorname) AS "lektor",
+ (nachname || \' \' || vorname) AS "lektor",
TRUNC(pb.stunden, 1) AS "stunden",
pb.stundensatz,
TRUNC((pb.stunden * pb.stundensatz), 2) AS "betrag",
@@ -280,8 +280,7 @@ FROM
FROM
lehre.tbl_projektbetreuer pb
JOIN lehre.tbl_projektarbeit pa USING (projektarbeit_id)
- JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id)
- JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
+ JOIN lehre.tbl_lehrveranstaltung lv ON (pa.lehrveranstaltung_id = lv.lehrveranstaltung_id)
JOIN PUBLIC.tbl_organisationseinheit oe USING (oe_kurzbz)
JOIN PUBLIC.tbl_person person USING (person_id)
LEFT JOIN lehre.tbl_vertrag vertrag USING (vertrag_id)
@@ -291,7 +290,7 @@ FROM
/* filter organisationseinheit */
lv.oe_kurzbz IN (\'' . implode('\',\'', $ORGANISATIONSEINHEIT) . '\')
/* filter studiensemester */
- AND le.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
+ AND pa.studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
/* filter active lehrveranstaltungen */
AND lv.aktiv = TRUE
/* filter active organisationseinheiten */
diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php
index f5b5cf6ce..d62ecd076 100644
--- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php
@@ -272,8 +272,8 @@ FROM
pa.lehreinheit_id,
lv.lehrveranstaltung_id,
lv.bezeichnung AS "lv_bezeichnung",
- pa.projektarbeit_id::text AS "projektarbeit_id",
- le.studiensemester_kurzbz,
+ pa.projektarbeit_id::text AS "projektarbeit_id",
+ pa.studiensemester_kurzbz,
stg.studiengang_kz,
upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz",
lv.orgform_kurzbz,
@@ -310,8 +310,7 @@ FROM
FROM
lehre.tbl_projektbetreuer pb
JOIN lehre.tbl_projektarbeit pa USING (projektarbeit_id)
- JOIN lehre.tbl_lehreinheit le USING (lehreinheit_id)
- JOIN lehre.tbl_lehrveranstaltung lv USING (lehrveranstaltung_id)
+ JOIN lehre.tbl_lehrveranstaltung lv ON (pa.lehrveranstaltung_id = lv.lehrveranstaltung_id)
JOIN PUBLIC.tbl_organisationseinheit oe USING (oe_kurzbz)
JOIN PUBLIC.tbl_person person USING (person_id)
LEFT JOIN lehre.tbl_vertrag vertrag USING (vertrag_id)
@@ -321,7 +320,7 @@ FROM
/* filter studiengang */
lv.studiengang_kz IN ('. implode(',', $STUDIENGANG) . ')
/* filter studiensemester */
- AND le.studiensemester_kurzbz = \''. $STUDIENSEMESTER. '\'
+ AND pa.studiensemester_kurzbz = \''. $STUDIENSEMESTER. '\'
/* filter active lehrveranstaltungen */
AND lv.aktiv = TRUE
/* filter ausbildungssemester */
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') ?>
+
+