diff --git a/application/config/navigation.php b/application/config/navigation.php
index bb6cc50ba..f7ba8dca3 100644
--- a/application/config/navigation.php
+++ b/application/config/navigation.php
@@ -349,5 +349,11 @@ $config['navigation_menu']['apps'] = [
'description' => 'LV Verwaltung',
#'icon' => 'person-chalkboard',
'requiredPermissions' => array('admin:r', 'assistenz:r')
+ ],
+ 'lav' => [
+ 'link' => site_url('lehre/lehrauftrag/Lehrauftrag/Dashboard'),
+ 'description' => 'Lehraufträge',
+ #'icon' => 'person-chalkboard',
+ 'requiredPermissions' => array('lehre/lehrauftrag_bestellen:r', 'lehre/lehrauftrag_erteilen:r')
]
];
diff --git a/application/controllers/api/frontend/v1/Lehrveranstaltung.php b/application/controllers/api/frontend/v1/Lehrveranstaltung.php
index 2e254bfc8..935602391 100644
--- a/application/controllers/api/frontend/v1/Lehrveranstaltung.php
+++ b/application/controllers/api/frontend/v1/Lehrveranstaltung.php
@@ -119,7 +119,19 @@ class Lehrveranstaltung extends FHCAPI_Controller
if (hasData($lehreinheiten_data))
{
$lehreinheiten = getData($lehreinheiten_data);
- $rowData->_children = $lehreinheiten;
+
+ if (!isset($row->_children))
+ {
+ $row->_children = $lehreinheiten;
+ }
+ else
+ {
+ if (!is_array($row->_children))
+ {
+ $row->_children = [$row->_children];
+ }
+ $row->_children = array_merge($row->_children, $lehreinheiten);
+ }
}
if (!isEmptyString($row->studienplan_lehrveranstaltung_id_parent))
diff --git a/application/controllers/api/frontend/v1/lv/Gruppe.php b/application/controllers/api/frontend/v1/lv/Gruppe.php
index 83a4fb696..daebe8a61 100644
--- a/application/controllers/api/frontend/v1/lv/Gruppe.php
+++ b/application/controllers/api/frontend/v1/lv/Gruppe.php
@@ -12,8 +12,8 @@ class Gruppe extends FHCAPI_Controller
'add' => ['admin:rw', 'assistenz:rw'],
'delete' => ['admin:rw', 'assistenz:rw'],
'deleteFromLVPlan' => ['admin:rw', 'assistenz:rw'],
- 'getBenutzer' => ['admin:r', 'assistenz:r'],
- 'getAll' => ['admin:r', 'assistenz:r'],
+ 'getBenutzerSearch' => ['admin:r', 'assistenz:r'],
+ 'getAllSearch' => ['admin:r', 'assistenz:r'],
'getByLehreinheit' => ['admin:r', 'assistenz:r'],
]);
@@ -22,7 +22,8 @@ class Gruppe extends FHCAPI_Controller
$this->_ci->load->library('PhrasesLib');
$this->loadPhrases(
array(
- 'ui'
+ 'ui',
+ 'lehre'
)
);
@@ -91,11 +92,11 @@ class Gruppe extends FHCAPI_Controller
$lehreinheitgruppe_id = $this->input->post('lehreinheitgruppe_id');
if (is_null($lehreinheit_id) || !ctype_digit((string)$lehreinheit_id) || is_null($lehreinheitgruppe_id) || !ctype_digit((string)$lehreinheitgruppe_id))
- $this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
+ $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
$lehreinheitgruppe_result = $this->_ci->LehreinheitgruppeModel->loadWhere(array('lehreinheitgruppe_id' => $lehreinheitgruppe_id));
if (!hasData($lehreinheitgruppe_result) || isError($lehreinheitgruppe_result))
- $this->terminateWithError( $this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
+ $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
$this->checkPermission($lehreinheit_id);
@@ -108,15 +109,33 @@ class Gruppe extends FHCAPI_Controller
}
- public function getAll()
+ public function getAllSearch()
{
+ $query = $this->input->get('query');
+
+ if (is_null($query))
+ $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
+
+ $query_words = explode(' ', $query);
+
$this->_ci->GruppeModel->addSelect('gruppe_kurzbz,
studiengang_kz,
semester,
bezeichnung,
gid,
\'false\' as lehrverband');
- $gruppen_result = $this->_ci->GruppeModel->loadWhere(array('sichtbar' => true, 'aktiv' => true, 'lehre' => true, 'direktinskription' => false, 'semester IS NOT NULL' => null));
+ $this->_ci->GruppeModel->db->where(array('sichtbar' => true, 'aktiv' => true, 'lehre' => true, 'direktinskription' => false, 'semester IS NOT NULL' => null));
+ $this->_ci->GruppeModel->db->group_start();
+ foreach ($query_words as $word)
+ {
+ $this->_ci->GruppeModel->db->group_start();
+ $this->_ci->GruppeModel->db->where('gruppe_kurzbz ILIKE', "%" . $word . "%");
+ $this->_ci->GruppeModel->db->or_where('bezeichnung ILIKE', "%" . $word . "%");
+ $this->_ci->GruppeModel->db->group_end();
+ }
+ $this->_ci->GruppeModel->db->group_end();
+
+ $gruppen_result = $this->_ci->GruppeModel->load();
$gruppen_array = array();
@@ -135,7 +154,18 @@ class Gruppe extends FHCAPI_Controller
$this->_ci->LehrverbandModel->addJoin('public.tbl_studiengang', 'studiengang_kz');
$this->_ci->LehrverbandModel->addOrder('verband');
$this->_ci->LehrverbandModel->addOrder('gruppe');
- $lehrverband_result = $this->_ci->LehrverbandModel->loadWhere(array('tbl_lehrverband.aktiv' => true));
+ $this->_ci->LehrverbandModel->db->where(array('tbl_lehrverband.aktiv' => true));
+
+ $this->_ci->LehrverbandModel->db->group_start();
+ foreach ($query_words as $word)
+ {
+ $this->_ci->LehrverbandModel->db->group_start();
+ $this->_ci->LehrverbandModel->db->where('CONCAT(CONCAT(typ, kurzbz), \'\', semester, verband, COALESCE(gruppe,\'\')) ILIKE', "%" . $word . "%");
+ $this->_ci->LehrverbandModel->db->or_where('tbl_lehrverband.bezeichnung ILIKE', "%" . $word . "%");
+ $this->_ci->LehrverbandModel->db->group_end();
+ }
+ $this->_ci->LehrverbandModel->db->group_end();
+ $lehrverband_result = $this->_ci->LehrverbandModel->load();
$lehrverband_array = array();
@@ -150,15 +180,40 @@ class Gruppe extends FHCAPI_Controller
$this->terminateWithSuccess($all_gruppen);
}
- public function getBenutzer()
+ public function getBenutzerSearch()
{
+ $query = $this->input->get('query');
+
+ if (is_null($query))
+ $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
+
+ $query_words = explode(' ', $query);
+
$this->_ci->PersonModel->addSelect('vorname, nachname, uid, semester, UPPER(CONCAT(tbl_studiengang.typ, tbl_studiengang.kurzbz)) as studiengang');
$this->_ci->PersonModel->addJoin('public.tbl_benutzer', 'person_id');
$this->_ci->PersonModel->addJoin('public.tbl_mitarbeiter', 'uid = mitarbeiter_uid', 'LEFT');
$this->_ci->PersonModel->addJoin('public.tbl_student', 'uid = student_uid', 'LEFT');
$this->_ci->PersonModel->addJoin('public.tbl_studiengang', 'studiengang_kz', 'LEFT');
- $personen = $this->_ci->PersonModel->loadWhere(array('tbl_benutzer.aktiv' => true));
+ $this->_ci->PersonModel->db->where(array('tbl_benutzer.aktiv' => true));
+
+ $this->_ci->PersonModel->db->group_start();
+ foreach ($query_words as $word)
+ {
+ $this->_ci->PersonModel->db->group_start();
+ $this->_ci->PersonModel->db->where('tbl_person.vorname ILIKE', "%" . $word . "%");
+ $this->_ci->PersonModel->db->or_where('tbl_person.nachname ILIKE', "%" . $word . "%");
+ $this->_ci->PersonModel->db->or_where('uid ILIKE', "%" . $word . "%");
+ $this->_ci->PersonModel->db->or_where('CONCAT(tbl_studiengang.typ, tbl_studiengang.kurzbz) ILIKE', "%" . $word . "%");
+
+ if (is_numeric($word))
+ {
+ $this->_ci->PersonModel->db->or_where('semester', $word);
+ }
+ $this->_ci->PersonModel->db->group_end();
+ }
+ $this->_ci->PersonModel->db->group_end();
+ $personen = $this->_ci->PersonModel->load();
$this->terminateWithSuccess(hasData($personen) ? getData($personen) : array());
}
diff --git a/application/controllers/api/frontend/v1/lv/Lehreinheit.php b/application/controllers/api/frontend/v1/lv/Lehreinheit.php
index 958007901..6329d30ac 100644
--- a/application/controllers/api/frontend/v1/lv/Lehreinheit.php
+++ b/application/controllers/api/frontend/v1/lv/Lehreinheit.php
@@ -169,6 +169,10 @@ class Lehreinheit extends FHCAPI_Controller
{
$value = $this->input->post($field);
+ if ($field === 'lehre')
+ {
+ $value = (bool)$value;
+ }
if ($value !== null)
{
$updateData[$field] = $value;
@@ -281,15 +285,43 @@ class Lehreinheit extends FHCAPI_Controller
public function delete()
{
$lehreinheit_id = $this->input->post('lehreinheit_id');
- $lehreinheit = $this->checkLehreinheit($lehreinheit_id);
- $this->checkPermission($lehreinheit->lehreinheit_id);
- $result = $this->_ci->LehreinheitModel->deleteLehreinheit($lehreinheit->lehreinheit_id);
+ $errors = array();
+ if (is_array($lehreinheit_id))
+ {
+ foreach ($lehreinheit_id as $le_id)
+ {
+ $lehreinheit = $this->checkLehreinheit($le_id);
+ $this->checkPermission($lehreinheit->lehreinheit_id);
- if (isError($result))
- $this->terminateWithValidationErrors(getError($result));
+ $result = $this->_ci->LehreinheitModel->deleteLehreinheit($lehreinheit->lehreinheit_id);
- $this->terminateWithSuccess('Erfolgreich geloescht');
+ if (isError($result))
+ {
+ $errors[] = getError($result);
+ }
+ }
+ }
+ else
+ {
+ $lehreinheit = $this->checkLehreinheit($lehreinheit_id);
+ $this->checkPermission($lehreinheit->lehreinheit_id);
+
+ $result = $this->_ci->LehreinheitModel->deleteLehreinheit($lehreinheit->lehreinheit_id);
+
+ if (isError($result))
+ $this->terminateWithError(getError($result));
+ }
+
+ if (!isEmptyArray($errors))
+ {
+ if (count($errors) !== count($lehreinheit_id))
+ $this->terminateWithSuccess(array('errors' => $errors));
+ else
+ $this->terminateWithError($errors);
+ }
+ else
+ $this->terminateWithSuccess('Erfolgreich geloescht');
}
public function update()
diff --git a/application/controllers/api/frontend/v1/lv/Lektor.php b/application/controllers/api/frontend/v1/lv/Lektor.php
index 68bec1bc4..cce7f6e8b 100644
--- a/application/controllers/api/frontend/v1/lv/Lektor.php
+++ b/application/controllers/api/frontend/v1/lv/Lektor.php
@@ -15,7 +15,7 @@ class Lektor extends FHCAPI_Controller
'deleteLVPlan' => ['admin:rw', 'assistenz:rw'],
'deletePerson' => ['admin:rw', 'assistenz:rw'],
'getLehrfunktionen' => ['admin:r', 'assistenz:r'],
- 'getLektoren' => ['admin:r', 'assistenz:r'],
+ 'getLektorenSearch' => ['admin:r', 'assistenz:r'],
'getLektorenByLE' => ['admin:r', 'assistenz:r'],
'getLektorDaten' => ['admin:r', 'assistenz:r'],
'getLektorVertrag' => ['admin:r', 'assistenz:r'],
@@ -208,12 +208,35 @@ class Lektor extends FHCAPI_Controller
$this->terminateWithSuccess(getData($this->_ci->LehrfunktionModel->load()));
}
- public function getLektoren()
+ public function getLektorenSearch()
{
+ $query = $this->input->get('query');
+
+ if (is_null($query))
+ $this->terminateWithError($this->p->t('ui', 'ungueltigeParameter'), self::ERROR_TYPE_GENERAL);
+
+ $query_words = explode(' ', $query);
+
$this->_ci->MitarbeiterModel->addSelect('uid, person_id, vorname, nachname');
$this->_ci->MitarbeiterModel->addJoin('public.tbl_benutzer', 'uid = mitarbeiter_uid');
$this->_ci->MitarbeiterModel->addJoin('public.tbl_person', 'person_id');
- $this->terminateWithSuccess(getData($this->_ci->MitarbeiterModel->loadWhere(array('public.tbl_benutzer.aktiv' => true))));
+
+ $this->_ci->MitarbeiterModel->db->where('public.tbl_benutzer.aktiv', true);
+
+ $this->_ci->MitarbeiterModel->db->group_start();
+ foreach ($query_words as $word)
+ {
+ $this->_ci->MitarbeiterModel->db->group_start();
+ $this->_ci->MitarbeiterModel->db->where('tbl_person.vorname ILIKE', "%" . $word . "%");
+ $this->_ci->MitarbeiterModel->db->or_where('tbl_person.nachname ILIKE', "%" . $word . "%");
+ $this->_ci->MitarbeiterModel->db->or_where('uid ILIKE', "%" . $word . "%");
+ $this->_ci->MitarbeiterModel->db->group_end();
+ }
+ $this->_ci->MitarbeiterModel->db->group_end();
+ $this->_ci->MitarbeiterModel->addOrder('nachname');
+ $this->_ci->MitarbeiterModel->addOrder('vorname');
+ $result = $this->_ci->MitarbeiterModel->load();
+ $this->terminateWithSuccess(hasData($result) ? getData($result) : array());
}
private function checkLehreinheit($lehreinheit_id)
diff --git a/application/controllers/api/frontend/v1/lv/Tags.php b/application/controllers/api/frontend/v1/lv/Tags.php
index a22a4c82e..34c42bc32 100644
--- a/application/controllers/api/frontend/v1/lv/Tags.php
+++ b/application/controllers/api/frontend/v1/lv/Tags.php
@@ -5,7 +5,7 @@ if (!defined('BASEPATH'))
class Tags extends Tag_Controller
{
- const BERECHTIGUNG_KURZBZ = ['admin:rw', 'assistenz:rw'];
+ const BERECHTIGUNG_KURZBZ = ['admin:rw', 'assistenz:r'];
public function __construct()
{
diff --git a/application/controllers/api/frontend/v1/stv/Dokumente.php b/application/controllers/api/frontend/v1/stv/Dokumente.php
index e6f6f4351..4f33405ae 100644
--- a/application/controllers/api/frontend/v1/stv/Dokumente.php
+++ b/application/controllers/api/frontend/v1/stv/Dokumente.php
@@ -591,10 +591,14 @@ class Dokumente extends FHCAPI_Controller
$documents = [
buildDropdownEntryPrintArray("accountinfo", "Accountinfoblatt", "xml=accountinfoblatt.xml.php&xsl=AccountInfo&output=pdf", $uid, 10, null),
buildDropdownEntryPrintArray("ausbildungsvertrag", "Ausbildungsvertrag", "xml=ausbildungsvertrag.xml.php&xsl=Ausbildungsver&output=pdf", $uid, 20, null),
- buildDropdownEntryPrintArray("ausbildungsvertrag_en", "Ausbildungsvertrag Englisch", "xml=ausbildungsvertrag.xml.php&xsl=AusbVerEng&output=pdf", $uid, 21, null),
- buildDropdownEntryPrintArray("studienbestaetigung", "Studienbestätigung", "xml=student.rdf.php&xsl=Inskription&output=pdf", $uid, 40, null),
- buildDropdownEntryPrintArray("studienbestaetigung_en", "Studienbestätigung Englisch", "xml=student.rdf.php&xsl=InskriptionEng&output=pdf", $uid, 41, null),
- buildDropdownEntryPrintArray("zutrittskarte", "Zutrittskarte", "xsl=ZutrittskarteStud&output=pdf&data=$uid", $uid,100, "zutrittskarte.php"),
+ buildDropdownEntryPrintArray("ausbildungsvertrag_en", "Ausbildungsvertrag Zweisprachig", "xml=ausbildungsvertrag.xml.php&xsl=AusbVerEng&output=pdf", $uid, 21, null),
+
+ buildDropdownEntryPrintArray("bescheid", "Bescheid (nur Voransicht)", "xml=abschlusspruefung.rdf.php&xsl_stg_kz=$studiengang_kz&xsl=Bescheid&output=pdf", $uid, 25, null),
+ buildDropdownEntryPrintArray("diplomasupp", "Diploma Supplement (nur Voransicht)", "xml=diplomasupplement.xml.php&xsl_stg_kz=$studiengang_kz&xsl=DiplSupplement&output=pdf", $uid, 26, null),
+
+ buildDropdownEntryPrintArray("studienbestaetigung", "Studienbestätigung", "xml=student.rdf.php&xsl=Inskription&output=pdf", $uid, 50, null),
+ buildDropdownEntryPrintArray("studienbestaetigung_en", "Studienbestätigung Englisch", "xml=student.rdf.php&xsl=InskriptionEng&output=pdf", $uid, 51, null),
+ buildDropdownEntryPrintArray("zutrittskarte", "Zutrittskarte", "xsl=ZutrittskarteStud&output=pdf&data=$uid", $uid,200, "zutrittskarte.php"),
buildDropdownEntryPrintArray("studienblatt", "Studienblatt", "xml=studienblatt.xml.php&xsl=Studienblatt&output=pdf&ss=$studiensemester_kurzbz", $uid, 60, null),
buildDropdownEntryPrintArray("studienblatt_eng", "Studienblatt Englisch", "xml=studienblatt.xml.php&xsl=StudienblattEng&output=pdf&ss=$studiensemester_kurzbz", $uid, 61, null),
@@ -616,10 +620,11 @@ class Dokumente extends FHCAPI_Controller
]
],
- $this->loadDropDownEntriesFinalExam($hasPermissionOutputformat, $stgTyp, $uid),
+ //Bakkzeugnis bzw. Diplomzeugnis is just shown in tab final_exam
+ buildDropdownEntryPrintArray("zeugnis", "Zeugnis", "xml=zeugnis.rdf.php&xsl=Zeugnis&output=pdf&xsl_stg_kz=$studiengang_kz&ss=$studiensemester_kurzbz", $uid, 121, null),
+ buildDropdownEntryPrintArray("zeugnis_en", "Zeugnis Englisch", "xml=zeugnis.rdf.php&xsl=ZeugnisEng&output=pdf&xsl_stg_kz=$studiengang_kz&ss=$studiensemester_kurzbz", $uid, 122, null),
+
- buildDropdownEntryPrintArray("bescheid", "Bescheid (nur Voransicht)", "xml=abschlusspruefung.rdf.php&xsl_stg_kz=$studiengang_kz&xsl=Bescheid&output=pdf", $uid, 80, null),
- buildDropdownEntryPrintArray("diplomasupp", "Diploma Supplement (nur Voransicht)", "xml=diplomasupplement.xml.php&xsl_stg_kz=$studiengang_kz&xsl=DiplSupplement&output=pdf", $uid, 81, null)
];
Events::trigger('DocumentGenerationDropDown',
@@ -632,15 +637,18 @@ class Dokumente extends FHCAPI_Controller
$studiengang_kz
);
+ $extraEntries = $this->loadDropDownEntriesBakkOrDipl($stgTyp, $uid);
+
+ $documents = array_merge($documents, $extraEntries);
+
usort($documents, function ($a, $b) {
$orderA = isset($a['order']) ? (int)$a['order'] : PHP_INT_MAX;
$orderB = isset($b['order']) ? (int)$b['order'] : PHP_INT_MAX;
return $orderA <=> $orderB;
});
-
$this->terminateWithSuccess($documents);
- return $documents || null;
+ //return $documents || null;
}
public function getDocumentDropDownMulti($studiensemester_kurzbz,$studiengang_kz)
@@ -678,9 +686,9 @@ class Dokumente extends FHCAPI_Controller
buildDropdownEntryPrintArray("accountinfo", "Accountinfoblatt", "xml=accountinfoblatt.xml.php&xsl=AccountInfo&output=pdf", $uidString, 10, null),
buildDropdownEntryPrintArray("ausbildungsvertrag", "Ausbildungsvertrag", "xml=ausbildungsvertrag.xml.php&xsl=Ausbildungsver&output=pdf", $uidString, 20, null),
buildDropdownEntryPrintArray("ausbildungsvertrag_en", "Ausbildungsvertrag Englisch", "xml=ausbildungsvertrag.xml.php&xsl=AusbVerEng&output=pdf", $uidString, 21, null),
- buildDropdownEntryPrintArray("studienbestaetigung", "Studienbestätigung", "xml=student.rdf.php&xsl=Inskription&output=pdf", $uidString, 40, null),
- buildDropdownEntryPrintArray("studienbestaetigung_en", "Studienbestätigung Englisch", "xml=student.rdf.php&xsl=InskriptionEng&output=pdf", $uidString, 41, null),
- buildDropdownEntryPrintArray("zutrittskarte", "Zutrittskarte", "xsl=ZutrittskarteStud&output=pdf&data=$uidString", $uidString,100, "zutrittskarte.php"),
+ buildDropdownEntryPrintArray("studienbestaetigung", "Studienbestätigung", "xml=student.rdf.php&xsl=Inskription&output=pdf", $uidString, 50, null),
+ buildDropdownEntryPrintArray("studienbestaetigung_en", "Studienbestätigung Englisch", "xml=student.rdf.php&xsl=InskriptionEng&output=pdf", $uidString, 51, null),
+ buildDropdownEntryPrintArray("zutrittskarte", "Zutrittskarte", "xsl=ZutrittskarteStud&output=pdf&data=$uidString", $uidString,200, "zutrittskarte.php"),
buildDropdownEntryPrintArray("studienblatt", "Studienblatt", "xml=studienblatt.xml.php&xsl=Studienblatt&output=pdf&ss=$studiensemester_kurzbz", $uidString, 60, null),
buildDropdownEntryPrintArray("studienblatt_eng", "Studienblatt Englisch", "xml=studienblatt.xml.php&xsl=StudienblattEng&output=pdf&ss=$studiensemester_kurzbz", $uidString, 61, null),
@@ -703,13 +711,9 @@ class Dokumente extends FHCAPI_Controller
]
],
- $this->loadDropDownEntriesFinalExam($hasPermissionOutputformat, $stgTyp, $uidString),
-
- //TODO(Manu) also in Fas multi not working
-/* buildDropdownEntryPrintArray("bescheid", "Bescheid (nur Voransicht)", "xml=abschlusspruefung.rdf.php&xsl_stg_kz=$studiengang_kz&xsl=Bescheid&output=pdf", $uidString, 80, null),
- */
-
- buildDropdownEntryPrintArray("diplomasupp", "Diploma Supplement (nur Voransicht)", "xml=diplomasupplement.xml.php&xsl_stg_kz=$studiengang_kz&xsl=DiplSupplement&output=pdf", $uidString, 81, null)
+ buildDropdownEntryPrintArray("diplomasupp", "Diploma Supplement (nur Voransicht)", "xml=diplomasupplement.xml.php&xsl_stg_kz=$studiengang_kz&xsl=DiplSupplement&output=pdf", $uidString, 35, null),
+ buildDropdownEntryPrintArray("zeugnis", "Zeugnis", "xml=zeugnis.rdf.php&xsl=Zeugnis&output=pdf&xsl_stg_kz=$studiengang_kz&ss=$studiensemester_kurzbz", $uidString, 121, null),
+ buildDropdownEntryPrintArray("zeugnis_en", "Zeugnis Englisch", "xml=zeugnis.rdf.php&xsl=ZeugnisEng&output=pdf&xsl_stg_kz=$studiengang_kz&ss=$studiensemester_kurzbz", $uidString, 122, null),
];
Events::trigger('DocumentGenerationDropDownMulti',
@@ -722,6 +726,10 @@ class Dokumente extends FHCAPI_Controller
$studiengang_kz
);
+ $extraEntries = $this->loadDropDownEntriesBakkOrDipl($stgTyp, $uidString);
+
+ $documents = array_merge($documents, $extraEntries);
+
usort($documents, function ($a, $b) {
$orderA = isset($a['order']) ? (int)$a['order'] : PHP_INT_MAX;
$orderB = isset($b['order']) ? (int)$b['order'] : PHP_INT_MAX;
@@ -960,4 +968,23 @@ class Dokumente extends FHCAPI_Controller
];
}
+ private function loadDropDownEntriesBakkOrDipl($stgTyp, $uid)
+ {
+ $entries = [];
+
+ if ($stgTyp == 'b')
+ {
+ $entries[] = buildDropdownEntryPrintArray("bakkurkunde", "Bakkurkunde", "xml=abschlusspruefung.rdf.php&xsl=Bakkurkunde&output=pdf", $uid, 22, null);
+ $entries[] = buildDropdownEntryPrintArray("bakkurkundeEng", "Bakkurkunde Englisch", "xml=abschlusspruefung.rdf.php&xsl=BakkurkundeEng&output=pdf", $uid, 23, null);
+ }
+
+ if ($stgTyp == 'm' || $stgTyp == 'd')
+ {
+ $entries[] = buildDropdownEntryPrintArray("diplomurkunde", "Diplomurkunde", "xml=abschlusspruefung.rdf.php&xsl=Diplomurkunde&output=pdf", $uid, 27, null);
+ $entries[] = buildDropdownEntryPrintArray("diplomurkundeEng", "Diplomurkunde Englisch", "xml=abschlusspruefung.rdf.php&xsl=DiplomurkundeEng&output=pdf", $uid, 28, null);
+ }
+
+ return $entries;
+ }
+
}
diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php
index f87afff9e..f0172da8a 100644
--- a/application/controllers/api/frontend/v1/stv/Student.php
+++ b/application/controllers/api/frontend/v1/stv/Student.php
@@ -112,16 +112,28 @@ class Student extends FHCAPI_Controller
if (defined('ACTIVE_ADDONS') && strpos(ACTIVE_ADDONS, 'bewerbung') !== false) {
$this->PrestudentModel->addSelect(
"(
- SELECT kontakt
- FROM public.tbl_kontakt
- WHERE kontakttyp='email'
- AND person_id=p.person_id
- AND zustellung
- ORDER BY kontakt_id
+ SELECT kontakt
+ FROM public.tbl_kontakt
+ WHERE kontakttyp='email'
+ AND person_id=p.person_id
+ AND zustellung
+ ORDER BY kontakt_id DESC
LIMIT 1
) AS email_privat",
false
);
+ $this->PrestudentModel->addSelect(
+ "(
+ SELECT kontakt
+ FROM public.tbl_kontakt
+ WHERE kontakttyp='email_unverifiziert'
+ AND person_id=p.person_id
+ AND zustellung
+ ORDER BY kontakt_id DESC
+ LIMIT 1
+ ) AS email_privat_unverified",
+ false
+ );
}
$this->PrestudentModel->addSelect(
"(
diff --git a/application/libraries/LektorLib.php b/application/libraries/LektorLib.php
index e06e2b728..bbe630eaf 100644
--- a/application/libraries/LektorLib.php
+++ b/application/libraries/LektorLib.php
@@ -17,6 +17,7 @@ class LektorLib
$this->_ci->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$this->_ci->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
$this->_ci->load->model('person/Benutzer_model', 'BenutzerModel');
+ $this->_ci->load->library('PhrasesLib', array('lehre'));
}
public function addLektorToLehreinheit($lehreinheit_id, $mitarbeiter_uid)
@@ -35,7 +36,7 @@ class LektorLib
if (isError($already_assigned)) return $already_assigned;
- if (hasData($already_assigned)) return error('Lektor already assigned');
+ if (hasData($already_assigned)) return error($this->_ci->phraseslib->t("lehre", "bereitzugeteilt"));
$studiensemester_result = $this->_ci->StudiensemesterModel->loadWhere(array('studiensemester_kurzbz' => $lehreinheit->studiensemester_kurzbz));
if (isError($studiensemester_result)) return $studiensemester_result;
@@ -88,6 +89,7 @@ class LektorLib
$lehreinheit = getData($lehreinheit_result)[0];
+
//TODO kollision check, wird vorerst nicht implementiert -> nur über das FAS möglich
if (isset($new_data['mitarbeiter_uid']) && $new_data['mitarbeiter_uid'] !== $mitarbeiter_uid)
{
@@ -98,7 +100,13 @@ class LektorLib
$verplant = $this->_ci->StundenplandevModel->loadWhere(array('lehreinheit_id' => $lehreinheit_id, 'mitarbeiter_uid' => $mitarbeiter_uid));
if (hasData($verplant))
- return error('Wechsel vom Mitarbeiter nicht möglich da er bereits verplant ist!');
+ return error($this->_ci->phraseslib->t("lehre", "lektorbereitsverplant"));
+
+ $lehreinheit_data = $this->_ci->LehreinheitmitarbeiterModel->loadWhere(array('mitarbeiter_uid' => $new_data['mitarbeiter_uid'], 'lehreinheit_id' => $lehreinheit_id));
+
+ if (hasData($lehreinheit_data))
+ return error($this->_ci->phraseslib->t("lehre", "bereitzugeteilt"));
+
}
$warning = '';
if (isset($new_data['semesterstunden']))
diff --git a/application/models/education/Lehreinheit_model.php b/application/models/education/Lehreinheit_model.php
index e52af4cba..2f955c295 100644
--- a/application/models/education/Lehreinheit_model.php
+++ b/application/models/education/Lehreinheit_model.php
@@ -651,7 +651,13 @@ EOSQL;
ELSE NULL
END
END,
- ' '
+ ' '
+ ORDER BY
+ UPPER(tbl_studiengang.typ::varchar(1) || tbl_studiengang.kurzbz),
+ COALESCE(TRIM(tbl_lehreinheitgruppe.semester::text), ''),
+ COALESCE(TRIM(tbl_lehreinheitgruppe.verband), ''),
+ COALESCE(TRIM(tbl_lehreinheitgruppe.gruppe), ''),
+ COALESCE(tbl_lehreinheitgruppe.gruppe_kurzbz, '')
) AS gruppen
FROM lehre.tbl_lehreinheitgruppe
LEFT JOIN public.tbl_studiengang USING (studiengang_kz)
diff --git a/application/models/education/Lehreinheitgruppe_model.php b/application/models/education/Lehreinheitgruppe_model.php
index bca395f31..dee8bbfe1 100644
--- a/application/models/education/Lehreinheitgruppe_model.php
+++ b/application/models/education/Lehreinheitgruppe_model.php
@@ -374,7 +374,7 @@ class Lehreinheitgruppe_model extends DB_Model
return success('Group assigned successfully to Lehreinheit');
}
else
- return error('Group already assigned');
+ return error($this->p->t('lehre', 'grpbereitszugeteilt'));
}
public function deleteGroup($lehreinheit_id, $lehreinheitgruppe_id)
@@ -401,7 +401,7 @@ class Lehreinheitgruppe_model extends DB_Model
$stundenplan_result = $this->loadWhere(array('tbl_lehreinheitgruppe.lehreinheitgruppe_id' => $lehreinheitgruppe_id));
if (hasData($stundenplan_result))
- return error('Gruppe already verplant');
+ return error($this->p->t('lehre', 'grpbereitsverplant'));
$delete_result = $this->delete($lehreinheitgruppe_id);
diff --git a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php
index b055ee954..1143398ca 100644
--- a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php
+++ b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php
@@ -254,22 +254,16 @@ EOSQL;
return $dvs;
}
- public function existsDienstverhaeltnis($mitarbeiter_uid, $start, $ende = null, $vertragsart_kurzbz = null)
+ public function existsDienstverhaeltnis($mitarbeiter_uid, $start, $ende, $vertragsart_kurzbz)
{
$this->addOrder('von', 'DESC');
$this->db->where('mitarbeiter_uid', $mitarbeiter_uid);
- if (!is_null($vertragsart_kurzbz))
- $this->db->where('vertragsart_kurzbz', $this->escape($vertragsart_kurzbz));
-
+ $this->db->where('vertragsart_kurzbz', $vertragsart_kurzbz);
$this->db->where('von <=', $ende);
-
- if (!is_null($ende))
- {
- $this->db->group_start();
- $this->db->where('bis >=', $start);
- $this->db->or_where('bis IS NULL', null, false);
- $this->db->group_end();
- }
+ $this->db->group_start();
+ $this->db->where('bis >=', $start);
+ $this->db->or_where('bis IS NULL', null, false);
+ $this->db->group_end();
$this->addLimit(1);
return $this->load();
diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php
index 83961dd91..c632b079f 100644
--- a/application/views/system/infocenter/stammdaten.php
+++ b/application/views/system/infocenter/stammdaten.php
@@ -106,6 +106,7 @@
kontakte as $kontakt): ?>
kontakttyp === 'email'): ?>
@@ -119,14 +120,16 @@
kontakttyp.'" data-id="'. $kontakt->kontakt_id .'" data-value="' . $kontakt->kontakt .'">';?>
kontakttyp === 'email'): ?>
- kontakt;
+ kontakt; ?>
+ kontakttyp === 'email_unverifiziert'): ?>
+ kontakt;
endif;
echo $kontakt->kontakt;
- if ($kontakt->kontakttyp === 'email'):
+ if ($kontakt->kontakttyp === 'email'):
?>
-
- '?>
+
+ '?>
| anmerkung; ?> |
@@ -140,9 +143,9 @@
strasse ?>
-
+
plz ?>
-
+
ort ?>
nationkurztext)): ?>
@@ -182,7 +185,8 @@
zugangscode)): ?>
diff --git a/public/css/tags.css b/public/css/tags.css
index 8cf306626..9e0d7ee4b 100644
--- a/public/css/tags.css
+++ b/public/css/tags.css
@@ -95,6 +95,12 @@
.modificationdate {
font-style: italic;
- font-size: 0.7em;
+ font-size: 1em;
text-align: left;
}
+
+
+.copy-btn {
+ float: right;
+ margin-top: 3px;
+}
\ No newline at end of file
diff --git a/public/js/api/lehrveranstaltung/gruppe.js b/public/js/api/lehrveranstaltung/gruppe.js
index e22fdd847..44340bec7 100644
--- a/public/js/api/lehrveranstaltung/gruppe.js
+++ b/public/js/api/lehrveranstaltung/gruppe.js
@@ -37,20 +37,20 @@ export default {
/*------------- details -------- */
- getAll()
+ getBenutzerSearch(query)
{
return {
method: 'get',
- url: '/api/frontend/v1/lv/gruppe/getAll/'
+ url: `/api/frontend/v1/lv/gruppe/getBenutzerSearch?query=${encodeURIComponent(query)}`
};
},
- getBenutzer()
+ getAllSearch(query)
{
return {
method: 'get',
- url: '/api/frontend/v1/lv/gruppe/getBenutzer/'
+ url: `/api/frontend/v1/lv/gruppe/getAllSearch?query=${encodeURIComponent(query)}`
};
- }
+ },
}
diff --git a/public/js/api/lehrveranstaltung/lektor.js b/public/js/api/lehrveranstaltung/lektor.js
index e8c2fb673..76a8c59a4 100644
--- a/public/js/api/lehrveranstaltung/lektor.js
+++ b/public/js/api/lehrveranstaltung/lektor.js
@@ -8,12 +8,11 @@ export default {
};
},
-
- getLektoren()
+ getLektorenSearch(query)
{
return {
method: 'get',
- url: '/api/frontend/v1/lv/lektor/getLektoren/'
+ url: `/api/frontend/v1/lv/lektor/getLektorenSearch?query=${encodeURIComponent(query)}`
};
},
diff --git a/public/js/components/Calendar/Base/Grid.js b/public/js/components/Calendar/Base/Grid.js
index c232dd955..3418a9151 100644
--- a/public/js/components/Calendar/Base/Grid.js
+++ b/public/js/components/Calendar/Base/Grid.js
@@ -316,7 +316,7 @@ export default {
template: /* html */`
{
+ const query = event.query.trim();
+ if (!query)
+ {
+ this.filteredUsers = [];
+ return;
+ }
- const fullName = `${user.vorname.toLowerCase()} ${user.nachname.toLowerCase()}`;
- const reverseFullName = `${user.nachname.toLowerCase()} ${user.vorname.toLowerCase()}`;
- return fullName.includes(query) || reverseFullName.includes(query) || user.uid.toLowerCase().includes(query) || user.studiengang.toLowerCase().includes(query);
- }).map(user => ({
- label: user.studiengang
- ? `${user.nachname} ${user.vorname} ${user.uid} ${user.studiengang} ${user.semester}`
- : `${user.nachname} ${user.vorname} ${user.uid}`,
- uid: user.uid
- }));
+ if (query.length < 2)
+ {
+ return;
+ }
+
+ if (this.abortController)
+ {
+ this.abortController.abort();
+ }
+
+ this.abortController = new AbortController();
+ const signal = this.abortController.signal;
+
+ this.$api.call(ApiGruppe.getBenutzerSearch(query), { signal })
+ .then(result => {
+ this.filteredUsers = result.data.map(user => ({
+ label: user.studiengang
+ ? `${user.nachname} ${user.vorname} ${user.uid} ${user.studiengang} ${user.semester}`
+ : `${user.nachname} ${user.vorname} ${user.uid}`,
+ uid: user.uid
+ })
+ )})
+ .catch(this.$fhcAlert.handleSystemError)
},
addUser()
{
@@ -132,19 +149,15 @@ export default{
table-only
:side-menu="false"
:reload=true
- :new-btn-label="$p.t('lehre', 'assignPerson')"
- new-btn-show
- @click:new="showAutocomplete = !showAutocomplete"
>
diff --git a/public/js/components/LVVerwaltung/Details/Form.js b/public/js/components/LVVerwaltung/Details/Form.js
index 5908512d7..d8299e4fa 100644
--- a/public/js/components/LVVerwaltung/Details/Form.js
+++ b/public/js/components/LVVerwaltung/Details/Form.js
@@ -26,16 +26,6 @@ export default {
default: true
}
},
- computed: {
- formattedAnmerkung: {
- get() {
- return (this.data.anmerkung || '').replace(/\\n/g, '\n');
- },
- set(value) {
- this.data.anmerkung = (value || '').replace(/\n/g, '\\n');
- }
- }
- },
template: `
@@ -74,7 +64,7 @@ export default {
:label="$p.t('lehre', 'detailanmerkung')"
type="textarea"
container-class="col-3"
- v-model="formattedAnmerkung"
+ v-model="data.anmerkung"
name="anmerkung"
id="anmerkung"
rows="10"
diff --git a/public/js/components/LVVerwaltung/Details/Gruppen.js b/public/js/components/LVVerwaltung/Details/Gruppen.js
index a6f9df005..024bf6468 100644
--- a/public/js/components/LVVerwaltung/Details/Gruppen.js
+++ b/public/js/components/LVVerwaltung/Details/Gruppen.js
@@ -88,9 +88,9 @@ export default{
data() {
return{
tabulatorEvents: [],
- showAutocomplete: false,
filteredGroups: [],
- selectedGroup: null
+ selectedGroup: null,
+ abortController: null
}
},
watch: {
@@ -99,19 +99,42 @@ export default{
}
},
methods:{
- searchGroup(event)
+
+ async searchGroup(event)
{
- const query = event.query.toLowerCase().trim();
- this.filteredGroups = this.dropdowns.gruppen_array.filter(gruppe => {
- return gruppe.gruppe_kurzbz.toLowerCase().includes(query) || gruppe?.bezeichnung?.toLowerCase().includes(query);
- }).map(gruppe => ({
- label: gruppe.bezeichnung
- ? `${gruppe.gruppe_kurzbz.trim()} (${gruppe.bezeichnung})`
- : gruppe.gruppe_kurzbz.trim(),
- gid: gruppe.gid,
- gruppe_kurzbz: gruppe.gruppe_kurzbz.trim(),
- lehrverband: gruppe.lehrverband,
- }));
+ const query = event.query.trim();
+
+ if (!query)
+ {
+ this.filteredLektor = [];
+ return;
+ }
+
+ if (query.length < 2)
+ {
+ return;
+ }
+
+ if (this.abortController)
+ {
+ this.abortController.abort();
+ }
+
+ this.abortController = new AbortController();
+ const signal = this.abortController.signal;
+
+ this.$api.call(ApiGruppe.getAllSearch(query), { signal })
+ .then(result => {
+ this.filteredGroups = result.data.map(gruppe => ({
+ label: gruppe.bezeichnung
+ ? `${gruppe.gruppe_kurzbz.trim()} (${gruppe.bezeichnung})`
+ : gruppe.gruppe_kurzbz.trim(),
+ gid: gruppe.gid,
+ gruppe_kurzbz: gruppe.gruppe_kurzbz.trim(),
+ lehrverband: gruppe.lehrverband,
+ })
+ )})
+ .catch(this.$fhcAlert.handleSystemError)
},
reload() {
this.$refs.table.reloadTable();
@@ -173,13 +196,9 @@ export default{
table-only
:side-menu="false"
:reload=true
- :new-btn-label="$p.t('lehre', 'addGroup')"
- new-btn-show
- @click:new="showAutocomplete = !showAutocomplete"
>
{
- this.dropdowns.lektor_array = result.data;
- })
- .catch(this.$fhcAlert.handleSystemError);
-
- this.$api.call(ApiGruppe.getAll())
- .then(result => {
- this.dropdowns.gruppen_array = result.data;
- })
- .catch(this.$fhcAlert.handleSystemError);
-
- this.$api.call(ApiGruppe.getBenutzer())
- .then(result => {
- this.dropdowns.benutzer_array = result.data;
- })
- .catch(this.$fhcAlert.handleSystemError);
},
template: /* html */`
@@ -307,12 +293,25 @@ export default {
:filter="filter"
>
-
diff --git a/public/js/components/LVVerwaltung/Lektor/Daten.js b/public/js/components/LVVerwaltung/Lektor/Daten.js
index a9c7e53be..21e5dc196 100644
--- a/public/js/components/LVVerwaltung/Lektor/Daten.js
+++ b/public/js/components/LVVerwaltung/Lektor/Daten.js
@@ -31,6 +31,8 @@ export default{
changed: {},
internal_mitarbeiter_uid: null,
filteredLektor: [],
+ abortController: null,
+ selectedLektorLabel: ''
}
},
computed: {
@@ -63,7 +65,10 @@ export default{
this.internal_mitarbeiter_uid = newVal;
if (newVal === null)
+ {
this.data = null;
+ this.selectedLektorLabel = '';
+ }
else if (newVal !== undefined && this.lehreinheit_id !== undefined)
this.getLektorData();
}
@@ -99,10 +104,15 @@ export default{
return this.$api.call(ApiLektor.getLektorDaten(this.lehreinheit_id, this.internal_mitarbeiter_uid))
.then(result => {
this.data = result.data;
+ this.selectedLektorLabel = `${this.data.nachname} ${this.data.vorname} (${this.data.mitarbeiter_uid})`,
this.original = { ...this.data };
})
.catch(this.$fhcAlert.handleSystemError);
},
+ onLektorSelected(selectedLektor)
+ {
+ this.data.mitarbeiter_uid = selectedLektor.value.uid;
+ },
updateDaten()
{
if (!this.changedLength)
@@ -139,17 +149,37 @@ export default{
})
.catch(this.$fhcAlert.handleSystemError);
},
- searchLektor(event)
+ async searchLektor(event)
{
- const query = event.query.toLowerCase().trim();
- this.filteredLektor = this.dropdowns.lektor_array.filter(lektor => {
- const fullName = `${lektor.vorname.toLowerCase()} ${lektor.nachname.toLowerCase()}`;
- const reverseFullName = `${lektor.nachname.toLowerCase()} ${lektor.vorname.toLowerCase()}`;
- return fullName.includes(query) || reverseFullName.includes(query) || lektor.uid.toLowerCase().includes(query);
- }).map(lektor => ({
- label: `${lektor.nachname} ${lektor.vorname} (${lektor.uid})`,
- uid: lektor.uid
- }));
+ const query = event.query.trim();
+
+ if (!query)
+ {
+ this.filteredLektor = [];
+ return;
+ }
+
+ if (query.length < 2)
+ {
+ return;
+ }
+
+ if (this.abortController)
+ {
+ this.abortController.abort();
+ }
+
+ this.abortController = new AbortController();
+ const signal = this.abortController.signal;
+
+ this.$api.call(ApiLektor.getLektorenSearch(query), { signal })
+ .then(result => {
+ this.filteredLektor = result.data.map(lektor => ({
+ label: `${lektor.nachname} ${lektor.vorname} (${lektor.uid})`,
+ uid: lektor.uid
+ })
+ )})
+ .catch(this.$fhcAlert.handleSystemError)
},
},
@@ -187,11 +217,12 @@ export default{
:disabled="data.vertrag_id !== null"
:suggestions="filteredLektor"
placeholder="Mitarbeiter hinzufügen"
- v-model="data.mitarbeiter_uid"
+ v-model="selectedLektorLabel"
field="label"
container-class="col-3"
dropdown
@complete="searchLektor"
+ @item-select="onLektorSelected"
name="lektorautocomplete"
>
@@ -231,7 +262,6 @@ export default{
-
-
-
-
+
+ {{ $p.t('lehre', 'gesamtkosten') }}:
+
+ {{ berechneteGesamtkosten }} €
+
-
diff --git a/public/js/components/LVVerwaltung/Lektor/Table.js b/public/js/components/LVVerwaltung/Lektor/Table.js
index 4e568f9db..85c39c25a 100644
--- a/public/js/components/LVVerwaltung/Lektor/Table.js
+++ b/public/js/components/LVVerwaltung/Lektor/Table.js
@@ -3,7 +3,6 @@ import FormForm from '../../Form/Form.js';
import FormInput from '../../Form/Input.js';
import ApiLektor from "../../../api/lehrveranstaltung/lektor.js";
-
export default{
name: "LVLektorTable",
components: {
@@ -34,9 +33,9 @@ export default{
handler: this.lektorSelected
}
],
- showAutocomplete: false,
filteredLektor: [],
- selectedLektor: ''
+ selectedLektor: '',
+ abortController: null
}
},
computed: {
@@ -163,17 +162,37 @@ export default{
})
},
- searchLektor(event)
+ async searchLektor(event)
{
- const query = event.query.toLowerCase().trim();
- this.filteredLektor = this.dropdowns.lektor_array.filter(lektor => {
- const fullName = `${lektor.vorname.toLowerCase()} ${lektor.nachname.toLowerCase()}`;
- const reverseFullName = `${lektor.nachname.toLowerCase()} ${lektor.vorname.toLowerCase()}`;
- return fullName.includes(query) || reverseFullName.includes(query) || lektor.uid.toLowerCase().includes(query);
- }).map(lektor => ({
- label: `${lektor.nachname} ${lektor.vorname} (${lektor.uid})`,
- uid: lektor.uid
- }));
+ const query = event.query.trim();
+
+ if (!query)
+ {
+ this.filteredLektor = [];
+ return;
+ }
+
+ if (query.length < 2)
+ {
+ return;
+ }
+
+ if (this.abortController)
+ {
+ this.abortController.abort();
+ }
+
+ this.abortController = new AbortController();
+ const signal = this.abortController.signal;
+
+ this.$api.call(ApiLektor.getLektorenSearch(query), { signal })
+ .then(result => {
+ this.filteredLektor = result.data.map(lektor => ({
+ label: `${lektor.nachname} ${lektor.vorname} (${lektor.uid})`,
+ uid: lektor.uid
+ })
+ )})
+ .catch(this.$fhcAlert.handleSystemError)
},
addLektor()
{
@@ -199,13 +218,9 @@ export default{
table-only
:side-menu="false"
reload
- :new-btn-label="$p.t('lehre', 'addLektor')"
- new-btn-show
- @click:new="showAutocomplete = !showAutocomplete"
>