Fixed models

This commit is contained in:
Paolo
2019-04-26 12:43:51 +02:00
parent 3a692f8a5e
commit c84c484a2a
147 changed files with 2132 additions and 46 deletions
@@ -23,17 +23,17 @@ class Nation extends APIv1_Controller
{
parent::__construct(array('Nation' => 'basis/nation:r', 'All' => 'basis/nation:r'));
// Load model NationModel
$this->load->model('codex/nation_model', 'NationModel');
$this->load->model('codex/Nation_model', 'NationModel');
}
public function getNation()
{
$nation_code = $this->get("nation_code");
if (isset($nation_code))
{
$result = $this->NationModel->loadWhere(array('nation_code' => $nation_code));
$this->response($result, REST_Controller::HTTP_OK);
}
else
@@ -41,7 +41,7 @@ class Nation extends APIv1_Controller
$this->response();
}
}
public function getAll()
{
if (!$this->get('orderEnglish'))
@@ -52,7 +52,7 @@ class Nation extends APIv1_Controller
{
$result = $this->NationModel->addOrder('engltext');
}
if (isSuccess($result))
{
if ($this->get('ohnesperre'))
@@ -64,7 +64,7 @@ class Nation extends APIv1_Controller
$result = $this->NationModel->load();
}
}
$this->response($result, REST_Controller::HTTP_OK);
}
}
}
+1 -1
View File
@@ -23,7 +23,7 @@ class Zgv extends APIv1_Controller
{
parent::__construct(array('Zgv' => 'basis/zgv:rw'));
// Load model ZgvModel
$this->load->model('codex/zgv_model', 'ZgvModel');
$this->load->model('codex/Zgv_model', 'ZgvModel');
}
/**
@@ -30,7 +30,7 @@ class Bewerbungstermine extends APIv1_Controller
)
);
// Load model BewerbungstermineModel
$this->load->model('crm/bewerbungstermine_model', 'BewerbungstermineModel');
$this->load->model('crm/Bewerbungstermine_model', 'BewerbungstermineModel');
}
@@ -29,7 +29,7 @@ class Dokumentprestudent extends APIv1_Controller
)
);
// Load model DokumentprestudentModel
$this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel');
$this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel');
}
/**
@@ -23,7 +23,7 @@ class Notizzuordnung extends APIv1_Controller
{
parent::__construct(array('Notizzuordnung' => 'basis/notizzuordnung:rw'));
// Load model NotizzuordnungModel
$this->load->model('person/notizzuordnung_model', 'NotizzuordnungModel');
$this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel');
}
@@ -102,15 +102,15 @@ class InfoCenter extends Auth_Controller
);
// Loads models
$this->load->model('crm/akte_model', 'AkteModel');
$this->load->model('crm/prestudent_model', 'PrestudentModel');
$this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel');
$this->load->model('crm/statusgrund_model', 'StatusgrundModel');
$this->load->model('person/notiz_model', 'NotizModel');
$this->load->model('person/person_model', 'PersonModel');
$this->load->model('system/message_model', 'MessageModel');
$this->load->model('system/filters_model', 'FiltersModel');
$this->load->model('system/personLock_model', 'PersonLockModel');
$this->load->model('crm/Akte_model', 'AkteModel');
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
$this->load->model('crm/Statusgrund_model', 'StatusgrundModel');
$this->load->model('person/Notiz_model', 'NotizModel');
$this->load->model('person/Person_model', 'PersonModel');
$this->load->model('system/Message_model', 'MessageModel');
$this->load->model('system/Filters_model', 'FiltersModel');
$this->load->model('system/PersonLock_model', 'PersonLockModel');
// Loads libraries
$this->load->library('PersonLogLib');
@@ -522,7 +522,7 @@ class InfoCenter extends Auth_Controller
if (isSuccess($result))
{
$this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel');
$this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel');
//set documents which have been formal geprüft to accepted
$dokument_kurzbzs = array();
+2 -2
View File
@@ -1,10 +1,10 @@
<?php
/**
* This model extends CI_Model because here is just implemented logic
* This model extends FHC_Model because here is just implemented logic
* It does not represent a resource (ex. like models that extend DB_Model)
*/
class Messages_model extends CI_Model
class Messages_model extends FHC_Model
{
/**
* Constructor
@@ -0,0 +1,14 @@
<?php
class Aufteilung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_aufteilung';
$this->pk = 'aufteilung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bestelldetail_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_bestelldetail';
$this->pk = 'bestelldetail_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bestelldetailtag_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_bestelldetailtag';
$this->pk = array('bestelldetail_id', 'tag');
}
}
@@ -0,0 +1,14 @@
<?php
class Bestellstatus_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_bestellstatus';
$this->pk = 'bestellstatus_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Bestellung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_bestellung';
$this->pk = 'bestellung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bestellungtag_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_bestellungtag';
$this->pk = array('bestellung_id', 'tag');
}
}
@@ -0,0 +1,14 @@
<?php
class Buchung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_buchung';
$this->pk = 'buchung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Buchungstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_buchungstyp';
$this->pk = 'buchungstyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Budget_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_budget';
$this->pk = array('kostenstelle_id', 'geschaeftsjahr_kurzbz');
}
}
@@ -0,0 +1,14 @@
<?php
class Rechnung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_rechnung';
$this->pk = 'rechnung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Rechnungsbetrag_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_rechnungsbetrag';
$this->pk = 'rechnungsbetrag_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Rechnungstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_rechnungstyp';
$this->pk = 'rechnungstyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Vertrag_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_vertrag';
$this->pk = 'vertrag_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Vertragsstatus_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_vertragsstatus';
$this->pk = 'vertragsstatus_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Vertragstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_vertragstyp';
$this->pk = 'vertragstyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Zahlungstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'wawi.tbl_zahlungstyp';
$this->pk = 'zahlungstyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Akadgrad_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_akadgrad';
$this->pk = 'akadgrad_id';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Archiv_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_archiv';
$this->pk = 'archiv_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Aufmerksamdurch_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_aufmerksamdurch';
$this->pk = 'aufmerksamdurch_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Ausbildung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_ausbildung';
$this->pk = 'ausbildungcode';
}
}
@@ -0,0 +1,14 @@
<?php
class Berufstaetigkeit_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_berufstaetigkeit';
$this->pk = 'berufstaetigkeit_code';
}
}
@@ -0,0 +1,14 @@
<?php
class Beschaeftigungsausmass_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_beschaeftigungsausmass';
$this->pk = 'beschausmasscode';
}
}
@@ -0,0 +1,14 @@
<?php
class Besqual_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_besqual';
$this->pk = 'besqualcode';
}
}
@@ -0,0 +1,14 @@
<?php
class Bisfunktion_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_bisfunktion';
$this->pk = array('studiengang_kz', 'bisverwendung_id');
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Bisio_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_bisio';
$this->pk = 'bisio_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bisorgform_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_bisorgform';
$this->pk = 'bisorgform_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Bisverwendung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_bisverwendung';
$this->pk = 'bisverwendung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bundesland_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_bundesland';
$this->pk = 'bundesland_code';
}
}
@@ -0,0 +1,14 @@
<?php
class Entwicklungsteam_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_entwicklungsteam';
$this->pk = array('studiengang_kz', 'mitarbeiter_uid');
}
}
@@ -0,0 +1,22 @@
<?php
class Gemeinde_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = "bis.tbl_gemeinde";
$this->pk = "gemeinde_id";
}
public function getGemeindeByPlz($plz)
{
$this->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer");
$this->addOrder("ortschaftsname");
return $this->loadWhere(array("plz" => $plz));
}
}
@@ -0,0 +1,14 @@
<?php
class Hauptberuf_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_hauptberuf';
$this->pk = 'hauptberufcode';
}
}
@@ -0,0 +1,14 @@
<?php
class Lehrform_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_lehrform';
$this->pk = 'lehrform_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Lgartcode_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_lgartcode';
$this->pk = 'lgartcode';
}
}
@@ -0,0 +1,14 @@
<?php
class Mobilitaetsprogramm_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_mobilitaetsprogramm';
$this->pk = 'mobilitaetsprogramm_code';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Nation_model extends DB_Model
{
/**
*
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_nation';
$this->pk = 'nation_code';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Note_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_note';
$this->pk = 'note';
}
}
@@ -0,0 +1,14 @@
<?php
class Verwendung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_verwendung';
$this->pk = 'verwendung_code';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Zgv_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_zgv';
$this->pk = 'zgv_code';
}
}
@@ -0,0 +1,14 @@
<?php
class Zgvdoktor_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_zgvdoktor';
$this->pk = 'zgvdoktor_code';
}
}
@@ -0,0 +1,13 @@
<?php
class Zgvgruppe_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_zgvgruppe';
$this->pk = 'gruppe_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Zgvmaster_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_zgvmaster';
$this->pk = 'zgvmas_code';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Zweck_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_zweck';
$this->pk = 'zweck_code';
}
}
@@ -0,0 +1,14 @@
<?php
class Content_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_content';
$this->pk = 'content_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Contentchild_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_contentchild';
$this->pk = 'contentchild_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Contentgruppe_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_contentgruppe';
$this->pk = array('gruppe_kurzbz', 'content_id');
}
}
@@ -0,0 +1,14 @@
<?php
class Contentlog_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_contentlog';
$this->pk = 'contentlog_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Contentsprache_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_contentsprache';
$this->pk = 'contentsprache_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Infoscreen_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_infoscreen';
$this->pk = 'infoscreen_id';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class News_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_news';
$this->pk = 'news_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Template_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_template';
$this->pk = 'template_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Veranstaltung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_veranstaltung';
$this->pk = 'veranstaltung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Veranstaltungskategorie_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_veranstaltungskategorie';
$this->pk = 'veranstaltungskategorie_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Aufnahmeschluessel_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_aufnahmeschluessel';
$this->pk = 'aufnahmeschluessel';
}
}
@@ -0,0 +1,14 @@
<?php
class Bewerbungstermine_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_bewerbungstermine';
$this->pk = 'bewerbungstermin_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Buchungstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_buchungstyp';
$this->pk = 'buchungstyp_kurzbz';
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Dokument_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_dokument';
$this->pk = 'dokument_kurzbz';
}
}
@@ -0,0 +1,71 @@
<?php
class Dokumentprestudent_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_dokumentprestudent';
$this->pk = array('prestudent_id', 'dokument_kurzbz');
}
/**
* setAccepted
*/
public function setAccepted($prestudent_id, $studiengang_kz)
{
$result = null;
if (is_numeric($prestudent_id) && is_numeric($studiengang_kz))
{
$query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) (
SELECT ds.dokument_kurzbz,
p.prestudent_id,
NOW() AS insertamum
FROM (SELECT DISTINCT person_id, dokument_kurzbz FROM public.tbl_akte) a
INNER JOIN public.tbl_prestudent p USING(person_id)
INNER JOIN public.tbl_dokumentstudiengang ds USING(dokument_kurzbz, studiengang_kz)
LEFT JOIN public.tbl_dokumentprestudent dp USING(dokument_kurzbz, prestudent_id)
WHERE ds.onlinebewerbung IS TRUE
AND (dp.dokument_kurzbz IS NULL AND dp.prestudent_id IS NULL)
AND p.prestudent_id = ?
AND ds.studiengang_kz = ?
)';
$result = $this->execQuery($query, array($prestudent_id, $studiengang_kz));
}
return $result;
}
/**
* setAcceptedDocuments
*/
public function setAcceptedDocuments($prestudent_id, $dokument_kurzbz)
{
$result = null;
if (is_numeric($prestudent_id) && is_array($dokument_kurzbz) && count($dokument_kurzbz) > 0)
{
$query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) (
SELECT d.dokument_kurzbz,
? AS prestudent_id,
NOW() AS insertamum
FROM public.tbl_dokument d
WHERE d.dokument_kurzbz IN ?
AND d.dokument_kurzbz NOT IN (
SELECT dokument_kurzbz
FROM public.tbl_dokumentprestudent
WHERE prestudent_id = ?
)
)';
$result = $this->execQuery($query, array($prestudent_id, $dokument_kurzbz, $prestudent_id));
}
return $result;
}
}
+14
View File
@@ -0,0 +1,14 @@
<?php
class Konto_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_konto';
$this->pk = 'buchungsnr';
}
}
@@ -0,0 +1,14 @@
<?php
class Preincoming_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_preincoming';
$this->pk = 'preincoming_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Preinteressent_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_preinteressent';
$this->pk = 'preinteressent_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Preinteressentstudiengang_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_preinteressentstudiengang';
$this->pk = array('preinteressent_id', 'studiengang_kz');
}
}
@@ -0,0 +1,14 @@
<?php
class Preoutgoing_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_preoutgoing';
$this->pk = 'preoutgoing_id';
}
}
+48
View File
@@ -0,0 +1,48 @@
<?php
class Student_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_student';
$this->pk = array('student_uid');
$this->hasSequence = false;
}
// ****
// * Generiert die Matrikelnummer
// * FORMAT: 0710254001
// * 07 = Jahr
// * 1/2/0 = WS/SS/incoming
// * 0254 = Studiengangskennzahl vierstellig
// * 001 = Laufende Nummer
// ****
public function generateMatrikelnummer($studiengang_kz, $studiensemester_kurzbz)
{
$jahr = mb_substr($studiensemester_kurzbz, 4);
$sem = mb_substr($studiensemester_kurzbz, 0, 2);
if ($sem == 'SS')
$jahr = $jahr - 1;
$art = 0;
$matrikelnummer = sprintf("%02d", $jahr).$art.sprintf("%04d", $studiengang_kz);
$qry = "SELECT matrikelnr FROM public.tbl_student WHERE matrikelnr LIKE ? ORDER BY matrikelnr DESC LIMIT 1";
$matrikelnrres = $this->execQuery($qry, array($matrikelnummer.'%'));
if (hasData($matrikelnrres))
{
$max = mb_substr($matrikelnrres->retval[0]->matrikelnr, 7);
}
else
$max = 0;
$max += 1;
return $matrikelnummer.sprintf("%03d", $max);
}
}
@@ -0,0 +1,14 @@
<?php
class Uebung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_uebung';
$this->pk = 'uebung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Erhalter_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_erhalter';
$this->pk = 'erhalter_kz';
}
}
@@ -0,0 +1,14 @@
<?php
class Fachbereich_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_fachbereich';
$this->pk = 'fachbereich_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Ferien_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_ferien';
$this->pk = array('studiengang_kz', 'bezeichnung');
}
}
@@ -0,0 +1,14 @@
<?php
class Lehrverband_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_lehrverband';
$this->pk = array('gruppe', 'verband', 'semester', 'studiengang_kz');
}
}
@@ -0,0 +1,14 @@
<?php
class Organisationseinheittyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_organisationseinheittyp';
$this->pk = 'organisationseinheittyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Semesterwochen_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_semesterwochen';
$this->pk = array('studiengang_kz', 'semester');
}
}
@@ -0,0 +1,14 @@
<?php
class Service_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_service';
$this->pk = 'service_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Standort_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_standort';
$this->pk = 'standort_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Statistik_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_statistik';
$this->pk = 'statistik_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Studiengangstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_studiengangstyp';
$this->pk = 'typ';
}
}
@@ -0,0 +1,14 @@
<?php
class Studienordnung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_studienordnung';
$this->pk = 'studienordnung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Studienordnungstatus_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_studienordnungstatus';
$this->pk = 'status_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Studienplatz_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_studienplatz';
$this->pk = 'studienplatz_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Bankverbindung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_bankverbindung';
$this->pk = 'bankverbindung_id';
}
}
@@ -0,0 +1,15 @@
<?php
class Benutzergruppe_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_benutzergruppe';
$this->pk = array('gruppe_kurzbz', 'uid');
$this->hasSequence = false;
}
}
@@ -0,0 +1,14 @@
<?php
class Fotostatus_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_fotostatus';
$this->pk = 'fotostatus_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Freebusy_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_freebusy';
$this->pk = 'freebusy_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Freebusytyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'campus.tbl_freebusytyp';
$this->pk = 'freebusytyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Kontaktmedium_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_kontaktmedium';
$this->pk = 'kontaktmedium_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Kontakttyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_kontakttyp';
$this->pk = 'kontakttyp';
}
}
+16 -16
View File
@@ -11,7 +11,7 @@ class Notiz_model extends DB_Model
$this->dbTable = 'public.tbl_notiz';
$this->pk = 'notiz_id';
}
// ------------------------------------------------------------------------------------------------------
/**
* Get a specialization for a prestudent
@@ -20,10 +20,10 @@ class Notiz_model extends DB_Model
{
// Join with the table public.tbl_notizzuordnung using notiz_id
$this->addJoin('public.tbl_notizzuordnung', 'notiz_id');
return $this->NotizModel->loadWhere(array('prestudent_id' => $prestudent_id, 'titel' => $titel));
}
/**
* Remove a specialization
*/
@@ -31,31 +31,31 @@ class Notiz_model extends DB_Model
{
// Loads model Notizzuordnung_model
$this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel');
// Start DB transaction
$this->db->trans_start(false);
$result = $this->delete(array('notiz_id' => $notiz_id));
if (isSuccess($result))
{
$result = $this->NotizzuordnungModel->delete(array('notiz_id' => $notiz_id));
}
// Transaction complete!
$this->db->trans_complete();
// Check if everything went ok during the transaction
if ($this->db->trans_status() === false || isError($result))
{
$this->db->trans_rollback();
$result = error('An error occurred while removing a specialization', EXIT_ERROR);
$result = error($result->msg, EXIT_ERROR);
}
else
{
$this->db->trans_commit();
$result = success('Specialization successfully removed');
}
return $result;
}
@@ -66,32 +66,32 @@ class Notiz_model extends DB_Model
{
// Loads model Notizzuordnung_model
$this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel');
// Start DB transaction
$this->db->trans_start(false);
$result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => true));
$notiz_id = $result->retval;
if (isSuccess($result))
{
$result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'prestudent_id' => $prestudent_id));
}
// Transaction complete!
$this->db->trans_complete();
// Check if everything went ok during the transaction
if ($this->db->trans_status() === false || isError($result))
{
$this->db->trans_rollback();
$result = error('An error occurred while adding a specialization', EXIT_ERROR);
$result = error($result->msg, EXIT_ERROR);
}
else
{
$this->db->trans_commit();
$result = success($notiz_id);
}
return $result;
}
@@ -122,7 +122,7 @@ class Notiz_model extends DB_Model
if ($this->db->trans_status() === false || isError($result))
{
$this->db->trans_rollback();
$result = error('An error occurred while adding a note for a person', EXIT_ERROR);
$result = error($result->msg, EXIT_ERROR);
}
else
{
@@ -0,0 +1,14 @@
<?php
class Notizzuordnung_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_notizzuordnung';
$this->pk = 'notizzuordnung_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Aktivitaet_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_aktivitaet';
$this->pk = 'aktivitaet_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Aufwandstyp_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_aufwandstyp';
$this->pk = 'aufwandstyp_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Projekt_ressource_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_projekt_ressource';
$this->pk = 'projekt_ressource_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Projektphase_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_projektphase';
$this->pk = 'projektphase_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Projekttask_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_projekttask';
$this->pk = 'projekttask_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Ressource_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_ressource';
$this->pk = 'ressource_id';
}
}
@@ -0,0 +1,14 @@
<?php
class Scrumsprint_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'fue.tbl_scrumsprint';
$this->pk = 'scrumsprint_id';
}
}

Some files were not shown because too many files have changed in this diff Show More