mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- Versionsnummer korrigert
- Neues DB Update File erstellt - Statusgrund bei Prestudentstatus hinzugefügt - Editieren des Statusgrund im FAS hinzugefügt
This commit is contained in:
@@ -84,6 +84,8 @@ class prestudent extends person
|
||||
public $bestaetigtam;
|
||||
public $bestaetigtvon;
|
||||
public $bewerbung_abgeschicktamum;
|
||||
public $statusgrund_id;
|
||||
public $rt_stufe;
|
||||
|
||||
public $studiensemester_old = '';
|
||||
public $ausbildungssemester_old = '';
|
||||
@@ -458,6 +460,8 @@ class prestudent extends person
|
||||
$rolle->bestaetigtvon = $row->bestaetigtvon;
|
||||
$rolle->anmerkung_status = $row->anmerkung;
|
||||
$rolle->bewerbung_abgeschicktamum = $row->bewerbung_abgeschicktamum;
|
||||
$rolle->rt_stufe = $row->rt_stufe;
|
||||
$rolle->statusgrund_id = $row->statusgrund_id;
|
||||
$this->result[] = $rolle;
|
||||
}
|
||||
return true;
|
||||
@@ -511,6 +515,8 @@ class prestudent extends person
|
||||
$this->bestaetigtvon = $row->bestaetigtvon;
|
||||
$this->anmerkung_status = $row->anmerkung;
|
||||
$this->bewerbung_abgeschicktamum = $row->bewerbung_abgeschicktamum;
|
||||
$this->statusgrund_id = $row->statusgrund_id;
|
||||
$this->rt_stufe = $row->rt_stufe;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -789,7 +795,7 @@ class prestudent extends person
|
||||
$qry = 'INSERT INTO public.tbl_prestudentstatus (prestudent_id, status_kurzbz,
|
||||
studiensemester_kurzbz, ausbildungssemester, datum, insertamum, insertvon,
|
||||
updateamum, updatevon, ext_id, orgform_kurzbz, bestaetigtam, bestaetigtvon, anmerkung,
|
||||
bewerbung_abgeschicktamum, studienplan_id) VALUES('.
|
||||
bewerbung_abgeschicktamum, studienplan_id, rt_stufe, statusgrund_id) VALUES('.
|
||||
$this->db_add_param($this->prestudent_id).",".
|
||||
$this->db_add_param($this->status_kurzbz).",".
|
||||
$this->db_add_param($this->studiensemester_kurzbz).",".
|
||||
@@ -805,7 +811,9 @@ class prestudent extends person
|
||||
$this->db_add_param($this->bestaetigtvon).",".
|
||||
$this->db_add_param($this->anmerkung_status).",".
|
||||
$this->db_add_param($this->bewerbung_abgeschicktamum).",".
|
||||
$this->db_add_param($this->studienplan_id,FHC_INTEGER).");";
|
||||
$this->db_add_param($this->studienplan_id,FHC_INTEGER).",".
|
||||
$this->db_add_param($this->rt_stufe,FHC_INTEGER).",".
|
||||
$this->db_add_param($this->statusgrund_id, FHC_INTEGER).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -835,7 +843,9 @@ class prestudent extends person
|
||||
' bewerbung_abgeschicktamum='.$this->db_add_param($this->bewerbung_abgeschicktamum).",".
|
||||
' studienplan_id='.$this->db_add_param($this->studienplan_id, FHC_INTEGER).",".
|
||||
' anmerkung='.$this->db_add_param($this->anmerkung_status).",".
|
||||
' orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).
|
||||
' orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).",".
|
||||
' rt_stufe='.$this->db_add_param($this->rt_stufe).",".
|
||||
' statusgrund_id='.$this->db_add_param($this->statusgrund_id, FHC_INTEGER)." ".
|
||||
" WHERE
|
||||
prestudent_id=".$this->db_add_param($this->prestudent_id, FHC_INTEGER, false)."
|
||||
AND status_kurzbz=".$this->db_add_param($this->status_kurzbz, FHC_STRING, false)."
|
||||
@@ -890,7 +900,8 @@ class prestudent extends person
|
||||
$log->sql = $qry;
|
||||
$log->sqlundo = 'INSERT INTO public.tbl_prestudentstatus(prestudent_id, status_kurzbz, studiensemester_kurzbz,'
|
||||
. ' ausbildungssemester, datum, insertamum, insertvon, updateamum, updatevon, ext_id, orgform_kurzbz,'
|
||||
. ' bestaetigtam, bestaetigtvon, anmerkung, bewerbung_abgeschicktamum, studienplan_id) VALUES('.
|
||||
. ' bestaetigtam, bestaetigtvon, anmerkung, bewerbung_abgeschicktamum, studienplan_id, '
|
||||
. ' rt_stufe, statusgrund_id) VALUES('.
|
||||
$this->db_add_param($this->prestudent_id).','.
|
||||
$this->db_add_param($this->status_kurzbz).','.
|
||||
$this->db_add_param($this->studiensemester_kurzbz).','.
|
||||
@@ -906,7 +917,9 @@ class prestudent extends person
|
||||
$this->db_add_param($this->bestaetigtvon).','.
|
||||
$this->db_add_param($this->anmerkung_status).','.
|
||||
$this->db_add_param($this->bewerbung_abgeschicktamum).','.
|
||||
$this->db_add_param($this->studienplan_id, FHC_INTEGER).');';
|
||||
$this->db_add_param($this->studienplan_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->rt_stufe, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->statusgrund_id, FHC_INTEGER).');';
|
||||
if($log->save(true))
|
||||
{
|
||||
|
||||
@@ -1013,6 +1026,8 @@ class prestudent extends person
|
||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$this->studienplan_id = $row->studienplan_id;
|
||||
$this->studienplan_bezeichnung = $row->studienplan_bezeichnung;
|
||||
$this->rt_stufe = $row->rt_stufe;
|
||||
$this->statusgrund_id = $row->statusgrund_id;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -1065,6 +1080,8 @@ class prestudent extends person
|
||||
$this->bewerbung_abgeschicktamum = $row->bewerbung_abgeschicktamum;
|
||||
$this->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$this->studienplan_id = $row->studienplan_id;
|
||||
$this->rt_stufe = $row->rt_stufe;
|
||||
$this->statusgrund_id = $row->statusgrund_id;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
*/
|
||||
require_once('basis_db.class.php');
|
||||
|
||||
class statusgrund extends basis_db
|
||||
{
|
||||
public $new; // boolean
|
||||
public $result = array(); // statusgrund Objekt
|
||||
|
||||
//Tabellenspalten
|
||||
public $statusgrund_id; // integer
|
||||
public $status_kurzbz; // varchar(20)
|
||||
public $aktiv = true; // boolean
|
||||
public $bezeichnung_mehrsprachig; // varchar(255)[]
|
||||
public $bezeichnung; // text[]
|
||||
|
||||
/**
|
||||
* Konstruktor - Laedt optional einen Statusgrund
|
||||
*
|
||||
* @param $statusgrund_id Statusgrund der geladen werden soll (default=null)
|
||||
*/
|
||||
public function __construct($statusgrund_id=null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($statusgrund_id != null)
|
||||
$this->load($statusgrund_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt den Statusgrund
|
||||
*
|
||||
* @param $statusgrund_id Grund der geladen werden soll
|
||||
*/
|
||||
public function load($statusgrund_id)
|
||||
{
|
||||
$sprache = new sprache();
|
||||
$bezeichnung_mehrsprachig = $sprache->getSprachQuery('bezeichnung_mehrsprachig');
|
||||
$beschreibung = $sprache->getSprachQuery('beschreibung');
|
||||
$qry = "
|
||||
SELECT
|
||||
*,".$bezeichnung_mehrsprachig.",".$beschreibung."
|
||||
FROM
|
||||
public.tbl_status_grund
|
||||
WHERE
|
||||
statusgrund_id=".$this->db_add_param($statusgrund_id, FHC_INTEGER);
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->statusgrund_id = $row->statusgrund_id;
|
||||
$this->status_kurzbz = $row->status_kurzbz;
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$this->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
$this->beschreibung = $sprache->parseSprachResult('beschreibung', $row);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Es ist kein Eintrag mit dieser ID vorhanden";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Gruende fuer einen Status
|
||||
*
|
||||
* @param $status_kurzbz Status zu dem die Gruende geladen werden sollen
|
||||
*/
|
||||
public function getFromStatus($status_kurzbz, $aktiv=null)
|
||||
{
|
||||
$sprache = new sprache();
|
||||
$bezeichnung_mehrsprachig = $sprache->getSprachQuery('bezeichnung_mehrsprachig');
|
||||
$beschreibung = $sprache->getSprachQuery('beschreibung');
|
||||
$qry = "
|
||||
SELECT
|
||||
*,".$bezeichnung_mehrsprachig.",".$beschreibung."
|
||||
FROM
|
||||
public.tbl_status_grund
|
||||
WHERE
|
||||
status_kurzbz=".$this->db_add_param($status_kurzbz);
|
||||
if(!is_null($aktiv))
|
||||
$qry.=" AND aktiv=".($aktiv?'true':'false');
|
||||
$qry.=" ORDER BY bezeichnung_mehrsprachig[0]";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new statusgrund();
|
||||
|
||||
$obj->statusgrund_id = $row->statusgrund_id;
|
||||
$obj->status_kurzbz = $row->status_kurzbz;
|
||||
$obj->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
$obj->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
$obj->beschreibung = $sprache->parseSprachResult('beschreibung', $row);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user