mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
Abfrage missedProjektarbeiten
This commit is contained in:
@@ -69,4 +69,50 @@ class Projektarbeit_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
|
||||
public function getMissedProjektarbeiten()
|
||||
{
|
||||
//TODO(MANU) check values
|
||||
$allowedProjekttypes = array();
|
||||
$allowedProjekttypes[] = 'Bachelor';
|
||||
$allowedProjekttypes[] = 'Diplom';
|
||||
|
||||
$now = new DateTime();
|
||||
|
||||
|
||||
//$this->addSelect($this->dbTable.'.*');
|
||||
$this->addSelect($this->dbTable.'.projektarbeit_id');
|
||||
$this->addSelect($this->dbTable.'.titel');
|
||||
$this->addSelect($this->dbTable.'.student_uid');
|
||||
$this->addSelect($this->dbTable.'.note');
|
||||
$this->addSelect($this->dbTable.'.seitenanzahl');
|
||||
$this->addSelect('p' . '.person_id');
|
||||
$this->addSelect('le' . '.lehreinheit_id');
|
||||
$this->addSelect('sg' . '.studiengang_kz');
|
||||
|
||||
$this->addJoin('campus.tbl_paabgabe pa','projektarbeit_id');
|
||||
$this->addJoin('public.tbl_benutzer ben','ben.uid = tbl_projektarbeit.student_uid');
|
||||
$this->addJoin('public.tbl_person p', 'person_id', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_lehreinheit le', 'lehreinheit_id', 'LEFT');
|
||||
$this->addJoin('lehre.tbl_lehrveranstaltung lv', 'lehrveranstaltung_id', 'LEFT');
|
||||
$this->addJoin('public.tbl_studiengang sg', 'studiengang_kz', 'LEFT');
|
||||
|
||||
$this->db->where('pa.paabgabetyp_kurzbz', 'end');
|
||||
$this->db->where_in($this->dbTable. '.projekttyp_kurzbz', $allowedProjekttypes);
|
||||
|
||||
//TODO(MANU) Config date
|
||||
$this->db->where('pa.datum >', '2022-09-01');
|
||||
//$this->db->where('pa.fixtermin', 'TRUE');
|
||||
$this->db->where('pa.abgabedatum', NULL);
|
||||
//TODO(MANU) get date with NOW
|
||||
$this->db->where('pa.datum < ', '2023-10-04');
|
||||
|
||||
$this->addLimit(10);
|
||||
|
||||
return $this->loadWhere([
|
||||
'pa.fixtermin' => 'TRUE',
|
||||
'sg.studiengang_kz' => 328
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user