mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-17 20:19:28 +00:00
show List Admission Dates
This commit is contained in:
@@ -27,20 +27,12 @@ class Aufnahmetermine extends FHCAPI_Controller
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('codex/Bisio_model', 'BisioModel');
|
||||
$this->load->model('crm/Reihungstest_model', 'ReihungstestModel');
|
||||
}
|
||||
|
||||
public function getAufnahmetermine($student_uid)
|
||||
public function getAufnahmetermine($person_id)
|
||||
{
|
||||
$this->BisioModel->addSelect("*");
|
||||
$this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT');
|
||||
$this->BisioModel->addJoin('lehre.tbl_lehreinheit le', 'ON (le.lehreinheit_id = bis.tbl_bisio.lehreinheit_id)','LEFT');
|
||||
$this->BisioModel->addOrder('von', 'DESC');
|
||||
$this->BisioModel->addOrder('bis', 'DESC');
|
||||
$this->BisioModel->addOrder('aufnahmetermin_id', 'DESC');
|
||||
$result = $this->BisioModel->loadWhere(
|
||||
array('student_uid' => $student_uid)
|
||||
);
|
||||
$result = $this->ReihungstestModel->getReihungstestPerson($person_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
@@ -274,233 +266,4 @@ class Aufnahmetermine extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLVList($studiengang_kz)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudiengangkz($studiengang_kz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAllLehreinheiten()
|
||||
{
|
||||
$lv_id = $this->input->post('lv_id');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($lv_id, $studiensemester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLvsandLesByStudent($student_uid)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$lv_ids = array();
|
||||
$allData = array();
|
||||
|
||||
foreach ($data as $lehrveranstaltung) {
|
||||
$lv_ids[] = $lehrveranstaltung->lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
foreach ($lv_ids as $id)
|
||||
{
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (is_array($data)) {
|
||||
$allData = array_merge($allData, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess($allData);
|
||||
}
|
||||
|
||||
public function getPurposes($aufnahmetermin_id)
|
||||
{
|
||||
$aufnahmetermin_id = (int)$aufnahmetermin_id;
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
$this->BisiozweckModel->addSelect("*");
|
||||
$this->BisiozweckModel->addJoin('bis.tbl_zweck zw', 'ON (zw.zweck_code = bis.tbl_bisio_zweck.zweck_code)');
|
||||
|
||||
$result = $this->BisiozweckModel->loadWhere(
|
||||
array('aufnahmetermin_id' => $aufnahmetermin_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getSupports($aufnahmetermin_id)
|
||||
{
|
||||
$aufnahmetermin_id = (int)$aufnahmetermin_id;
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
$this->BisioaufenthaltfoerderungModel->addSelect("*");
|
||||
$this->BisioaufenthaltfoerderungModel->addJoin('bis.tbl_aufenthaltfoerderung af', 'ON (af.aufenthaltfoerderung_code = bis.tbl_bisio_aufenthaltfoerderung.aufenthaltfoerderung_code)');
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->loadWhere(
|
||||
array('aufnahmetermin_id' => $aufnahmetermin_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListPurposes()
|
||||
{
|
||||
$this->load->model('codex/Zweck_model', 'ZweckModel');
|
||||
|
||||
$result = $this->ZweckModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListSupports()
|
||||
{
|
||||
$this->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
|
||||
|
||||
$result = $this->AufenthaltfoerderungModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function addAufnahmeterminPurpose($aufnahmetermin_id, $local_purpose = null)
|
||||
{
|
||||
$zweck_code = $this->input->post('zweck_code');
|
||||
|
||||
if($local_purpose){
|
||||
$zweck_code = $local_purpose;
|
||||
}
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
if(!$local_purpose)
|
||||
{
|
||||
$check = $this->BisiozweckModel->loadWhere(
|
||||
[
|
||||
'aufnahmetermin_id' => $aufnahmetermin_id,
|
||||
'zweck_code' => $zweck_code,
|
||||
]
|
||||
);
|
||||
if (hasData($check))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_entryExisting'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->BisiozweckModel->insert(
|
||||
array(
|
||||
'aufnahmetermin_id' => $aufnahmetermin_id,
|
||||
'zweck_code' => $zweck_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if($local_purpose)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteAufnahmeterminPurpose($aufnahmetermin_id)
|
||||
{
|
||||
$zweck_code = $this->input->post('zweck_code');
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
|
||||
$result = $this->BisiozweckModel->delete(
|
||||
array(
|
||||
'aufnahmetermin_id' => $aufnahmetermin_id,
|
||||
'zweck_code' => $zweck_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function addAufnahmeterminSupport($aufnahmetermin_id, $local_support = null)
|
||||
{
|
||||
$aufenthaltfoerderung_code = $this->input->post('aufenthaltfoerderung_code');
|
||||
|
||||
if($local_support){
|
||||
$aufenthaltfoerderung_code = $local_support;
|
||||
}
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
if(!$local_support)
|
||||
{
|
||||
$check = $this->BisioaufenthaltfoerderungModel->loadWhere(
|
||||
[
|
||||
'aufnahmetermin_id' => $aufnahmetermin_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code,
|
||||
]
|
||||
);
|
||||
if (hasData($check))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_entryExisting'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->insert(
|
||||
array(
|
||||
'aufnahmetermin_id' => $aufnahmetermin_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if($local_support)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteAufnahmeterminSupport($aufnahmetermin_id)
|
||||
{
|
||||
$aufenthaltfoerderung_code = $this->input->post('aufenthaltfoerderung_code');
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->delete(
|
||||
array(
|
||||
'aufnahmetermin_id' => $aufnahmetermin_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code
|
||||
)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,4 +511,43 @@ class Reihungstest_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($date, $studiengang_kz));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
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
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
export default {
|
||||
getAufnahmetermine(prestudent_id) {
|
||||
getAufnahmetermine(person_id) {
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/stv/aufnahmetermine/' + prestudent_id
|
||||
url: 'api/frontend/v1/stv/aufnahmetermine/getAufnahmetermine/' + person_id,
|
||||
};
|
||||
},
|
||||
}
|
||||
+28
-3
@@ -27,12 +27,24 @@ export default {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: () => this.$api.call(
|
||||
ApiStvAdmissionDates.getAufnahmetermin(this.student.prestudent_id)
|
||||
ApiStvAdmissionDates.getAufnahmetermine(this.student.person_id)
|
||||
),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "aufnahmetermin_id", field: "aufnahmetermin_id"},
|
||||
{title: "prestudent_id", field: "prestudent_id"},
|
||||
{title: "rt_id", field: "rt_id"},
|
||||
{title: "rt_person_id", field: "rt_person_id"},
|
||||
{title: "person_id", field: "person_id"},
|
||||
{title: "datum", field: "datum"},
|
||||
{title: "stufe", field: "stufe"},
|
||||
{title: "studiensemester", field: "studiensemester_kurzbz"},
|
||||
{title: "anmerkung", field: "anmerkung", visible: false},
|
||||
{title: "anmeldedatum", field: "anmeldedatum", visible: false},
|
||||
{title: "punkte", field: "punkte"},
|
||||
{title: "teilgenommen", field: "teilgenommen"},
|
||||
{title: "ort", field: "ort", visible: false},
|
||||
{title: "studienplan", field: "studienplan", visible: false},
|
||||
{title: "studienplan_id", field: "studienplan_id", visible: false},
|
||||
{title: "stg_kuerzel", field: "stg_kuerzel"},
|
||||
],
|
||||
layout: 'fitDataFill',
|
||||
layoutColumnsOnNewData: false,
|
||||
@@ -53,6 +65,19 @@ export default {
|
||||
<div class="stv-details-admission-dates-table h-100 pb-3">
|
||||
<h4>Allgemein</h4>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
table-only
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
:new-btn-label="this.$p.t('lehre', 'reihungstest')"
|
||||
@click:new="actionNewMobility"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
@@ -41416,6 +41416,26 @@ and represent the current state of research on the topic. The prescribed citatio
|
||||
)
|
||||
)
|
||||
),
|
||||
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'
|
||||
)
|
||||
)
|
||||
),
|
||||
// FHC4 STUDIERENDENVERWALTUNG AUFNAHMETERMINE ENDE ---------------------------------------------------------------
|
||||
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user