mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
Created Anrechnungen Students GUI, Controller, DB-tables, library, phrases
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -11,4 +11,40 @@ class Anrechnung_model extends DB_Model
|
||||
$this->dbTable = 'lehre.tbl_anrechnung';
|
||||
$this->pk = 'anrechnung_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Anrechnungstatus.
|
||||
* @param $anrechnung_id
|
||||
* @param $status_kurzbz
|
||||
* @return array|null
|
||||
*/
|
||||
public function saveAnrechnungstatus($anrechnung_id, $status_kurzbz)
|
||||
{
|
||||
$qry = '
|
||||
INSERT INTO lehre.tbl_anrechnung_anrechnungstatus (
|
||||
anrechnung_id, status_kurzbz, insertvon
|
||||
) VALUES ( ?, ?, ?);
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array($anrechnung_id, $status_kurzbz, getAuthUID()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last inserted Anrechnungstatus
|
||||
* @param $anrechnung_id
|
||||
* @return array|null
|
||||
*/
|
||||
public function getLastAnrechnungstatus($anrechnung_id)
|
||||
{
|
||||
$qry = '
|
||||
SELECT status_kurzbz, bezeichnung_mehrsprachig
|
||||
FROM lehre.tbl_anrechnungstatus
|
||||
JOIN lehre.tbl_anrechnung_anrechnungstatus USING (status_kurzbz)
|
||||
WHERE anrechnung_id = ?
|
||||
ORDER BY insertamum DESC
|
||||
LIMIT 1
|
||||
';
|
||||
|
||||
return $this->execQuery($qry, array($anrechnung_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
class Anrechnungstatus_model extends DB_Model
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dbTable = 'lehre.tbl_anrechnungstatus';
|
||||
$this->pk = 'status_kurzbz';
|
||||
}
|
||||
}
|
||||
@@ -273,4 +273,24 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
|
||||
return $this->execQuery($query, $parametersarray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Lehrveranstaltung and its Lehreinheiten (multiple rows possible).
|
||||
* Returns empty array if student has no Lehrveranstaltung.
|
||||
* @param $uid
|
||||
* @param $studiensemester_kurzbz
|
||||
* @param $lehrveranstaltung_id
|
||||
* @return array|null
|
||||
*/
|
||||
public function getLvByStudent($uid, $studiensemester_kurzbz, $lehrveranstaltung_id)
|
||||
{
|
||||
$query = '
|
||||
SELECT * FROM campus.vw_student_lehrveranstaltung
|
||||
WHERE uid = ?
|
||||
AND studiensemester_kurzbz = ?
|
||||
AND lehrveranstaltung_id = ?;
|
||||
';
|
||||
|
||||
return $this->execQuery($query, array($uid, $studiensemester_kurzbz, $lehrveranstaltung_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ class Person_model extends DB_Model
|
||||
*/
|
||||
public function getByUid($uid)
|
||||
{
|
||||
$this->addSelect('vorname, nachname, gebdatum, person_id');
|
||||
$this->addSelect('vorname, nachname, gebdatum, person_id, bpk, matr_nr');
|
||||
$this->addJoin('tbl_benutzer', 'person_id');
|
||||
|
||||
return $this->loadWhere(array('uid' => $uid));
|
||||
|
||||
Reference in New Issue
Block a user