Compare commits

..

91 Commits

Author SHA1 Message Date
ma0068 df2f142f37 add toasts if no taken selections for Notenspiegel, LVplanung and Studienverlauf 2026-06-18 11:45:01 +02:00
Harald Bamberger d3d04c5a77 Merge branch 'master' into studvw_2026_05_rc 2026-06-17 14:44:25 +02:00
Harald Bamberger 0687ef72ce Merge branch 'bug-77051/StudVw_Spezialgruppen_Studenten_ohne_Verbandszuweisung_werden_weggefiltert' 2026-06-17 09:40:23 +02:00
Harald Bamberger 9180b9bd63 Merge branch 'master' into bug-77051/StudVw_Spezialgruppen_Studenten_ohne_Verbandszuweisung_werden_weggefiltert 2026-06-16 13:11:40 +02:00
Andreas Österreicher 168fb00023 Merge branch 'feature-40852/MasterLehrgaenge_BeruflicheKompetenzen' 2026-06-15 09:18:17 +02:00
chfhtw f5d81e4a93 move prepareQuery (and addSelectPrioRel) into a library and make joins more flexible & change JOIN to LEFT JOIN for tbl_studentlehrverband (the actual bugfix) & change order of JOIN tbl_benutzergruppe in fetchStudents to speed up query 2026-06-12 09:53:59 +02:00
Andreas Österreicher b0f3fa0c46 Berufliche Qualifikation umbenannt 2026-06-12 09:41:34 +02:00
Andreas Österreicher 6d89e95afa Merge branch 'master' into feature-40852/MasterLehrgaenge_BeruflicheKompetenzen 2026-06-12 08:53:44 +02:00
Andreas Österreicher 2f90112e4d Merge branch 'rc_reihungstest' 2026-06-01 10:58:33 +02:00
Andreas Österreicher 774eb90bcc Merge branch 'feature-76918/reihungstest_gebiete_nur_von_abegschickten_studiengaengen' into rc_reihungstest 2026-06-01 09:46:12 +02:00
Andreas Österreicher 1def930147 Merge branch 'feature-76920/reihungstest_fertig_nachricht_anzeigen_wenn_alle_gebiete_abgeschlossen_wurden' into rc_reihungstest 2026-06-01 09:11:02 +02:00
Andreas Österreicher 30b8a406a5 Merge branch 'feature-75888/reihungstest_mehrfachdurchfuehrung' into rc_reihungstest 2026-06-01 09:10:35 +02:00
Andreas Österreicher 093842274e Merge branch 'feature-75887/reihungstest_constructor_popups' into rc_reihungstest 2026-06-01 09:05:22 +02:00
ma0048 fd2f4187fa wording angepasst 2026-05-27 12:34:04 +02:00
ma0048 b2bebb7fa3 alle gebiete wurden gestartet meldung 2026-05-26 13:32:21 +02:00
ma0048 e32cce57fe gebiete nur von abgeschickten stg 2026-05-26 13:26:16 +02:00
ma0068 f6f58642f5 update second occurence of id STORAGE_KEY 2026-05-26 10:57:26 +02:00
Harald Bamberger 1561aa55b7 correct model path 2026-05-26 09:37:49 +02:00
Harald Bamberger bb366e4117 font color black on tag limette 2026-05-26 09:06:44 +02:00
Harald Bamberger 0962e62e69 Merge branch 'feature-76202/HorizontalSplit_from_master' into studvw_2026_05_rc 2026-05-19 17:28:08 +02:00
Harald Bamberger dcd6cfd74b increase width of horizontal split 2026-05-19 17:26:46 +02:00
Harald Bamberger baaf941f25 Merge branch 'feature-75958/StudVW_DatenExport_wie_im_Fas' into studvw_2026_05_rc 2026-05-19 17:12:11 +02:00
Harald Bamberger 2e5e7afb4d slot end tag 2026-05-19 17:11:51 +02:00
Harald Bamberger 178638c006 Merge branch 'feature-75958/StudVW_DatenExport_wie_im_Fas' into studvw_2026_05_rc 2026-05-19 16:51:57 +02:00
Harald Bamberger 981c97173e add padding to export icon link 2026-05-19 16:51:24 +02:00
ma0068 d4e170037b add order Nachname, Vorname 2026-05-18 10:11:17 +02:00
ma0068 7aba7aefb9 add order mitarbeiter_uid 2026-05-15 11:05:12 +02:00
ma0068 e5ae400686 Tab Abschlusspruefung: use searchPersons instead of Mitarbeiter and refactor Label for dropdown 2026-05-13 17:38:39 +02:00
Harald Bamberger cb7a0f7669 Merge branch 'feature-70376/Lohnguide' 2026-05-13 11:53:14 +02:00
Harald Bamberger 68d97a5e97 handle case where old value or new value and not both are null explicitly in markDirty Method 2026-05-13 11:42:25 +02:00
Harald Bamberger d27071528f revert change to comparision in markDirty Method 2026-05-13 11:16:18 +02:00
Harald Bamberger 17772c3738 Merge branch 'master' into feature-70376/Lohnguide 2026-05-13 11:15:07 +02:00
Harald Bamberger 8ce67a4726 Merge branch 'master' into studvw_2026_05_rc 2026-05-06 17:35:05 +02:00
Harald Bamberger bcfdf1e05c Merge branch 'feature-75838/UXImproveProjektarbeitSTVSprint247' into studvw_2026_05_rc 2026-05-06 17:33:33 +02:00
Harald Bamberger cb744799bd Merge branch 'feature-71776/StudVW_Abschlusspruefung_DropdownsPrueferAndMultiActionNewPruefung' into studvw_2026_05_rc 2026-05-06 17:27:26 +02:00
Harald Bamberger 90ebee25fe Merge branch 'feature-71775/StudVW_ChangeSem_Behaviour' into studvw_2026_05_rc 2026-05-06 16:28:44 +02:00
Harald Bamberger bbb4f8a01c Merge branch 'bug-76146/studvw_karteireiter_dokumente_akzeptiert_eintraege_ohne_vorhandenes_dokument' 2026-05-06 16:13:50 +02:00
Harald Bamberger 3e8ed231a6 Merge branch 'feature-71392/StudVW_Einstiegssemester_bei_Interessenten_anzeigen' into studvw_2026_05_rc 2026-05-06 16:03:37 +02:00
Harald Bamberger 4c67b9d267 Merge branch 'feature-76202/HorizontalSplit_from_master' into studvw_2026_05_rc 2026-05-06 15:56:14 +02:00
Johann Hoffmann c16cf342cb horizontalsplit component analog to verticalsplit; also built it into Studentenverwaltung.js menu; added defaultRatio prop to both components which defaults to 50/50 seperation 2026-05-06 15:54:49 +02:00
Harald Bamberger d843f05922 Merge branch 'feature-76201/StudVWTabsBeibehalten' into studvw_2026_05_rc 2026-05-06 15:42:29 +02:00
Harald Bamberger 44e9b4dff1 Merge branch 'feature-76145/StudVW_Studienverlauf_in_AppMenu' into studvw_2026_05_rc 2026-05-06 15:41:41 +02:00
Harald Bamberger bda42ab347 Merge branch 'feature-75958/StudVW_DatenExport_wie_im_Fas' into studvw_2026_05_rc 2026-05-06 15:06:51 +02:00
Harald Bamberger b5b69878b8 Merge branch 'feature-75901/StudVW_AppMenue_neueVerlinkungen' into studvw_2026_05_rc 2026-05-06 14:40:17 +02:00
Harald Bamberger 6f17ddbbdf Merge branch 'feature-63428/Infomail_Foto' into studvw_2026_05_rc 2026-05-06 14:35:45 +02:00
ma0048 bf5ab6b7dd nur prestudent mit dem bewerber status beruecksichtigen 2026-05-05 15:19:57 +02:00
Harald Bamberger b7e48633ab Merge branch 'master' into bug-76146/studvw_karteireiter_dokumente_akzeptiert_eintraege_ohne_vorhandenes_dokument 2026-05-05 13:33:38 +02:00
Werner Masik 7f13c128f1 allow null value for vordienstzeit; changed comparison in markDirty to !== (because of 0 vs. null issue) 2026-05-04 20:35:51 +02:00
Werner Masik 58a921b500 changed lohnguide kommentar data type to text 2026-04-30 09:47:12 +02:00
ma0068 21ea277aaf use checks for param studiengang_kurzbz instead of deleting it 2026-04-24 09:20:37 +02:00
ma0068 2c0badf67c bugfix error undefined offset: deletion of unused variable studiengang_kz 2026-04-23 17:28:43 +02:00
ma0068 903f3b99b3 add Studienverlauf to AppMenue 2026-04-20 11:36:54 +02:00
ma0068 df9edc36e0 save temporary 2026-04-20 08:40:55 +02:00
ma0048 13e8a1a9f6 bug fixed + infocenter performance 2026-04-16 14:21:02 +02:00
ma0048 21d80905a2 akzeptierte dokumente anzeigen, auch wenn kein dokument vorhanden ist 2026-04-13 13:04:46 +02:00
Johann Hoffmann 3aebccbb9d track activeTab in StudVW Details.js and pass it to :default property of fhcTabs instances to attempt to set the last active tab to current, else use the old default tab of route.params.tab 2026-04-10 13:01:13 +02:00
Harald Bamberger 0621564be7 Merge branch 'master' into feature-71775/StudVW_ChangeSem_Behaviour 2026-03-19 15:57:13 +01:00
ma0068 f1714db09e add ExcelExport of FAS to StudentList, add slot additional to Filtercomponent 2026-03-19 15:00:51 +01:00
Johann Hoffmann aba4bc2909 merge projektarbeit details & betreuer form and handle several UX changes regarding formData of both 2026-03-19 11:12:14 +01:00
ma0068 70b025da30 add Link Reihungstestverwaltung to AppMenu 2026-03-17 14:59:05 +01:00
ma0068 87dd858358 add entry StudVw to navigation CI Menue 2026-03-17 14:58:39 +01:00
ma0068 51f3edcd72 delete not needed parameter orgform for html version lv planung 2026-03-17 12:57:55 +01:00
ma0068 e7f626bd72 add Lv-Planung to app menue 2026-03-17 12:49:40 +01:00
ma0068 17f94aabdf add loading skeletons for mitarbeiterHeader 2026-03-16 17:16:40 +01:00
ma0068 c49e32c4ac use skeletons for all data in studentHeader 2026-03-16 11:26:23 +01:00
ma0048 36beb927f1 rt login zusaetzlicher check, ob die anmeldung mit dem prestudent studienplan uebereinstimmt 2026-03-16 09:51:08 +01:00
ma0048 ee41b2b68d alert und confirm auf dialog umgebaut 2026-03-16 09:40:40 +01:00
ma0068 df124db84a use primeVue Skeleton while loading Data for Semester, Verband and Gruppe 2026-03-13 12:40:29 +01:00
ma0068 29a4b4aadc use permission PERM_LOGGED for header, add condition one empty space for showing verband 2026-03-13 09:11:00 +01:00
ma0068 2682ea75ab use only one endpoint for detailheader 2026-03-12 16:58:48 +01:00
ma0068 b3a63a60e9 update phrase noTextInSem 2026-03-12 16:02:44 +01:00
Harald Bamberger a54dfaf0c7 Merge branch 'master' into feature-71775/StudVW_ChangeSem_Behaviour 2026-03-12 15:20:53 +01:00
Harald Bamberger 595538d6bb Merge branch 'master' into feature-71775/StudVW_ChangeSem_Behaviour 2026-03-12 15:10:06 +01:00
Harald Bamberger a5329e5bba Merge branch 'master' into feature-71775/StudVW_ChangeSem_Behaviour 2026-03-12 15:03:56 +01:00
Harald Bamberger 37a79c4589 Merge branch 'master' into feature-71775/StudVW_ChangeSem_Behaviour 2026-03-12 15:03:28 +01:00
Harald Bamberger dd760f8210 finetune behavior 2026-03-12 11:10:13 +01:00
ma0068 dd87e893ba working version for relaod header and data without updateUrl 2026-03-11 17:13:59 +01:00
ma0068 127ce312ea reload Details and Detailheader without updateUrl 2026-03-10 08:28:11 +01:00
ma0068 2237e9f1b7 refactor detail Header, relaod array if semester changed, show no status if no status, phrase 2026-03-09 11:42:24 +01:00
ma0068 9b4fa132dc add status 2026-03-06 10:58:54 +01:00
Harald Bamberger daf332a102 add query_studiensemester_kurzbz to result of fetchStudents, fetchPrestudents and search 2026-03-06 10:39:37 +01:00
ma0068 c127c0900e refactor dropdown for pruefer, add localStorage for formVariables, add multiactions for adding new finalexam 2026-02-25 14:28:41 +01:00
ma0068 fc01fa045e add and use variable semester_berechnet for using ausbildungssemester in status interessent 2026-02-23 13:44:33 +01:00
ma0068 c56d323cd3 build sum ects_berufliche_kompetenzen after sql 2026-01-13 09:15:30 +01:00
ma0068 ac4cdb44de Merge branch 'master' into feature-40852/MasterLehrgaenge_BeruflicheKompetenzen 2026-01-12 11:05:26 +01:00
Harald Bamberger f57dc6785b Merge branch 'master' into feature-63428/Infomail_Foto 2025-09-30 13:47:04 +02:00
ma0068 97126553f0 get sum of ects for berufliche Kompetenzen dynamically 2025-09-24 11:33:16 +02:00
Andreas Österreicher da03e11071 Merge branch 'master' into feature-40852/MasterLehrgaenge_BeruflicheKompetenzen 2025-09-12 13:34:44 +02:00
ma0068 cf59bcff12 add Functionality sendInfomail
- expand InputComponent for dynamic adding of actionButton to Form Upload Image
- add Phrases for Infomail
2025-08-19 09:16:26 +02:00
ma0068 738c819272 remove comments 2024-08-30 13:32:00 +02:00
ma0068 ed39127f31 add tags for berufliche Kompetenzen 2024-08-13 16:00:03 +02:00
59 changed files with 2057 additions and 2297 deletions
+7 -9
View File
@@ -119,15 +119,6 @@ $config['navigation_header'] = array(
'requiredPermissions' => array(
'lehre/zgvpruefung:r'
)
),
'ferien' => array(
'link' => site_url('lehre/Ferienverwaltung'),
'description' => 'Ferienverwaltung',
'expand' => true,
'sort' => 55,
'requiredPermissions' => array(
'basis/ferien:r'
)
)
)
),
@@ -179,6 +170,13 @@ $config['navigation_header'] = array(
'expand' => true,
'sort' => 51,
'requiredPermissions' => 'vertrag/mitarbeiter:r'
),
'studierendenverwaltung' => array(
'link' => site_url('studentenverwaltung'),
'description' => 'Studierendenverwaltung',
'expand' => true,
'sort' => 52,
'requiredPermissions' => ['admin:r', 'assistenz:r']
)
)
),
@@ -9,9 +9,10 @@ class Detailheader extends FHCAPI_Controller
public function __construct()
{
parent::__construct([
'getHeader' => ['vertrag/mitarbeiter:r'],
'getPersonAbteilung' => ['vertrag/mitarbeiter:r'],
'getLeitungOrg' => ['vertrag/mitarbeiter:r'],
'getHeader' => self::PERM_LOGGED,
'getPersonAbteilung' => self::PERM_LOGGED,
'getLeitungOrg' => self::PERM_LOGGED,
'getSemesterStati' => self::PERM_LOGGED,
]);
}
@@ -48,6 +49,17 @@ class Detailheader extends FHCAPI_Controller
$this->terminateWithSuccess(current($data));
}
public function getSemesterStati($prestudent_id)
{
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$result = $this->PrestudentstatusModel->getAllPrestudentstatiWithStudiensemester($prestudent_id);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
}
@@ -1,371 +0,0 @@
<?php
/**
* Copyright (C) 2024 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (!defined('BASEPATH')) exit('No direct script access allowed');
//use CI3_Events as Events;
/**
* This controller operates between (interface) the JS (GUI) and the back-end
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
*/
class Ferien extends FHCAPI_Controller
{
const DEFAULT_BERECHTIGUNG = 'basis/ferien';
/**
* Calls the parent's constructor and prepares libraries and phrases
*/
public function __construct()
{
parent::__construct([
'getFerien' => self::DEFAULT_BERECHTIGUNG.':r',
'getDefaultVonBis' => self::DEFAULT_BERECHTIGUNG.':r',
'getOe' => self::DEFAULT_BERECHTIGUNG.':r',
'getStudienplaene' => self::DEFAULT_BERECHTIGUNG.':r',
'getFerientypen' => self::DEFAULT_BERECHTIGUNG.':r',
'insert' => self::DEFAULT_BERECHTIGUNG.':w',
'update' => self::DEFAULT_BERECHTIGUNG.':w',
'delete' => self::DEFAULT_BERECHTIGUNG.':w'
]);
// Load models
$this->load->model('organisation/Ferien_model', 'FerienModel');
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$this->load->library('PermissionLib');
// Load language phrases
$this->loadPhrases([
'ui'
]);
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Get Ferien
*/
public function getFerien()
{
$filterVonDatum = $this->input->get('filterVonDatum');
$filterBisDatum = $this->input->get('filterBisDatum');
if (isset($filterVonDatum) && !is_valid_date($filterVonDatum))
return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL);
if (isset($filterBisDatum) && !is_valid_date($filterBisDatum))
return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL);
$this->FerienModel->addSelect(
'tbl_ferien.ferien_id, tbl_ferien.bezeichnung, tbl_ferien.vondatum, tbl_ferien.bisdatum,
plan.studienplan_id, oe.oe_kurzbz, fetyp.ferientyp_kurzbz, oe.bezeichnung AS oe_bezeichnung,
plan.studienplan_id, plan.bezeichnung AS studienplan_bezeichnung, fetyp.mitarbeiter AS mitarbeiterrelevant,
fetyp.studierende AS studierendenrelevant, fetyp.lehre'
);
$this->FerienModel->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
$this->FerienModel->addJoin('lehre.tbl_studienplan plan', 'studienplan_id', 'LEFT');
$this->FerienModel->addJoin('public.tbl_organisationseinheit oe', 'tbl_ferien.oe_kurzbz = oe.oe_kurzbz', 'LEFT');
$this->FerienModel->addJoin('lehre.tbl_ferientyp fetyp', 'ferientyp_kurzbz', 'LEFT');
if (isset($filterVonDatum))
$this->FerienModel->db->where('tbl_ferien.bisdatum >=', $filterVonDatum);
if (isset($filterBisDatum))
$this->FerienModel->db->where('tbl_ferien.vondatum <=', $filterBisDatum);
$this->FerienModel->addOrder('vondatum', 'DESC');
$result = $this->FerienModel->load();
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
/**
* Gets default dates (from - to) for filtering Ferien.
*/
public function getDefaultVonBis()
{
$defaultVonBis = ['defaultVon' => null, 'defaultBis' => null];
// get current Studienjahr
$this->load->model('organisation/Studienjahr_model', 'StudienjahrModel');
$result = $this->StudienjahrModel->getAktOrNextStudienjahr(62);
if (isError($result)) return $this->terminateWithError(getError($result));
if (hasData($result))
{
$studienjahr = getData($result)[0];
$defaultVonBis['defaultVon'] = $studienjahr->beginn;
$defaultVonBis['defaultBis'] = $studienjahr->ende;
}
$this->terminateWithSuccess($defaultVonBis);
}
/**
* Get list of Organisationseinheiten
*/
public function getOe()
{
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
//$this->StudiengangModel->addSelect(' tbl_studiengang.*, UPPER(typ::varchar(1) || kurzbz) AS kuerzel');
$this->OrganisationseinheitModel->addOrder('organisationseinheittyp_kurzbz, oe_kurzbz');
$result = $this->OrganisationseinheitModel->loadWhere(['aktiv' => true]);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
/**
* Get list of Studienplaene.
* Studienplaene are returned by Organisationseinheit, von and bis datum.
*/
public function getStudienplaene()
{
// check input
$oe_kurzbz = $this->input->get('oe_kurzbz');
$vondatum = $this->input->get('vondatum');
$bisdatum = $this->input->get('bisdatum');
if (!isset($oe_kurzbz) || isEmptyString($oe_kurzbz))
return $this->terminateWithError($this->p->t('ferien', 'error_missingId', ['id' => 'Organisationseinheit']));
if (isset($vondatum) && !is_valid_date($vondatum))
return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL);
if (isset($bisdatum) && !is_valid_date($bisdatum))
return $this->terminateWithError($this->p->t('ui', 'error_invalid_date'), self::ERROR_TYPE_GENERAL);
// get Studiengang from Oe
$result = $this->StudiengangModel->loadWhere(['oe_kurzbz' => $oe_kurzbz]);
if (isError($result)) return $this->terminateWithError(getError($result));
if (!hasData($result)) return $this->terminateWithSuccess([]);
$studiengangKzArr = array_column(getData($result), 'studiengang_kz');
// load models
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
// get all Studiensemester in requested date range
$result = $this->StudiensemesterModel->getByDateRange($vondatum, $bisdatum);
if (isError($result)) return $this->terminateWithError(getError($result));
if (!hasData($result)) return $this->terminateWithSuccess([]);
$studiensemesterArr = array_column(getData($result), 'studiensemester_kurzbz');
$studienplaene = [];
foreach ($studiengangKzArr as $studiengang_kz)
{
foreach ($studiensemesterArr as $studiensemester_kurzbz)
{
// get studienplaene for each Studiengang and Studiensemester
$this->StudienplanModel->addDistinct("studienplan_id");
$this->StudienplanModel->addSelect("lehre.tbl_studienplan.*");
$this->StudienplanModel->addJoin("lehre.tbl_studienordnung", "studienordnung_id");
$this->StudienplanModel->addJoin("lehre.tbl_studienplan_semester", "studienplan_id");
$whereArray = array(
"tbl_studienplan.aktiv" => "TRUE",
"tbl_studienordnung.studiengang_kz" => $studiengang_kz,
"tbl_studienplan_semester.studiensemester_kurzbz" => $studiensemester_kurzbz
);
$result = $this->StudienplanModel->loadWhere($whereArray);
if (isError($result)) return $this->terminateWithError(getError($result));
if (!hasData($result)) continue;
foreach (getData($result) as $studienplan)
{
$studienplaene[$studienplan->studienplan_id] = $studienplan;
}
}
}
$this->terminateWithSuccess($studienplaene);
}
/**
* Get list of Ferientypen
*/
public function getFerientypen()
{
$this->load->model('organisation/Ferientyp_model', 'FerientypModel');
$this->FerientypModel->addOrder('ferientyp_kurzbz');
$result = $this->FerientypModel->load();
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
/**
* Add Ferien
*/
public function insert()
{
$this->_validate();
$data = $this->_getData();
// check permissions for new Ferien
if (!$this->permissionlib->isBerechtigt(self::DEFAULT_BERECHTIGUNG, 'suid', $data['oe_kurzbz']))
return $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'));
$data = array_merge($data, ['insertamum' => date('c'), 'insertvon' => getAuthUID()]);
$id = $this->getDataOrTerminateWithError($this->FerienModel->insert($data));
$this->terminateWithSuccess(hasData($id) ? getData($id) : null);
}
/**
* Update Ferien
*/
public function update()
{
$id = $this->input->post('ferien_id');
if (!is_numeric($id))
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Ferien Id']), self::ERROR_TYPE_GENERAL);
$this->_validate();
$data = $this->_getData();
// check permissions for existing Ferien
$this->_validateBerechtigung('suid', $id);
// check permissions for new Ferien
if (!$this->permissionlib->isBerechtigt(self::DEFAULT_BERECHTIGUNG, 'suid', $data['oe_kurzbz']))
return $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'));
if (isEmptyArray($data)) return $this->terminateWithSuccess(null);
$data = array_merge($data, ['ferien_id' => $id, 'updateamum' => date('c'), 'updatevon' => getAuthUID()]);
$result = $this->FerienModel->update($id, $data);
if (isError($result)) return $this->terminateWithError(getError($result));
$this->terminateWithSuccess($id);
}
/**
* Delete Ferien
*/
public function delete()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('ferien_id', 'Ferien Id', 'required');
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
$ferien_id = $this->input->post('ferien_id');
$this->_validateBerechtigung('suid', $ferien_id);
$this->FerienModel->addSelect('ferien_id');
$result = $this->FerienModel->load($ferien_id);
if (!hasData($result)) return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['ferien_id' => $ferien_id]));
$result = $this->getDataOrTerminateWithError($this->FerienModel->delete($ferien_id));
$this->terminateWithSuccess();
}
/**
* Validate ferien post input.
*/
private function _validate()
{
$this->load->library('form_validation');
$this->form_validation->set_rules('vondatum', 'Von Datum', 'required|is_valid_date');
$this->form_validation->set_rules('bisdatum', 'Bis Datum', 'required|is_valid_date');
$this->form_validation->set_rules('bezeichnung', 'Bezeichnung', 'required|max_length[128]');
$this->form_validation->set_rules('oe_kurzbz', 'Organisationseinheit', 'max_length[32]');
$this->form_validation->set_rules('studienplan_id', 'Studienplan', 'numeric');
$this->form_validation->set_rules('ferientyp_kurzbz', 'Ferientyp', 'max_length[64]');
if (!$this->form_validation->run())
$this->terminateWithValidationErrors($this->form_validation->error_array());
}
/**
* Checks permission for oe of Ferien. Terminates if unauthorized.
* @param typ permission type suid
* @param ferien_id
* @return void
*/
private function _validateBerechtigung($typ, $ferien_id)
{
if (isset($ferien_id))
{
$this->FerienModel->addSelect('oe_kurzbz');
$result = $this->FerienModel->load($ferien_id);
if (isError($result)) return $this->terminateWithError(getError($result));
if (hasData($result))
{
$ferien = getData($result)[0];
if ($this->permissionlib->isBerechtigt(self::DEFAULT_BERECHTIGUNG, $typ, $ferien->oe_kurzbz)) return;
}
}
return $this->terminateWithError($this->p->t('ui', 'keineBerechtigung'));
}
/**
* Gets Ferien data from post input.
*/
private function _getData()
{
$data = [];
$allowed = [
'vondatum',
'bisdatum',
'bezeichnung',
'oe_kurzbz',
'studienplan_id',
'ferientyp_kurzbz'
];
foreach ($allowed as $field)
{
$data[$field] = $this->input->post($field);
}
return $data;
}
}
@@ -246,12 +246,12 @@ class Abschlusspruefung extends FHCAPI_Controller
{
$searchString = $this->input->get('searchString') ?? '';
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
$this->load->model('person/Person_model', 'PersonModel');
$result = $this->MitarbeiterModel->searchMitarbeiter($searchString, 'ohneMaUid');
$result = $this->PersonModel->searchPerson($searchString, 'mitMaUid');
if (isError($result)) {
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
$this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
}
$this->terminateWithSuccess($result ?: []);
@@ -78,52 +78,32 @@ class Dokumente extends FHCAPI_Controller
$this->terminateWithError($this->p->t('ui', 'errorMissingValue', ['value' => 'Studiengang_kz']), self::ERROR_TYPE_GENERAL);
$resultPreDoc = $this->_getPrestudentDokumente($prestudent_id);
$arrayAccepted = [];
$person_id = $this->_getPersonId($prestudent_id);
$docNames = array_map(function ($item) {
return $item->dokument_kurzbz;
}, $resultPreDoc);
$mergedArray = [];
foreach($docNames as $doc)
foreach ($resultPreDoc as $pre)
{
$result = $this->AkteModel->getAktenFAS($person_id, $doc, $studiengang_kz, $prestudent_id, true);
$result = $this->AkteModel->getAktenFAS($person_id, $pre->dokument_kurzbz, $studiengang_kz, $prestudent_id, true);
if (isError($result))
{
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
}
if (hasData($result))
{
$data = getData($result);
foreach ($data as $value)
foreach (getData($result) as $doc)
{
array_push($arrayAccepted, $value);
$merged = clone $doc;
$merged->docdatum = $pre->docdatum;
$merged->insertvonma = $pre->insertvonma;
$merged->bezeichnung = $pre->bezeichnung;
$mergedArray[] = $merged;
}
}
}
//Mapping with document_kurzbz
$preDocMap = [];
foreach ($resultPreDoc as $pre) {
$preDocMap[$pre->dokument_kurzbz] = $pre;
}
$mergedArray = [];
foreach ($arrayAccepted as $doc) {
$merged = clone $doc;
if (isset($preDocMap[$doc->dokument_kurzbz])) {
$merged->docdatum = $preDocMap[$doc->dokument_kurzbz]->docdatum;
$merged->insertvonma = $preDocMap[$doc->dokument_kurzbz]->insertvonma;
$merged->bezeichnung = $preDocMap[$doc->dokument_kurzbz]->bezeichnung;
} else {
$merged->akzeptiertdatum = null;
$merged->akzeptiertvon = null;
else
{
$mergedArray[] = $pre;
}
$mergedArray[] = $merged;
}
$this->terminateWithSuccess($mergedArray);
@@ -90,6 +90,15 @@ class Projektarbeit extends FHCAPI_Controller
if (!isset($projektarbeit_id) || !is_numeric($projektarbeit_id)) return $this->terminateWithError('Projektarbeit Id missing', self::ERROR_TYPE_GENERAL);
$result = $this->fetchProjektarbeitByID($projektarbeit_id);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess(current($data));
}
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'
@@ -97,13 +106,10 @@ class Projektarbeit extends FHCAPI_Controller
$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');
$result = $this->ProjektarbeitModel->loadWhere(
return $this->ProjektarbeitModel->loadWhere(
array('projektarbeit_id' => $projektarbeit_id)
);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess(current($data));
}
/**
@@ -132,7 +138,8 @@ class Projektarbeit extends FHCAPI_Controller
);
$data = $this->getDataOrTerminateWithError($result);
$data = $this->getDataOrTerminateWithError($this->fetchProjektarbeitById($data));
$this->terminateWithSuccess($data);
}
@@ -144,6 +144,7 @@ class Student extends FHCAPI_Controller
. $this->PrestudentModel->escape($studiensemester_kurzbz)
. ") AS statusofsemester"
);
$this->PrestudentModel->addSelect($this->PrestudentModel->escape($studiensemester_kurzbz) . ' as query_studiensemester_kurzbz');
$this->PrestudentModel->addJoin('public.tbl_student s', 'prestudent_id', 'LEFT');
$this->PrestudentModel->addJoin('public.tbl_benutzer b', 'student_uid = uid', 'LEFT');
@@ -25,9 +25,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
*/
class Students extends FHCAPI_Controller
{
private $allowedStgs = [];
public function __construct()
{
$permissions = [];
@@ -35,16 +32,17 @@ class Students extends FHCAPI_Controller
$permissions[$router->method] = ['admin:r', 'assistenz:r'];
parent::__construct($permissions);
$this->allowedStgs = $this->permissionlib->getSTG_isEntitledFor('admin') ?: [];
$this->allowedStgs = array_merge($this->allowedStgs, $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: []);
$allowedStgs = $this->permissionlib->getSTG_isEntitledFor('admin') ?: [];
$allowedStgs = array_merge($allowedStgs, $this->permissionlib->getSTG_isEntitledFor('assistenz') ?: []);
if (!$this->allowedStgs) {
if (!$allowedStgs) {
$this->_outputAuthError([$router->method => ['admin:r', 'assistenz:r']]);
exit;
}
// Load Libraries
$this->load->library('PhrasesLib');
$this->load->library('stv/StudentListLib', ['allowedStgs' => $allowedStgs]);
$this->loadPhrases(
array(
'lehre'
@@ -111,23 +109,19 @@ class Students extends FHCAPI_Controller
]);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addJoin(
$this->studentlistlib->addJoin(
"(
SELECT prestudent_id
FROM public.tbl_prestudentstatus
WHERE status_kurzbz = 'Incoming'
AND studiensemester_kurzbz = " . $this->PrestudentModel->escape($studiensemester_kurzbz) . "
) test",
"prestudent_id"
"prestudent_id",
"",
"start"
);
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
$this->studentlistlib->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -135,16 +129,13 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->addSelectPrioRel();
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -164,10 +155,7 @@ class Students extends FHCAPI_Controller
]);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addJoin(
$this->studentlistlib->addJoin(
"(
SELECT prestudent_id
FROM bis.tbl_bisio bis
@@ -187,14 +175,12 @@ class Students extends FHCAPI_Controller
) AND stdsem.studiensemester_kurzbz = " . $this->PrestudentModel->escape($studiensemester_kurzbz) . "
GROUP BY prestudent_id
) test",
"prestudent_id"
"prestudent_id",
"",
"start"
);
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
$this->studentlistlib->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -202,16 +188,13 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -231,23 +214,18 @@ class Students extends FHCAPI_Controller
]);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->PrestudentModel->addJoin(
$this->studentlistlib->addJoin(
"(
SELECT prestudent_id
FROM bis.tbl_mobilitaet
WHERE studiensemester_kurzbz = " . $this->PrestudentModel->escape($studiensemester_kurzbz) . "
) bis",
"prestudent_id"
"prestudent_id",
"",
"start"
);
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
$this->studentlistlib->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -255,16 +233,13 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->load();
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -313,8 +288,6 @@ class Students extends FHCAPI_Controller
*/
protected function fetchPrestudents($studiengang_kz, $studiensemester_kurzbz = null, $filter = null, $orgform_kurzbz = null)
{
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$stdsemEsc = $studiensemester_kurzbz ? $this->PrestudentModel->escape($studiensemester_kurzbz) : 'NULL';
$selectRT = "
@@ -331,38 +304,38 @@ class Students extends FHCAPI_Controller
AND r.studiensemester_kurzbz=" . $stdsemEsc;
$where = ['tbl_prestudent.studiengang_kz' => $studiengang_kz];
$this->studentlistlib->addWhere('tbl_prestudent.studiengang_kz', $studiengang_kz);
if ($orgform_kurzbz) {
$where['ps.orgform_kurzbz'] = $orgform_kurzbz;
$this->studentlistlib->addWhere('ps.orgform_kurzbz', $orgform_kurzbz);
}
switch ($filter) {
case "interessenten":
$where['ps.status_kurzbz'] = 'Interessent';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
break;
case "bewerbungnichtabgeschickt":
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bewerbung_abgeschicktamum'] = null;
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bewerbung_abgeschicktamum IS NULL');
break;
case "bewerbungabgeschickt":
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bewerbung_abgeschicktamum IS NOT NULL'] = null;
$where['ps.bestaetigtam'] = null;
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bewerbung_abgeschicktamum IS NOT NULL');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NULL');
break;
case "statusbestaetigt":
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bestaetigtam IS NOT NULL'] = null;
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NOT NULL');
break;
case "statusbestaetigtrtnichtangemeldet":
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bestaetigtam IS NOT NULL'] = null;
$this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NOT NULL');
$this->studentlistlib->addWhere('NOT EXISTS(' . $selectRT . ')', null, false);
break;
case "statusbestaetigtrtangemeldet":
$where['ps.status_kurzbz'] = 'Interessent';
$where['ps.bestaetigtam IS NOT NULL'] = null;
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('ps.bestaetigtam IS NOT NULL');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
break;
case "zgv":
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
@@ -374,69 +347,69 @@ class Students extends FHCAPI_Controller
$this->terminateWithSuccess([]);
$stg = current($stg);
$where['ps.status_kurzbz'] = 'Interessent';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
if ($stg->typ == 'm') {
$where['zgvmas_code IS NOT NULL'] = null;
$this->studentlistlib->addWhere('zgvmas_code IS NOT NULL');
if (defined('ZGV_ERFUELLT_ANZEIGEN') && ZGV_ERFUELLT_ANZEIGEN)
$where['zgvmas_erfuellt'] = true;
$this->studentlistlib->addWhere('zgvmas_erfuellt', true);
} elseif ($stg->typ == 'p') {
$where['zgvdoktor_code IS NOT NULL'] = null;
$this->studentlistlib->addWhere('zgvdoktor_code IS NOT NULL');
if (defined('ZGV_DOKTOR_ANZEIGEN') && ZGV_DOKTOR_ANZEIGEN)
$where['zgvdoktor_erfuellt'] = true;
$this->studentlistlib->addWhere('zgvdoktor_erfuellt', true);
} else {
$where['zgv_code IS NOT NULL'] = null;
$this->studentlistlib->addWhere('zgv_code IS NOT NULL');
if (defined('ZGV_ERFUELLT_ANZEIGEN') && ZGV_ERFUELLT_ANZEIGEN)
$where['zgv_erfuellt'] = true;
$this->studentlistlib->addWhere('zgv_erfuellt', true);
}
break;
case "reihungstestangemeldet":
$where['ps.status_kurzbz'] = 'Interessent';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
break;
case "reihungstestnichtangemeldet":
$where['ps.status_kurzbz'] = 'Interessent';
$this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Interessent');
$this->studentlistlib->addWhere('NOT EXISTS(' . $selectRT . ')', null, false);
break;
case "bewerber":
$where['ps.status_kurzbz'] = 'Bewerber';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
break;
case "bewerberrtnichtangemeldet":
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('NOT EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('NOT EXISTS(' . $selectRT . ')', null, false);
break;
case "bewerberrtangemeldet":
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
break;
case "bewerberrtangemeldetteilgenommen":
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$where['reihungstestangetreten'] = true;
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('reihungstestangetreten', true);
break;
case "bewerberrtangemeldetnichtteilgenommen":
$where['ps.status_kurzbz'] = 'Bewerber';
$this->PrestudentModel->db->where('EXISTS(' . $selectRT . ')', null, false);
$where['reihungstestangetreten'] = false;
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Bewerber');
$this->studentlistlib->addWhere('EXISTS(' . $selectRT . ')', null, false);
$this->studentlistlib->addWhere('reihungstestangetreten', false);
break;
case "aufgenommen":
$where['ps.status_kurzbz'] = 'Aufgenommener';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Aufgenommener');
break;
case "warteliste":
$where['ps.status_kurzbz'] = 'Wartender';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Wartender');
break;
case "absage":
$where['ps.status_kurzbz'] = 'Abgewiesener';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Abgewiesener');
break;
case "incoming":
// NOTE(chris): in FAS it was not filtered for studiengang_kz
$where['ps.status_kurzbz'] = 'Incoming';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Incoming');
break;
case "absolvent":
$where['ps.status_kurzbz'] = 'Absolvent';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Absolvent');
break;
case "diplomand":
$where['ps.status_kurzbz'] = 'Diplomand';
$this->studentlistlib->addWhere('ps.status_kurzbz', 'Diplomand');
break;
default:
if (!$studiensemester_kurzbz) {
@@ -444,9 +417,9 @@ class Students extends FHCAPI_Controller
* show all prestudents in this stg who don't have a status
* $orgform_kurzbz does not change the results since orgform is stored in the status table
*/
$where['ps.status_kurzbz'] = null;
$this->studentlistlib->addWhere('ps.status_kurzbz IS NULL');
} else {
$this->PrestudentModel->db->where_in('ps.status_kurzbz', [
$this->studentlistlib->addWhere('ps.status_kurzbz', [
'Interessent',
'Bewerber',
'Aufgenommener',
@@ -457,21 +430,21 @@ class Students extends FHCAPI_Controller
break;
}
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("
$this->studentlistlib->addSelect("
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
THEN ps.ausbildungssemester::text
ELSE ''::text
END AS semester", false);
$this->PrestudentModel->addSelect("'' AS verband");
$this->PrestudentModel->addSelect("'' AS gruppe");
$this->addSelectPrioRel();
$this->studentlistlib->addSelect("'' AS verband");
$this->studentlistlib->addSelect("'' AS gruppe");
$query_studiensemester_kurzbz = $studiensemester_kurzbz ? $this->PrestudentModel->escape($studiensemester_kurzbz) : '\'NULL\'';
$this->studentlistlib->addSelect($query_studiensemester_kurzbz . ' as query_studiensemester_kurzbz');
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere($where);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -574,7 +547,6 @@ class Students extends FHCAPI_Controller
$gruppe_kurzbz = null,
$orgform_kurzbz = null
) {
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
if (!$this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
@@ -582,34 +554,30 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->prepareQuery($studiensemester_kurzbz, '');
// NOTE(chris): overwrite 'LEFT JOIN' with 'JOIN'
$this->studentlistlib->addJoin("public.tbl_student s", "prestudent_id");
$this->PrestudentModel->addSelect('v.semester');
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
$this->PrestudentModel->addSelect("'' AS priorisierung_relativ");
$where = [];
$this->studentlistlib->addSelect("'' AS priorisierung_relativ");
$this->studentlistlib->addSelect($this->PrestudentModel->escape($studiensemester_kurzbz) . ' as query_studiensemester_kurzbz');
if ($gruppe_kurzbz !== null) {
$this->PrestudentModel->addJoin('public.tbl_benutzergruppe g', 'uid');
$where['g.gruppe_kurzbz'] = $gruppe_kurzbz;
$where['g.studiensemester_kurzbz'] = $studiensemester_kurzbz;
$this->studentlistlib->addJoin('public.tbl_benutzergruppe g', 'uid', '', 'after_b');
$this->studentlistlib->addWhere('g.gruppe_kurzbz', $gruppe_kurzbz);
$this->studentlistlib->addWhere('g.studiensemester_kurzbz', $studiensemester_kurzbz);
} else {
$where['v.studiengang_kz'] = $studiengang_kz;
$this->studentlistlib->addWhere('v.studiengang_kz', $studiengang_kz);
if ($semester !== null)
$where['v.semester'] = $semester;
$this->studentlistlib->addWhere('v.semester', $semester);
if ($verband !== null)
$where['v.verband'] = $verband;
$this->studentlistlib->addWhere('v.verband', $verband);
if ($gruppe !== null)
$where['v.gruppe'] = $gruppe;
$this->studentlistlib->addWhere('v.gruppe', $gruppe);
if (!$verband && !$gruppe && $orgform_kurzbz !== null) {
$this->PrestudentModel->db->where(
$this->studentlistlib->addWhere(
"(
SELECT orgform_kurzbz
FROM public.tbl_prestudentstatus
@@ -623,9 +591,10 @@ class Students extends FHCAPI_Controller
}
}
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere($where);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -652,11 +621,8 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(
$this->studentlistlib->addSelect("COALESCE(
v.semester::text,
CASE
WHEN pls.status_kurzbz IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
@@ -664,16 +630,15 @@ class Students extends FHCAPI_Controller
ELSE ''::text
END
) AS semester", false);
$this->PrestudentModel->addSelect("COALESCE(v.verband::text, ''::text)");
$this->PrestudentModel->addSelect("COALESCE(v.gruppe::text, ''::text)");
$this->studentlistlib->addSelect("COALESCE(v.verband::text, ''::text) AS verband");
$this->studentlistlib->addSelect("COALESCE(v.gruppe::text, ''::text) AS gruppe");
$this->studentlistlib->addWhere('tbl_prestudent.prestudent_id', $prestudent_id);
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere([
'tbl_prestudent.prestudent_id' => $prestudent_id
]);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -700,23 +665,13 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect('v.semester');
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
$this->addSelectPrioRel();
$this->studentlistlib->addWhere('s.student_uid', $student_uid);
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere([
's.student_uid' => $student_uid
]);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -744,21 +699,13 @@ class Students extends FHCAPI_Controller
$this->terminateWithError($studiensemester_kurzbz . ' - ' . $this->p->t('lehre', 'error_noStudiensemester'));
}
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect('v.semester');
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
$this->addSelectPrioRel();
$this->studentlistlib->addWhere('p.person_id', $person_id);
$this->addFilter($studiensemester_kurzbz);
$result = $this->PrestudentModel->loadWhere([
'p.person_id' => $person_id
]);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
@@ -790,29 +737,8 @@ class Students extends FHCAPI_Controller
$data = $this->getDataOrTerminateWithError($result);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->prepareQuery($studiensemester_kurzbz);
$this->PrestudentModel->addSelect("COALESCE(v.semester::text, CASE WHEN public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent') THEN public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)::text ELSE ''::text END) AS semester", false);
$this->PrestudentModel->addSelect('v.verband');
$this->PrestudentModel->addSelect('v.gruppe');
//add status per semester
$this->PrestudentModel->addSelect(
"public.get_rolle_prestudent(public.tbl_prestudent.prestudent_id, "
. $this->PrestudentModel->escape($studiensemester_kurzbz)
. ") AS statusofsemester"
);
$this->addSelectPrioRel();
$this->addFilter($studiensemester_kurzbz);
$prestudent_ids = [];
$student_uids = [];
$this->addMeta('data', $data);
foreach ($data as $row) {
$dataset = json_decode($row->data);
if ($row->type == 'prestudent') {
@@ -822,197 +748,39 @@ class Students extends FHCAPI_Controller
}
}
$this->studentlistlib->addSelect("COALESCE(
v.semester::text,
CASE
WHEN public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) IN ('Aufgenommener', 'Bewerber', 'Wartender', 'interessent')
THEN public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)::text
ELSE ''::text
END
) AS semester", false);
$this->studentlistlib->addSelect($this->PrestudentModel->escape($studiensemester_kurzbz) . ' as query_studiensemester_kurzbz');
if ($prestudent_ids && $student_uids) {
$this->PrestudentModel->db->where_in('tbl_prestudent.prestudent_id', $prestudent_ids);
$this->PrestudentModel->db->or_where_in('s.student_uid', $student_uids);
$this->studentlistlib->addWhere('tbl_prestudent.prestudent_id', $prestudent_ids);
$this->studentlistlib->addOrWhere('s.student_uid', $student_uids);
} elseif ($prestudent_ids) {
$this->PrestudentModel->db->where_in('tbl_prestudent.prestudent_id', $prestudent_ids);
$this->studentlistlib->addWhere('tbl_prestudent.prestudent_id', $prestudent_ids);
} elseif ($student_uids) {
$this->PrestudentModel->db->where_in('s.student_uid', $student_uids);
$this->studentlistlib->addWhere('s.student_uid', $student_uids);
} else {
$this->terminateWithSuccess([]);
}
$result = $this->PrestudentModel->load();
$this->addFilter($studiensemester_kurzbz);
$result = $this->studentlistlib->execute($studiensemester_kurzbz);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
/**
* @param string|null $studiensemester_kurzbz
* @param string $type
*
* @return void
*/
protected function prepareQuery($studiensemester_kurzbz, $type = 'LEFT')
{
$stdsemEsc = $studiensemester_kurzbz ? $this->PrestudentModel->escape($studiensemester_kurzbz) : 'NULL';
$this->load->config('stv');
if(defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
{
$tags = $this->config->item('stv_prestudent_tags');
$whereTags = '';
if (is_array($tags) && !isEmptyArray($tags)) {
$tags = array_keys($tags);
foreach ($tags as $key => $tag) {
$tags[$key] = $this->db->escape($tag);
}
$whereTags = " AND nt.typ_kurzbz IN (" . implode(",", $tags) . ")";
}
$subQueryTag = "
(
SELECT
tag.prestudent_id,
COALESCE(json_agg(tag ORDER BY tag.done), '[]'::json) AS tags
FROM (
SELECT DISTINCT ON (n.notiz_id)
n.notiz_id AS id,
nt.typ_kurzbz,
array_to_json(nt.bezeichnung_mehrsprachig)->>0 AS beschreibung,
n.text AS notiz,
nt.style,
n.erledigt AS done,
nz.prestudent_id
FROM public.tbl_notizzuordnung AS nz
JOIN public.tbl_notiz AS n ON nz.notiz_id = n.notiz_id
JOIN public.tbl_notiz_typ AS nt ON n.typ = nt.typ_kurzbz "
. $whereTags .
"
) AS tag
GROUP BY tag.prestudent_id
) AS tag_data_agg
";
}
$this->PrestudentModel->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
$this->PrestudentModel->addJoin('public.tbl_person p', 'person_id');
$this->PrestudentModel->addJoin('public.tbl_student s', 'prestudent_id', $type);
$this->PrestudentModel->addJoin('public.tbl_prestudentstatus pls', '
pls.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.prestudent_id=tbl_prestudent.prestudent_id
AND pls.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)', 'LEFT');
$this->PrestudentModel->addJoin('lehre.tbl_studienplan sp', 'studienplan_id', 'LEFT');
$this->PrestudentModel->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid', 'LEFT');
$this->PrestudentModel->addJoin(
'public.tbl_studentlehrverband v',
'v.student_uid=s.student_uid AND v.studiensemester_kurzbz' . ($studiensemester_kurzbz ? '=' . $stdsemEsc : ' IS NULL'),
$type
);
$this->PrestudentModel->addJoin('public.tbl_prestudentstatus ps', '
ps.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.prestudent_id=tbl_prestudent.prestudent_id
AND ps.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')', 'LEFT');
if(defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
{
$this->PrestudentModel->addJoin($subQueryTag, 'tag_data_agg.prestudent_id = tbl_prestudent.prestudent_id', 'LEFT');
}
$this->PrestudentModel->addSelect("b.uid");
if(defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
{
$this->PrestudentModel->addSelect('tag_data_agg.tags');
}
$this->PrestudentModel->addSelect('titelpre');
$this->PrestudentModel->addSelect('nachname');
$this->PrestudentModel->addSelect('vorname');
$this->PrestudentModel->addSelect('wahlname');
$this->PrestudentModel->addSelect('vornamen');
$this->PrestudentModel->addSelect('titelpost');
$this->PrestudentModel->addSelect('ersatzkennzeichen');
$this->PrestudentModel->addSelect('gebdatum');
$this->PrestudentModel->addSelect('geschlecht');
$this->PrestudentModel->addSelect('foto');
$this->PrestudentModel->addSelect('foto_sperre');
// semester
// verband
// gruppe
//add status per semester
$this->PrestudentModel->addSelect(
"public.get_rolle_prestudent(public.tbl_prestudent.prestudent_id, "
. $this->PrestudentModel->escape($studiensemester_kurzbz)
. ") AS statusofsemester"
);
$this->PrestudentModel->addSelect('UPPER(stg.typ || stg.kurzbz) AS studiengang');
$this->PrestudentModel->addSelect('tbl_prestudent.studiengang_kz');
$this->PrestudentModel->addSelect('stg.bezeichnung AS stg_bezeichnung');
$this->PrestudentModel->addSelect("s.matrikelnr");
$this->PrestudentModel->addSelect('p.person_id');
$this->PrestudentModel->addSelect('pls.status_kurzbz AS status');
$this->PrestudentModel->addSelect('pls.datum AS status_datum');
$this->PrestudentModel->addSelect('pls.bestaetigtam AS status_bestaetigung');
$this->PrestudentModel->addSelect(
"(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung LIMIT 1) AS mail_privat",
false
);
$this->PrestudentModel->addSelect("
CASE WHEN b.uid IS NOT NULL AND b.uid<>''
THEN CONCAT(b.uid, '@', " . $this->PrestudentModel->escape(DOMAIN) . ")
ELSE '' END AS mail_intern", false);
$this->PrestudentModel->addSelect('p.anmerkung AS anmerkungen');
$this->PrestudentModel->addSelect('tbl_prestudent.anmerkung');
$this->PrestudentModel->addSelect('pls.orgform_kurzbz');
$this->PrestudentModel->addSelect('aufmerksamdurch_kurzbz');
$this->PrestudentModel->addSelect(
"(SELECT rt_gesamtpunkte AS punkte FROM public.tbl_prestudent WHERE prestudent_id=ps.prestudent_id) AS punkte",
false
);
$this->PrestudentModel->addSelect('tbl_prestudent.aufnahmegruppe_kurzbz');
$this->PrestudentModel->addSelect('tbl_prestudent.dual');
$this->PrestudentModel->addSelect('p.matr_nr');
$this->PrestudentModel->addSelect('sp.bezeichnung AS studienplan_bezeichnung');
$this->PrestudentModel->addSelect('tbl_prestudent.prestudent_id');
// priorisierung_relativ
$this->PrestudentModel->addSelect('mentor');
$this->PrestudentModel->addSelect('b.aktiv AS bnaktiv');
$this->PrestudentModel->addSelect('unruly');
$this->PrestudentModel->db->where_in('tbl_prestudent.studiengang_kz', $this->allowedStgs);
$this->PrestudentModel->addOrder('nachname');
$this->PrestudentModel->addOrder('vorname');
}
/**
* @return void
*/
protected function addSelectPrioRel()
{
$this->PrestudentModel->addSelect("(
SELECT count(*)
FROM (
SELECT *, public.get_rolle_prestudent(pss.prestudent_id, NULL) AS laststatus
FROM public.tbl_prestudent pss
JOIN public.tbl_prestudentstatus USING (prestudent_id)
WHERE person_id = p.person_id
AND studiensemester_kurzbz = (
SELECT studiensemester_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = tbl_prestudent.prestudent_id
AND status_kurzbz = 'Interessent'
LIMIT 1
)
AND status_kurzbz = 'Interessent'
) prest
WHERE laststatus NOT IN ('Abbrecher', 'Abgewiesener', 'Absolvent')
AND priorisierung <= tbl_prestudent.priorisierung
) || ' (' || COALESCE(tbl_prestudent.priorisierung::text, ' '::text) || ')' AS priorisierung_relativ", false);
}
/**
* Adds additional filters to the query
*
@@ -1,44 +0,0 @@
<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Overview on cronjob logs
*/
class Ferienverwaltung extends Auth_Controller
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct(
array(
'index' => ['basis/ferien:r']
)
);
// Loads WidgetLib
//$this->load->library('WidgetLib');
// Loads phrases system
$this->loadPhrases(
array(
'global',
'ui'
//'ferien'
)
);
}
// -----------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Everything has a beginning
*/
public function index()
{
$this->load->view('lehre/ferienverwaltung.php');
}
}
+15 -3
View File
@@ -198,7 +198,19 @@ class Gradelist extends Auth_Controller
if (!isset($row_noten->found))
{
$result_lv = $this->LehrveranstaltungModel->load($row_noten->lehrveranstaltung_id);
$result_stg = $this->StudiengangModel->load($result_lv->retval[0]->studiengang_kz);
$studiengang_kz = null;
if (!empty($result_lv->retval) && isset($result_lv->retval[0]) && isset($result_lv->retval[0]->studiengang_kz))
{
$result_stg = $this->StudiengangModel->load($result_lv->retval[0]->studiengang_kz);
if (!empty($result_stg->retval) && isset($result_stg->retval[0]) && is_object($result_stg->retval[0]) && isset($result_stg->retval[0]->kurzbzlang))
{
$studiengang_kz = $result_stg->retval[0]->kurzbzlang;
}
}
$courses['semester'][$row_noten->studiensemester_kurzbz]['lvs_nonstpl'][] = array(
'lehrveranstaltung_id' => $row_noten->lehrveranstaltung_id,
'lehrtyp_kurzbz' => $result_lv->retval[0]->lehrtyp_kurzbz,
@@ -212,8 +224,8 @@ class Gradelist extends Auth_Controller
'semester' => $result_lv->retval[0]->semester,
'note' => $row_noten->note,
'datum' => $row_noten->benotungsdatum,
'zugeordnet' => true,
'studiengang_kurzbz' => $result_stg->retval[0]->kurzbzlang
'studiengang_kurzbz' => $studiengang_kz,
'zugeordnet' => true
);
if(!isset($courses['semester'][$row_noten->studiensemester_kurzbz]['data']['ectssumme_nonstpl']))
$courses['semester'][$row_noten->studiensemester_kurzbz]['data']['ectssumme_nonstpl'] = 0;
+5 -1
View File
@@ -382,7 +382,11 @@ class StundenplanLib
$tz = new DateTimeZone($this->_ci->config->item('timezone'));
$ferienEvents = $this->_ci->FerienModel->getByDateRange($start_date, $end_date, $studiengang_kz);
$ferienEvents = $this->_ci->FerienModel->execReadOnlyQuery("
SELECT *
FROM lehre.tbl_ferien
WHERE (bisdatum >= ? AND vondatum < ?) AND (studiengang_kz = 0 OR studiengang_kz = ?)
", [$start_date, $end_date, $studiengang_kz]);
if (isError($ferienEvents))
return $ferienEvents;
@@ -0,0 +1,370 @@
<?php
/**
* Copyright (C) 2025 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* This generates a list of students and or prestudents used for Studierendenverwaltung
*/
class StudentListLib
{
private $_ci; // Code igniter instance
private $_allowedStgs = [];
private $_selects = [];
private $_joins = [];
/**
* Gets the CI instance, loads model and prepares default values
*
* @param array $params
*
* @return void
*/
public function __construct($params = null)
{
$this->_ci =& get_instance(); // get code igniter instance
$this->_ci->load->model('crm/Prestudent_model', 'PrestudentModel');
if (isset($params['allowedStgs']))
$this->_allowedStgs = $params['allowedStgs'];
// Add default SELECTs
$this->addSelect("b.uid");
if (defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED)
$this->addSelect('tag_data_agg.tags');
$this->addSelect('titelpre');
$this->addSelect('nachname');
$this->addSelect('vorname');
$this->addSelect('wahlname');
$this->addSelect('vornamen');
$this->addSelect('titelpost');
$this->addSelect('ersatzkennzeichen');
$this->addSelect('gebdatum');
$this->addSelect('geschlecht');
$this->addSelect('foto');
$this->addSelect('foto_sperre');
$this->addSelect('v.semester');
$this->addSelect('v.verband');
$this->addSelect('v.gruppe');
$this->addSelect("statusofsemester"); // Will be replaced later
$this->addSelect('UPPER(stg.typ || stg.kurzbz) AS studiengang');
$this->addSelect('tbl_prestudent.studiengang_kz');
$this->addSelect('stg.bezeichnung AS stg_bezeichnung');
$this->addSelect("s.matrikelnr");
$this->addSelect('p.person_id');
$this->addSelect('pls.status_kurzbz AS status');
$this->addSelect('pls.datum AS status_datum');
$this->addSelect('pls.bestaetigtam AS status_bestaetigung');
$this->addSelect("
CASE
WHEN pls.status_kurzbz = 'Interessent'
THEN pls.ausbildungssemester
ELSE s.semester
END AS semester_berechnet
");
$this->addSelect(
"(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung LIMIT 1) AS mail_privat",
false
);
$this->addSelect("
CASE WHEN b.uid IS NOT NULL AND b.uid<>''
THEN CONCAT(b.uid, '@', " . $this->_ci->PrestudentModel->escape(DOMAIN) . ")
ELSE '' END AS mail_intern", false);
$this->addSelect('p.anmerkung AS anmerkungen');
$this->addSelect('tbl_prestudent.anmerkung');
$this->addSelect('pls.orgform_kurzbz');
$this->addSelect('aufmerksamdurch_kurzbz');
$this->addSelect(
"(SELECT rt_gesamtpunkte AS punkte FROM public.tbl_prestudent WHERE prestudent_id=ps.prestudent_id) AS punkte",
false
);
$this->addSelect('tbl_prestudent.aufnahmegruppe_kurzbz');
$this->addSelect('tbl_prestudent.dual');
$this->addSelect('p.matr_nr');
$this->addSelect('sp.bezeichnung AS studienplan_bezeichnung');
$this->addSelect('tbl_prestudent.prestudent_id');
$this->addSelect("(
SELECT count(*)
FROM (
SELECT *, public.get_rolle_prestudent(pss.prestudent_id, NULL) AS laststatus
FROM public.tbl_prestudent pss
JOIN public.tbl_prestudentstatus USING (prestudent_id)
WHERE person_id = p.person_id
AND studiensemester_kurzbz = (
SELECT studiensemester_kurzbz
FROM public.tbl_prestudentstatus
WHERE prestudent_id = tbl_prestudent.prestudent_id
AND status_kurzbz = 'Interessent'
LIMIT 1
)
AND status_kurzbz = 'Interessent'
) prest
WHERE laststatus NOT IN ('Abbrecher', 'Abgewiesener', 'Absolvent')
AND priorisierung <= tbl_prestudent.priorisierung
) || ' (' || COALESCE(tbl_prestudent.priorisierung::text, ' '::text) || ')' AS priorisierung_relativ", false); // TODO(chris): overwrite in fetchStudents
$this->addSelect('mentor');
$this->addSelect('b.aktiv AS bnaktiv');
$this->addSelect('unruly');
// Add default JOINs
$this->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
$this->addJoin('public.tbl_person p', 'person_id');
$this->addJoin('public.tbl_student s', 'prestudent_id', 'LEFT'); // TODO(chris): overwrite in fetchStudents
$this->addJoin('public.tbl_prestudentstatus pls', '
pls.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.prestudent_id=tbl_prestudent.prestudent_id
AND pls.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, NULL)
AND pls.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, NULL)', 'LEFT');
$this->addJoin('lehre.tbl_studienplan sp', 'studienplan_id', 'LEFT');
$this->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid', 'LEFT');
$this->addJoin("v", "", ""); // Will be replaced later
$this->addJoin("ps", "", ""); // Will be replaced later
if (defined('STV_TAGS_ENABLED') && STV_TAGS_ENABLED) {
$this->_ci->load->config('stv');
$tags = $this->_ci->config->item('stv_prestudent_tags');
$whereTags = '';
if (is_array($tags) && !isEmptyArray($tags)) {
$tags = array_keys($tags);
foreach ($tags as $key => $tag) {
$tags[$key] = $this->_ci->PrestudentModel->escape($tag);
}
$whereTags = " AND nt.typ_kurzbz IN (" . implode(",", $tags) . ")";
}
$subQueryTag = "(
SELECT
tag.prestudent_id,
COALESCE(json_agg(tag ORDER BY tag.done), '[]'::json) AS tags
FROM (
SELECT DISTINCT ON (n.notiz_id)
n.notiz_id AS id,
nt.typ_kurzbz,
array_to_json(nt.bezeichnung_mehrsprachig)->>0 AS beschreibung,
n.text AS notiz,
nt.style,
n.erledigt AS done,
nz.prestudent_id
FROM public.tbl_notizzuordnung AS nz
JOIN public.tbl_notiz AS n ON nz.notiz_id = n.notiz_id
JOIN public.tbl_notiz_typ AS nt ON n.typ = nt.typ_kurzbz " . $whereTags . "
) AS tag
GROUP BY tag.prestudent_id
) AS tag_data_agg";
$this->addJoin($subQueryTag, 'tag_data_agg.prestudent_id = tbl_prestudent.prestudent_id', 'LEFT');
}
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
/**
* Adds a SELECT statement to the query.
*
* @param string|array $select
* @param boolean $escape (optional)
*
* @return void
*/
public function addSelect($select, $escape = true)
{
if (is_array($select)) {
foreach ($select as $s)
$this->addSelect($s, $escape);
return;
}
$alias = $this->getAliasFromSelect($select);
$this->_selects[$alias] = [$select, $escape];
}
/**
* Joins a table to the query.
*
* @param string $table
* @param string $cond
* @param string $type (optional)
* @param string $position (optional)
*
* @return void
*/
public function addJoin($table, $cond, $type = '', $position = 'end')
{
$alias = $this->getAliasFromTable($table);
if ($position == 'end') {
return $this->_joins[$alias] = [$table, $cond, $type];
}
if ($position == 'start') {
return $this->_joins = [$alias => [$table, $cond, $type]] + $this->_joins;
}
if (substr($position, 0, 7) == 'before_') {
$ref = substr($position, 7);
$index = 0;
} elseif (substr($position, 0, 6) == 'after_') {
$ref = substr($position, 6);
$index = 1;
} else {
return $this->addJoin($table, $cond, $type);
}
if (!isset($this->_joins[$ref]))
return $this->addJoin($table, $cond, $type);
$key_indeces = array_flip(array_keys($this->_joins));
$index += $key_indeces[$ref];
if (!$index)
return $this->addJoin($table, $cond, $type, 'start');
$front_part = array_slice($this->_joins, 0, $index, true);
$back_part = array_slice($this->_joins, $index, null, true);
if (isset($front_part[$alias])) {
unset($front_part[$alias]);
}
$this->_joins = $front_part + [$alias => [$table, $cond, $type]] + $back_part;
}
/**
* Adds a WHERE clause to the query.
*
* @param string|array $key
* @param string|array $value
* @param boolean $escape
*
* @return void
*/
public function addWhere($key, $value = null, $escape = true)
{
if (!is_array($key) && is_array($value)) {
$this->_ci->PrestudentModel->db->where_in($key, $value, $escape);
} else {
$this->_ci->PrestudentModel->db->where($key, $value, $escape);
}
}
/**
* Adds a OR WHERE clause to the query.
*
* @param string|array $key
* @param string|array $value
* @param boolean $escape
*
* @return void
*/
public function addOrWhere($key, $value = null, $escape = true)
{
if (!is_array($key) && is_array($value)) {
$this->_ci->PrestudentModel->db->or_where_in($key, $value, $escape);
} else {
$this->_ci->PrestudentModel->db->or_where($key, $value, $escape);
}
}
/**
* Generates the query and executes it.
*
* @param string|null $studiensemester_kurzbz
*
* @return stdClass result of the query
*/
public function execute($studiensemester_kurzbz)
{
$stdsemEsc = $studiensemester_kurzbz ? $this->_ci->PrestudentModel->escape($studiensemester_kurzbz) : 'NULL';
$this->addSelect(
"public.get_rolle_prestudent(
public.tbl_prestudent.prestudent_id,
" . $this->_ci->PrestudentModel->escape($studiensemester_kurzbz) . "
) AS statusofsemester"
);
$this->addJoin(
'public.tbl_studentlehrverband v',
'v.student_uid=s.student_uid AND v.studiensemester_kurzbz' . ($studiensemester_kurzbz ? '=' . $stdsemEsc : ' IS NULL'),
'LEFT'
);
$this->addJoin(
'public.tbl_prestudentstatus ps',
'ps.status_kurzbz=public.get_rolle_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.prestudent_id=tbl_prestudent.prestudent_id
AND ps.studiensemester_kurzbz=public.get_stdsem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
AND ps.ausbildungssemester=public.get_absem_prestudent(tbl_prestudent.prestudent_id, ' . $stdsemEsc . ')
',
'LEFT'
);
$this->addWhere('tbl_prestudent.studiengang_kz', $this->_allowedStgs);
foreach ($this->_joins as $join)
$this->_ci->PrestudentModel->addJoin($join[0], $join[1], $join[2]);
foreach ($this->_selects as $select)
$this->_ci->PrestudentModel->addSelect($select[0], $select[1]);
$this->_ci->PrestudentModel->addOrder('nachname');
$this->_ci->PrestudentModel->addOrder('vorname');
return $this->_ci->PrestudentModel->load();
}
//------------------------------------------------------------------------------------------------------------------
// Protected methods
/**
* Get alias of a table or select statement
*
* @param string $select
*
* @return string
*/
final protected function getAliasFromSelect($select)
{
if (strpos($select, ' ') !== false) {
return trim(strrchr($select, ' '));
}
if (strpos($select, '.') !== false) {
return substr(strrchr($select, '.'), 1);
}
return $select;
}
/**
* Get alias of a table or select statement
*
* @param string|array $table
*
* @return string|array
*/
final protected function getAliasFromTable($table)
{
if (strpos($table, ' ') !== false) {
return trim(strrchr($table, ' '));
}
return $table;
}
}
@@ -40,7 +40,9 @@ abstract class AbstractBestandteil implements IValidation
if( is_bool($new_value) && ($old_value !== $new_value) ) {
$this->modifiedcolumns[$columnname] = $columnname;
} else if($old_value != $new_value) {
} else if(is_null($old_value) xor is_null($new_value)) {
$this->modifiedcolumns[$columnname] = $columnname;
} else if($old_value != $new_value) {
$this->modifiedcolumns[$columnname] = $columnname;
}
}
@@ -137,19 +137,25 @@ EOTXT;
return parent::__toString() . $txt;
}
/* public function validate()
public function validate()
{
if( !(filter_var($this->tage, FILTER_VALIDATE_INT,
array(
'options' => array(
'min_range' => 1,
'max_range' => 50
)
)
)) ) {
$this->validationerrors[] = 'Urlaubsanspruch muss eine Tagesanzahl im Bereich 1 bis 50 sein.';
$value = $this->vordienstzeit;
if ($value === null || $value === '') {
$result = null; // allow null value
} else {
$result = filter_var($value, FILTER_VALIDATE_INT, [
'options' => [
'min_range' => 0,
'max_range' => 100
]
]);
if ($result === false) {
$this->validationerrors[] = 'Vordienstjahre muss eine ganze Zahl (0 bis 100) enthalten oder leer sein.';
}
}
return parent::validate();
} */
}
}
@@ -9,52 +9,6 @@ class Ferien_model extends DB_Model
{
parent::__construct();
$this->dbTable = 'lehre.tbl_ferien';
$this->pk = 'ferien_id';
}
/**
* Loads all Ferien between two dates.
* @param $vondatum
* @param $bisdatum
* @param $studiengang_kz by default, loads only Ferien from oe of 0 Studiengang (and parents)
* @return object success or error
*/
public function getByDateRange($vondatum, $bisdatum, $studiengang_kz = 0)
{
if (!is_numeric($studiengang_kz)) return error("Invalid Studiengang Kz");
if (!is_valid_date($vondatum)) return error("Invalid von date");
if (!is_valid_date($bisdatum)) return error("Invalid bis date");
// get oe from studiengang
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$result = $this->StudiengangModel->loadWhere(['studiengang_kz' => $studiengang_kz]);
if (isError($result)) return $result;
if (!hasData($result)) return success([]);
$oe_kurzbz = getData($result)[0]->oe_kurzbz;
// get all parents oes
$this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
$result = $this->OrganisationseinheitModel->getParents($oe_kurzbz);
if (isError($result)) return $result;
if (!hasData($result)) return success([]);
$parents = array_column(getData($result), 'oe_kurzbz');
// get ferien - use oe_kurzbz
$qry = "
SELECT
*
FROM
lehre.tbl_ferien
WHERE
bisdatum >= ? AND vondatum < ?
AND (oe_kurzbz IS NULL OR oe_kurzbz IN ?)
ORDER BY
vondatum";
return $this->execReadOnlyQuery($qry, [$vondatum, $bisdatum, $parents]);
$this->pk = array('studiengang_kz', 'bezeichnung');
}
}
@@ -1,15 +0,0 @@
<?php
class Ferientyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_ferientyp';
$this->pk = 'ferientyp_kurzbz';
$this->hasSequence = false;
}
}
@@ -53,9 +53,11 @@ class Studienjahr_model extends DB_Model
* @param int $days
* @return array|stdClass|null
*/
public function getLastOrAktStudienjahr($days = 0)
public function getLastOrAktStudienjahr($days = 60)
{
$days = is_numeric($days) ? $this->escape($days) : 0;
if (!is_numeric($days)) {
$days = 60;
}
$query = '
SELECT *
@@ -75,25 +77,19 @@ class Studienjahr_model extends DB_Model
* @param int $days
* @return array|stdClass|null
*/
public function getAktOrNextStudienjahr($days = 0)
public function getAktOrNextStudienjahr($days = 62)
{
$days = is_numeric($days) ? $this->escape($days) : 0;
if (!is_numeric($days)) {
$days = 62;
}
$query = '
SELECT * FROM (
SELECT
jahr.*, MIN(sem.start) AS beginn, MAX(sem.ende) AS ende
FROM
public.tbl_studienjahr jahr
JOIN public.tbl_studiensemester sem using(studienjahr_kurzbz)
GROUP BY
studienjahr_kurzbz
) jahre
WHERE
ende >= NOW() + \'' . $days . ' DAYS\'::INTERVAL
ORDER BY
ende
LIMIT 1
SELECT *
FROM public.tbl_studienjahr
JOIN public.tbl_studiensemester using(studienjahr_kurzbz)
WHERE start < NOW() + \'' . $days . ' DAYS\'::INTERVAL
ORDER by start DESC
LIMIT 1
';
return $this->execQuery($query);
+21 -1
View File
@@ -149,7 +149,7 @@ class Person_model extends DB_Model
* @param $filter Term to search for.
* @return DB-result
*/
public function searchPerson($filter)
public function searchPerson($filter, $mode=null)
{
$this->addSelect('vorname, nachname, gebdatum, person_id, titelpre, titelpost');
$this->addSelect("CASE
@@ -161,6 +161,26 @@ class Person_model extends DB_Model
THEN 'Student'
ELSE 'Person'
END AS status");
if($mode == 'mitMaUid')
{
$this->addSelect("(
SELECT m.mitarbeiter_uid
FROM public.tbl_benutzer b
JOIN public.tbl_mitarbeiter m
ON b.uid = m.mitarbeiter_uid
WHERE b.person_id = tbl_person.person_id
LIMIT 1
)
AS uid");
$this->addOrder('uid, lower(nachname), lower(vorname)');
}
else
{
$this->addOrder('lower(nachname), lower(vorname)');
}
$result = $this->loadWhere(
'lower(nachname) like '.$this->db->escape('%'.mb_strtolower($filter).'%')."
OR lower(vorname) like ".$this->db->escape('%'.$filter.'%')."
@@ -1,27 +0,0 @@
<?php
$includesArray = array(
'title' => 'Ferienverwaltung',
'axios027' => true,
'bootstrap5' => true,
'fontawesome6' => true,
'vue3' => true,
'filtercomponent' => true,
'navigationcomponent' => true,
'tabulator6' => true,
'primevue3' => true,
//'vuedatepicker11' => true,
'customJSModules' => array('public/js/apps/lehre/Ferienverwaltung/Ferienverwaltung.js'),
'customCSSs' => array('vendor/vuejs/vuedatepicker_css/main.css')
);
$this->load->view('templates/FHC-Header', $includesArray);
?>
<div id="main">
<div>
<ferienverwaltung></ferienverwaltung>
</div>
</div>
<?php $this->load->view('templates/FHC-Footer', $includesArray); ?>
@@ -315,22 +315,15 @@
WHERE tpl.app = '.$APP.'
) pl USING(person_id)
LEFT JOIN (
SELECT
SELECT DISTINCT ON (tbl_rueckstellung.person_id)
tbl_rueckstellung.person_id,
tbl_rueckstellung.datum_bis,
tbl_rueckstellung.status_kurzbz,
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
FROM public.tbl_rueckstellung
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
WHERE tbl_rueckstellung.rueckstellung_id =
(
SELECT srueck.rueckstellung_id
FROM public.tbl_rueckstellung srueck
WHERE srueck.person_id = tbl_rueckstellung.person_id
AND datum_bis >= NOW()
ORDER BY srueck.datum_bis DESC LIMIT 1
)
WHERE tbl_rueckstellung.datum_bis >= NOW()
ORDER BY tbl_rueckstellung.person_id, tbl_rueckstellung.datum_bis DESC
) rueck ON rueck.person_id = p.person_id
WHERE
EXISTS (
@@ -24,22 +24,15 @@ $query = '
WHERE tpl.app = '.$APP.'
) pl ON p.person_id = pl.person_id
LEFT JOIN (
SELECT
SELECT DISTINCT ON (tbl_rueckstellung.person_id)
tbl_rueckstellung.person_id,
tbl_rueckstellung.datum_bis,
tbl_rueckstellung.status_kurzbz,
array_to_json(bezeichnung_mehrsprachig::varchar[])->>0 as bezeichnung
FROM public.tbl_rueckstellung
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id
WHERE tbl_rueckstellung.rueckstellung_id =
(
SELECT srueck.rueckstellung_id
FROM public.tbl_rueckstellung srueck
WHERE srueck.person_id = tbl_rueckstellung.person_id
AND datum_bis >= NOW()
ORDER BY srueck.datum_bis DESC LIMIT 1
)
JOIN public.tbl_rueckstellung_status USING(status_kurzbz)
WHERE tbl_rueckstellung.datum_bis >= NOW()
ORDER BY tbl_rueckstellung.person_id, tbl_rueckstellung.datum_bis DESC
) rueck ON rueck.person_id = p.person_id
WHERE p.person_id NOT IN (SELECT person_id FROM public.tbl_prestudent)';
+75 -11
View File
@@ -80,9 +80,17 @@ echo '
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<link rel="stylesheet" href="../../vendor/components/jqueryui/themes/base/jquery-ui.min.css" type="text/css" />
<link rel="stylesheet" href="../../vendor/twbs/bootstrap3/dist/css/bootstrap.min.css" type="text/css"/>
<link href="../../skin/style.css.php" rel="stylesheet" type="text/css" />
<style>
.ui-dialog-titlebar-close
{
visibility: hidden !important;
}
</style>
<script type="text/javascript" src="../../vendor/components/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../vendor/components/jqueryui/jquery-ui.min.js"></script>
<script type="text/javascript" src="../../vendor/twbs/bootstrap3/dist/js/bootstrap.min.js"></script>
<script language="Javascript" type="text/javascript">
//<![CDATA[
@@ -131,22 +139,78 @@ echo '
}
}
function GebietStarten(bezeichnung,stunde,minute,sekunde,gebiet_id)
function GebietStarten(bezeichnung, stunde, minute, sekunde, gebiet_id)
{
var check = confirm(<?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?>+' '+stunde+'h '+minute+'m '+sekunde+'s');
if (check == true) {
var sprache_user = <?php echo "'".$sprache_user."'"?>;
document.location.href = 'frage.php?gebiet_id='+gebiet_id+'&start=true';
}
else {
return false;
let message = <?php echo "'".$p->t('testtool/okKlickenUmZuStarten')."'"?> + ' ' + stunde + 'h ' + minute + 'm ' + sekunde + 's';
let title = <?php echo "'".$p->t('testtool/startGebiet')."'"?>;
let abbrechen = <?php echo "'".$p->t('testtool/abbrechen')."'"?>;
if ($('#gebiet-dialog').length === 0)
{
$('body').append(
'<div id="gebiet-dialog" title="' + title + '">' +
'<p id="gebiet-dialog-msg">' + message + '</p>' +
'</div>'
);
}
$('#gebiet-dialog').dialog({
modal: true,
width: 400,
resizable: false,
buttons: [
{
text: 'OK',
click: function() {
$(this).dialog('close');
document.location.href = 'frage.php?gebiet_id=' + gebiet_id + '&start=true';
}
},
{
text: abbrechen,
click: function() {
$(this).dialog('close');
}
}
]
});
}
let letzteFrageBestaetigt = false;
function letzteFrage()
{
alert(<?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>);
return true;
if (letzteFrageBestaetigt)
return true;
let message = <?php echo "'".$p->t("testtool/alleFragenBeantwortet")."'"?>;
if ($('#fertig-dialog').length === 0)
{
$('body').append(
'<div id="fertig-dialog">' +
'<p>' + message + '</p>' +
'</div>'
);
}
$('#fertig-dialog').dialog({
modal: true,
width: 400,
resizable: false,
buttons: [
{
text: 'OK',
click: function() {
$(this).dialog('close');
letzteFrageBestaetigt = true;
$('[name="submitantwort"]').click();
}
}
]
});
return false;
}
$(document).ready(function () {
@@ -647,7 +711,7 @@ if($frage->frage_id!='')
}
$letzte = $frage->getNextFrage($gebiet_id, $_SESSION['pruefling_id'], $frage_id, $demo);
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&amp;frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"letzteFrage()\"":"").">";
echo "<form action=\"$PHP_SELF?gebiet_id=$gebiet_id&amp;frage_id=$frage->frage_id\" method=\"POST\" ".(!$letzte && !$levelgebiet?"onsubmit=\"return letzteFrage()\"":"").">";
echo '
<div class="row text-center">
<table class="table" style="width: 600px; margin-left: auto; margin-right: auto;">
+22
View File
@@ -44,6 +44,27 @@ if (isset($_GET['sprache_user']) && !empty($_GET['sprache_user']))
$sprache_user = (isset($_SESSION['sprache_user']) && !empty($_SESSION['sprache_user'])) ? $_SESSION['sprache_user'] : DEFAULT_LANGUAGE;
$p = new phrasen($sprache_user);
$showInfo = false;
if (isset($_SESSION['alleGebiete']))
{
$alleGebiete = array_map('intval', $_SESSION['alleGebiete']);
$pruefling_id = $_SESSION['pruefling_id'];
$qry = "SELECT COUNT(DISTINCT gebiet_id) as anzahl
FROM testtool.tbl_pruefling_frage
JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id IN (". implode(',', $alleGebiete) .")
AND pruefling_id = ". $pruefling_id ."
";
$result = $db->db_query($qry);
$anzahlGebiete = $db->db_fetch_object($result);
if ((int)$anzahlGebiete->anzahl === count($alleGebiete))
$showInfo = true;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -69,6 +90,7 @@ $p = new phrasen($sprache_user);
<body>
<br><br><br><br><br>
<center><h2><?php echo $p->t('testtool/zeitAbgelaufen');?></h2>
<h3><?php echo ($showInfo ? ($p->t('testtool/alleGebietGestartet') . "<br />" . $p->t('testtool/alleGebieteGestartetInfo')) : ''); ?></h3>
</center>
</body>
</html>
+11 -2
View File
@@ -142,7 +142,9 @@ if (isset($_REQUEST['prestudent']))
}
if ($reihungstest_id != '' && $rt->load($reihungstest_id))
{
if ($rt->freigeschaltet)
$pruefling_exist = new Pruefling();
$alreadyInRT = $pruefling_exist->personAlreadyInRT($ps->person_id, $rt->reihungstest_id, $ps->prestudent_id);
if ($rt->freigeschaltet && !$alreadyInRT)
{
// regenerate Session ID after Login
session_regenerate_id();
@@ -282,7 +284,14 @@ if (isset($_REQUEST['prestudent']))
}
else
{
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
if ($alreadyInRT)
{
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtRegistriert').'</div>';
}
else
{
$alertmsg .= '<div class="alert alert-danger">'.$p->t('testtool/reihungstestNichtFreigeschalten').'</div>';
}
}
}
else
+24
View File
@@ -187,6 +187,7 @@ else if (isset($_SESSION['pruefling_id']))
}
$qry .= "
AND ps_status.bewerbung_abgeschicktamum IS NOT NULL
/* Order to get last semester when using distinct on */
ORDER BY
@@ -405,6 +406,29 @@ else if (isset($_SESSION['pruefling_id']))
echo '</table>';
}
if (isset($_SESSION['pruefling_id']) && !empty($_SESSION['alleGebiete']))
{
$alleGebiete = array_map('intval', $_SESSION['alleGebiete']);
$pruefling_id = (int)$_SESSION['pruefling_id'];
$qry = "SELECT COUNT(DISTINCT gebiet_id) AS anzahl
FROM testtool.tbl_pruefling_frage
JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id IN (". implode(',', $alleGebiete) .")
AND pruefling_id = ". $pruefling_id;
$result_check = $db->db_query($qry);
$row_check = $db->db_fetch_object($result_check);
if ((int)$row_check->anzahl === count($alleGebiete))
{
echo '<tr><td>
<div class="alert alert-success small" style="margin-left: 20px; width: 170px; margin-top: 3px;" role="alert">
<strong>'.$p->t('testtool/alleGebietGestartet').'</strong>
</div>
</td></tr>';
}
}
// Link zum Logout
echo '<tr><td class="ItemTesttool" style="margin-left: 20px;" nowrap>
+1 -44
View File
@@ -24,7 +24,6 @@
* @create 07-12-2006
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
require_once(dirname(__FILE__).'/organisationseinheit.class.php');
class ferien extends basis_db
{
@@ -63,50 +62,8 @@ class ferien extends basis_db
$this->errormsg = 'Studiengang_kz ist ungültig';
return false;
}
// get oe from studiengang
$sql_query="
SELECT
oe_kurzbz
FROM
public.tbl_studiengang
WHERE
studiengang_kz=".$this->db_add_param($stg_kz, FHC_INTEGER)."
ORDER BY
studiengang_kz";
if (!$this->db_query($sql_query))
{
$this->errormsg = $this->db_last_error();
return false;
}
$oe_kurzbz = '';
while ($row = $this->db_fetch_object())
{
$oe_kurzbz = $row->oe_kurzbz;
}
// get all parents oes
$organisationseinheit = new organisationseinheit();
$parents = $organisationseinheit->getParents($oe_kurzbz);
if (!$parents)
{
$this->errormsg = $parents->errormsg;
return false;
}
$sql_query="
SELECT
*
FROM
lehre.tbl_ferien
WHERE
oe_kurzbz IS NULL
OR oe_kurzbz IN (".$this->implode4SQL($parents).")
ORDER BY
vondatum";
$sql_query="SELECT * FROM lehre.tbl_ferien WHERE studiengang_kz=0 OR studiengang_kz=".$this->db_add_param($stg_kz, FHC_INTEGER)." ORDER BY vondatum;";
if (!$this->db_query($sql_query))
{
+26
View File
@@ -584,6 +584,32 @@ class pruefling extends basis_db
$qry .= " LIMIT 1";
if($result = $this->db_query($qry))
{
if ($this->db_num_rows($result) == 0)
return false;
else
return true;
}
else
{
$this->errormsg = 'Fehler bei einer Abfrage';
return false;
}
}
public function personAlreadyInRT($person_id, $reihungstest_id, $prestudent_id)
{
$qry = "SELECT tbl_prestudent.prestudent_id
FROM public.tbl_rt_person
JOIN public.tbl_prestudent ON tbl_prestudent.person_id = tbl_rt_person.person_id
JOIN public.tbl_prestudentstatus ON tbl_prestudent.prestudent_id = tbl_prestudentstatus.prestudent_id AND status_kurzbz = 'Bewerber'
AND tbl_prestudentstatus.studienplan_id = tbl_rt_person.studienplan_id
WHERE tbl_rt_person.person_id = " . $this->db_add_param($person_id) . "
AND tbl_rt_person.rt_id = " . $this->db_add_param($reihungstest_id) . "
AND tbl_prestudent.prestudent_id != " . $this->db_add_param($prestudent_id) . "
AND get_rolle_prestudent(tbl_prestudent.prestudent_id, NULL) = 'Bewerber'
LIMIT 1";
if($result = $this->db_query($qry))
{
if ($this->db_num_rows($result) == 0)
+5
View File
@@ -17,6 +17,7 @@ $this->phrasen['testtool/basic']='Basic';
$this->phrasen['testtool/basisgebiete']='Basisgebiete';
$this->phrasen['testtool/semester']='Semester';
$this->phrasen['testtool/reihungstestNichtFreigeschalten']='Der zuteilte Reihungstest ist noch nicht freigeschaltet';
$this->phrasen['testtool/reihungstestNichtRegistriert']='Sie sind für den Reihungstest nicht registriert';
$this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='Der Reihungstest dem Sie zugeteilt sind, kann nicht geladen werden. Melden Sie sich bitte bei der Reihungstestaufsicht.';
$this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Ihr Geburtsdatum stimmt nicht mit unseren Daten überein. Bitte wenden Sie sich an die Aufsichtsperson';
$this->phrasen['testtool/home']='Home';
@@ -31,10 +32,14 @@ $this->phrasen['testtool/keineAntwort']='Keine Antwort';
$this->phrasen['testtool/speichernUndWeiter']='Speichern und weiter';
$this->phrasen['testtool/alleFragenBeantwortet']='GLÜCKWUNSCH! \n\nSie haben alle Fragen in der zur Verfügung stehenden Zeit beantwortet. \nNutzen Sie die verbleibende Zeit, um Ihre Antworten zu kontrollieren oder fahren Sie mit dem nächsten Teilgebiet fort.';
$this->phrasen['testtool/zeitAbgelaufen']='Die Maximalzeit für dieses Gebiet ist abgelaufen, oder alle Fragen wurden beantwortet';
$this->phrasen['testtool/alleGebietGestartet']='Sie haben alle Gebiete bearbeitet.';
$this->phrasen['testtool/alleGebieteGestartetInfo']='Sie können sich nun ausloggen und den Browser schließen.';
$this->phrasen['testtool/spracheDerTestfragen']='Gewünschte Sprache der Testfragen';
$this->phrasen['testtool/einleitung']='Einleitung';
$this->phrasen['testtool/blaettern']='Blättern';
$this->phrasen['testtool/demo']='Demobeispiel ansehen';
$this->phrasen['testtool/abbrechen']='Abbrechen';
$this->phrasen['testtool/startGebiet']='Gebiet starten';
$this->phrasen['testtool/okKlickenUmZuStarten']='Klicken Sie OK um dieses Gebiet zu starten. \nSie haben für die Bearbeitung ein Zeitlimit von';
$this->phrasen['testtool/bitteZuerstAnmelden']='Bitte zuerst anmelden!';
$this->phrasen['testtool/fehlerBeimGenerierenDesFragenpools']='Fehler beim generieren des Fragenpools';
+5
View File
@@ -17,6 +17,7 @@ $this->phrasen['testtool/basic']='Basic';
$this->phrasen['testtool/basisgebiete']='Basic test';
$this->phrasen['testtool/semester']='Semester';
$this->phrasen['testtool/reihungstestNichtFreigeschalten']='The entrance examination assigned has not yet been activated.';
$this->phrasen['testtool/reihungstestNichtRegistriert']='You are not registered for the placement test.';
$this->phrasen['testtool/reihungstestKannNichtGeladenWerden']='The placement test you are assigned to could not be loaded. Please contact the placement test supervisior.';
$this->phrasen['testtool/geburtsdatumStimmtNichtUeberein']='Your date of birth does not correspond to the data we have. Please speak to the supervisor. ';
$this->phrasen['testtool/home']='Home';
@@ -31,10 +32,14 @@ $this->phrasen['testtool/keineAntwort']='No Answer';
$this->phrasen['testtool/speichernUndWeiter']='Save and next';
$this->phrasen['testtool/alleFragenBeantwortet']='CONGRATULATIONS!\n\nYou have answered all the questions in the time allowed.\n Use the remaining time to check your answers or continue to the next section.';
$this->phrasen['testtool/zeitAbgelaufen']='The time for this part has expired or you have answered all the questions.';
$this->phrasen['testtool/alleGebietGestartet']='You have worked on all sections.';
$this->phrasen['testtool/alleGebieteGestartetInfo']='You can now log out and close the browser.';
$this->phrasen['testtool/spracheDerTestfragen']='Desired language of questions';
$this->phrasen['testtool/einleitung']='Introduction';
$this->phrasen['testtool/blaettern']='Browse';
$this->phrasen['testtool/demo']='See an example';
$this->phrasen['testtool/abbrechen']='Cancel';
$this->phrasen['testtool/startGebiet']='Start the section';
$this->phrasen['testtool/okKlickenUmZuStarten']='Click OK to start this section. \nYou have a timelimit of';
$this->phrasen['testtool/bitteZuerstAnmelden']='Please log in first!';
$this->phrasen['testtool/fehlerBeimGenerierenDesFragenpools']='Error in generating the pool of questions.';
+5
View File
@@ -2,6 +2,7 @@
@import './SvgIcons.css';
@import './components/searchbar/searchbar.css';
@import './components/verticalsplit.css';
@import './components/horizontalsplit.css';
@import './components/FilterComponent.css';
@import './components/Tabs.css';
@import './components/Notiz.css';
@@ -277,3 +278,7 @@ html.fs_huge {
}
*/
/* slim ende */
.fhc-xxl-modal {
min-width: 80vw;
}
+75
View File
@@ -0,0 +1,75 @@
:root {
--fhc-horizontalsplit-hsplitter-bg-color: var(--fhc-background, #eee);
--fhc-horizontalsplit-hsplitter-border-color: var(--fhc-border, #eee);
--fhc-horizontalsplit-hsplitter-splitactions-color: var(--fhc-dark, #000);
}
.horizontalsplit-container {
display: flex;
flex-direction: row;
overflow: hidden;
max-height: 100%;
padding: 0px;
}
.horizontalsplitted {
overflow: auto;
flex-shrink: 0;
}
.horizontalsplitter {
flex-shrink: 0;
width: 16px;
cursor: col-resize;
user-select: none;
display: flex;
align-items: center;
justify-content: center;
}
.horizontalsplitter.left {
border-left: solid 3px var(--fhc-horizontalsplit-hsplitter-border-color);
margin-right: 3px;
}
.horizontalsplitter.right {
border-right: solid 3px var(--fhc-horizontalsplit-hsplitter-border-color);
margin-left: 3px;
}
.splitactions.horizontal {
background-color: var(--fhc-horizontalsplit-hsplitter-bg-color);
color: var(--fhc-horizontalsplit-hsplitter-splitactions-color);
display: flex;
flex-direction: column;
padding: 5px 0 5px 0;
}
.splitactions.horizontal.left {
border-radius: 0 40% 40% 0;
}
.splitactions.horizontal.right {
border-radius: 40% 0 0 40%;
}
.splitactions.horizontal .splitaction {
width: 14px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
}
.splitactions.horizontal .splitaction.resize {
cursor: col-resize;
}
#content {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
#content > div:first-child {
margin-top: 30px;
}
+2 -1
View File
@@ -69,6 +69,7 @@
.tag_limette {
background-color: #D3FFCE;
color: black;
}
.tag_done {
@@ -111,4 +112,4 @@
.copy-btn {
float: right;
margin-top: 3px;
}
}
+6
View File
@@ -34,4 +34,10 @@ export default {
url: 'api/frontend/v1/detailheader/detailheader/getLeitungOrg/' + oekurzbz,
};
},
getSemesterStati(prestudent_id){
return {
method: 'get',
url: 'api/frontend/v1/detailheader/detailheader/getSemesterStati/' + prestudent_id,
};
},
}
@@ -1,79 +0,0 @@
/**
* Copyright (C) 2025 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
export default {
getFerien(filterVonDatum, filterBisDatum) {
return {
method: 'get',
url: 'api/frontend/v1/education/ferien/getFerien',
params: {
filterVonDatum,
filterBisDatum
}
};
},
getOe() {
return {
method: 'get',
url: 'api/frontend/v1/education/ferien/getOe'
};
},
getStudienplaene(oe_kurzbz, vondatum, bisdatum) {
return {
method: 'get',
url: 'api/frontend/v1/education/ferien/getStudienplaene',
params: {
oe_kurzbz,
vondatum,
bisdatum
}
};
},
getFerientypen() {
return {
method: 'get',
url: 'api/frontend/v1/education/ferien/getFerientypen'
};
},
getDefaultVonBis() {
return {
method: 'get',
url: 'api/frontend/v1/education/ferien/getDefaultVonBis'
};
},
insert(params) {
return {
method: 'post',
url: 'api/frontend/v1/education/ferien/insert',
params
};
},
update(params) {
return {
method: 'post',
url: 'api/frontend/v1/education/ferien/update',
params
};
},
delete(ferien_id) {
return {
method: 'post',
url: 'api/frontend/v1/education/ferien/delete',
params: { ferien_id }
};
}
};
-3
View File
@@ -35,9 +35,6 @@ export default {
getMitarbeiter(searchString){
return this.$fhcApi.get('api/frontend/v1/stv/abschlusspruefung/getMitarbeiter/' + searchString);
},
getPruefer(searchString){
return this.$fhcApi.get('api/frontend/v1/stv/abschlusspruefung/getPruefer/' + searchString);
},
getNoten(){
return this.$fhcApi.get('api/frontend/v1/stv/abschlusspruefung/getNoten/');
},
@@ -1,12 +0,0 @@
import Ferienverwaltung from '../../../components/Ferienverwaltung/Ferienverwaltung.js';
import PluginsPhrasen from '../../../plugins/Phrasen.js';
const app = Vue.createApp({
name: 'FerienverwaltungApp',
components: {
Ferienverwaltung
}
});
app
.use(PluginsPhrasen)
.mount('#main');
+216 -82
View File
@@ -1,11 +1,13 @@
import ApiDetailHeader from "../../api/factory/detailHeader.js";
import ApiHandleFoto from "../../api/factory/fotoHandling.js";
import ModalUploadFoto from "./Modal/UploadFoto.js";
import PvSkeleton from "../../../../index.ci.php/public/js/components/primevue/skeleton/skeleton.esm.min.js";
export default {
name: 'DetailHeader',
components: {
ModalUploadFoto
ModalUploadFoto,
PvSkeleton
},
props: {
headerData: {
@@ -38,6 +40,14 @@ export default {
'mitarbeiter',
].includes(value)
}
},
currentSemester: {
type: String,
default: ''
},
isLoading: { //if true, then parent isLoading
type: Boolean,
default: false
}
},
computed: {
@@ -60,8 +70,7 @@ export default {
},
hasTileUIDSlot() {
return !!this.$slots.uid
},
}
},
created(){
if (this.typeHeader === 'student') {
@@ -71,7 +80,7 @@ export default {
} else if (this.typeHeader === 'mitarbeiter') {
if (!this.person_id || !this.mitarbeiter_uid || !this.domain) {
throw new Error(
'[DetailHeader] "person_id", "mitarbeiter_uid", and "domain" are requried.'
'[DetailHeader] "person_id", "mitarbeiter_uid", and "domain" are required.'
)
}
this.loadHeaderData(this.person_id, this.mitarbeiter_uid);
@@ -86,13 +95,26 @@ export default {
},
deep: true,
},
headerData: {
handler(newVal) {
if (this.typeHeader === 'student' && newVal?.length) {
this.getSemesterStati(newVal[0].prestudent_id);
}
},
immediate: true
},
},
data(){
return{
headerDataMa: {},
departmentData: {},
leitungData: {},
isFetchingIssues: false
isFetchingIssues: false,
noCurrentStatus: false,
semesterStatiLoading: false,
leitungOrgLoading: false,
departmentDataLoading: false,
headerDataMaLoading: false
};
},
methods: {
@@ -108,29 +130,40 @@ export default {
});
},
getHeader(person_id) {
this.headerDataMaLoading = true;
return this.$api
.call(ApiDetailHeader.getHeader(person_id))
.then(result => {
this.headerDataMa = result.data;
})
.catch(this.$fhcAlert.handleSystemError);
.catch(this.$fhcAlert.handleSystemError)
.finally(() => {
this.headerDataMaLoading = false;
});
},
loadDepartmentData(mitarbeiter_uid) {
this.departmentDataLoading = true;
return this.$api
.call(ApiDetailHeader.getPersonAbteilung(mitarbeiter_uid))
.then(result => {
this.departmentData = result.data;
})
.catch(this.$fhcAlert.handleSystemError);
.catch(this.$fhcAlert.handleSystemError)
.finally(() => {
this.departmentDataLoading = false;
});
},
getLeitungOrg(oekurzbz){
this.leitungOrgLoading = true;
return this.$api
.call(ApiDetailHeader.getLeitungOrg(oekurzbz))
.then(result => {
this.leitungData = result.data;
})
.catch(this.$fhcAlert.handleSystemError);
.catch(this.$fhcAlert.handleSystemError)
.finally(() => {
this.leitungOrgLoading = false;
});
},
async goToLeitung() {
this.loadHeaderData(this.leitungData.person_id, this.leitungData.uid);
@@ -179,6 +212,33 @@ export default {
} else {
return 'data:image/jpeg;base64,' + foto;
}
},
getSemesterStati(prestudent_id){
this.semesterStatiLoading = true;
this.$api
.call(ApiDetailHeader.getSemesterStati(prestudent_id))
.then(result => {
this.semesterStati = result.data;
this.setNoCurrentStatus();
})
.catch(this.$fhcAlert.handleSystemError)
.finally(() => {
this.semesterStatiLoading = false;
});
},
setNoCurrentStatus() {
if(!Array.isArray(this.semesterStati))
{
this.noCurrentStatus = false;
}
if(!this.semesterStati.some(item => item.studiensemester_kurzbz === this.currentSemester)) {
this.noCurrentStatus = true;
}
else
{
this.noCurrentStatus = false;
}
}
},
template: `
@@ -200,7 +260,6 @@ export default {
</modal-upload-foto>
<template v-if="typeHeader==='student'">
<div
v-for="person in headerData"
:key="person.person_id"
@@ -236,62 +295,100 @@ export default {
<small class="text-muted">{{person.uid}}</small>
</div>
<div v-if="headerData.length == 1">
<div class="d-flex align-items-center gap-3">
<h2 class="h4">
{{headerData[0].titelpre}}
{{headerData[0].vorname}}
{{headerData[0].nachname}}
<span v-if="headerData[0].titelpost">, </span>
{{headerData[0].titelpost}}
</h2>
<h6 v-if="headerData[0].unruly" class="badge" :class="'bg-unruly rounded-0'"><strong>unruly</strong></h6>
</div>
<div v-if="headerData.length == 1">
<div v-if="!isLoading" class="d-flex align-items-center gap-3">
<h2 class="h4">
{{headerData[0].titelpre}}
{{headerData[0].vorname}}
{{headerData[0].nachname}}
<span v-if="headerData[0].titelpost">, </span>
{{headerData[0].titelpost}}
</h2>
<h6 v-if="headerData[0].unruly" class="badge" :class="'bg-unruly rounded-0'"><strong>unruly</strong></h6>
</div>
<div v-else class="d-flex align-items-center gap-3">
<pv-skeleton width="15rem" height="2rem" borderRadius="16px"></pv-skeleton>
<h6 v-if="headerData[0].unruly" class="badge" :class="'bg-unruly rounded-0'"><strong>unruly</strong></h6>
</div>
<h5 class="h6">
<strong class="text-muted">{{$p.t('lehre', 'studiengang')}} </strong>
{{headerData[0].stg_bezeichnung}} ({{headerData[0].studiengang}})
<strong v-if="headerData[0].semester" class="text-muted"> | {{$p.t('lehre', 'semester')}} </strong>
{{headerData[0].semester}}
<strong v-if="headerData[0].verband" class="text-muted"> | {{$p.t('lehre', 'verband')}}</strong>
{{headerData[0].verband}}
<strong v-if="headerData[0].gruppe" class="text-muted"> | {{$p.t('lehre', 'gruppe')}} </strong>
{{headerData[0].gruppe}}
</h5>
<h5 class="h6 d-flex align-items-center flex-wrap gap-1">
<strong class="text-muted">{{$p.t('lehre', 'studiengang')}} </strong>
<span v-if="!isLoading">
{{headerData[0].stg_bezeichnung}} ({{headerData[0].studiengang}})
</span>
<span v-else>
<pv-skeleton width="10rem"></pv-skeleton>
</span>
<template v-if="!semesterStatiLoading">
<strong v-if="headerData[0].semester != null" class="text-muted"> | {{$p.t('lehre', 'semester')}} </strong>
{{headerData[0].semester}}
<strong v-if="headerData[0].gruppe !== null && headerData[0].verband != ' '" class="text-muted"> | {{$p.t('lehre', 'verband')}}</strong>
{{headerData[0].verband}}
<strong v-if="headerData[0].gruppe !== null && headerData[0].gruppe != ' '" class="text-muted"> | {{$p.t('lehre', 'gruppe')}} </strong>
{{headerData[0].gruppe}}
</template>
<template v-else>
<strong class="text-muted"> | {{$p.t('lehre', 'semester')}} </strong>
<pv-skeleton size="1rem" class="mr-2"></pv-skeleton>
<strong class="text-muted"> | {{$p.t('lehre', 'verband')}}</strong>
<pv-skeleton size="1rem" class="mr-2"></pv-skeleton>
<strong class="text-muted"> | {{$p.t('lehre', 'gruppe')}} </strong>
<pv-skeleton size="1rem" class="mr-2"></pv-skeleton>
</template>
</h5>
<h5 class="h6">
<strong class="text-muted">Email </strong>
<span>
<a :href="'mailto:'+headerData[0]?.mail_intern">{{headerData[0].mail_intern}}</a>
</span>
<strong v-if="headerData[0].statusofsemester" class="text-muted"> | Status </strong>
{{headerData[0].statusofsemester}}
</h5>
</div>
<div v-if="headerData.length == 1" class="col-md-1 d-flex flex-column align-items-end justify-content-start ms-auto">
<div class="d-flex py-1">
<div class="px-2" style="min-width: 100px;">
<slot name="issues"></slot>
</div>
<div v-if="hasTileGammaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleGammaTile"></slot></h4>
<h6 class="text-muted text-center"><slot name="valueGammaTile"></slot></h6>
</div>
<div v-if="hasTileBetaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleBetaTile"></slot></h4>
<h6 class="text-muted text-center"><slot name="valueBetaTile"></slot></h6>
</div>
<div v-if="hasTileAlphaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleAlphaTile"></slot></h4>
<h6 class="text-muted text-center"><slot name="valueAlphaTile"></slot></h6>
</div>
<div v-if="hasTileUIDSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center">UID</h4>
<h6 class="text-muted text-center"><slot name="uid"></slot></h6>
</div>
<h5 class="h6 d-flex align-items-center flex-wrap gap-1">
<strong class="text-muted">Email </strong>
<span v-if="!isLoading">
<a :href="'mailto:'+headerData[0]?.mail_intern">{{headerData[0].mail_intern}}</a>
</span>
<span v-else>
<pv-skeleton width="10rem"></pv-skeleton>
</span>
<strong class="text-muted"> | Status </strong>
<span v-if="noCurrentStatus">
<strong class="text-danger">{{$p.t('lehre', 'textNoStatusInSem', { sem: currentSemester}) }}</strong>
</span>
<span v-else>
{{headerData[0].statusofsemester}}
</span>
</h5>
</div>
<div v-if="headerData.length == 1" class="col-md-1 d-flex flex-column align-items-end justify-content-start ms-auto">
<div class="d-flex py-1">
<div class="px-2" style="min-width: 100px;">
<slot name="issues"></slot>
</div>
<div v-if="hasTileGammaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleGammaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueGammaTile"></slot>
</h6>
</div>
<div v-if="hasTileBetaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleBetaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueBetaTile"></slot>
</h6>
</div>
<div v-if="hasTileAlphaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleAlphaTile"></slot></h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueAlphaTile"></slot>
</h6>
</div>
<div v-if="hasTileUIDSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center">UID</h4>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="uid"></slot>
</h6>
</div>
</div>
</div>
</template>
@@ -330,27 +427,51 @@ export default {
<!--show Ma-Details-->
<div class="col-md-9 text-nowrap mt-2">
<h4>{{headerDataMa.titelpre}} {{headerDataMa.vorname}} {{headerDataMa.nachname}}<span v-if="headerDataMa?.titelpost">, </span> {{headerDataMa.titelpost}}</h4>
<strong class="text-muted">{{departmentData.organisationseinheittyp_kurzbz}}</strong>
{{departmentData.bezeichnung}}
<span v-if="leitungData.uid"> | </span>
<strong v-if="leitungData.uid" class="text-muted">Vorgesetzte*r </strong>
<a href="#" @click.prevent="goToLeitung">
{{leitungData.titelpre}} {{leitungData.vorname}} {{leitungData.nachname}}
</a>
<p>
<strong class="text-muted">Email </strong>
<span v-if="headerDataMa && (headerDataMa.alias === undefined || headerDataMa.alias === null || headerDataMa.alias === '')">
<a :href="'mailto:' + mitarbeiter_uid + '@' + domain">
{{ mitarbeiter_uid }}@{{ domain }}
<h4 v-if="!headerDataMaLoading">{{headerDataMa.titelpre}} {{headerDataMa.vorname}} {{headerDataMa.nachname}}<span v-if="headerDataMa?.titelpost">, </span> {{headerDataMa.titelpost}}</h4>
<h4 v-else><pv-skeleton width="15rem" height="2rem" borderRadius="16px"></pv-skeleton></h4>
<div class="d-flex align-items-center flex-wrap gap-1">
<strong class="text-muted">{{departmentData.organisationseinheittyp_kurzbz}}</strong>
<span v-if="!departmentDataLoading">
{{departmentData.bezeichnung}}
</span>
<span v-else>
<pv-skeleton width="12rem"></pv-skeleton>
</span>
<span v-if="leitungData.uid"> | </span>
<strong v-if="leitungData.uid" class="text-muted">Vorgesetzte*r </strong>
<span v-if="!leitungOrgLoading">
<a href="#" @click.prevent="goToLeitung">
{{leitungData.titelpre}} {{leitungData.vorname}} {{leitungData.nachname}}
</a>
</span>
<span v-else>
<a :href="'mailto:'+headerDataMa?.alias+'@'+domain">{{headerDataMa.alias}}@{{domain}}</a>
<pv-skeleton width="5rem"></pv-skeleton>
</span>
<span v-if="headerDataMa?.telefonklappe" class="mb-2"> | <strong class="text-muted">DW </strong>{{headerDataMa?.telefonklappe}}</span>
</p>
</div>
<div class="d-flex align-items-center gap-2 flex-nowrap">
<div class="d-flex align-items-center gap-1">
<strong class="text-muted">Email</strong>
<template v-if="!headerDataMaLoading">
<a :href="'mailto:' + (headerDataMa?.alias || mitarbeiter_uid) + '@' + domain">
{{ (headerDataMa?.alias || mitarbeiter_uid) + '@' + domain }}
</a>
</template>
<pv-skeleton v-else width="10rem"></pv-skeleton>
</div>
<div v-if="headerDataMa?.telefonklappe" class="d-flex align-items-center gap-1">
<span>|</span>
<strong class="text-muted">DW</strong>
<template v-if="!headerDataMaLoading">
{{ headerDataMa.telefonklappe }}
</template>
<pv-skeleton v-else width="4rem"></pv-skeleton>
</div>
</div>
<slot name="tag"></slot>
</div>
<div class="col-md-1 d-flex flex-column align-items-end justify-content-start ms-auto">
@@ -360,20 +481,33 @@ export default {
</div>
<div v-if="hasTileGammaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleGammaTile"></slot></h4>
<h6 class="text-muted text-center"><slot name="valueGammaTile"></slot></h6>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueGammaTile"></slot>
</h6>
</div>
<div v-if="hasTileBetaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleBetaTile"></slot></h4>
<h6 class="text-muted text-center"><slot name="valueBetaTile" :valueBetaTile="valueBetaTile"></slot></h6>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueBetaTile"></slot>
</h6>
</div>
<div v-if="hasTileAlphaSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center"><slot name="titleAlphaTile"></slot></h4>
<h6 class="text-muted text-center"><slot name="valueAlphaTile"></slot></h6>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="valueAlphaTile"></slot>
</h6>
</div>
<div v-if="hasTileUIDSlot" class="px-2" style="border-left: 1px solid #EEE">
<h4 class="mb-1 text-center">UID</h4>
<h6 class="text-muted text-center"><slot name="uid"></slot></h6>
<h6 class="text-muted d-flex align-items-center justify-content-center flex-wrap gap-1">
<pv-skeleton v-if="isLoading" width="4rem"></pv-skeleton>
<slot v-else name="uid"></slot>
</h6>
</div>
</div>
</div>
@@ -1,295 +0,0 @@
import {CoreFilterCmpt} from "../filter/Filter.js";
import {CoreNavigationCmpt} from "../navigation/Navigation.js";
import FormInput from "../Form/Input.js";
import FerienModal from "./Modal.js";
import ApiFerienverwaltung from '../../api/factory/ferienverwaltung/ferienverwaltung.js';
export default {
name: "Ferienverwaltung",
components: {
CoreFilterCmpt,
CoreNavigationCmpt,
FormInput,
FerienModal
},
data() {
return {
filterVonDatum: null,
filterBisDatum: null,
loading: false,
sideMenuEntries: {},
headerMenuEntries: {},
tabulatorOptions: {
ajaxURL: 'dummy',
ajaxRequestFunc: () => this.$api.call(
ApiFerienverwaltung.getFerien(this.filterVonDatum, this.filterBisDatum)
),
ajaxResponse: (url, params, response) => response.data,
columns: [
{title:"Ferien Id", field:"ferien_id", visible: false, headerFilter: true},
{
title:"Datum von",
field:"vondatum",
headerFilter: true,
formatter: function (cell) {
const dateStr = cell.getValue();
if (!dateStr) return "";
const date = new Date(dateStr);
return date.toLocaleString("de-DE", {
day: "2-digit",
month: "2-digit",
year: "numeric",
hour12: false
});
}
},
{
title:"Datum bis",
field:"bisdatum",
headerFilter: true,
formatter: function (cell) {
const dateStr = cell.getValue();
if (!dateStr) return "";
const date = new Date(dateStr);
return date.toLocaleString("de-DE", {
day: "2-digit",
month: "2-digit",
year: "numeric",
hour12: false
});
}
},
{title:"Bezeichnung", field:"bezeichnung", headerFilter: true},
{title:"Organisationseinheit Kurzbezeichnung", field:"oe_kurzbz", visible: false, headerFilter: true},
{title:"Organisationseinheit", field:"oe_bezeichnung", headerFilter: true},
{title:"Studienplan", field:"studienplan_bezeichnung", visible: false, headerFilter: true},
{title:"Ferientyp Kurzbezeichnung", field:"ferientyp_kurzbz", visible: false, headerFilter: true},
{
title:"Mitarbeiterrelevant",
field:"mitarbeiterrelevant",
visible: false,
headerFilter: true,
hozAlign: "center",
formatter:'tickCross', formatterParams: {
tickElement: '<i class="fas fa-check text-success"></i>',
crossElement: '<i class="fas fa-times text-danger"></i>'
},
headerFilter:"tickCross", headerFilterParams: {
"tristate":true, elementAttributes:{"value":"true"}
},
headerFilterEmptyCheck:function(value){return value === null}
},
{
title:"Studierendenrelevant",
field:"studierendenrelevant",
visible: false,
headerFilter: true,
hozAlign: "center",
formatter:'tickCross', formatterParams: {
tickElement: '<i class="fas fa-check text-success"></i>',
crossElement: '<i class="fas fa-times text-danger"></i>'
},
headerFilter:"tickCross", headerFilterParams: {
"tristate":true, elementAttributes:{"value":"true"}
},
headerFilterEmptyCheck:function(value){return value === null}
},
{
title:"Lehre planbar",
field:"lehre",
visible: false,
headerFilter: true,
hozAlign: "center",
formatter:'tickCross', formatterParams: {
tickElement: '<i class="fas fa-check text-success"></i>',
crossElement: '<i class="fas fa-times text-danger"></i>'
},
headerFilter:"tickCross", headerFilterParams: {
"tristate":true, elementAttributes:{"value":"true"}
},
headerFilterEmptyCheck:function(value){return value === null}
},
{title:"Aktionen", field: "actions",
minWidth: 150, // Ensures Action-buttons will be always fully displayed
formatter: (cell, formatterParams, onRendered) => {
let container = document.createElement('div');
container.className = "d-flex gap-2";
let button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action';
button.innerHTML = '<i class="fa fa-edit"></i>';
button.title = this.$p.t('person', 'ferien_edit');
button.addEventListener('click', (event) =>
this.$refs.modal.open(JSON.parse(JSON.stringify(cell.getData()))) // deep copy
);
container.append(button);
button = document.createElement('button');
button.className = 'btn btn-outline-secondary';
button.innerHTML = '<i class="fa fa-trash"></i>';
button.addEventListener('click', evt => {
evt.stopPropagation();
this.$fhcAlert
.confirmDelete()
.then(result => result ? cell.getData().ferien_id : Promise.reject({handled:true}))
.then(ferien_id => this.$api.call(ApiFerienverwaltung.delete(ferien_id)))
.then(() => {
//cell.getRow().delete();
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
this.reload();
})
.catch(this.$fhcAlert.handleSystemError);
});
container.append(button);
return container;
},
frozen: true
}
]
},
tabulatorEvents: [
{
event: 'tableBuilt',
handler: async () => {
//await this.$p.loadCategory(['ferien', 'ui']);
await this.$p.loadCategory(['global', 'ferien']);
let cm = this.$refs.table.tabulator.columnManager;
cm.getColumnByField('ferien_id').component.updateDefinition({
title: this.$p.t('ferien', 'ferienId'),
});
cm.getColumnByField('vondatum').component.updateDefinition({
title: this.$p.t('ferien', 'vondatum'),
});
cm.getColumnByField('bisdatum').component.updateDefinition({
title: this.$p.t('ferien', 'bisdatum'),
});
cm.getColumnByField('bezeichnung').component.updateDefinition({
title: this.$p.t('global', 'bezeichnung'),
});
cm.getColumnByField('oe_kurzbz').component.updateDefinition({
title: this.$p.t('ferien', 'oeKurzbezeichnung'),
});
cm.getColumnByField('oe_bezeichnung').component.updateDefinition({
title: this.$p.t('ferien', 'oeBezeichnung'),
});
cm.getColumnByField('studienplan_bezeichnung').component.updateDefinition({
title: this.$p.t('ferien', 'studienplanBezeichnung'),
});
cm.getColumnByField('ferientyp_kurzbz').component.updateDefinition({
title: this.$p.t('ferien', 'ferientypKurzbz'),
});
cm.getColumnByField('mitarbeiterrelevant').component.updateDefinition({
title: this.$p.t('ferien', 'mitarbeiterrelevant'),
});
cm.getColumnByField('studierendenrelevant').component.updateDefinition({
title: this.$p.t('ferien', 'studierendenrelevant'),
});
cm.getColumnByField('lehre').component.updateDefinition({
title: this.$p.t('ferien', 'lehrePlanbar'),
});
cm.getColumnByField('actions').component.updateDefinition({
title: this.$p.t('global', 'aktionen')
});
}
}
]
}
},
computed: {
},
methods: {
reload() {
this.$refs.table.reloadTable();
},
actionNew() {
this.$refs.modal.open();
}
},
created() {
this.$api
.call(ApiFerienverwaltung.getDefaultVonBis())
.then(result => {
this.filterVonDatum = result.data.defaultVon;
this.filterBisDatum = result.data.defaultBis;
}
)
.catch(error => {
if (error)
this.$fhcAlert.handleSystemError(error);
});
},
template: `
<core-navigation-cmpt
v-bind:add-side-menu-entries="sideMenuEntries"
v-bind:add-header-menu-entries="headerMenuEntries"
>
</core-navigation-cmpt>
<div class="h-100 d-flex flex-column">
<div class="row justify-content-center">
<div class="col-5">
<form-input
type="DatePicker"
v-model="filterVonDatum"
name="filtervondatum"
:label="$p.t('ferien/vondatum')"
:enable-time-picker="false"
text-input
format="dd.MM.yyyy"
auto-apply
>
</form-input>
</div>
<div class="col-5">
<form-input
type="DatePicker"
v-model="filterBisDatum"
name="filterbisdatum"
:label="$p.t('ferien/bisdatum')"
:enable-time-picker="false"
text-input
format="dd.MM.yyyy"
auto-apply
>
</form-input>
</div>
<div class="col-1 align-self-end">
<button
class="btn btn-primary"
@click="reload()"
:disabled="loading"
>
<i v-if="loading" class="fa fa-spinner fa-spin"></i>
{{ $p.t('ui/anzeigen') }}
</button>
</div>
</div>
<div class="row mt-3">
<div class="col">
<core-filter-cmpt
ref="table"
table-only
:side-menu="false"
:tabulator-options="tabulatorOptions"
:tabulator-events="tabulatorEvents"
reload
:reload-btn-infotext="this.$p.t('table', 'reload')"
new-btn-show
:new-btn-label="$p.t('ui/neu')"
@click:new="actionNew"
>
</core-filter-cmpt>
<ferien-modal ref="modal" @saved="reload"></ferien-modal>
</div>
</div>
</div>`
};
@@ -1,190 +0,0 @@
import BsModal from "../Bootstrap/Modal.js";
import BsConfirm from "../Bootstrap/Confirm.js";
import CoreForm from "../Form/Form.js";
import FormValidation from "../Form/Validation.js";
import FormInput from "../Form/Input.js";
import ApiFerien from '../../api/factory/ferienverwaltung/ferienverwaltung.js';
export default {
components: {
BsModal,
CoreForm,
FormValidation,
FormInput
},
data() {
return {
oeList: [],
studienplaeneList: [],
ferientypList: [],
loading: false,
data: {},
};
},
computed: {
},
methods: {
save() {
this.$refs.form.clearValidation();
this.loading = true;
let saveFunc = this.data.ferien_id ? ApiFerien.update : ApiFerien.insert;
this.$refs.form
.call(saveFunc(this.data))
.then(result => {
this.$emit('saved', result.data);
this.loading = false;
this.$refs.modal.hide();
this.$fhcAlert.alertSuccess(this.$p.t('ui/gespeichert'));
})
.catch(error => {
if (error)
this.$fhcAlert.handleSystemError(error);
this.loading = false;
});
},
open(data) {
this.$refs.form.clearValidation();
this.data = data ?? {
oe_kurzbz: null,
bezeichnung: '',
vondatum: null,
bisdatum: null,
studienplan_id: null
};
this.$api
.call(ApiFerien.getOe())
.then(result => {
this.oeList = result.data;
//this.loading = false;
}
)
.catch(error => {
if (error)
this.$fhcAlert.handleSystemError(error);
//this.loading = false;
});
this.getStudienplaene();
this.$api
.call(ApiFerien.getFerientypen())
.then(result => {
this.ferientypList = result.data;
}
)
.catch(error => {
if (error)
this.$fhcAlert.handleSystemError(error);
});
this.$refs.modal.show();
},
getStudienplaene() {
if (!this.data.oe_kurzbz) return;
this.$api
.call(ApiFerien.getStudienplaene(this.data.oe_kurzbz, this.data.vondatum, this.data.bisdatum))
.then(result => {
this.studienplaeneList = result.data;
}
)
.catch(error => {
if (error)
this.$fhcAlert.handleSystemError(error);
});
},
preventCloseOnLoading(ev) {
if (this.loading)
ev.returnValue = false;
}
},
template: `
<core-form ref="form" class="stv-details-ferien-edit" @submit.prevent="save">
<bs-modal ref="modal" @hide-bs-modal="preventCloseOnLoading">
<form-validation></form-validation>
<fieldset :disabled="loading">
<form-input
type="DatePicker"
v-model="data.vondatum"
name="vondatum"
:label="$p.t('ferien/vondatum')"
:enable-time-picker="false"
text-input
format="dd.MM.yyyy"
auto-apply
>
</form-input>
<form-input
type="DatePicker"
v-model="data.bisdatum"
name="bisdatum"
:label="$p.t('ferien/bisdatum')"
:enable-time-picker="false"
text-input
format="dd.MM.yyyy"
auto-apply
>
</form-input>
<form-input
v-model="data.bezeichnung"
name="bezeichnung"
:label="$p.t('global/bezeichnung')"
>
</form-input>
<form-input
type="select"
v-model="data.oe_kurzbz"
name="oe_kurzbz"
:label="$p.t('ferien/organisationseinheit')"
@change="getStudienplaene"
>
<option :value="null">-- {{ $p.t('ui/alle') }} --</option>
<option v-for="oe in oeList" :key="oe.oe_kurzbz" :value="oe.oe_kurzbz">
{{ oe.organisationseinheittyp_kurzbz + ' ' + oe.bezeichnung }}
</option>
</form-input>
<form-input
type="select"
v-model="data.studienplan_id"
name="studienplan_id"
:label="$p.t('ferien/studienplan')"
>
<option :value="null">-- {{ $p.t('ui/keineAuswahl') }} --</option>
<option v-for="studienplan in studienplaeneList" :key="studienplan.studienplan_id" :value="studienplan.studienplan_id">
{{ studienplan.bezeichnung }}
</option>
</form-input>
<form-input
type="select"
v-model="data.ferientyp_kurzbz"
name="ferientyp_kurzbz"
:label="$p.t('ferien/ferientypKurzbz')"
>
<option :value="null">-- {{ $p.t('ui/keineAuswahl') }} --</option>
<option v-for="ferientyp in ferientypList" :key="ferientyp.ferientyp_kurzbz" :value="ferientyp.ferientyp_kurzbz">
{{ ferientyp.ferientyp_kurzbz }}
</option>
</form-input>
</fieldset>
<template #footer>
<button type="submit" class="btn btn-primary" :disabled="loading">
<i v-if="loading" class="fa fa-spinner fa-spin"></i>
{{ $p.t('ui/speichern') }}
</button>
</template>
</bs-modal>
</core-form>`
};
+3 -1
View File
@@ -29,7 +29,8 @@ export default {
label: String,
// NOTE(chris): remove these from $attrs array to prevent doubled event listeners
onInput: [Array, Function],
'onUpdate:modelValue': [Array, Function]
'onUpdate:modelValue': [Array, Function],
titleActionButton: String
},
data() {
return {
@@ -317,6 +318,7 @@ export default {
:id="idCmp"
:name="name"
:class="validationClass"
:titleActionButton="titleActionButton"
@update:model-value="clearValidationForThisName"
>
<slot></slot>
+11 -2
View File
@@ -1,9 +1,14 @@
export default {
emits: [
'update:modelValue'
'update:modelValue',
'actionbutton-clicked'
],
props: {
modelValue: String
modelValue: String,
titleActionButton: {
type: String,
default: ""
}
},
computed: {
valueAsBase64DataString() {
@@ -28,6 +33,9 @@ export default {
},
deleteImage() {
this.$emit('update:modelValue', '');
},
emitAction(){
this.$emit('actionbutton-clicked', this.modelValue);
}
},
template: `
@@ -42,6 +50,7 @@ export default {
<button type="button" class="btn btn-outline-dark btn-sm" @click="openUploadDialog">
<i class="fa fa-pen"></i>
</button>
<button v-if="titleActionButton" class="btn btn-outline-dark btn-sm" @click="emitAction">{{titleActionButton}}</button>
</div>
</div>
</template>
+134 -21
View File
@@ -18,6 +18,7 @@
import CoreSearchbar from "../searchbar/searchbar.js";
import NavLanguage from "../navigation/Language.js";
import VerticalSplit from "../verticalsplit/verticalsplit.js";
import HorizontalSplit from "../horizontalsplit/horizontalsplit.js";
import AppMenu from "../AppMenu.js";
import AppConfig from "../AppConfig.js";
import StvVerband from "./Studentenverwaltung/Verband.js";
@@ -37,6 +38,7 @@ export default {
CoreSearchbar,
NavLanguage,
VerticalSplit,
HorizontalSplit,
AppMenu,
AppConfig,
StvVerband,
@@ -192,7 +194,44 @@ export default {
}
return extraItems;
}
},
appMenuLvPlanungItems() {
const extraItems = [];
if (this.studiengangKz !== undefined && this.selected_semester !== undefined) {
const studiengang_kz = String(this.studiengangKz);
const semester = String(this.selected_semester);
const orgform = this.selected_orgform || '';
extraItems.push({
link: FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'content/statistik/lvplanung.xls.php?'
+ '&studiengang_kz=' + studiengang_kz
+ '&semester=' + semester
+ '&studiensemester_kurzbz=' + this.studiensemesterKurzbz
+ '&orgform_kurzbz=' + orgform,
description: 'stv/lvplanung_xls'
});
extraItems.push({
link: FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'content/statistik/lvplanung.php?'
+ '&studiengang_kz=' + studiengang_kz
+ '&semester=' + semester,
description: 'stv/lvplanung_html'
});
}
return extraItems;
},
linkRt(){
return FHC_JS_DATA_STORAGE_OBJECT.app_root + '/vilesci/stammdaten/reihungstestverwaltung.php'
},
selected_uid(){
return this.selected?.[this.selected.length - 1]?.uid ?? null;
},
linkGradeList(){
return FHC_JS_DATA_STORAGE_OBJECT.app_root + 'index.ci.php/person/gradelist/index/' + this.selected_uid
},
},
watch: {
'url_studiensemester_kurzbz': function (newVal, oldVal) {
@@ -212,6 +251,7 @@ export default {
'url_studiengang': function (newVal, oldVal) {
if (newVal !== oldVal) {
this.checkUrlStudiengang();
this.$refs.stvList.clearSelection();
}
},
'url_mode': function () {
@@ -235,6 +275,10 @@ export default {
}
}
}
},
sidebarCollapsed(newVal) {
if(newVal) this.$refs.hSplit.collapseLeft()
else this.$refs.hSplit.showBoth()
}
},
methods: {
@@ -431,6 +475,15 @@ export default {
},
deleteCustomFilter(){
this.$refs.stvList.resetFilter();
},
showAlertNoSelectedStudent(){
this.$fhcAlert.alertError(this.$p.t('ui', 'alert_chooseStudent'));
},
showAlertMultipleStudents() {
this.$fhcAlert.alertError(this.$p.t('ui', 'alert_chooseOnlyOneStudent'));
},
showAlertNoGroupChosen(){
this.$fhcAlert.alertError(this.$p.t('ui', 'alert_chooseGroupSem'));
}
},
created() {
@@ -606,19 +659,26 @@ export default {
</div>
<div class="offcanvas-body">
<app-menu app-identifier="stv">
<li class="dropend">
<li :class="{ dropend: appMenuExtraItems.length }">
<a
v-if="appMenuExtraItems.length"
class="dropdown-toggle"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false"
:class="{ disabled: !appMenuExtraItems.length }"
data-bs-popper-config='{"strategy":"fixed"}'
>
{{ $p.t('stv/grade_report') }}
</a>
<ul class="dropdown-menu p-0">
<a
v-else
href="#"
@click.prevent="showAlertNoGroupChosen"
>
{{ $p.t('stv/grade_report') }}
</a>
<ul v-if="appMenuExtraItems.length" class="dropdown-menu p-0">
<li
v-for="(item, key) in appMenuExtraItems"
:key="key"
@@ -629,26 +689,79 @@ export default {
</li>
</ul>
</li>
<li :class="{ dropend: appMenuExtraItems.length }">
<a
v-if="appMenuExtraItems.length"
class="dropdown-toggle"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false"
data-bs-popper-config='{"strategy":"fixed"}'
>
{{ $p.t('stv/lvplanung') }}
</a>
<a
v-else
href="#"
@click.prevent="showAlertNoGroupChosen"
>
{{ $p.t('stv/lvplanung') }}
</a>
<ul v-if="appMenuExtraItems.length" class="dropdown-menu p-0">
<li
v-for="(item, key) in appMenuLvPlanungItems"
:key="key"
>
<a class="dropdown-item" :href="item.link" target="_blank">
{{ $p.t(item.description) }}
</a>
</li>
</ul>
</li>
<li>
<a :href="linkRt" target="_blank">
{{ $p.t('stv/RTVerwaltung') }}
</a>
</li>
<li>
<a v-if="selected.length === 1" :href="linkGradeList" target="_blank">
{{ $p.t('stv/studienverlauf') }}
</a>
<a v-else-if="selected.length === 0" href="#" @click.prevent="showAlertNoSelectedStudent">
{{ $p.t('stv/studienverlauf') }}
</a>
<a v-else href="#" @click.prevent="showAlertMultipleStudents">
{{ $p.t('stv/studienverlauf') }}
</a>
</li>
</app-menu>
</div>
</aside>
<nav id="sidebarMenu" class="bg-light offcanvas offcanvas-start col-md p-md-0 h-100">
<div class="offcanvas-header justify-content-end px-1 d-md-none">
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" :aria-label="$p.t('ui/schliessen')"></button>
</div>
<stv-verband :preselectedKey="studiengangKz ? '' + studiengangKz : null" :endpoint="verbandEndpoint" @select-verband="onSelectVerband" class="col" style="height:0%"></stv-verband>
<stv-studiensemester v-model:studiensemester-kurzbz="studiensemesterKurzbz" @update:studiensemester-kurzbz="studiensemesterChanged"></stv-studiensemester>
</nav>
<main class="col-md-8 ms-sm-auto col-lg-9 col-xl-10">
<vertical-split>
<template #top>
<stv-list ref="stvList" v-model:selected="selected" :studiengang-kz="studiengangKz" :studiensemester-kurzbz="studiensemesterKurzbz" @filterActive="handleCustomFilter"></stv-list>
</template>
<template #bottom>
<stv-details ref="details" :students="selected" @reload="reloadList"></stv-details>
</template>
</vertical-split>
</main>
<horizontal-split ref="hSplit" :defaultRatio="[15, 85]">
<template #left>
<nav id="sidebarMenu" class="bg-light offcanvas offcanvas-start col-md p-md-0 h-100 w-100">
<div class="offcanvas-header justify-content-end px-1 d-md-none">
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" :aria-label="$p.t('ui/schliessen')"></button>
</div>
<stv-verband :preselectedKey="studiengangKz ? '' + studiengangKz : null" :endpoint="verbandEndpoint" @select-verband="onSelectVerband" class="col" style="height:0%"></stv-verband>
<stv-studiensemester v-model:studiensemester-kurzbz="studiensemesterKurzbz" @update:studiensemester-kurzbz="studiensemesterChanged"></stv-studiensemester>
</nav>
</template>
<template #right>
<main>
<vertical-split :defaultRatio="[50, 50]">
<template #top>
<stv-list ref="stvList" v-model:selected="selected" :studiengang-kz="studiengangKz" :studiensemester-kurzbz="studiensemesterKurzbz" @filterActive="handleCustomFilter"></stv-list>
</template>
<template #bottom>
<stv-details ref="details" :students="selected" @reload="reloadList"></stv-details>
</template>
</vertical-split>
</main>
</template>
</horizontal-split>
</div>
</div>
<app-config ref="config" v-model="appconfig" :endpoints="configEndpoints"></app-config>
@@ -2,12 +2,18 @@ import FhcTabs from "../../Tabs.js";
import FhcHeader from "../../DetailHeader/DetailHeader.js";
import ApiStvApp from '../../../api/factory/stv/app.js';
import ApiStudent from '../../../api/factory/stv/students.js';
// TODO(chris): alt & title
// TODO(chris): phrasen
export default {
name: "DetailsPrestudent",
inject: {
currentSemester: {
from: 'currentSemester',
},
},
components: {
FhcTabs,
FhcHeader
@@ -15,7 +21,9 @@ export default {
data() {
return {
configStudent: {},
configStudents: {}
configStudents: {},
activeTab: null,
localStudent: null
};
},
props: {
@@ -40,6 +48,9 @@ export default {
}
return Object.fromEntries(Object.entries(this.configStudents).filter(([ , value ]) => !value.showOnlyWithUid && !value.showOnlyWithUid));
},
isLoading() {
return this.students === null; //null-> loading, [] -> empty, [...] -> data, necessary for skeleton in child
},
tile_PersId(){
let tile = this.students[0].person_id != null ? this.students[0].person_id : '-';
return tile;
@@ -57,6 +68,21 @@ export default {
'$p.user_language.value'(n, o) {
if (n !== o && o !== undefined)
this.loadConfig();
},
currentSemester(newVal) {
if (
Array.isArray(this.students) &&
this.students.length === 1 &&
newVal !== this.students[0].query_studiensemester_kurzbz
) {
this.reloadDataStudent();
}
else {
this.localStudent = null;
}
},
students() {
this.localStudent = null;
}
},
methods: {
@@ -74,10 +100,28 @@ export default {
})
.catch(this.$fhcAlert.handleSystemError);
},
handleTabChanged(key) {
this.activeTab = key
this.reload()
},
reload() {
if (this.$refs.tabs?.$refs?.current?.reload)
this.$refs.tabs.$refs.current.reload();
},
reloadDataStudent(){
this.localStudent = null;
const studentArr = this.students;
if (!studentArr || !studentArr.length) {
return;
}
this.$api
.call(ApiStudent.uid(studentArr[0].uid, this.currentSemester))
.then(result => {
this.localStudent = result.data;
});
},
reloadList() {
this.$emit('reload');
},
@@ -92,10 +136,12 @@ export default {
</div>
<div v-else-if="configStudent && configStudents" class="d-flex flex-column h-100">
<fhc-header
:headerData="students"
:headerData="localStudent || students"
:currentSemester="currentSemester"
typeHeader="student"
@reload="reloadList"
fotoEditable
:isLoading="isLoading"
>
<template #uid>{{students[0].uid}}</template>
<template #titleAlphaTile>PersID</template>
@@ -107,16 +153,16 @@ export default {
</fhc-header>
<fhc-tabs
v-if="students.length == 1"
ref="tabs"
ref="tabs"
:useprimevue="true"
:modelValue="students[0]"
:modelValue="(Array.isArray(localStudent) && localStudent[0]) || students[0]"
:config="config"
:default="$route.params.tab"
:default="activeTab ?? $route.params.tab"
style="flex: 1 1 0%; height: 0%"
@changed="reload"
@changed="handleTabChanged"
>
</fhc-tabs>
<fhc-tabs v-else ref="tabs" :useprimevue="true" :modelValue="students" :config="config" :default="$route.params.tab" style="flex: 1 1 0%; height: 0%" @changed="reload"></fhc-tabs>
<fhc-tabs v-else ref="tabs" :useprimevue="true" :modelValue="students" :config="config" :default="activeTab ?? $route.params.tab" style="flex: 1 1 0%; height: 0%" @changed="handleTabChanged"></fhc-tabs>
</div>
<div v-else>
Loading...
@@ -238,6 +238,16 @@ export default {
}
return this.student.map(e => e.uid);
},
studentNames() {
if (this.student.uid)
{
return [this.student.vorname + ' ' + this.student.nachname];
}
const array = this.student.map(e => ' ' + e.vorname + ' ' + e.nachname + '(' + e.uid +')');
return array.toString();
},
studentKzs(){
if (this.student.uid)
{
@@ -287,10 +297,50 @@ export default {
.catch(this.$fhcAlert.handleSystemError);
},
actionNewAbschlusspruefung() {
this.resetForm();
this.statusNew = true;
this.$refs.finalexamModal.show();
this.setDefaultFormData();
this.statusNew = true;
//prepare local Storage
let STORAGE_KEY = 'finalExamDefaultData';
const id = '20260224_02';
const stored = JSON.parse(localStorage.getItem(STORAGE_KEY)) || {};
if (stored[id]) {
const data = stored[id];
this.formData.pruefungstyp_kurzbz = data.pruefungstyp_kurzbz;
this.formData.datum = data.datum;
this.formData.sponsion = data.sponsion;
this.formData.akadgrad_id = data.akadgrad_id;
if (data.vorsitz_uid) {
this.selectedVorsitz = {
mitarbeiter_uid: data.vorsitz_uid,
person_id: data.vorsitz_person_id,
label: data.vorsitz_label
};
}
if (data.pruefer1_person_id) {
this.selectedPruefer1 = {
person_id: data.pruefer1_person_id,
label: data.pruefer1_label
};
}
if (data.pruefer2_person_id) {
this.selectedPruefer2 = {
person_id: data.pruefer2_person_id,
label: data.pruefer2_label
};
}
if (data.pruefer3_person_id) {
this.selectedPruefer3 = {
person_id: data.pruefer3_person_id,
label: data.pruefer3_label
};
}
}
this.$refs.finalexamModal.show();
},
actionEditAbschlusspruefung(abschlusspruefung_id) {
this.resetForm();
@@ -305,20 +355,23 @@ export default {
};
if (data.p1_person_id) {
this.selectedPruefer1 = {
label: this.getPersonLabel(data.p1_titelpre, data.p1_nachname, data.p1_vorname, data.p1_titelpost),
person_id: data.p1_person_id
label: this.getPersonLabel(data.p1_titelpre, data.p1_nachname, data.p1_vorname, data.p1_titelpost, data.p1_uid),
person_id: data.p1_person_id,
mitarbeiter_uid: data.p1_uid
};
}
if (data.p2_person_id) {
this.selectedPruefer2 = {
label: this.getPersonLabel(data.p2_titelpre, data.p2_nachname, data.p2_vorname, data.p2_titelpost),
person_id: data.p2_person_id
label: this.getPersonLabel(data.p2_titelpre, data.p2_nachname, data.p2_vorname, data.p2_titelpost, data.p2_uid),
person_id: data.p2_person_id,
mitarbeiter_uid: data.p2_uid
}
};
if (data.p3_person_id) {
this.selectedPruefer3= {
label: this.getPersonLabel(data.p3_titelpre, data.p3_nachname, data.p3_vorname, data.p3_titelpost),
person_id: data.p3_person_id
label: this.getPersonLabel(data.p3_titelpre, data.p3_nachname, data.p3_vorname, data.p3_titelpost, data.p3_uid),
person_id: data.p3_person_id,
mitarbeiter_uid: data.p3_uid
};
}
});
@@ -337,6 +390,29 @@ export default {
.then(this.deleteAbschlusspruefung)
.catch(this.$fhcAlert.handleSystemError);
},
saveOrUpdateLocalStorage(){
let STORAGE_KEY = 'finalExamDefaultData';
const id = '20260224_02';
const stored = JSON.parse(localStorage.getItem(STORAGE_KEY)) || {};
stored[id] = {
pruefungstyp_kurzbz: this.formData.pruefungstyp_kurzbz,
vorsitz_uid: this.selectedVorsitz?.mitarbeiter_uid || null,
vorsitz_person_id: this.selectedVorsitz?.person_id || null,
vorsitz_label: this.selectedVorsitz?.label || null,
pruefer1_person_id: this.selectedPruefer1?.person_id || null,
pruefer1_label: this.selectedPruefer1?.label || null,
pruefer2_person_id: this.selectedPruefer2?.person_id || null,
pruefer2_label: this.selectedPruefer2?.label || null,
pruefer3_person_id: this.selectedPruefer3?.person_id || null,
pruefer3_label: this.selectedPruefer3?.label || null,
akadgrad_id: this.formData.akadgrad_id,
datum: this.formData.datum,
sponsion: this.formData.sponsion
};
localStorage.setItem(STORAGE_KEY, JSON.stringify(stored));
},
addNewAbschlusspruefung() {
const dataToSend = {
uid: this.student.uid,
@@ -347,6 +423,8 @@ export default {
.call(ApiStvAbschlusspruefung.addNewAbschlusspruefung(dataToSend))
.then(response => {
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
//save formData fields in LocalStorage
this.saveOrUpdateLocalStorage();
this.hideModal('finalexamModal');
this.resetForm();
})
@@ -355,6 +433,26 @@ export default {
this.reload();
});
},
async addNewAbschlusspruefungMulti(){
try {
for (const student of this.studentUids) {
await this.$refs.formFinalExam.call(
ApiStvAbschlusspruefung.addNewAbschlusspruefung({
uid: student,
formData: this.formData
})
);
}
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
//save formData fields in LocalStorage
this.saveOrUpdateLocalStorage();
this.hideModal('finalexamModal');
this.resetForm();
} catch (error) {
this.$fhcAlert.handleSystemError(error);
}
},
hideModal(modalRef){
this.$refs[modalRef].hide();
},
@@ -376,6 +474,9 @@ export default {
id: abschlusspruefung_id,
formData: this.formData
};
//uncomment if also save data in local storage for update
//this.saveOrUpdateLocalStorage();
return this.$refs.formFinalExam
.call(ApiStvAbschlusspruefung.updateAbschlusspruefung(dataToSend))
.then(response => {
@@ -417,7 +518,6 @@ export default {
this.selectedPruefer1 = null;
this.selectedPruefer2 = null;
this.selectedPruefer3 = null;
},
setDefaultFormData() {
@@ -471,29 +571,29 @@ export default {
searchPerson(event) {
if (this.abortController.persons) {
this.abortController.persons.abort();
}
}
this.abortController.persons = new AbortController();
return this.$api
.call(ApiStvAbschlusspruefung.getPruefer(event.query))
.then(result => {
this.filteredPersons = [];
for (let person of result.data.retval) {
this.filteredPersons.push(
{
label: this.getPersonLabel(
person.titelpre,
person.nachname,
person.vorname,
person.titelpost,
person.person_uid
),
person_id: person.person_id
}
);
}
});
this.filteredPersons = [];
for (let person of result.data.retval) {
this.filteredPersons.push(
{
label: this.getPersonLabel(
person.titelpre,
person.nachname,
person.vorname,
person.titelpost,
person.uid
),
person_id: person.person_id,
mitarbeiter_uid: person.uid
}
);
}
});
},
},
created() {
@@ -526,7 +626,7 @@ export default {
.catch(this.$fhcAlert.handleSystemError);
this.$api
.call(ApiStvAbschlusspruefung.getAkadGrade(this.student.studiengang_kz))
.call(ApiStvAbschlusspruefung.getAkadGrade(this.stg_kz))
.then(result => {
this.arrAkadGrad = result.data;
})
@@ -547,7 +647,8 @@ export default {
<div class="stv-details-abschlusspruefung h-100 pb-3">
<h4>{{this.$p.t('stv','tab_finalexam')}}</h4>
<div v-if="this.student.length">
<div v-if="this.student.length" class="d-flex gap-2">
<button class="btn btn-primary" @click="actionNewAbschlusspruefung()"> + {{$p.t('stv', 'tab_finalexam')}}</button>
<abschlusspruefung-dropdown
:showAllFormats="showAllFormats"
:studentUids="studentUids"
@@ -579,12 +680,14 @@ export default {
<template #title>
<p v-if="statusNew" class="fw-bold mt-3">{{$p.t('abschlusspruefung', 'abschluessPruefungAnlegen')}}</p>
<p v-else class="fw-bold mt-3">{{$p.t('abschlusspruefung', 'abschluessPruefungBearbeiten')}}</p>
<small v-if="this.student.length" class="text-muted">{{studentNames}}</small>
</template>
<form-form v-if="!this.student.length" ref="formFinalExam" @submit.prevent>
<form-form ref="formFinalExam" @submit.prevent>
<legend>{{this.$p.t('global','details')}}</legend>
<p v-if="statusNew">[{{$p.t('ui', 'neu')}}]</p>
<div class="row mb-3">
<form-input
container-class="col-6 stv-details-abschlusspruefung-typ"
@@ -602,6 +705,7 @@ export default {
</option>
</form-input>
<form-input
v-if="!this.student.length"
container-class="col-6 stv-details-abschlusspruefung-note"
:label="$p.t('abschlusspruefung', 'notekommpruefung')"
type="select"
@@ -670,9 +774,10 @@ export default {
>
</form-input>
</div>
<div class="row mb-3">
<form-input
v-if="!this.student.length"
container-class="col-6 stv-details-abschlusspruefung-abschlussbeurteilung_kurzbz"
:label="$p.t('abschlusspruefung', 'abschlussbeurteilung')"
type="select"
@@ -698,7 +803,23 @@ export default {
optionValue="person_id"
dropdown
forceSelection
:suggestions="filteredPersons"
:suggestions="filteredPersons"
@complete="searchPerson"
:min-length="3"
>
</form-input>
<form-input
v-if="this.student.length"
type="autocomplete"
container-class="col-6 stv-details-abschlusspruefung-pruefer3"
:label="$p.t('abschlusspruefung', 'pruefer3')"
name="pruefer3"
v-model="selectedPruefer3"
optionLabel="label"
optionValue="person_id"
dropdown
forceSelection
:suggestions="filteredPersons"
@complete="searchPerson"
:min-length="3"
>
@@ -722,6 +843,7 @@ export default {
</option>
</form-input>
<form-input
v-if="!this.student.length"
type="autocomplete"
container-class="col-6 stv-details-abschlusspruefung-pruefer3"
:label="$p.t('abschlusspruefung', 'pruefer3')"
@@ -731,7 +853,7 @@ export default {
optionValue="person_id"
dropdown
forceSelection
:suggestions="filteredPersons"
:suggestions="filteredPersons"
@complete="searchPerson"
:min-length="3"
>
@@ -779,6 +901,7 @@ export default {
>
</form-input>
<form-input
v-if="!this.student.length"
container-class="col-6 stv-details-abschlusspruefung-protokoll"
:label="$p.t('abschlusspruefung', 'protokoll')"
type="textarea"
@@ -790,7 +913,7 @@ export default {
</form-input>
</div>
<div class="row mb-3 col-6">
<div v-if="!this.student.length" class="row mb-3 col-6">
<div class="col">
<p >{{$p.t('abschlusspruefung', 'zurBeurteilung')}}</p>
</div>
@@ -807,8 +930,9 @@ export default {
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{$p.t('ui', 'abbrechen')}}</button>
<button v-if="statusNew" class="btn btn-primary" @click="addNewAbschlusspruefung()"> {{$p.t('ui', 'speichern')}}</button>
<button v-else class="btn btn-primary" @click="updateAbschlusspruefung(formData.abschlusspruefung_id)"> {{$p.t('ui', 'speichern')}}</button>
<button v-if="statusNew && !this.student.length" class="btn btn-primary" @click="addNewAbschlusspruefung()"> {{$p.t('ui', 'speichern')}}</button>
<button v-else-if="statusNew && this.student.length" class="btn btn-primary" @click="addNewAbschlusspruefungMulti(studentUids)"> {{$p.t('ui', 'speichern')}}</button>
<button v-else class="btn btn-primary" @click="updateAbschlusspruefung(formData.abschlusspruefung_id)"> {{$p.t('ui', 'speichern')}}</button>
</template>
</bs-modal>
@@ -158,6 +158,16 @@ export default {
},
reload(){
this.updateStudent(this.modelValue);
},
sendInfomail(){
const subject = this.$p.t('person', 'betreffProfilfoto');
const subjectEncoded = encodeURIComponent(subject);
const body = this.$p.t('person', 'mailText_profilfoto');
const bodyWithNewLines = body.replace(/\\n/g, '\n');
const bodyEncoded = encodeURIComponent(bodyWithNewLines);
window.location.href = "mailto:" + this.modelValue.mail_intern + "?subject=" + subjectEncoded + "&body=" + bodyEncoded;
}
},
created() {
@@ -386,8 +396,10 @@ export default {
container-class="col stv-details-details-foto"
:label="$p.t('person', 'foto')"
type="UploadImage"
titleActionButton="Infomail"
v-model="data.foto"
name="foto"
@actionbutton-clicked="sendInfomail"
>
<img alt="No Image" :src="noImageSrc" class="w-100">
</form-input>
@@ -5,6 +5,7 @@ import PvAutoComplete from "../../../../../../../index.ci.php/public/js/componen
import ApiStvProjektarbeit from '../../../../../api/factory/stv/projektarbeit.js';
export default {
name: 'ProjektarbeitDetails',
components: {
FormForm,
FormInput,
@@ -110,6 +111,10 @@ export default {
this.formData.anmerkung = null;
this.$refs.formDetails.clearValidation();
},
setFormData(projektarbeit) {
this.formData = projektarbeit;
if (this.formData.firma_id) this.formData.firma = {firma_id: this.formData.firma_id, name: this.formData.firma_name};
},
getFormData(newProjektarbeit, studiensemester_kurzbz, additional_lehrveranstaltung_id) {
this.additional_lehrveranstaltung_id = additional_lehrveranstaltung_id;
@@ -148,8 +153,7 @@ export default {
return this.$api
.call(ApiStvProjektarbeit.loadProjektarbeit(projektarbeit_id))
.then(result => {
this.formData = result.data;
if (this.formData.firma_id) this.formData.firma = {firma_id: this.formData.firma_id, name: this.formData.firma_name};
this.setFormData(result.data)
return result;
})
.catch(this.$fhcAlert.handleSystemError)
@@ -9,6 +9,7 @@ import ProjektarbeitDetails from "./Details.js";
import Projektbetreuer from "./Projektbetreuer.js";
export default {
name: 'Projektarbeit',
components: {
CoreFilterCmpt,
BsModal,
@@ -213,17 +214,6 @@ export default {
});
container.append(button);
button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action';
button.innerHTML = '<i class="fa fa-users"></i>';
button.title = this.$p.t('projektarbeit', 'betreuerBearbeiten');
button.addEventListener('click', (event) => {
let data = cell.getData();
this.editedProjektarbeit = data;
this.actionEditBetreuer();
});
container.append(button);
button = document.createElement('button');
button.className = 'btn btn-outline-secondary btn-action';
button.innerHTML = '<i class="fa fa-xmark"></i>';
@@ -264,6 +254,7 @@ export default {
actionEditProjektarbeit() {
this.statusNew = false;
this.toggleMenu('details');
this.$refs.projektbetreuer.getProjektbetreuer(this.editedProjektarbeit?.projektarbeit_id, this.editedProjektarbeit?.studiensemester_kurzbz);
this.$refs.projektarbeitModal.show();
},
actionEditBetreuer() {
@@ -280,9 +271,18 @@ export default {
.then(this.deleteProjektarbeit)
.catch(this.$fhcAlert.handleSystemError);
},
saveProjektarbeit() {
if(this.statusNew) this.addNewProjektarbeit()
else this.updateProjektarbeit()
},
addNewProjektarbeit() {
this.$refs.projektarbeitDetails.addNewProjektarbeit()
.then((result) => {
if(result?.data?.length) {
this.editedProjektarbeit = result.data[0]
this.$refs.projektarbeitDetails.setFormData(this.editedProjektarbeit)
this.toggleMenu('betreuer');
}
this.projektarbeitSaved();
})
.catch(this.$fhcAlert.handleSystemError);
@@ -308,7 +308,8 @@ export default {
projektarbeitSaved() {
this.reload();
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
this.hideModal('projektarbeitModal');
if(!this.statusNew) this.hideModal('projektarbeitModal');
else this.statusNew = false
},
setDefaultStunden(projekttyp_kurzbz) {
this.$refs.projektbetreuer.setDefaultStunden(projekttyp_kurzbz);
@@ -321,22 +322,22 @@ export default {
},
toggleMenu(tabId) {
this.activeTab = tabId;
if (this.statusNew == false) {
switch(tabId) {
case 'details':
this.$refs.projektarbeitDetails.getFormData(
this.statusNew, this.editedProjektarbeit?.studiensemester_kurzbz, this.editedProjektarbeit?.lehrveranstaltung_id
);
this.$refs.projektarbeitDetails.loadProjektarbeit(this.editedProjektarbeit?.projektarbeit_id);
break;
case 'betreuer':
this.$refs.projektbetreuer.getFormData(
this.editedProjektarbeit ? this.editedProjektarbeit.projekttyp_kurzbz : null
);
this.$refs.projektbetreuer.getProjektbetreuer(this.editedProjektarbeit?.projektarbeit_id, this.editedProjektarbeit?.studiensemester_kurzbz);
break;
}
if (this.statusNew == false && tabId == 'details') {
this.$refs.projektarbeitDetails.getFormData(
this.statusNew, this.editedProjektarbeit?.studiensemester_kurzbz, this.editedProjektarbeit?.lehrveranstaltung_id
);
this.$refs.projektarbeitDetails.loadProjektarbeit(this.editedProjektarbeit?.projektarbeit_id);
} else if(tabId == 'betreuer') {
this.$refs.projektbetreuer.getFormData(
this.editedProjektarbeit ? this.editedProjektarbeit.projekttyp_kurzbz : null
);
this.$refs.projektbetreuer.getProjektbetreuer(this.editedProjektarbeit?.projektarbeit_id, this.editedProjektarbeit?.studiensemester_kurzbz);
}
},
resetFormData() {
this.$refs.projektarbeitDetails.resetForm()
this.$refs.projektbetreuer.resetForm()
}
},
template: `
@@ -358,46 +359,29 @@ export default {
</core-filter-cmpt>
<!--Modal: projektarbeitModal-->
<bs-modal ref="projektarbeitModal" dialog-class="modal-xl modal-dialog-scrollable" header-class="flex-wrap pb-0">
<bs-modal ref="projektarbeitModal" :dialog-class="(statusNew ? 'modal-xl ' : 'fhc-xxl-modal ' ) + 'modal-dialog-scrollable'"
header-class="flex-wrap pb-0"
@hideBsModal="resetFormData"
>
<template #title>
<p v-if="statusNew" class="fw-bold mt-3">{{$p.t('projektarbeit', 'projektarbeitAnlegen')}}</p>
<p v-else class="fw-bold mt-3">{{$p.t('projektarbeit', 'projektarbeitBearbeiten')}}</p>
</template>
<template #modal-header-content v-if="!statusNew">
<ul class="nav nav-tabs w-100 mt-3 msg_preview" id="pa_tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" :class="activeTab == 'details' ? 'active' : ''" id="details-tab" data-bs-toggle="tab" data-bs-target="#details" type="button" role="tab" aria-controls="details" aria-selected="true" @click="toggleMenu('details')">Details</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" :class="activeTab == 'betreuer' ? 'active' : ''" id="betreuer-tab" data-bs-toggle="tab" data-bs-target="#betreuer" type="button" role="tab" aria-controls="betreuer" aria-selected="false" @click="toggleMenu('betreuer')">{{$p.t('projektarbeit', 'betreuerGross')}}</button>
</li>
</ul>
</template>
<div class="tab-content" id="pa_content">
<div class="tab-pane fade show" :class="activeTab == 'details' ? 'active' : ''" id="details" role="tabpanel" aria-labelledby="details-tab">
<div class="row">
<div class="col-12">
<projektarbeit-details ref="projektarbeitDetails" :student="student" @projekttyp-changed="setDefaultStunden">
</projektarbeit-details>
</div>
</div>
<div class="row" >
<div :class="statusNew ? 'col-12' : 'col-6'">
<projektarbeit-details ref="projektarbeitDetails" :student="student" @projekttyp-changed="setDefaultStunden">
</projektarbeit-details>
</div>
<div class="tab-pane fade show" :class="activeTab == 'betreuer' ? 'active' : ''" id="betreuer" role="tabpanel" aria-labelledby="betreuer-tab">
<div class="row">
<div class="col-12">
<projektbetreuer ref="projektbetreuer" :config="config" @betreuer-saved="reload"></projektbetreuer>
</div>
</div>
<div :class="statusNew ? '' : 'col-6'" :style="statusNew ? 'display: none' : ''">
<projektbetreuer ref="projektbetreuer" :config="config" @betreuer-saved="reload"></projektbetreuer>
</div>
</div>
<template #footer>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{$p.t('ui', 'abbrechen')}}</button>
<button v-if="statusNew" class="btn btn-primary" @click="addNewProjektarbeit()"> {{$p.t('ui', 'speichern')}}</button>
<button v-if="!statusNew && activeTab == 'details'" class="btn btn-primary" @click="updateProjektarbeit()"> {{$p.t('ui', 'speichern')}}</button>
<button type="button" class="btn btn-secondary" @click="resetFormData" data-bs-dismiss="modal">{{$p.t('ui', 'abbrechen')}}</button>
<button class="btn btn-primary" @click="saveProjektarbeit()"> {{$p.t('ui', 'speichern')}}</button>
</template>
</bs-modal>
@@ -10,6 +10,7 @@ import Vertrag from "./Vertrag.js";
import ApiStvProjektbetreuer from '../../../../../api/factory/stv/projektbetreuer.js';
export default {
name: 'Projektbetreuer',
components: {
CoreFilterCmpt,
BsModal,
@@ -93,7 +93,7 @@ export default {
}
},
{title:"Geschlecht", field:"geschlecht", headerFilter: "list", headerFilterParams: {values:{'m':'männlich','w':'weiblich','x':'divers','u':'unbekannt'}, listOnEmpty:true, autocomplete:true}},
{title:"Sem.", field:"semester", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
{title:"Sem.", field:"semester_berechnet", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
{title:"Verb.", field:"verband", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
{title:"Grp.", field:"gruppe", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
{title:"Studiengang", field:"studiengang", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
@@ -171,7 +171,7 @@ export default {
selectableRows: true,
selectableRowsRangeMode: 'click',
index: 'prestudent_id',
persistenceID: 'stv-list',
persistenceID: 'stv-list-20260223_01'
},
tabulatorEvents: [
{
@@ -195,7 +195,15 @@ export default {
},
{
event: 'dataLoaded',
handler: data => this.count = data.length
handler: data => {
if (Array.isArray(data)) {
this.count = data.length;
this.allPrestudents = data.map(item => item.prestudent_id);
} else {
this.count = 0;
this.allPrestudents = [];
}
}
},
{
event: 'dataFiltered',
@@ -237,7 +245,8 @@ export default {
dragSource: [],
oldScrollUrl: '',
oldScrollLeft: 0,
oldScrollTop: 0
oldScrollTop: 0,
allPrestudents: []
}
},
computed: {
@@ -274,6 +283,7 @@ export default {
};
});
},
//TODO(Manu) check: replace download or additional entry?
downloadConfig() {
return {
csv: {
@@ -291,6 +301,21 @@ export default {
.replace(/\//g, '_');
return "StudentList_" + today + ".csv";
},
selectedPrestudents() {
if (this.selected && this.selected.length > 0) {
return this.selected.map(item => item.prestudent_id);
} else {
// fallback whole list of prestudents
return this.allPrestudents || [];
}
},
linkXLS(){
return FHC_JS_DATA_STORAGE_OBJECT.app_root
+ 'content/statistik/studentenexportextended.xls.php?'
+ '&studiensemester_kurzbz=' + this.currentSemester
+ '&data=' + this.selectedPrestudents.join(";");
},
},
created: function() {
if(this.tagsEnabled) {
@@ -330,7 +355,7 @@ export default {
ersatzkennzeichen: capitalize(this.$p.t('person/ersatzkennzeichen')),
gebdatum: capitalize(this.$p.t('person/geburtsdatum')),
geschlecht: capitalize(this.$p.t('person/geschlecht')),
semester: capitalize(this.$p.t('lehre/sem')),
semester_berechnet: capitalize(this.$p.t('lehre/sem')),
verband: capitalize(this.$p.t('lehre/verb')),
gruppe: capitalize(this.$p.t('lehre/grp')),
studiengang: capitalize(this.$p.t('lehre/studiengang')),
@@ -391,15 +416,17 @@ export default {
actionNewPrestudent() {
this.$refs.new.open();
},
rowSelectionChanged(data, rows) {
rowSelectionChanged(data, rows, selected, deselected) {
this.selectedcount = data.length;
this.lastSelected = this.selected;
if(selected.length > 0 || deselected.length > 0){
this.lastSelected = this.selected;
this.$emit('update:selected', data);
}
//for tags
this.selectedRows = this.$refs.table.tabulator.getSelectedRows();
this.selectedColumnValues = this.selectedRows.filter(row => row.getData().prestudent_id !== undefined && row.getData().prestudent_id).map(row => row.getData().prestudent_id);
this.$emit('update:selected', data);
},
autoSelectRows(data) {
if (Array.isArray(this.lastSelected) && this.lastSelected.length){
@@ -546,6 +573,10 @@ export default {
this.changeFocus(this.focusObj, el);
}
},
clearSelection(){
this.lastSelected = [];
this.$emit('update:selected',[]);
},
//methods tags
addedTag(addedTag)
{
@@ -600,7 +631,7 @@ export default {
// TODO(chris): focusin, focusout, keydown and tabindex should be in the filter component
// TODO(chris): filter component column chooser has no accessibilty features
template: `
<div class="stv-list h-100 pt-3">
<div class="stv-list h-100 pt-3">
<div
class="tabulator-container d-flex flex-column h-100"
:class="{'has-filter': filter.length}"
@@ -627,6 +658,27 @@ export default {
@headerFilterOn="handleHeaderFilter"
>
<!--
<template #actions>
<div>
<button
class="btn btn-outline-success sm mb-1"
:title="'Export ' + selectedPrestudents.length + ' prestudent(s) to Excel'"
>
<i class="fas fa-file-excel fa-xl"></i>
</button>
</div>
</template>
-->
<template #additional>
<div class="pe-2">
<a :href="linkXLS" target="_blank">
<i class="fas fa-file-excel fa-xl text-success" :title="$p.t('stv', 'text_exportXLS', { count: selectedPrestudents.length })"></i>
</a>
</div>
</template>
<template #actions>
<core-tag ref="tagComponent"
v-if="tagsEnabled"
+1
View File
@@ -723,6 +723,7 @@ export const CoreFilterCmpt = {
<span class="fa-solid fa-xl fa-table-columns"></span>
</a>
<table-download class="btn btn-link px-0 fhc-text" :tabulator="tabulator" :config="download"></table-download>
<slot name="additional"></slot>
</div>
</div>
@@ -0,0 +1,147 @@
export default {
name: 'HorizontalSplit',
props: {
defaultRatio: {
type: Array,
default: () => [50, 50]
}
},
data: function () {
return {
availWidth: 0,
leftwidth: 0,
rightwidth: 0,
mousePosX: 0,
resize: false,
hsplitterOffset: 0,
selfOffsetLeft: 0
};
},
template: `
<div ref="horizontalsplit" class="horizontalsplit-container">
<div ref="leftpanel" class="horizontalsplitted"
:style="{ width: this.leftwidthcss }">
<slot name="left">
<p>Left Panel</p>
</slot>
</div>
<div ref="hsplitter" class="horizontalsplitter"
:class="this.leftOrRightClass" @mousedown="this.dragStart">
<div class="splitactions horizontal" :class="this.leftOrRightClass">
<span @click="this.collapseRight" class="splitaction">
<i class="fas fa-angle-right text-muted"></i>
</span>
<span @dblclick="this.showBoth" class="splitaction resize">
<i class="fas fa-grip-lines-vertical text-muted"></i>
</span>
<span @click="this.collapseLeft" class="splitaction">
<i class="fas fa-angle-left text-muted"></i>
</span>
</div>
</div>
<div ref="rightpanel" class="horizontalsplitted"
:style="{ width: this.rightwidthcss }">
<slot name="right">
<p/>
</slot>
</div>
</div>
`,
mounted: function () {
this.calcWidths();
this.trackHorizontalSplitterOffsetLeft();
window.addEventListener('resize', this.calcWidths);
},
updated: function () {
this.trackHorizontalSplitterOffsetLeft();
},
beforeDestroy: function () {
window.removeEventListener('resize', this.calcWidths);
},
methods: {
calcWidths: function () {
var oldavailWidth = this.availWidth;
this.selfOffsetLeft = this.$refs.horizontalsplit.offsetLeft;
this.availWidth = this.$refs.horizontalsplit.offsetWidth - this.$refs.hsplitter.offsetWidth;
if ((this.leftwidth === 0 && this.rightwidth === 0) || oldavailWidth === 0) {
this.leftwidth = Math.floor(this.availWidth * (this.defaultRatio[0] / 100));
} else {
this.leftwidth = Math.floor(((this.leftwidth * 100) / oldavailWidth) / 100 * this.availWidth);
}
this.rightwidth = this.availWidth - this.leftwidth;
},
collapseLeft: function () {
this.calcWidths();
this.leftwidth = 0;
this.rightwidth = this.availWidth;
},
collapseRight: function () {
this.calcWidths();
this.leftwidth = this.availWidth;
this.rightwidth = 0;
},
showBoth: function () {
this.leftwidth = Math.floor(this.availWidth * (this.defaultRatio[0] / 100));
this.rightwidth = this.availWidth - this.leftwidth;
},
isCollapsed: function () {
if (this.leftwidth === 0) {
return 'left';
} else if (this.rightwidth === 0) {
return 'right';
} else {
return false;
}
},
dragStart: function (e) {
e.preventDefault();
e.stopPropagation();
window.addEventListener('mouseup', this.dragEnd);
window.addEventListener('mousemove', this.drag);
this.resize = true;
this.mousePosX = e.clientX;
},
drag: function (e) {
if (!this.resize) {
return;
}
e.preventDefault();
e.stopPropagation();
var offsetX = e.clientX - this.mousePosX;
this.leftwidth = this.leftwidth + offsetX;
if (this.leftwidth < 0) {
this.leftwidth = 0;
}
if (this.leftwidth > this.availWidth) {
this.leftwidth = this.availWidth;
}
this.rightwidth = this.availWidth - this.leftwidth;
this.mousePosX = e.clientX;
},
dragEnd: function (e) {
e.preventDefault();
e.stopPropagation();
window.removeEventListener('mousemove', this.drag);
window.removeEventListener('mouseup', this.dragEnd);
this.resize = false;
this.mousePosX = e.clientX;
},
trackHorizontalSplitterOffsetLeft: function () {
this.hsplitterOffset = this.$refs.hsplitter.offsetLeft;
}
},
computed: {
leftOrRightClass: function () {
return ((this.hsplitterOffset - this.selfOffsetLeft) <= Math.floor(this.availWidth / 2))
? 'left'
: 'right';
},
leftwidthcss: function () {
return this.leftwidth + 'px';
},
rightwidthcss: function () {
return this.rightwidth + 'px';
}
}
};
@@ -1,5 +1,11 @@
export default {
name: 'VerticalSplit',
props: {
defaultRatio: {
type: Array,
default: () => [50, 50]
}
},
data: function() {
return {
availHeight: 0,
@@ -50,17 +56,22 @@ export default {
updated: function() {
this.trackVerticalSplitterOffsetTop();
},
beforeDestroy: function () {
window.removeEventListener('resize', this.calcHeights);
},
methods: {
calcHeights: function() {
var windowheight = window.innerHeight;
var oldavailHeight = this.availHeight;
this.selfOffsetTop = this.$refs.verticalsplit.offsetTop;
this.availHeight = windowheight - this.selfOffsetTop - this.$refs.vsplitter.offsetHeight;
if( (this.topheight === 0 && this.bottomheight === 0) || oldavailHeight === 0 ) {
this.topheight = Math.floor(this.availHeight/2);
this.topheight = Math.floor(this.availHeight * (this.defaultRatio[0] / 100));
} else {
this.topheight = Math.floor( ((((this.topheight * 100) / oldavailHeight) / 100) * this.availHeight) );
}
this.bottomheight = this.availHeight - this.topheight;
},
collapseTop: function() {
@@ -74,8 +85,8 @@ export default {
this.bottomheight = 0;
},
showBoth: function() {
this.topheight = Math.floor(this.availHeight/2);
this.bottomheight = Math.floor(this.availHeight/2);
this.topheight = Math.floor(this.availHeight * (this.defaultRatio[0] / 100));
this.bottomheight = this.availHeight - this.topheight
},
isCollapsed: function() {
if( this.topheight === 0 ) {
+76
View File
@@ -705,7 +705,72 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
echo ' </anrechnungen>';
//Berufliche Kompetenzen
$studienplan = new studienplan();
$studienplan->loadStudienplan($studienplan_id);
$regelstudiendauer = $studienplan->regelstudiendauer;
$studienplan_ects = $studienplan->ects_stpl;
$ects_berufliche_kompetenzen = 0;
//bei masterlehrgängen und $studienplan_ects >= 120 ECTS: Andruck der beruflichen Kompetenzen, wenn die Lv angerechnet wurde
//TODO(Manu) check if rule still valid
if ($row->typ == 'l' && $regelstudiendauer >= 4)
{
$ects_berufliche_kompetenzen = 0;
echo '<berufliche_kompetenzen>';
echo '<header_berufliche_kompetenz>Validierung von beruflich erworbenen Kompetenzen</header_berufliche_kompetenz>';
$qry_sem_0="
SELECT
lehrveranstaltung_id,
lehrform_kurzbz,
sws,
lehre.tbl_lehrveranstaltung.bezeichnung,
bezeichnung_english,
ects,
benotungsdatum,
note,
positiv,
offiziell,
note.anmerkung
FROM
lehre.tbl_zeugnisnote zeugnis
JOIN lehre.tbl_note note USING(note)
JOIN lehre.tbl_lehrveranstaltung USING(lehrveranstaltung_id)
JOIN public.tbl_student student USING(student_uid)
WHERE
student_uid =".$db->db_add_param($uid_arr[$i])."
AND
lehre.tbl_lehrveranstaltung.semester = '0'
";
if($result_sem_0 = $db->db_query($qry_sem_0))
{
while ($row_sem_0 = $db->db_fetch_object($result_sem_0))
{
$benotungsdatum = $datum->formatDatum($row_sem_0->benotungsdatum, 'd/m/Y');
$note = $db->db_parse_bool($row_sem_0->offiziell) ? $row_sem_0->anmerkung : $row_sem_0->note;
$ects_berufliche_kompetenzen += $row_sem_0->ects;
echo '<lv_sem0>
<lv_id>' . $row_sem_0->lehrveranstaltung_id . '</lv_id>
<lehrform_kurzbz>' . $row_sem_0->lehrform_kurzbz . '</lehrform_kurzbz>
<bezeichnung><![CDATA[' . $row_sem_0->bezeichnung . ']]></bezeichnung>
<bezeichnung_englisch><![CDATA[' . $row_sem_0->bezeichnung_english . ']]></bezeichnung_englisch>
<sws_lv>'.$row_sem_0->sws.'</sws_lv>
<ects>'.$row_sem_0->ects.'</ects>
<note_positiv>'.$db->db_parse_bool($row_sem_0->positiv).'</note_positiv>
<note>'.$note.'</note>
<benotungsdatum>'.$benotungsdatum.'</benotungsdatum>
</lv_sem0>';
}
}
echo '<ects_berufliche_kompetenz>'.$ects_berufliche_kompetenzen.'</ects_berufliche_kompetenz>';
echo '</berufliche_kompetenzen>';
}
echo "<studiensemester>";
for($start = $semesterNumberStart; $start <= $semesterNumberEnd; $start++)
{
$semester_ects = 0;
@@ -728,6 +793,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
AND zeugnis = true
AND status.ausbildungssemester = ".$db->db_add_param($start)."
AND status.status_kurzbz NOT IN('Unterbrecher', 'Interessent','Bewerber','Aufgenommener','Abgewiesener','Wartender')
--AND lehre.tbl_lehrveranstaltung.semester != '0'
ORDER BY datum ASC";
$semester_kurzbz = array();
@@ -776,6 +842,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
WHERE
student_uid = ".$db->db_add_param($uid_arr[$i])."
AND zeugnis = true
AND lehre.tbl_lehrveranstaltung.semester != '0'
AND studiensemester_kurzbz in (".$sqlStudent->implode4SQL($aktuellesSemester).")";
if (defined('ZEUGNISNOTE_NICHT_ANZEIGEN'))
@@ -1134,10 +1201,19 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
}
}
echo '<ects_gesamt>'.$semester_ects.'</ects_gesamt>';
echo '<ects_gesamt_positiv>'.$semester_ects_positiv.'</ects_gesamt_positiv>';
echo "</semesters>";
}
//TODO(Manu) check if rule still valid
if ($row->typ == 'l' && $regelstudiendauer >= 4)
{
$ects_total += $ects_berufliche_kompetenzen;
$ects_total_positiv += $ects_berufliche_kompetenzen;
}
echo "</studiensemester>";
echo " <ects_total>$ects_total</ects_total>";
echo " <ects_total_positiv>$ects_total_positiv</ects_total_positiv>";
+2 -2
View File
@@ -94,7 +94,7 @@ require_once('dbupdate_3.4/71399_dashboard_update_widget_paths.php');
require_once('dbupdate_3.4/71645_studvw_messagetab_ladezeit.php');
require_once('dbupdate_3.4/71566_studienordnungsdokument_neuer_organisationseinheitstyp_programm.php');
require_once('dbupdate_3.4/70376_lohnguide.php');
require_once('dbupdate_3.4/71405_ferienzeiten.php');
require_once('dbupdate_3.4/75888_reihungstest_mehrfachdurchfuehrung.php');
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -257,7 +257,7 @@ $tabellen=array(
"lehre.tbl_anrechnung_begruendung" => array("begruendung_id","bezeichnung"),
"lehre.tbl_anrechnungszeitraum" => array("anrechnungszeitraum_id","studiensemester_kurzbz","anrechnungstart","anrechnungende", "insertamum", "insertvon"),
"lehre.tbl_betreuerart" => array("betreuerart_kurzbz","beschreibung","aktiv"),
"lehre.tbl_ferien" => array("ferien_id","bezeichnung","studiengang_kz","vondatum","bisdatum","oe_kurzbz","studienplan_id","ferientyp_kurzbz","insertamum","insertvon","updateamum","updatevon"),
"lehre.tbl_ferien" => array("bezeichnung","studiengang_kz","vondatum","bisdatum"),
"lehre.tbl_lehreinheit" => array("lehreinheit_id","lehrveranstaltung_id","studiensemester_kurzbz","lehrfach_id","lehrform_kurzbz","stundenblockung","wochenrythmus","start_kw","raumtyp","raumtypalternativ","sprache","lehre","anmerkung","unr","lvnr","updateamum","updatevon","insertamum","insertvon","ext_id","lehrfach_id_old","gewicht"),
"lehre.tbl_lehreinheitgruppe" => array("lehreinheitgruppe_id","lehreinheit_id","studiengang_kz","semester","verband","gruppe","gruppe_kurzbz","updateamum","updatevon","insertamum","insertvon","ext_id"),
"lehre.tbl_lehreinheitmitarbeiter" => array("lehreinheit_id","mitarbeiter_uid","lehrfunktion_kurzbz","semesterstunden","planstunden","stundensatz","faktor","anmerkung","bismelden","updateamum","updatevon","insertamum","insertvon","ext_id","standort_id","vertrag_id"),
+2 -2
View File
@@ -264,8 +264,8 @@ CREATE TABLE IF NOT EXISTS hr.tbl_vertragsbestandteil_lohnguide (
stellenbezeichnung varchar(255),
fachrichtung_kurzbz character varying(32) NOT NULL,
modellstelle_kurzbz character varying(32) NOT NULL,
kommentar_person varchar(255),
kommentar_modellstelle varchar(255),
kommentar_person text,
kommentar_modellstelle text,
CONSTRAINT tbl_vertragsbestandteil_lohnguide_pk PRIMARY KEY (vertragsbestandteil_id),
CONSTRAINT tbl_vertragsbestandteil_fk FOREIGN KEY (vertragsbestandteil_id) REFERENCES hr.tbl_vertragsbestandteil (vertragsbestandteil_id) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
CONSTRAINT tbl_vertragsbestandteil_lohnguide_fachrichtung_fk FOREIGN KEY (fachrichtung_kurzbz) REFERENCES hr.tbl_lohnguide_fachrichtung (fachrichtung_kurzbz) MATCH FULL ON DELETE RESTRICT ON UPDATE CASCADE,
-206
View File
@@ -1,206 +0,0 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
//Add column ferien_id to lehre.tbl_ferien
if(!@$db->db_query("SELECT ferien_id FROM lehre.tbl_ferien LIMIT 1"))
{
$qry = 'ALTER TABLE lehre.tbl_ferien ADD COLUMN ferien_id integer;';
if(!$db->db_query($qry))
echo '<strong> lehre.tbl_ferien '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferien: Neue Spalte ferien_id hinzugefügt';
}
//Column ferien_id mit Werten befüllen
if($result = @$db->db_query("SELECT ferien_id FROM lehre.tbl_ferien where ferien_id is not null LIMIT 1"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = 'UPDATE lehre.tbl_ferien et SET ferien_id =
(SELECT rownumber FROM (SELECT ROW_NUMBER() OVER (ORDER BY bezeichnung, studiengang_kz)
AS rownumber, t.* FROM lehre.tbl_ferien t ORDER BY bezeichnung, studiengang_kz) rn
WHERE rn.bezeichnung = et.bezeichnung
AND rn.studiengang_kz = et.studiengang_kz);
';
if(!$db->db_query($qry))
echo '<strong> lehre.tbl_ferien '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferien: Spalte bis.tbl_ferien_id mit Werten aufgefüllt';
}
}
//Create Sequence lehre.tbl_ferien and grant Rights
if ($result = @$db->db_query("SELECT * FROM pg_class WHERE relname = 'tbl_ferien_ferien_id_seq'"))
{
if ($db->db_num_rows($result) == 0)
{
if ($count = @$db->db_query("SELECT * FROM lehre.tbl_ferien"))
{
$count = $db->db_num_rows($count) + 1;
$qry = 'CREATE SEQUENCE lehre.tbl_ferien_ferien_id_seq START ';
$qry .= $count;
if(!$db->db_query($qry))
{
echo '<strong> lehre.tbl_ferien '.$db->db_last_error().'</strong><br>';
}
else
{
echo '<br>lehre.tbl_ferien: Sequence lehre.tbl_ferien_ferien_id_seq mit Startwert ' . $count . ' erstellt';
$qry2 = "GRANT SELECT, UPDATE ON lehre.tbl_ferien_ferien_id_seq TO vilesci;
GRANT SELECT, UPDATE ON lehre.tbl_ferien_ferien_id_seq TO web;";
if(!$db->db_query($qry2))
{
echo '<strong>lehre.tbl_ferien_ferien_id_seq Berechtigungen: '.$db->db_last_error().'</strong><br>';
}
else
{
echo '<br>lehre.tbl_ferien: Rechte auf lehre.tbl_ferien_ferien_id_seq fuer web user und vilesci gesetzt ';
}
}
}
}
}
//lehre.tbl_ferien auf NOT NULL setzen
if ($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tbl_ferien' AND column_name = 'ferien_id' and is_nullable = 'NO'"))
{
if($db->db_num_rows($result)==0)
{
$qry = 'ALTER TABLE lehre.tbl_ferien ALTER COLUMN ferien_id SET NOT NULL';
if(!$db->db_query($qry))
echo '<strong> lehre.tbl_ferien '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferien: Spalte bis.tbl_ferien_id auf NOT NULL gesetzt';
}
}
//lehre.tbl_ferien DEFAULT einstellen
if ($result = @$db->db_query("SELECT column_default FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tbl_ferien' AND column_name = 'ferien_id' and column_default is null"))
{
if($db->db_num_rows($result)==1)
{
$qry = "ALTER TABLE lehre.tbl_ferien ALTER COLUMN ferien_id SET DEFAULT nextval('lehre.tbl_ferien_ferien_id_seq'::regclass);";
if(!$db->db_query($qry))
echo '<strong> lehre.tbl_ferien '.$db->db_last_error().'</strong><br>';
else
echo '<br> lehre.tbl_ferien: Defaultwert bei Spalte bis.tbl_ferien_id gesetzt';
}
}
//DELETE Constraint PRIMARY KEY pk_tbl_ferien (bezeichnung, studiengang_kz) entfernen
if ($result = @$db->db_query("SELECT conname FROM pg_constraint WHERE conname = 'pk_tbl_ferien'"))
{
if($db->db_num_rows($result)==1)
{
$qry = "ALTER TABLE lehre.tbl_ferien DROP CONSTRAINT pk_tbl_ferien;";
if (!$db->db_query($qry))
echo '<strong>lehre.tbl_ferien: '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferien: Primary Key pk_tbl_ferien (bezeichnung, studiengang_kz) entfernt ';
}
}
// ADD PRIMARY KEY tbl_ferien_pk to lehre.tbl_ferien
if ($result = @$db->db_query("SELECT conname FROM pg_constraint WHERE conname = 'tbl_ferien_pk'"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = "ALTER TABLE lehre.tbl_ferien ADD CONSTRAINT tbl_ferien_pk PRIMARY KEY(ferien_id);";
if (!$db->db_query($qry))
echo '<strong>slehre.tbl_ferien: '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferien: Primary Key tbl_ferien_pk (ferien_id) hinzugefügt';
}
}
// add new fields to tbl_ferien, migrate data (add oe_kurzbz data), mark studiengang_kz as deprecated
if(!$result = @$db->db_query("SELECT oe_kurzbz FROM lehre.tbl_ferien LIMIT 1"))
{
$qry = "ALTER TABLE lehre.tbl_ferien
ADD COLUMN IF NOT EXISTS oe_kurzbz VARCHAR(32),
ADD COLUMN IF NOT EXISTS studienplan_id SMALLINT DEFAULT NULL,
ADD CONSTRAINT tbl_ferien_studienplan_fk
FOREIGN KEY (studienplan_id)
REFERENCES lehre.tbl_studienplan(studienplan_id)
ON UPDATE CASCADE ON DELETE RESTRICT,
ADD CONSTRAINT tbl_ferien_oe_kurzbz_fk
FOREIGN KEY (oe_kurzbz)
REFERENCES public.tbl_organisationseinheit(oe_kurzbz)
ON UPDATE CASCADE ON DELETE RESTRICT,
ADD COLUMN IF NOT EXISTS insertamum timestamp DEFAULT NOW(),
ADD COLUMN IF NOT EXISTS insertvon VARCHAR(32),
ADD COLUMN IF NOT EXISTS updateamum timestamp,
ADD COLUMN IF NOT EXISTS updatevon VARCHAR(32);
UPDATE lehre.tbl_ferien
SET oe_kurzbz = (
SELECT
CASE
WHEN studiengang_kz = 0
THEN NULL
ELSE oe_kurzbz
END
FROM
public.tbl_studiengang
WHERE
studiengang_kz = tbl_ferien.studiengang_kz
)
WHERE oe_kurzbz IS NULL AND studiengang_kz IS NOT NULL;
ALTER TABLE lehre.tbl_ferien ALTER COLUMN studiengang_kz DROP NOT NULL;
COMMENT ON COLUMN lehre.tbl_ferien.studiengang_kz IS 'DEPRECATED';";
if(!$db->db_query($qry))
echo '<strong>lehre.tbl_ferien: '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferien columns oe_kurzbz, studienplan_id, insertamum, insertvon, updateamum, updatevon hinzugefuegt';
}
// Creates table lehre.tbl_ferientyp if it doesn't exist and grants privileges
if (!$result = @$db->db_query('SELECT 0 FROM lehre.tbl_ferientyp WHERE 0 = 1'))
{
$qry = 'CREATE TABLE lehre.tbl_ferientyp (
ferientyp_kurzbz VARCHAR(64),
beschreibung VARCHAR(256) NOT NULL,
mitarbeiter boolean NOT NULL,
studierende boolean NOT NULL,
lehre boolean NOT NULL
);
COMMENT ON TABLE lehre.tbl_ferientyp IS \'Typ-Tabelle zum Speichern von Informationen zu Ferien.\';
COMMENT ON COLUMN lehre.tbl_ferientyp.ferientyp_kurzbz IS \'Typ der Ferien.\';
COMMENT ON COLUMN lehre.tbl_ferientyp.mitarbeiter IS \'Ob die Ferien für MitarbeiterInnen relevant sind.\';
COMMENT ON COLUMN lehre.tbl_ferientyp.studierende IS \'Ob die Ferien für Studierende relevant sind.\';
COMMENT ON COLUMN lehre.tbl_ferientyp.lehre IS \'Ob Lehre in den Ferien verplant werden kann.\';
ALTER TABLE lehre.tbl_ferientyp ADD CONSTRAINT pk_tbl_ferientyp PRIMARY KEY (ferientyp_kurzbz);
ALTER TABLE lehre.tbl_ferien ADD COLUMN IF NOT EXISTS ferientyp_kurzbz VARCHAR(64) DEFAULT NULL;
ALTER TABLE lehre.tbl_ferien ADD CONSTRAINT tbl_lehre_ferien_ferientyp_kurzbz_fk FOREIGN KEY (ferientyp_kurzbz)
REFERENCES lehre.tbl_ferientyp (ferientyp_kurzbz) MATCH FULL
ON DELETE SET NULL ON UPDATE CASCADE;
INSERT INTO lehre.tbl_ferientyp (ferientyp_kurzbz, beschreibung, mitarbeiter, studierende, lehre)
VALUES(\'Feiertag\', \'Gesetzliche und andere Feiertage\', true, true, false);
INSERT INTO lehre.tbl_ferientyp (ferientyp_kurzbz, beschreibung, mitarbeiter, studierende, lehre)
VALUES(\'Ferien\', \'Ferientage\', true, true, false);
INSERT INTO lehre.tbl_ferientyp (ferientyp_kurzbz, beschreibung, mitarbeiter, studierende, lehre)
VALUES(\'Info\', \'Weitere Zeiten für Ereignisse, z.B. Sportwoche, Ausgleichswoche... \', true, true, false);
';
if (!$db->db_query($qry))
echo '<strong>lehre.tbl_ferientyp: '.$db->db_last_error().'</strong><br>';
else
echo '<br>lehre.tbl_ferientyp table created';
$qry = 'GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE lehre.tbl_ferientyp TO vilesci;';
if (!$db->db_query($qry))
echo '<strong>lehre.tbl_ferientyp: '.$db->db_last_error().'</strong><br>';
else
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.tbl_ferientyp';
}
@@ -0,0 +1,15 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_benutzerfunktion_uid'"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = "CREATE INDEX idx_tbl_benutzerfunktion_uid ON public.tbl_benutzerfunktion USING btree (uid)";
if (! $db->db_query($qry))
echo '<strong>idx_tbl_benutzerfunktion_uid: ' . $db->db_last_error() . '</strong><br>';
else
echo 'Index idx_tbl_benutzerfunktion_uid angelegt<br>';
}
}
+208 -250
View File
@@ -53699,6 +53699,46 @@ and represent the current state of research on the topic. The prescribed citatio
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'mailText_profilfoto',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Hallo,\n\nIhr Profilbild wurde entfernt, da es nicht den aktuellen Bildrichtlinen entspricht. Bitte laden Sie unter CIS->Profil ein neues Profilbild hoch!\n\nDanke!",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Hello,\n\nYour profile picture has been removed because it does not comply with the current image guidelines. Please upload a new profile picture under CIS->Profile!\n\nThank you!",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'person',
'phrase' => 'betreffProfilfoto',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Profilbild',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Profile picture',
'description' => '',
'insertvon' => 'system'
)
)
),
// FHC-4 Finetuning END
//**************************** CORE/search
@@ -58095,6 +58135,86 @@ I have been informed that I am under no obligation to consent to the transmissio
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'lvplanung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'LV-Planung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Course-Planning',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'lvplanung_xls',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'LV-Planung EXCEL',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Course-Planning EXCEL',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'lvplanung_html',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'LV-Planung HTML',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Course-Planning HTML',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'RTVerwaltung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Reihungstestverwaltung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Administration Placement Test',
'description' => '',
'insertvon' => 'system'
)
)
),
// ### Phrases Dashboard Admin START
array(
@@ -58177,262 +58297,21 @@ I have been informed that I am under no obligation to consent to the transmissio
)
),
// ### Phrases Dashboard Admin END
// ### Ferien START
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'ferienId',
'category' => 'stv',
'phrase' => 'text_exportXLS',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ferien Id',
'text' => '{count} Prestudent(Innen) als Excel exportieren',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Holiday Id',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'vondatum',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Datum von',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'From date',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'bisdatum',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Datum bis',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'To date',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'organisationseinheit',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Organisationseinheit",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Organisational unit",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'oeKurzbezeichnung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => "Organisationseinheit Kurzbezeichung",
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => "Organisational unit short name",
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'oeBezeichnung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Organisationseinheit Bezeichnung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Organizational unit name',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'studienplan',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Studienplan',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Study plan',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'studienplanBezeichnung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Studienplan Bezeichnung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Study plan name',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'ferientypKurzbz',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ferientyp Bezeichnung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Holiday type name',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'mitarbeiterrelevant',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Mitarbeiterrelevant',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Employee relevant',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'studierendenrelevant',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Studierendenrelevant',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student relevant',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'lehrePlanbar',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Lehre planbar',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Classes assignable',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ferien',
'phrase' => 'ferien_edit',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'edit holidays',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Ferien bearbeiten',
'text' => 'Export {count} prestudent(s) to Excel',
'description' => '',
'insertvon' => 'system'
)
@@ -58441,24 +58320,103 @@ I have been informed that I am under no obligation to consent to the transmissio
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'keineAuswahl',
'phrase' => 'alert_chooseStudent',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'keine Auswahl',
'text' => 'Bitte eine/n Studierende/n markieren!',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'no selection',
'text' => 'Please select a student!',
'description' => '',
'insertvon' => 'system'
)
)
)
// ### Ferien END
),
array(
'app' => 'core',
'category' => 'stv',
'phrase' => 'studienverlauf',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Studienverlauf',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Gradelist',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'lehre',
'phrase' => 'textNoStatusInSem',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Kein Status im {sem}',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'No status in {sem}',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'alert_chooseOnlyOneStudent',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte nur eine/n Studierende/n markieren!',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Please select only one student!',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'alert_chooseGroupSem',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Bitte eine Gruppe auswählen!',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Please select a group!',
'description' => '',
'insertvon' => 'system'
)
)
),
);
+3 -5
View File
@@ -125,13 +125,11 @@
}
else
{
$sql_query="INSERT INTO lehre.tbl_ferien (studiengang_kz, bezeichnung, vondatum, bisdatum, oe_kurzbz) VALUES(
$sql_query="INSERT INTO lehre.tbl_ferien (studiengang_kz, bezeichnung, vondatum, bisdatum) VALUES(
".$db->db_add_param($_POST['studiengang_kz'], FHC_INTEGER).",
".$db->db_add_param($_POST['bezeichnung']).",
".$db->db_add_param($datum_obj->formatDatum($_POST['vondatum'],'Y-m-d')).",
".$db->db_add_param($datum_obj->formatDatum($_POST['bisdatum'],'Y-m-d')).",
CASE WHEN ".$db->db_add_param($_POST['studiengang_kz'], FHC_INTEGER)." = 0 THEN NULL
ELSE (SELECT oe_kurzbz FROM public.tbl_studiengang WHERE studiengang_kz = ".$db->db_add_param($_POST['studiengang_kz'], FHC_INTEGER).") END);";
".$db->db_add_param($datum_obj->formatDatum($_POST['bisdatum'],'Y-m-d')).");";
//echo $sql_query;
$db->db_query($sql_query);
$stg_kz = $_POST['studiengang_kz'];
@@ -253,7 +251,7 @@
{
echo '
<tr>
<td>'.$db->convert_html_chars($stg_arr[$row->studiengang_kz] ?? '').'</td>
<td>'.$db->convert_html_chars($stg_arr[$row->studiengang_kz]).'</td>
<td>'.$db->convert_html_chars($row->vondatum).'</td>
<td>'.$db->convert_html_chars($row->bisdatum).'</td>
<td>'.$db->convert_html_chars($row->bezeichnung).'</td>';