mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
- Reihungstestverwaltung
- Studentenstatus kann nicht mehr geloescht werden - Semesterauswahl beim Interessentenimport
This commit is contained in:
@@ -134,5 +134,30 @@ class datum
|
||||
{
|
||||
return (strlen($datum)>0?date('d.m.Y',strtotime($datum)):'');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prueft Uhrzeit auf Gueltigkeit (HH:MM:SS)
|
||||
* @return true wenn ok, false wenn falsches Format
|
||||
*/
|
||||
function checkUhrzeit($uhrzeit)
|
||||
{
|
||||
if(ereg("([0-9]{2}):([0-9]{2})(:([0-9]{2}))?$",$uhrzeit))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prueft ob das Datum im Format dd.mm.YYYY oder YYYY-mm-dd ist
|
||||
* @return true wenn ok, false wenn falsches Format
|
||||
*/
|
||||
function checkDatum($datum)
|
||||
{
|
||||
if(ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})$",$datum) || ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})$",$datum))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -78,12 +78,46 @@ class reihungstest
|
||||
*/
|
||||
function load($reihungstest_id)
|
||||
{
|
||||
//noch nicht implementiert
|
||||
if(!is_numeric($reihungstest_id))
|
||||
{
|
||||
$this->errormsg = 'Reihungstest_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_reihungstest WHERE reihungstest_id='$reihungstest_id'";
|
||||
if($result = pg_query($this->conn, $qry))
|
||||
{
|
||||
if($row = pg_fetch_object($result))
|
||||
{
|
||||
$this->reihungstest_id = $row->reihungstest_id;
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->ort_kurzbz = $row->ort_kurzbz;
|
||||
$this->anmerkung = $row->anmerkung;
|
||||
$this->datum = $row->datum;
|
||||
$this->uhrzeit = $row->uhrzeit;
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Reihungstest existiert nicht';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Reihungstests';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getAll()
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_reihungstest ORDER BY studiengang_kz, datum, uhrzeit";
|
||||
$qry = "SELECT * FROM public.tbl_reihungstest ORDER BY datum, uhrzeit";
|
||||
if($result = pg_query($this->conn, $qry))
|
||||
{
|
||||
while($row = pg_fetch_object($result))
|
||||
@@ -258,5 +292,37 @@ class reihungstest
|
||||
{
|
||||
//noch nicht implementiert!
|
||||
}
|
||||
|
||||
function getReihungstest($studiengang_kz)
|
||||
{
|
||||
$qry = "SELECT * FROM public.tbl_reihungstest WHERE studiengang_kz='$studiengang_kz'";
|
||||
if($result = pg_query($this->conn, $qry))
|
||||
{
|
||||
while($row = pg_fetch_object($result))
|
||||
{
|
||||
$obj = new reihungstest($this->conn, null, null);
|
||||
|
||||
$obj->reihungstest_id = $row->reihungstest_id;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->ort_kurzbz = $row->ort_kurzbz;
|
||||
$obj->anmerkung = $row->anmerkung;
|
||||
$obj->datum = $row->datum;
|
||||
$obj->uhrzeit = $row->uhrzeit;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Reihungstests';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user