mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
client side placementtest handling, filtering Dropdowns placementtests, Phrases, show future Placementtests, open Reihungstestverwaltung
This commit is contained in:
@@ -14,9 +14,13 @@ class Aufnahmetermine extends FHCAPI_Controller
|
||||
'insertAufnahmetermin' => ['admin:rw', 'assistenz:rw'],
|
||||
'updateAufnahmetermin' => ['admin:rw', 'assistenz:rw'],
|
||||
'deleteAufnahmetermin' => ['admin:rw', 'assistenz:rw'],
|
||||
'getListPlacementTests' => ['admin:rw', 'assistenz:rw'],
|
||||
'getListStudyPlans' => ['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
|
||||
@@ -169,7 +173,8 @@ class Aufnahmetermine extends FHCAPI_Controller
|
||||
'punkte' => $_POST['punkte'],
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
@@ -186,9 +191,53 @@ class Aufnahmetermine extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListPlacementTests()
|
||||
public function getListPlacementTests($prestudent_id)
|
||||
{
|
||||
$result = $this->ReihungstestModel->getAllReihungstests();
|
||||
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);
|
||||
@@ -198,10 +247,154 @@ class Aufnahmetermine extends FHCAPI_Controller
|
||||
{
|
||||
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
|
||||
|
||||
$result = $this->StudienplanModel->getStudienplaeneForPerson($person_id);;
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,14 +530,15 @@ class Reihungstest_model extends DB_Model
|
||||
tbl_reihungstest.max_teilnehmer,
|
||||
tbl_reihungstest.oeffentlich,
|
||||
tbl_reihungstest.freigeschaltet,
|
||||
tbl_reihungstest.studiensemester_kurzbz,
|
||||
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.studiengangbezeichnung_englisch,
|
||||
so.studiengangkurzbzlang
|
||||
FROM
|
||||
public.tbl_rt_person
|
||||
JOIN public.tbl_reihungstest ON (rt_id=reihungstest_id)
|
||||
@@ -552,35 +553,208 @@ class Reihungstest_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all placement tests
|
||||
* @return array Returns object array with data of placement tests
|
||||
* 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
|
||||
*/
|
||||
//TODO(Manu) finish Details
|
||||
public function getAllReihungstests()
|
||||
public function getReihungstestErgebnisPerson($person_id, $punkte, $reihungstest_id, $weightedArray = null)
|
||||
{
|
||||
$query = '
|
||||
SELECT * FROM public.tbl_reihungstest
|
||||
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)
|
||||
ORDER BY datum DESC NULLS LAST, uhrzeit
|
||||
';
|
||||
$parametersArray = array($reihungstest_id);
|
||||
|
||||
return $this->execQuery($query);
|
||||
}
|
||||
$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 = ? ";
|
||||
|
||||
public function getReihungstestsPs($prestudent_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)
|
||||
{
|
||||
$query = '
|
||||
SELECT * FROM public.tbl_reihungstest
|
||||
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)
|
||||
ORDER BY datum DESC, uhrzeit
|
||||
';
|
||||
$prozent = 0;
|
||||
if($row->punkte>=$row->maxpunkte)
|
||||
{
|
||||
$prozent = 100;
|
||||
$row->punkte = $row->maxpunkte;
|
||||
}
|
||||
else
|
||||
$prozent = (($row->punkte + $row->offsetpunkte)/($row->maxpunkte + $row->offsetpunkte))*100;
|
||||
|
||||
return $this->execQuery($query);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
];
|
||||
?>
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ export default {
|
||||
url: 'api/frontend/v1/stv/aufnahmetermine/getAufnahmetermine/' + person_id,
|
||||
};
|
||||
},
|
||||
getListPlacementTests(){
|
||||
getListPlacementTests(prestudent_id){
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/stv/aufnahmetermine/getListPlacementTests/',
|
||||
url: 'api/frontend/v1/stv/aufnahmetermine/getListPlacementTests/' + prestudent_id,
|
||||
};
|
||||
},
|
||||
getListStudyPlans(person_id){
|
||||
@@ -59,6 +59,41 @@ export default {
|
||||
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
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-mobility h-30 d-flex flex-column">
|
||||
<header-placement></header-placement>
|
||||
<header-placement :student="modelValue"></header-placement>
|
||||
<admission-dates ref="tbl_admission_dates" :student="modelValue"></admission-dates>
|
||||
</div>`
|
||||
};
|
||||
+191
-43
@@ -14,10 +14,22 @@ export default {
|
||||
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
|
||||
@@ -31,9 +43,9 @@ export default {
|
||||
),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "rt_id", field: "rt_id"},
|
||||
{title: "rt_person_id", field: "rt_person_id"},
|
||||
{title: "person_id", field: "person_id"},
|
||||
{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();
|
||||
@@ -48,7 +60,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{title: "stufe", field: "stufe"},
|
||||
{title: "studiensemester", field: "studiensemester_kurzbz"},
|
||||
{title: "studiensemester", field: "studiensemester"},
|
||||
{title: "anmerkung", field: "anmerkung", visible: false},
|
||||
{title: "anmeldedatum", field: "anmeldedatum", visible: false,
|
||||
formatter: function (cell) {
|
||||
@@ -64,11 +76,20 @@ export default {
|
||||
}
|
||||
},
|
||||
{title: "punkte", field: "punkte"},
|
||||
{title: "teilgenommen", field: "teilgenommen"},
|
||||
{
|
||||
title: "teilgenommen", field: "teilgenommen",
|
||||
formatter: "tickCross",
|
||||
hozAlign: "center",
|
||||
formatterParams: {
|
||||
tickElement: '<i class="fa fa-check text-success"></i>',
|
||||
crossElement: '<i class="fa fa-xmark text-danger"></i>'
|
||||
}
|
||||
},
|
||||
{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"},
|
||||
{title: "stg", field: "studiengangkurzbzlang"},
|
||||
{title: "Stg", field: "stg_kuerzel"},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 150, // Ensures Action-buttons will be always fully displayed
|
||||
@@ -106,21 +127,77 @@ export default {
|
||||
index: 'aufnahmetermin_id',
|
||||
persistenceID: 'stv-details-table_admission-dates'
|
||||
},
|
||||
tabulatorEvents: [],
|
||||
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: []
|
||||
listStudyPlans: [],
|
||||
filterOnlyFutureTestsSet: false,
|
||||
filteredPlacementTests: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
actionNewPlacementTest() {
|
||||
this.resetForm();
|
||||
this.statusNew = true;
|
||||
this.formData.anmeldedatum = new Date();
|
||||
this.$refs.placementTestModal.show();
|
||||
},
|
||||
actionEditPlacementTest(rt_person_id) {
|
||||
console.log("edit Test " + rt_person_id);
|
||||
this.resetForm();
|
||||
this.statusNew = false;
|
||||
this.loadPlacementTest(rt_person_id);
|
||||
@@ -159,7 +236,6 @@ export default {
|
||||
this.$refs.table.reloadTable();
|
||||
},
|
||||
loadPlacementTest(rt_person_id) {
|
||||
console.log("load Test " + rt_person_id);
|
||||
return this.$api
|
||||
.call(ApiStvAdmissionDates.loadPlacementTest(rt_person_id))
|
||||
.then(result => {
|
||||
@@ -185,7 +261,6 @@ export default {
|
||||
});
|
||||
},
|
||||
deletePlacementTest(rt_person_id) {
|
||||
console.log("delete Test" + rt_person_id);
|
||||
return this.$api
|
||||
.call(ApiStvAdmissionDates.deletePlacementTest(rt_person_id))
|
||||
.then(response => {
|
||||
@@ -196,30 +271,72 @@ export default {
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
console.log("resetForm");
|
||||
this.formData = {};
|
||||
/*
|
||||
getResultReihungstest(reihungstest_id){
|
||||
const paramsRt = {
|
||||
reihungstest_id: reihungstest_id,
|
||||
person_id: this.student.person_id,
|
||||
punkte: this.useReihungstestPunkte,
|
||||
studiengang_kz: this.student.studiengang_kz
|
||||
};
|
||||
|
||||
this.formData.von = new Date();
|
||||
this.formData.bis = new Date();
|
||||
this.formData.mobilitaetsprogramm_code = 7;
|
||||
this.formData.nation_code = 'A';
|
||||
this.formData.herkunftsland_code = 'A';
|
||||
this.formData.rt_id = null;
|
||||
this.formData.localPurposes = [];
|
||||
this.formData.localSupports = [];
|
||||
this.formData.lehrveranstaltung_id = '',
|
||||
this.formData.lehreinheit_id = '',
|
||||
this.statusNew = true;
|
||||
this.listLes = [];*/
|
||||
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())
|
||||
.call(ApiStvAdmissionDates.getListPlacementTests(this.student.prestudent_id))
|
||||
.then(result => {
|
||||
this.listPlacementTests = result.data;
|
||||
this.listPlacementTests = this.filteredPlacementTests = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
@@ -232,7 +349,7 @@ export default {
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-admission-table h-100 pb-3">
|
||||
<h4>Allgemein</h4>
|
||||
<h4>{{$p.t('admission', 'allgemein')}}</h4>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
@@ -247,14 +364,8 @@ export default {
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
|
||||
{{formData}}
|
||||
|
||||
<!-- {{student}}-->
|
||||
|
||||
<!-- {{listPlacementTests}}-->
|
||||
|
||||
<!--Modal: placementTestModal-->
|
||||
<bs-modal ref="placementTestModal" dialog-class="modal-dialog-scrollable">
|
||||
<bs-modal ref="placementTestModal" dialog-class="modal-dialog-scrollable modal-lg">
|
||||
<template #title>
|
||||
<p v-if="statusNew" class="fw-bold mt-3">{{$p.t('admission', 'admission_new')}}</p>
|
||||
<p v-else class="fw-bold mt-3">{{$p.t('admission', 'admission_edit')}}</p>
|
||||
@@ -263,7 +374,8 @@ export default {
|
||||
|
||||
<form-form ref="formPlacementTest" @submit.prevent>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="row mb-3 g-2">
|
||||
<div class="col-10">
|
||||
<form-input
|
||||
container-class="stv-details-admission-placementtest"
|
||||
:label="$p.t('lehre', 'reihungstest')"
|
||||
@@ -273,17 +385,43 @@ export default {
|
||||
>
|
||||
<option value=""> -- {{ $p.t('fehlermonitoring', 'keineAuswahl') }} --</option>
|
||||
<option
|
||||
v-for="test in listPlacementTests"
|
||||
v-for="test in filteredPlacementTests"
|
||||
:key="test.reihungstest_id"
|
||||
:value="test.reihungstest_id"
|
||||
>
|
||||
{{test.reihungstest_id}} {{test.studiensemester_kurzbz}} St.{{test.stufe}} {{test.kurzbzlang}} {{test.datum}} {{test.uhrzeit}}
|
||||
{{test.anmerkung}} (x/{{test.max_teilnehmer}}) {{test.rt_id}}
|
||||
{{test.studiensemester_kurzbz}} St.{{test.stufe}} {{test.stg}} {{test.datum}} {{test.uhrzeit}}
|
||||
{{test.anmerkung}} <span v-if="test.max_teilnehmer">({{test.angemeldete_teilnehmer}}/{{test.max_teilnehmer}})</span>
|
||||
<span v-if="test.datum">({{test.wochentag}})</span>
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" style="color:transparent;">filter</label>
|
||||
<button
|
||||
class="btn btn-outline-secondary w-100"
|
||||
ref="filterButton"
|
||||
@click="toggleFilter"
|
||||
:title="$p.t('admission', 'loadZukuenftigeRT')"
|
||||
>
|
||||
<i class="fa fa-filter"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<label class="form-label" style="color:transparent;">edit</label>
|
||||
<button
|
||||
class="btn btn-outline-secondary w-100"
|
||||
@click="openAdministrationPlacementTest(formData.rt_id)"
|
||||
:title="$p.t('admission', 'headerRTVerwaltung')"
|
||||
>
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-7">
|
||||
<form-input
|
||||
container-class="stv-details-admission-anmeldedatum"
|
||||
:label="$p.t('admission', 'anmeldundRtAm')"
|
||||
@@ -297,8 +435,10 @@ export default {
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="mt-2">
|
||||
<form-input
|
||||
container-class="stv-details-admission-teilgenommen"
|
||||
type="checkbox"
|
||||
@@ -308,8 +448,10 @@ export default {
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-7">
|
||||
<form-input
|
||||
container-class="stv-details-admission-studyplan"
|
||||
:label="$p.t('lehre', 'studienplan')"
|
||||
@@ -327,8 +469,10 @@ export default {
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-3">
|
||||
<form-input
|
||||
container-class="stv-details-admission-points"
|
||||
:label="$p.t('exam', 'punkte')"
|
||||
@@ -337,11 +481,15 @@ export default {
|
||||
name="punkte"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
</div>
|
||||
|
||||
<!--TODO(Manu) Reihungstestergebnis holen-->
|
||||
|
||||
<div v-if="allowUebernahmePunkte" class="col-4">
|
||||
<label class="form-label" style="color:transparent;">getPunkte</label>
|
||||
<button class="btn btn-outline-secondary w-100" @click="getResultReihungstest(formData.rt_id)">{{ $p.t('admission', 'getRTErgebnis') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form-form>
|
||||
|
||||
<template #footer>
|
||||
|
||||
+144
-1
@@ -1,13 +1,156 @@
|
||||
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: `
|
||||
<div class="stv-details-admission-header-placement h-100 pb-3">
|
||||
<h4>Studiengang</h4>
|
||||
<h4>{{ $p.t('lehre', 'studiengang') }}</h4>
|
||||
|
||||
<form-form class="mt-3" ref="formRtGesamtData" @submit.prevent>
|
||||
<div v-if="showAufnahmegruppen" class="row mb-3">
|
||||
<div class="col-1">
|
||||
<label>{{ $p.t('lehre', 'gruppe') }}</label>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<form-input
|
||||
container-class="stv-details-admission-header-placement-aufnahmegruppe"
|
||||
type="select"
|
||||
name="aufnahmegruppe_kurzbz"
|
||||
v-model="formData.aufnahmegruppe_kurzbz"
|
||||
>
|
||||
<option value=null> -- {{ $p.t('fehlermonitoring', 'keineAuswahl') }} --</option>
|
||||
<option
|
||||
v-for="gruppe in listAufnahmegruppen"
|
||||
:key="gruppe.gruppe_kurzbz"
|
||||
:value="gruppe.gruppe_kurzbz"
|
||||
>
|
||||
{{gruppe.bezeichnung}} - {{gruppe.gruppe_kurzbz}}
|
||||
</option>
|
||||
|
||||
</form-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
<div class="col-3">
|
||||
<form-input
|
||||
container-class="form-check stv-details-admission-header-placement-rtangetreten"
|
||||
type="checkbox"
|
||||
name="reihungstestangetreten"
|
||||
:label="$p.t('admission','rtAbsolviert')"
|
||||
v-model="formData.reihungstestangetreten"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label>{{ $p.t('admission', 'gesamtpunkte') }}</label>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<form-input
|
||||
container-class="stv-details-admission-header-placement-gesamtpunkte"
|
||||
type="text"
|
||||
name="rt_gesamtpunkte"
|
||||
v-model="formData.rt_gesamtpunkte"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<button class="btn btn-outline-primary" @click="saveDataRt(student.prestudent_id)"> {{$p.t('ui', 'speichern')}}</button>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<button class="btn btn-outline-primary" @click="calculateTotalPoints"> {{$p.t('admission', 'gesamtpunkteBerechnen')}}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form-form>
|
||||
|
||||
</div>
|
||||
`
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -41536,6 +41536,286 @@ and represent the current state of research on the topic. The prescribed citatio
|
||||
)
|
||||
)
|
||||
),
|
||||
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 ---------------------------------------------------------------
|
||||
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user