diff --git a/application/controllers/api/frontend/v1/stv/Aufnahmetermine.php b/application/controllers/api/frontend/v1/stv/Aufnahmetermine.php new file mode 100644 index 000000000..538626789 --- /dev/null +++ b/application/controllers/api/frontend/v1/stv/Aufnahmetermine.php @@ -0,0 +1,400 @@ + ['admin:r', 'assistenz:r'], + 'loadAufnahmetermin' => ['admin:r', 'assistenz:r'], + 'insertAufnahmetermin' => ['admin:rw', 'assistenz:rw'], + 'updateAufnahmetermin' => ['admin:rw', 'assistenz:rw'], + 'deleteAufnahmetermin' => ['admin:rw', 'assistenz:rw'], + 'getListPlacementTests' => ['admin:r', 'assistenz:r'], + 'getListStudyPlans' => ['admin:r', 'assistenz:r'], + 'loadDataRtPrestudent' => ['admin:r', 'assistenz:r'], + 'insertOrUpdateDataRtPrestudent' => ['admin:r', 'assistenz:r'], + 'loadAufnahmegruppen' => ['admin:r', 'assistenz:r'], + 'getResultReihungstest' => ['admin:r', 'assistenz:r'], + 'getZukuenftigeReihungstestStg' => ['admin:r', 'assistenz:r'], + ]); + + // Load Libraries + $this->load->library('VariableLib', ['uid' => getAuthUID()]); + $this->load->library('form_validation'); + + // Load language phrases + $this->loadPhrases([ + 'ui', + 'admission' + ]); + + // Load models + $this->load->model('crm/Reihungstest_model', 'ReihungstestModel'); + $this->load->model('crm/RtPerson_model', 'RtPersonModel'); + } + + public function getAufnahmetermine($person_id) + { + $result = $this->ReihungstestModel->getReihungstestPerson($person_id); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + public function insertAufnahmetermin() + { + $this->load->library('form_validation'); + $authUID = getAuthUID(); + + $formData = $this->input->post('formData'); + $person_id = $this->input->post('person_id'); + + if(!$person_id) + { + return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Person ID']), self::ERROR_TYPE_GENERAL); + } + + + + $_POST['rt_id'] = (isset($formData['rt_id']) && !empty($formData['rt_id'])) ? $formData['rt_id'] : null; + $_POST['anmeldedatum'] = (isset($formData['anmeldedatum']) && !empty($formData['anmeldedatum'])) ? $formData['anmeldedatum'] : null; + $_POST['teilgenommen'] = (isset($formData['teilgenommen']) && !empty($formData['teilgenommen'])) ? $formData['teilgenommen'] : false; + $_POST['studienplan_id'] = (isset($formData['studienplan_id']) && !empty($formData['studienplan_id'])) ? $formData['studienplan_id'] : null; + $_POST['punkte'] = (isset($formData['punkte']) && !empty($formData['punkte'])) ? $formData['punkte'] : null; + + $this->form_validation->set_rules('punkte', 'Punkte', 'numeric', [ + 'required' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Punkte']) + ]); + $this->form_validation->set_rules('studienplan_id', 'studienplan_id', 'required', [ + 'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Studienplan']) + ]); + $this->form_validation->set_rules('rt_id', 'Reihungstest_id', 'required', [ + 'is_valid_date' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Reihungstest']) + ]); + + $this->form_validation->set_rules('anmeldedatum', 'AnmeldeDatum', 'is_valid_date', [ + 'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Anmeldedatum']) + ]); + + + if ($this->form_validation->run() == false) + { + $this->terminateWithValidationErrors($this->form_validation->error_array()); + } + + $result = $this->RtPersonModel->insert([ + 'person_id' => $person_id, + 'rt_id' => $_POST['rt_id'], + 'anmeldedatum' => $_POST['anmeldedatum'], + 'teilgenommen' => $_POST['teilgenommen'], + 'studienplan_id' => $_POST['studienplan_id'], + 'punkte' => $_POST['punkte'], + 'insertamum' => date('c'), + 'insertvon' => $authUID, + ]); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + public function loadAufnahmetermin($rt_person_id) + { + $result = $this->RtPersonModel->loadWhere( + array('rt_person_id' => $rt_person_id) + ); + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess(current($data)); + } + + public function updateAufnahmetermin() + { + $this->load->library('form_validation'); + $authUID = getAuthUID(); + + $formData = $this->input->post('formData'); + $rt_person_id = $this->input->post('rt_person_id'); + $person_id = (isset($formData['person_id']) && !empty($formData['person_id'])) ? $formData['person_id'] : null; + + + if(!$person_id) + { + return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Person ID']), self::ERROR_TYPE_GENERAL); + } + if(!$rt_person_id) + { + return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'RT_Person ID']), self::ERROR_TYPE_GENERAL); + } + + + $_POST['rt_id'] = (isset($formData['rt_id']) && !empty($formData['rt_id'])) ? $formData['rt_id'] : null; + $_POST['anmeldedatum'] = (isset($formData['anmeldedatum']) && !empty($formData['anmeldedatum'])) ? $formData['anmeldedatum'] : null; + $_POST['teilgenommen'] = (isset($formData['teilgenommen']) && !empty($formData['teilgenommen'])) ? $formData['teilgenommen'] : false; + $_POST['studienplan_id'] = (isset($formData['studienplan_id']) && !empty($formData['studienplan_id'])) ? $formData['studienplan_id'] : null; + $_POST['punkte'] = (isset($formData['punkte']) && !empty($formData['punkte'])) ? $formData['punkte'] : null; + + $this->form_validation->set_rules('punkte', 'Punkte', 'numeric', [ + 'required' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Punkte']) + ]); + $this->form_validation->set_rules('studienplan_id', 'studienplan_id', 'required', [ + 'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Studienplan']) + ]); + $this->form_validation->set_rules('rt_id', 'Reihungstest_id', 'required', [ + 'is_valid_date' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Reihungstest']) + ]); + + $this->form_validation->set_rules('anmeldedatum', 'AnmeldeDatum', 'is_valid_date', [ + 'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Anmeldedatum']) + ]); + + + if ($this->form_validation->run() == false) + { + $this->terminateWithValidationErrors($this->form_validation->error_array()); + } + + $result = $this->RtPersonModel->update( + [ + 'rt_person_id' => $rt_person_id, + 'person_id' => $person_id, + ], + [ + 'rt_id' => $_POST['rt_id'], + 'anmeldedatum' => $_POST['anmeldedatum'], + 'teilgenommen' => $_POST['teilgenommen'], + 'studienplan_id' => $_POST['studienplan_id'], + 'punkte' => $_POST['punkte'], + 'insertamum' => date('c'), + 'insertvon' => $authUID, + ] + ); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + public function deleteAufnahmetermin($rt_person_id) + { + $result = $this->RtPersonModel->delete( + array('rt_person_id' => $rt_person_id) + ); + + $data = $this->getDataOrTerminateWithError($result); + $this->terminateWithSuccess($data); + } + + public function getListPlacementTests($prestudent_id) + { + if(!$prestudent_id) + { + return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Prestudent ID']), self::ERROR_TYPE_GENERAL); + } + + //get studienplan array + $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); + + $this->PrestudentstatusModel->addSelect('*'); + $this->PrestudentstatusModel->addSelect('sp.studienplan_id'); + + $this->PrestudentstatusModel->addJoin('lehre.tbl_studienplan sp', 'studienplan_id', 'LEFT'); + + $result = $this->PrestudentstatusModel->loadWhere( + array( + 'prestudent_id' => $prestudent_id, + 'status_kurzbz' => 'Interessent' + ) + ); + + $data = $this->getDataOrTerminateWithError($result); + + $studienplan_arr = []; + $include_ids = []; + foreach ($data as $item) + { + if($item->studienplan_id != null) + $studienplan_arr[] = $item->studienplan_id; + } + + //get Placementtests Person + $person_id = $this->_getPersonId($prestudent_id); + $resultRt = $this->ReihungstestModel->getReihungstestPerson($person_id); + + $dataRt = $this->getDataOrTerminateWithError($resultRt); + + foreach ($dataRt as $item) + { + if(!in_array($item->studienplan_id, $studienplan_arr)) + $studienplan_arr[] = $item->studienplan_id; + if(!in_array($item->rt_id, $include_ids) && ($item->rt_id != null)) + $include_ids[] = $item->rt_id; + } + + $result = $this->ReihungstestModel->getReihungstestByStudyPlanAndIds($studienplan_arr, $include_ids); + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + public function getListStudyPlans($person_id) + { + $this->load->model('organisation/Studienplan_model', 'StudienplanModel'); + + $result = $this->StudienplanModel->getStudienplaeneForPerson($person_id); + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + public function loadDataRtPrestudent($prestudent_id) + { + $this->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $this->PrestudentModel->addSelect(["reihungstestangetreten"]); + $this->PrestudentModel->addSelect(["rt_gesamtpunkte"]); + $this->PrestudentModel->addSelect(["aufnahmegruppe_kurzbz"]); + $result = $this->PrestudentModel->loadWhere( + array('prestudent_id' => $prestudent_id) + ); + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess(current($data)); + } + + public function insertOrUpdateDataRtPrestudent() + { + $this->load->library('form_validation'); + $authUID = getAuthUID(); + + $formData = $this->input->post('formData'); + $prestudent_id = $this->input->post('prestudent_id'); + + if(!$prestudent_id) + { + return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Prestudent ID']), self::ERROR_TYPE_GENERAL); + } + $_POST['rt_gesamtpunkte'] = + (isset($formData['rt_gesamtpunkte']) && !empty($formData['rt_gesamtpunkte'])) + ? $formData['rt_gesamtpunkte'] + : null; + $_POST['reihungstestangetreten'] = + (isset($formData['reihungstestangetreten']) && !empty($formData['reihungstestangetreten'])) + ? $formData['reihungstestangetreten'] + : null; + $_POST['aufnahmegruppe_kurzbz'] = + (isset($formData['aufnahmegruppe_kurzbz']) && !empty($formData['aufnahmegruppe_kurzbz'])) + ? $formData['aufnahmegruppe_kurzbz'] + : null; + + $this->form_validation->set_rules('rt_gesamtpunkte', 'Rt_gesamtpunkte', 'numeric', [ + 'required' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Rt_gesamtpunkte']) + ]); + + if ($this->form_validation->run() == false) + { + $this->terminateWithValidationErrors($this->form_validation->error_array()); + } + + $this->load->model('crm/Prestudent_model', 'PrestudentModel'); + + $result = $this->PrestudentModel->update( + [ + 'prestudent_id' => $prestudent_id, + ], + [ + 'reihungstestangetreten' => $_POST['reihungstestangetreten'], + 'rt_gesamtpunkte' => $_POST['rt_gesamtpunkte'], + 'aufnahmegruppe_kurzbz' => $_POST['aufnahmegruppe_kurzbz'], + 'updateamum' => date('c'), + 'updatevon' => $authUID, + ] + ); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + public function loadAufnahmegruppen() + { + $uid = $this->input->get('uid'); + $studiensemester_kurzbz = $this->input->get('studiensemester_kurzbz'); + + $this->load->model('person/Benutzergruppe_model', 'BenutzergruppeModel'); + + $result = $this->BenutzergruppeModel->loadAufnahmegruppen($uid, $studiensemester_kurzbz); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess(($data)); + } + + public function getResultReihungstest() + { + $person_id = $this->input->get('person_id'); + $punkte = $this->input->get('punkte'); + $reihungstest_id = $this->input->get('reihungstest_id'); + + if(!$reihungstest_id) + { + $this->terminateWithSuccess(null); + } + + //for gewichtung + $studiengang_kz = $this->input->get('studiengang_kz'); + + $this->load->model('testtool/Ablauf_model', 'AblaufModel'); + $result = $this->AblaufModel->getAblaufGebieteAndGewichte($studiengang_kz); + $data = $this->getDataOrTerminateWithError($result); + + $weightedArray = []; + foreach ($data as $abl) + { + $weightedArray[$abl->gebiet_id] = $abl->gewicht; + } + + $result = $this->ReihungstestModel->getReihungstestErgebnisPerson($person_id, $punkte, $reihungstest_id, $weightedArray); + +/* if (isError($result)) + { + $this->terminateWithError($result, self::ERROR_TYPE_GENERAL); + }*/ + + $this->terminateWithSuccess($result); + } + + public function getZukuenftigeReihungstestStg() + { + $studiengang_kz = $this->input->get('studiengang_kz'); + if(!$studiengang_kz) + { + return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Studiengang_kz']), self::ERROR_TYPE_GENERAL); + } + + $result = $this->ReihungstestModel->getZukuenftigeReihungstestStg($studiengang_kz); + + $data = $this->getDataOrTerminateWithError($result); + + $this->terminateWithSuccess($data); + } + + private function _getPersonId($prestudent_id) + { + $this->load->model('crm/Prestudent_model', 'PrestudentModel'); + $result = $this->PrestudentModel->loadWhere( + ['prestudent_id' => $prestudent_id] + ); + + $data = $this->getDataOrTerminateWithError($result); + $person = current($data); + + return $person->person_id; + } +} diff --git a/application/controllers/api/frontend/v1/stv/Config.php b/application/controllers/api/frontend/v1/stv/Config.php index 36276645a..92af856b0 100644 --- a/application/controllers/api/frontend/v1/stv/Config.php +++ b/application/controllers/api/frontend/v1/stv/Config.php @@ -165,6 +165,11 @@ class Config extends FHCAPI_Controller 'component' => './Stv/Studentenverwaltung/Details/Lehrveranstaltungstermine.js' ]; + $result['admissionDates'] = [ + 'title' => $this->p->t('stv', 'tab_admissionDates'), + 'component' => './Stv/Studentenverwaltung/Details/Aufnahmetermine.js' + ]; + Events::trigger('stv_conf_student', function & () use (&$result) { return $result; }); diff --git a/application/models/crm/Reihungstest_model.php b/application/models/crm/Reihungstest_model.php index 86ebfd0af..a685b01cd 100644 --- a/application/models/crm/Reihungstest_model.php +++ b/application/models/crm/Reihungstest_model.php @@ -511,4 +511,250 @@ class Reihungstest_model extends DB_Model return $this->execQuery($query, array($date, $studiengang_kz)); } -} \ No newline at end of file + + /** + * Loads all placement tests of a given person + * @param integer $person_id + * @return array Returns object array with data of placement tests + */ + public function getReihungstestPerson($person_id) + { + $query = ' + SELECT + tbl_rt_person.*, + tbl_reihungstest.studiengang_kz, + tbl_reihungstest.anmerkung, + tbl_reihungstest.datum, + tbl_reihungstest.uhrzeit, + tbl_reihungstest.ext_id, + tbl_reihungstest.max_teilnehmer, + tbl_reihungstest.oeffentlich, + tbl_reihungstest.freigeschaltet, + tbl_reihungstest.studiensemester_kurzbz as studiensemester, + tbl_reihungstest.stufe, + tbl_reihungstest.anmeldefrist, + tbl_reihungstest.aufnahmegruppe_kurzbz, + tbl_studiengang.typ, + UPPER(typ::varchar(1) || kurzbz) AS stg_kuerzel, + so.studiengangbezeichnung, + so.studiengangbezeichnung_englisch, + so.studiengangkurzbzlang + FROM + public.tbl_rt_person + JOIN public.tbl_reihungstest ON (rt_id=reihungstest_id) + JOIN public.tbl_studiengang ON tbl_reihungstest.studiengang_kz = tbl_studiengang.studiengang_kz + JOIN lehre.tbl_studienplan sp USING(studienplan_id) + JOIN lehre.tbl_studienordnung so USING(studienordnung_id) + WHERE + tbl_rt_person.person_id = ? + ORDER BY datum, uhrzeit ASC'; + + return $this->execQuery($query, array($person_id)); + } + + /** + * Calculates Result of Placement Test for a given Person and given placementtest + * and with taking account of weighting per area + * + * @param $person_id ID of Person + * @param $punkte if true result is points else result is percentage of sum + * @param $reihungstest_id ID of Placementtest + * @param $weightedArray array of weighting per area (gewicht per gebiet_id) + * @return float result + */ + public function getReihungstestErgebnisPerson($person_id, $punkte, $reihungstest_id, $weightedArray = null) + { + $parametersArray = array($reihungstest_id); + + $qry = " + SELECT DISTINCT ON (vw_auswertung_ablauf.gebiet_id) gebiet_id, + vw_auswertung_ablauf.*, + tbl_studiengang.typ + FROM + testtool.vw_auswertung_ablauf + JOIN + public.tbl_studiengang USING (studiengang_kz) + WHERE + reihungstest_id = ? "; + + //using prestudent Status to avoid to get the sum of more than 1 placement tests + $qry .= " + AND prestudent_id = ( + SELECT + prestudent_id + FROM + public.tbl_rt_person + JOIN + public.tbl_prestudent USING(person_id) + JOIN + public.tbl_prestudentstatus USING (prestudent_id, studienplan_id) + JOIN + tbl_reihungstest ON ( + tbl_rt_person.rt_id = tbl_reihungstest.reihungstest_id + ) + WHERE + tbl_rt_person.person_id = ? + AND + tbl_rt_person.rt_id = ? + AND + tbl_prestudentstatus.status_kurzbz = 'Interessent' + AND + tbl_prestudentstatus.studiensemester_kurzbz = tbl_reihungstest.studiensemester_kurzbz + ORDER BY tbl_reihungstest.datum DESC, tbl_prestudent.priorisierung ASC LIMIT 1 + ) + "; + array_push($parametersArray, $person_id); + array_push($parametersArray, $reihungstest_id); + + $resultRtPerson = $this->execQuery($qry, $parametersArray); + + $ergebnis = 0; + $summeGewicht = 0; + + foreach ($resultRtPerson->retval as $row) + { + $prozent = 0; + if($row->punkte>=$row->maxpunkte) + { + $prozent = 100; + $row->punkte = $row->maxpunkte; + } + else + $prozent = (($row->punkte + $row->offsetpunkte)/($row->maxpunkte + $row->offsetpunkte))*100; + + if($punkte == 'true') + { + if($row->punkte) + { + $ergebnis += $row->punkte; + } + } + else + { + if ($row->punkte) + { + $gew = isset($weightedArray[$row->gebiet_id]) ? $weightedArray[$row->gebiet_id] : 1; + $ergebnis += $prozent * $gew; + $summeGewicht += $gew; + } + } + } + $return = $summeGewicht > 0 + ? number_format($ergebnis/$summeGewicht, 4, '.', '') + : number_format($ergebnis, 4, '.', ''); + + return $return; + } + + /** + * returns Reihungstests for given studyplans and include_ids + * + * @param Array $studienplan_arr array of studienplaene + * @param Array $include_ids array of include_ids + * @return Array List of Reihungstests + */ + public function getReihungstestByStudyPlanAndIds($studienplan_arr, $include_ids = null) + { + $studienplan_ids_string = implode(',', $studienplan_arr); + $studienplan_arr = explode(',', $studienplan_ids_string); + + $parametersArray = array($studienplan_arr); + + $qry = " + SELECT + distinct a.*, + CASE EXTRACT(DOW FROM a.datum) + WHEN 0 THEN 'So' + WHEN 1 THEN 'Mo' + WHEN 2 THEN 'Di' + WHEN 3 THEN 'Mi' + WHEN 4 THEN 'Do' + WHEN 5 THEN 'Fr' + WHEN 6 THEN 'Sa' + END AS wochentag, + sg.kurzbzlang as stg, + ( + SELECT count(*) FROM public.tbl_rt_person + WHERE rt_id = a.reihungstest_id + ) as angemeldete_teilnehmer + FROM + public.tbl_reihungstest a + JOIN public.tbl_rt_studienplan USING(reihungstest_id) + JOIN public.tbl_studiengang sg USING(studiengang_kz) + WHERE studienplan_id IN ?"; + + if($include_ids && is_array($include_ids) && count($include_ids) > 0) + { + $include_ids_string = implode(',', $include_ids); + $include_ids = explode(',', $include_ids_string); + + array_push($parametersArray, $include_ids); + + $qry .= "OR reihungstest_id in ?"; + } + $qry .= "ORDER BY a.datum DESC"; + + return $this->execQuery($qry, $parametersArray); + } + /** + * returns Reihungstests for given studyplans and include_ids + * + * @param Integer $studiengang_kz + * @param $include_id optional (here null) + * @return Array List of Reihungstests + */ + public function getZukuenftigeReihungstestStg($studiengang_kz, $include_id = null) + { + $parametersArray = array($studiengang_kz, $studiengang_kz, $include_id); + + $qry = " + SELECT *, + CASE EXTRACT(DOW FROM a.datum) + WHEN 0 THEN 'So' + WHEN 1 THEN 'Mo' + WHEN 2 THEN 'Di' + WHEN 3 THEN 'Mi' + WHEN 4 THEN 'Do' + WHEN 5 THEN 'Fr' + WHEN 6 THEN 'Sa' + END AS wochentag, + ( + SELECT count(*) FROM public.tbl_prestudent + WHERE reihungstest_id=a.reihungstest_id + ) as angemeldete_teilnehmer + FROM + ( + SELECT *, '1' as sortierung, + ( + SELECT upper(typ || kurzbz) FROM public.tbl_studiengang + WHERE studiengang_kz=tbl_reihungstest.studiengang_kz + ) as stg + FROM + public.tbl_reihungstest + WHERE + datum>=now()-'1 days'::interval AND studiengang_kz=? + UNION + SELECT *, '2' as sortierung, + ( + SELECT upper(typ || kurzbz) FROM public.tbl_studiengang + WHERE studiengang_kz=tbl_reihungstest.studiengang_kz + ) as stg + FROM + public.tbl_reihungstest + WHERE datum>=now()-'1 days'::interval AND studiengang_kz!=? + UNION + SELECT *, '0' as sortierung, + ( + SELECT upper(typ || kurzbz) FROM public.tbl_studiengang + WHERE studiengang_kz=tbl_reihungstest.studiengang_kz + ) as stg + FROM + public.tbl_reihungstest + WHERE reihungstest_id=? + ORDER BY sortierung, stg, datum + ) a + "; + + return $this->execQuery($qry, $parametersArray); + } +} diff --git a/application/models/organisation/Studienplan_model.php b/application/models/organisation/Studienplan_model.php index e35ba52fb..569aebd0b 100644 --- a/application/models/organisation/Studienplan_model.php +++ b/application/models/organisation/Studienplan_model.php @@ -134,4 +134,17 @@ class Studienplan_model extends DB_Model 'prestudent_id' => $prestudent_id ]); } + + public function getStudienplaeneForPerson($person_id) + { + $this->addDistinct(); + $this->addSelect($this->dbTable . '.*'); + $this->addSelect('ps.*'); + $this->addJoin('public.tbl_prestudentstatus pss', 'studienplan_id'); + $this->addJoin('public.tbl_prestudent ps', 'prestudent_id'); + + return $this->loadWhere([ + 'person_id' => $person_id + ]); + } } diff --git a/application/models/person/Benutzergruppe_model.php b/application/models/person/Benutzergruppe_model.php index fba797641..271402ffe 100644 --- a/application/models/person/Benutzergruppe_model.php +++ b/application/models/person/Benutzergruppe_model.php @@ -33,4 +33,16 @@ class Benutzergruppe_model extends DB_Model $uids = (hasData($res)) ? getData($res) : array(); return $uids; } + + /** + * Laedt die Aufnahmegruppe(n) in Abhängigkeit von User und Studiensemester + * @param uid, gruppe_kurzbz, studiensemester_kurzbz + * @return array + */ + public function loadAufnahmegruppen($uid, $stsem) + { + $query = " + SELECT * FROM tbl_gruppe WHERE aufnahmegruppe=true;"; + return $this->execReadOnlyQuery($query); + } } diff --git a/application/models/testtool/Ablauf_model.php b/application/models/testtool/Ablauf_model.php index 748926658..d6d6ebe74 100644 --- a/application/models/testtool/Ablauf_model.php +++ b/application/models/testtool/Ablauf_model.php @@ -11,4 +11,31 @@ class Ablauf_model extends DB_Model $this->dbTable = 'testtool.tbl_ablauf'; $this->pk = 'ablauf_id'; } + + /** + * Returns Weighting of the respective ranking test areas + * @param $studiengang_kz Studiengang_kz + * @param $semester Integer optional + * @return array of weightings per ranking test areas of given studiengang + */ + public function getAblaufGebieteAndGewichte($studiengang_kz, $semester = null) + { + $parametersArray = array($studiengang_kz); + + $qry = " + SELECT + tbl_ablauf.gebiet_id, tbl_ablauf.gewicht + FROM + testtool.tbl_ablauf + WHERE + tbl_ablauf.studiengang_kz= ?"; + + if($semester) + { + $qry .= " AND semester = ?"; + array_push($parametersArray, $semester); + + } + return $this->execQuery($qry, $parametersArray); + } } diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index c10dc475a..8e4c523d6 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -37,7 +37,10 @@ $configArray = [ //replaced by possibility to hide each formular field via config stv.php #'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN, #'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN - 'showHintKommPrfg' => !defined('FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT') ? false : FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT + 'showHintKommPrfg' => !defined('FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT') ? false : FAS_STUDSTATUS_SHOW_KOMM_PRFG_HINT, + 'showAufnahmegruppen' => !defined('FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN') ? false : FAS_REIHUNGSTEST_AUFNAHMEGRUPPEN, + 'allowUebernahmePunkte' => !defined('FAS_REIHUNGSTEST_PUNKTEUEBERNAHME') ? true : FAS_REIHUNGSTEST_PUNKTEUEBERNAHME, + 'useReihungstestPunkte' => !defined('FAS_REIHUNGSTEST_PUNKTE') ? true : FAS_REIHUNGSTEST_PUNKTE, ]; ?> diff --git a/public/js/api/factory/stv.js b/public/js/api/factory/stv.js index 7ea387263..95bc227f5 100644 --- a/public/js/api/factory/stv.js +++ b/public/js/api/factory/stv.js @@ -29,6 +29,7 @@ import exam from './stv/exam.js'; import abschlusspruefung from './stv/abschlusspruefung.js'; import grades from './stv/grades.js'; import mobility from './stv/mobility.js'; +import admissionDates from './stv/admissionDates.js'; export default { app, @@ -44,5 +45,6 @@ export default { exam, abschlusspruefung, grades, - mobility + mobility, + admissionDates }; \ No newline at end of file diff --git a/public/js/api/factory/stv/admissionDates.js b/public/js/api/factory/stv/admissionDates.js new file mode 100644 index 000000000..a6d743276 --- /dev/null +++ b/public/js/api/factory/stv/admissionDates.js @@ -0,0 +1,99 @@ +/** + * 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 . + */ + +export default { + getAufnahmetermine(person_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/getAufnahmetermine/' + person_id, + }; + }, + getListPlacementTests(prestudent_id){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/getListPlacementTests/' + prestudent_id, + }; + }, + getListStudyPlans(person_id){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/getListStudyPlans/' + person_id, + }; + }, + addNewPlacementTest(params){ + return { + method: 'post', + url: 'api/frontend/v1/stv/aufnahmetermine/insertAufnahmetermin/', + params + }; + }, + loadPlacementTest(rt_person_id){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/loadAufnahmetermin/' + rt_person_id, + }; + }, + updatePlacementTest(params){ + return { + method: 'post', + url: 'api/frontend/v1/stv/aufnahmetermine/updateAufnahmetermin/', + params + }; + }, + deletePlacementTest(rt_person_id){ + return { + method: 'post', + url: 'api/frontend/v1/stv/aufnahmetermine/deleteAufnahmetermin/' + rt_person_id + }; + }, + loadDataRtPrestudent(prestudent_id){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/loadDataRtPrestudent/' + prestudent_id, + }; + }, + saveDataRtPrestudent(params){ + return { + method: 'post', + url: 'api/frontend/v1/stv/aufnahmetermine/insertOrUpdateDataRtPrestudent/', + params + }; + }, + loadAufnahmegruppen(params){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/loadAufnahmegruppen/', + params + }; + }, + getResultReihungstest(params){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/getResultReihungstest/', + params + }; + }, + loadFutureReihungstests(params){ + return { + method: 'get', + url: 'api/frontend/v1/stv/aufnahmetermine/getZukuenftigeReihungstestStg/', + params + }; + }, + + +} \ No newline at end of file diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 248cfd55c..36340a767 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -65,7 +65,10 @@ export default { defaultSemester: this.defaultSemester, $reloadList: () => { this.$refs.stvList.reload(); - } + }, + configShowAufnahmegruppen: this.config.showAufnahmegruppen, + configAllowUebernahmePunkte: this.config.allowUebernahmePunkte, + configUseReihungstestPunkte: this.config.useReihungstestPunkte } }, data() { diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine.js b/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine.js new file mode 100644 index 000000000..53ae524e0 --- /dev/null +++ b/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine.js @@ -0,0 +1,26 @@ +import AdmissionDates from "./Aufnahmetermine/Aufnahmetermine.js"; +import HeaderPlacement from "./Aufnahmetermine/HeaderReihungstest.js"; + +export default { + name: "TabAdmissionDates", + components: { + AdmissionDates, + HeaderPlacement + }, + provide() { + return { + config: this.config + }; + }, + props: { + modelValue: Object, + }, + data(){ + return {} + }, + template: ` +
+ + +
` +}; \ No newline at end of file diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine/Aufnahmetermine.js b/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine/Aufnahmetermine.js new file mode 100644 index 000000000..cf8a47dd3 --- /dev/null +++ b/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine/Aufnahmetermine.js @@ -0,0 +1,503 @@ +import {CoreFilterCmpt} from "../../../../filter/Filter.js"; +import BsModal from "../../../../Bootstrap/Modal.js"; +import FormForm from '../../../../Form/Form.js'; +import FormInput from '../../../../Form/Input.js'; + +import ApiStvAdmissionDates from '../../../../../api/factory/stv/admissionDates'; + +export default { + name: 'ListAdmissionDates', + components: { + CoreFilterCmpt, + BsModal, + FormForm, + FormInput + }, + inject: { + allowUebernahmePunkte: { + from: 'configAllowUebernahmePunkte', + default: true + }, + //if true use punkte, false: use percentage + useReihungstestPunkte: { + from: 'configUseReihungstestPunkte', + default: true + }, + $reloadList: { + from: '$reloadList', + required: true + }, + cisRoot: { + from: 'cisRoot' + }, + }, + props: { + student: Object + }, + data() { + return { + tabulatorOptions: { + ajaxURL: 'dummy', + ajaxRequestFunc: () => this.$api.call( + ApiStvAdmissionDates.getAufnahmetermine(this.student.person_id) + ), + ajaxResponse: (url, params, response) => response.data, + columns: [ + {title: "rt_id", field: "rt_id", visible: false}, + {title: "rt_person_id", field: "rt_person_id", visible: false}, + {title: "person_id", field: "person_id", visible: false}, + {title: "datum", field: "datum", + 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", + }); + } + }, + {title: "stufe", field: "stufe"}, + {title: "studiensemester", field: "studiensemester"}, + {title: "anmerkung", field: "anmerkung", visible: false}, + {title: "anmeldedatum", field: "anmeldedatum", visible: false, + 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", + }); + } + }, + {title: "punkte", field: "punkte"}, + { + title: "teilgenommen", field: "teilgenommen", + formatter: "tickCross", + hozAlign: "center", + formatterParams: { + tickElement: '', + crossElement: '' + } + }, + {title: "ort", field: "ort", visible: false}, + {title: "studienplan", field: "studienplan", visible: false}, + {title: "studienplan_id", field: "studienplan_id", visible: false}, + {title: "stg", field: "studiengangkurzbzlang"}, + {title: "Stg", field: "stg_kuerzel"}, + { + 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 = ''; + button.title = this.$p.t('ui', 'bearbeiten'); + button.addEventListener('click', (event) => + this.actionEditPlacementTest(cell.getData().rt_person_id) + ); + container.append(button); + + button = document.createElement('button'); + button.className = 'btn btn-outline-secondary btn-action'; + button.innerHTML = ''; + button.title = this.$p.t('ui', 'loeschen'); + button.addEventListener('click', () => + this.actionDeletePlacementTest(cell.getData().rt_person_id) + ); + container.append(button); + + return container; + }, + frozen: true + } + ], + layout: 'fitDataFill', + layoutColumnsOnNewData: false, + height: 'auto', + minHeight: 200, + index: 'aufnahmetermin_id', + persistenceID: 'stv-details-table_admission-dates' + }, + tabulatorEvents: [ + { + event: 'tableBuilt', + handler: async () => { + await this.$p.loadCategory(['admission', 'global', 'person', 'ui', 'projektarbeitsbeurteilung']); + let cm = this.$refs.table.tabulator.columnManager; + + cm.getColumnByField('rt_id').component.updateDefinition({ + title: this.$p.t('ui', 'reihungstest_id') + }); + cm.getColumnByField('rt_person_id').component.updateDefinition({ + title: this.$p.t('ui', 'reihungstest_person_id') + }); + cm.getColumnByField('person_id').component.updateDefinition({ + title: this.$p.t('person', 'person_id') + }); + cm.getColumnByField('datum').component.updateDefinition({ + title: this.$p.t('global', 'datum') + }); + cm.getColumnByField('stufe').component.updateDefinition({ + title: this.$p.t('admission', 'stufe') + }); + cm.getColumnByField('studiensemester').component.updateDefinition({ + title: this.$p.t('lehre', 'studiensemester') + }); + cm.getColumnByField('anmerkung').component.updateDefinition({ + title: this.$p.t('global', 'anmerkung') + }); + cm.getColumnByField('anmeldedatum').component.updateDefinition({ + title: this.$p.t('admission', 'anmeldedatum') + }); + cm.getColumnByField('punkte').component.updateDefinition({ + title: this.$p.t('exam', 'punkte') + }); + cm.getColumnByField('teilgenommen').component.updateDefinition({ + title: this.$p.t('admission', 'teilgenommen') + }); + cm.getColumnByField('ort').component.updateDefinition({ + title: this.$p.t('person', 'ort') + }); + cm.getColumnByField('studienplan').component.updateDefinition({ + title: this.$p.t('lehre', 'studienplan') + }); + cm.getColumnByField('studienplan_id').component.updateDefinition({ + title: this.$p.t('ui', 'studienplan_id') + }); + cm.getColumnByField('studiengangkurzbzlang').component.updateDefinition({ + title: this.$p.t('projektarbeitsbeurteilung', 'studiengang') + }); + cm.getColumnByField('stg_kuerzel').component.updateDefinition({ + title: this.$p.t('admission', 'stg_kurz') + }); + } + } + ], + formData: {}, + statusNew: true, + listPlacementTests: [], + listStudyPlans: [], + filterOnlyFutureTestsSet: false, + filteredPlacementTests: [] + } + }, + methods: { + actionNewPlacementTest() { + this.resetForm(); + this.statusNew = true; + this.formData.anmeldedatum = new Date(); + this.$refs.placementTestModal.show(); + }, + actionEditPlacementTest(rt_person_id) { + this.resetForm(); + this.statusNew = false; + this.loadPlacementTest(rt_person_id); + this.$refs.placementTestModal.show(); + }, + actionDeletePlacementTest(rt_person_id) { + this.$fhcAlert + .confirmDelete() + .then(result => result + ? rt_person_id + : Promise.reject({handled: true})) + .then(this.deletePlacementTest) + .catch(this.$fhcAlert.handleSystemError); + }, + addNewPlacementTest() { + const dataToSend = { + person_id: this.student.person_id, + formData: this.formData + }; + return this.$refs.formPlacementTest + .call(ApiStvAdmissionDates.addNewPlacementTest(dataToSend)) + .then(response => { + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); + this.hideModal("placementTestModal"); + this.resetForm(); + }) + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.reload(); + }); + }, + hideModal(modalRef){ + this.$refs[modalRef].hide(); + }, + reload() { + this.$refs.table.reloadTable(); + }, + loadPlacementTest(rt_person_id) { + return this.$api + .call(ApiStvAdmissionDates.loadPlacementTest(rt_person_id)) + .then(result => { + this.formData = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + }, + updatePlacementTest(rt_person_id) { + const dataToSend = { + formData: this.formData, + rt_person_id: rt_person_id, + }; + this.$refs.formPlacementTest + .call(ApiStvAdmissionDates.updatePlacementTest(dataToSend)) + .then(response => { + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); + this.hideModal("placementTestModal"); + this.resetForm(); + }) + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.reload(); + }); + }, + deletePlacementTest(rt_person_id) { + return this.$api + .call(ApiStvAdmissionDates.deletePlacementTest(rt_person_id)) + .then(response => { + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); + }) + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.reload(); + }); + }, + getResultReihungstest(reihungstest_id){ + const paramsRt = { + reihungstest_id: reihungstest_id, + person_id: this.student.person_id, + punkte: this.useReihungstestPunkte, + studiengang_kz: this.student.studiengang_kz + }; + + return this.$api + .call(ApiStvAdmissionDates.getResultReihungstest(paramsRt)) + .then(response => { + this.formData.punkte = response.data; + }) + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.reload(); + }); + }, + loadFutureReihungstests(){ + const arrayReihungstestIds = this.listPlacementTests.map(item => item.reihungstest_id); + const paramsRt = { + studiengang_kz: this.student.studiengang_kz, + arrayReihungstestIds : arrayReihungstestIds + }; + + return this.$api + .call(ApiStvAdmissionDates.loadFutureReihungstests(paramsRt)) + .then(response => { + this.filteredPlacementTests = response.data; + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'filterOnlyFutureActive')); + this.$refs.filterButton.className = 'btn btn-secondary w-100'; + this.$refs.filterButton.title = this.$p.t('ui', 'alleAnzeigen'); + }) + .catch(this.$fhcAlert.handleSystemError) + .finally(() => { + this.reload(); + }); + }, + toggleFilter(){ + this.filterOnlyFutureTestsSet = !this.filterOnlyFutureTestsSet; + + if(this.filterOnlyFutureTestsSet) { + this.loadFutureReihungstests(); + } + else + { + this.filteredPlacementTests = this.listPlacementTests; + this.$refs.filterButton.className = 'btn btn-outline-secondary w-100'; + this.$refs.filterButton.title = this.$p.t('admission', 'loadZukuenftigeRT');} + }, + openAdministrationPlacementTest(reihungstest_id){ + let link = this.cisRoot + 'vilesci/stammdaten/reihungstestverwaltung.php'; + if(reihungstest_id){ + link += '?reihungstest_id=' + reihungstest_id; + } + window.open(link, '_blank'); + }, + resetForm() { + this.formData = {}; + }, + }, + created() { + this.$api + .call(ApiStvAdmissionDates.getListPlacementTests(this.student.prestudent_id)) + .then(result => { + this.listPlacementTests = this.filteredPlacementTests = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + + this.$api + .call(ApiStvAdmissionDates.getListStudyPlans(this.student.person_id)) + .then(result => { + this.listStudyPlans = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + }, + template: ` +
+

{{$p.t('admission', 'allgemein')}}

+ + + + + + + + + + + +
+
+ + + + +
+ +
+ + +
+
+ + +
+ +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + + + +
+
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ ` +} diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine/HeaderReihungstest.js b/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine/HeaderReihungstest.js new file mode 100644 index 000000000..fcda41f34 --- /dev/null +++ b/public/js/components/Stv/Studentenverwaltung/Details/Aufnahmetermine/HeaderReihungstest.js @@ -0,0 +1,157 @@ +import FormForm from "../../../../Form/Form.js"; +import FormInput from "../../../../Form/Input.js"; +import ApiStvAdmissionDates from '../../../../../api/factory/stv/admissionDates'; + +export default { + name: 'HeaderPlacement', + components: { + FormForm, + FormInput + }, + inject: { + showAufnahmegruppen: { + from: 'configShowAufnahmegruppen', + default: false + }, + currentSemester: { + from: 'currentSemester', + }, + }, + props: { + student: Object + }, + data(){ + return { + statusNew: true, + formData: { + aufnahmegruppe_kurzbz: null + }, + listAufnahmetermine: [], + listAufnahmegruppen: [] + } + }, + methods: { + saveDataRt(prestudent_id) { + const dataToSend = { + prestudent_id: prestudent_id, + formData: this.formData + }; + return this.$api + .call(ApiStvAdmissionDates.saveDataRtPrestudent(dataToSend)) + .then(result => { + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); + }) + .catch(this.$fhcAlert.handleSystemError); + }, + calculateTotalPoints() { + return this.$api + .call(ApiStvAdmissionDates.getAufnahmetermine(this.student.person_id)) + .then(result => { + this.listAufnahmetermine = result.data; + + const listAufnahmetermineFiltered = this.listAufnahmetermine + .filter(item => item.studiengangkurzbzlang == this.student.studiengang) + .sort((a, b) => this.parseSemester(b.studiensemester) - this.parseSemester(a.studiensemester)); + const elementSemYoungest = listAufnahmetermineFiltered[0]; + + this.formData.rt_gesamtpunkte = elementSemYoungest.punkte; + + }) + .catch(this.$fhcAlert.handleSystemError); + }, + parseSemester(semester) { + const type = semester.slice(0, 2).toUpperCase(); // "WS" or "SS" + const year = parseInt(semester.slice(2), 10); + + // WS > SS + return year * 10 + (type === 'SS' ? 1 : 2); + } + }, + created(){ + this.$api + .call(ApiStvAdmissionDates.loadDataRtPrestudent(this.student.prestudent_id)) + .then(result => { + this.formData = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + + if(this.showAufnahmegruppen) + { + const paramsGroup = { + uid: this.student.uid, + semester: this.currentSemester + }; + this.$api + .call(ApiStvAdmissionDates.loadAufnahmegruppen(paramsGroup)) + .then(result => { + this.listAufnahmegruppen = result.data; + }) + .catch(this.$fhcAlert.handleSystemError); + } + }, + template: ` +
+

{{ $p.t('lehre', 'studiengang') }}

+ + +
+
+ +
+
+ + + + + +
+
+ +
+ +
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
+ +
+
+ +
+ ` +} \ No newline at end of file diff --git a/rdf/reihungstest.rdf.php b/rdf/reihungstest.rdf.php index cb4ebf8dc..15860d025 100644 --- a/rdf/reihungstest.rdf.php +++ b/rdf/reihungstest.rdf.php @@ -73,18 +73,23 @@ $rt = new reihungstest(); if(isset($_GET['include_id']) && isset($_GET['studiengang_kz'])) { + error_log("in zweig get zukuenfigte"); $include_id=$_GET['include_id']; + error_log("include_Id:" . $include_id); $studiengang_kz=$_GET['studiengang_kz']; + error_log(" stg_kz: " . $studiengang_kz); $rt->getZukuenftige($include_id, $studiengang_kz); } elseif(isset($_GET['prestudent_id'])) { $include_ids=array(); + error_log("prestudent"); $prestudent = new prestudent(); $prestudent->getPrestudentRolle($_GET['prestudent_id'], 'Interessent'); $studienplan_arr = array(); foreach($prestudent->result as $row) { + error_log( $row->studienplan_id); $studienplan_arr[] = $row->studienplan_id; } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index f3662f071..52149cac3 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -43291,6 +43291,428 @@ and represent the current state of research on the topic. The prescribed citatio ) ), // FHC 4 Lehrveranstaltungstermine ENDE --------------------------------------------------------------------------- + // FHC4 STUDIERENDENVERWALTUNG AUFNAHMETERMINE START --------------------------------------------------------------- + array( + 'app' => 'core', + 'category' => 'stv', + 'phrase' => 'tab_admissionDates', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Aufnahmetermine', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Admission Dates', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'reihungstest', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reihungstest', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Placement Test', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'admission_edit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Aufnahmetermin bearbeiten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Edit appointment for participation placement test', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'admission_delete', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Aufnahmetermin Löschen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Delete Admission Date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'admission_new', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Termin für Teilnahme am Reihungstest anlegen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Create appointment for participation placement test', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'anmeldundRtAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anmeldung zum Reihungstest am', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Registration for the ranking test on', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'rtAngetreten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zum Reihungstest angetreten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Participated in the ranking test', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'rtAbsolviert', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reihungstestverfahren absolviert', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Placement test procedure completed', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'gesamtpunkte', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Gesamtpunkte', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Total Points', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'gesamtpunkteBerechnen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Gesamtpunkte berechnen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Calculate total points', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'allgemein', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Allgemein', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Generally', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'headerRTVerwaltung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zur Reihungstestverwaltung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Administration Placement Test', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'loadZukuenftigeRT', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur zukünftige Reihungstests laden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show future placement tests only', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'getRTErgebnis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reihungstestergebnis holen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Get placement test result', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'filterOnlyFutureActive', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Filter \'Nur zukünftige Reihungstest anzeigen\' aktiv', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Filter \'Only show future placement tests\' active', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'reihungstest_id', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reihungstest ID', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Placementtest ID', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'reihungstest_person_id', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'RtPerson ID', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'PtPerson ID', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'stufe', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Stufe', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'level', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'anmeldedatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anmeldedatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Registration Date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'teilgenommen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'teilgenommen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'participated', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'admission', + 'phrase' => 'stg_kurz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Kürzel', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'shorthand', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + // FHC4 STUDIERENDENVERWALTUNG AUFNAHMETERMINE ENDE --------------------------------------------------------------- );