Merge origin/ci into ci

Conflicts:
	application/core/FHC_Model.php
	application/models/Nation_model.php
	application/models/lehre/Studiengang_model.php
	application/models/lehre/Studienplan_model.php
This commit is contained in:
paolo
2016-05-04 15:34:00 +02:00
221 changed files with 3055 additions and 169 deletions
@@ -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 Geschaeftsjahr_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_geschaeftsjahr';
$this->pk = 'geschaeftsjahr_kurzbz';
}
}
@@ -0,0 +1,14 @@
<?php
class Gruppe_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_gruppe';
$this->pk = 'gruppe_kurzbz';
}
}
@@ -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');
}
}
@@ -1,16 +1,13 @@
<?php
class Organisationseinheit_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable='public.tbl_organisationseinheit';
$this->pk='oe_kurzbz';
$this->dbTable = 'public.tbl_organisationseinheit';
$this->pk = 'oe_kurzbz';
}
}
}
@@ -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';
}
}
@@ -1,83 +1,41 @@
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Studiengang_model extends DB_Model
{
public $table = 'public.tbl_studiengang';
public $id = 'studiengang_kz';
public $order = 'DESC';
function __construct()
{
parent::__construct();
}
// get all
function get_all()
{
$this->db->order_by($this->id, $this->order);
return $this->db->get($this->table)->result();
}
// get data by id
function get_by_id($id)
{
$this->db->where($this->id, $id);
return $this->db->get($this->table)->row();
}
// get total rows
function total_rows() {
$this->db->from($this->table);
return $this->db->count_all_results();
}
// get data with limit
function index_limit($limit, $start = 0) {
$this->db->order_by($this->id, $this->order);
$this->db->limit($limit, $start);
return $this->db->get($this->table)->result();
}
// get search total rows
function search_total_rows($keyword = NULL) {
$this->db->like('', $keyword);
$this->db->from($this->table);
return $this->db->count_all_results();
}
// get search data with limit
function search_index_limit($limit, $start = 0, $keyword = NULL) {
$this->db->order_by($this->id, $this->order);
$this->db->like('', $keyword);
$this->db->limit($limit, $start);
return $this->db->get($this->table)->result();
}
// insert data
function insert($data)
{
$this->db->insert($this->table, $data);
}
// update data
function update($id, $data)
{
$this->db->where($this->id, $id);
$this->db->update($this->table, $data);
}
// delete data
function delete($id)
{
$this->db->where($this->id, $id);
$this->db->delete($this->table);
}
}
/* End of file Studiengang_model.php */
/* Location: ./application/models/Studiengang_model.php */
/**
*
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_studiengang';
$this->pk = 'studiengang_kz';
}
/**
*
*/
public function getAllForBewerbung()
{
$allForBewerbungQuery = "SELECT DISTINCT studiengang_kz,
typ,
organisationseinheittyp_kurzbz,
studiengangbezeichnung,
standort,
studiengangbezeichnung_englisch,
lgartcode,
tbl_lgartcode.bezeichnung
FROM lehre.vw_studienplan LEFT JOIN bis.tbl_lgartcode USING (lgartcode)
WHERE onlinebewerbung IS TRUE
AND aktiv IS TRUE
ORDER BY typ, studiengangbezeichnung, tbl_lgartcode.bezeichnung ASC";
// Checks if the operation is permitted by the API caller
if (! $this->fhc_db_acl->isBerechtigt($this->acl['lehre.vw_studienplan'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['lehre.vw_studienplan'], FHC_MODEL_ERROR);
if (! $this->fhc_db_acl->isBerechtigt($this->acl['bis.tbl_lgartcode'], 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl['lehre.vw_studienplan'], FHC_MODEL_ERROR);
return $this->db->query($allForBewerbungQuery);
}
}
@@ -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 Studienjahr_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_studienjahr';
$this->pk = 'studienjahr_kurzbz';
}
}
@@ -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 Studienplan_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'lehre.tbl_studienplan';
$this->pk = 'studienplan_id';
}
}
@@ -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 Studiensemester_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_studiensemester';
$this->pk = 'studiensemester_kurzbz';
}
}