mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
- Prestudent_model.php: added getStandortCode and getFoerderrelevant methods
- indent formatting
This commit is contained in:
@@ -290,7 +290,6 @@ class Prestudent_model extends DB_Model
|
||||
|
||||
$prestudentdata->prestudentstatus = $lastStatusData;
|
||||
|
||||
|
||||
if ($this->hasUDF())
|
||||
{
|
||||
$prestudentdata->prestudentUdfs = $this->getUDFs($prestudent_id);
|
||||
@@ -581,4 +580,34 @@ class Prestudent_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, array($person_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets förderrelevant flag for a prestudent, from prestudent, or, if not set on prestudent level, from studiengang
|
||||
* @param int $prestudent_id
|
||||
* @return object
|
||||
*/
|
||||
public function getFoerderrelevant($prestudent_id)
|
||||
{
|
||||
$query = 'SELECT COALESCE (ps.foerderrelevant, stg.foerderrelevant) AS foerderrelevant
|
||||
FROM public.tbl_prestudent ps
|
||||
LEFT JOIN public.tbl_studiengang stg USING (studiengang_kz)
|
||||
WHERE prestudent_id = ?';
|
||||
|
||||
return $this->execQuery($query, array($prestudent_id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets bis standort_code for a prestudent, from prestudent, or, if not set on prestudent level, from studiengang
|
||||
* @param int $prestudent_id
|
||||
* @return object
|
||||
*/
|
||||
public function getStandortCode($prestudent_id)
|
||||
{
|
||||
$query = 'SELECT COALESCE (ps.standort_code, stg.standort_code) AS standort_code
|
||||
FROM public.tbl_prestudent ps
|
||||
LEFT JOIN public.tbl_studiengang stg USING (studiengang_kz)
|
||||
WHERE prestudent_id = ?';
|
||||
|
||||
return $this->execQuery($query, array($prestudent_id));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user