mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
Added method getAvailableReihungstestByPersonId
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
if (!defined("BASEPATH")) exit("No direct script access allowed");
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Reihungstest extends APIv1_Controller
|
||||
{
|
||||
@@ -23,9 +23,9 @@ class Reihungstest extends APIv1_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model ReihungstestModel
|
||||
$this->load->model("crm/Reihungstest_model", "ReihungstestModel");
|
||||
$this->load->model('crm/Reihungstest_model', 'ReihungstestModel');
|
||||
// Load library ReihungstestLib
|
||||
$this->load->library("ReihungstestLib");
|
||||
$this->load->library('ReihungstestLib');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ class Reihungstest extends APIv1_Controller
|
||||
*/
|
||||
public function getReihungstest()
|
||||
{
|
||||
$reihungstestID = $this->get("reihungstest_id");
|
||||
$reihungstestID = $this->get('reihungstest_id');
|
||||
|
||||
if (isset($reihungstestID))
|
||||
{
|
||||
@@ -52,20 +52,20 @@ class Reihungstest extends APIv1_Controller
|
||||
*/
|
||||
public function getByStudiengangStudiensemester()
|
||||
{
|
||||
$studiengang_kz = $this->get("studiengang_kz");
|
||||
$studiensemester_kurzbz = $this->get("studiensemester_kurzbz");
|
||||
$available = $this->get("available");
|
||||
$studiengang_kz = $this->get('studiengang_kz');
|
||||
$studiensemester_kurzbz = $this->get('studiensemester_kurzbz');
|
||||
$available = $this->get('available');
|
||||
|
||||
if (isset($studiengang_kz))
|
||||
{
|
||||
$parametersArray = array("studiengang_kz" => $studiengang_kz);
|
||||
$parametersArray = array('studiengang_kz' => $studiengang_kz);
|
||||
if (isset($studiensemester_kurzbz))
|
||||
{
|
||||
$parametersArray["studiensemester_kurzbz"] = $studiensemester_kurzbz;
|
||||
$parametersArray['studiensemester_kurzbz'] = $studiensemester_kurzbz;
|
||||
}
|
||||
if (isset($available))
|
||||
{
|
||||
$parametersArray["anmeldefrist >="] = "NOW()";
|
||||
$parametersArray['anmeldefrist >='] = 'NOW()';
|
||||
}
|
||||
$result = $this->ReihungstestModel->loadWhere($parametersArray);
|
||||
|
||||
@@ -82,12 +82,33 @@ class Reihungstest extends APIv1_Controller
|
||||
*/
|
||||
public function getReihungstestByPersonID()
|
||||
{
|
||||
$person_id = $this->get("person_id");
|
||||
$available = $this->get("available");
|
||||
$person_id = $this->get('person_id');
|
||||
$available = $this->get('available');
|
||||
|
||||
if (isset($person_id))
|
||||
{
|
||||
$result = $this->reihungstestlib->getReihungstestByPersonID($person_id, $available);
|
||||
$result = $this->ReihungstestLib->getReihungstestByPersonID($person_id, $available);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function getAvailableReihungstestByPersonId()
|
||||
{
|
||||
$person_id = $this->get('person_id');
|
||||
|
||||
if (isset($person_id))
|
||||
{
|
||||
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
|
||||
|
||||
$result = $this->StudiengangModel->getAvailableReihungstestByPersonId($person_id);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -104,9 +125,9 @@ class Reihungstest extends APIv1_Controller
|
||||
{
|
||||
if ($this->_validate($this->post()))
|
||||
{
|
||||
if (isset($this->post()["reihungstest_id"]))
|
||||
if (isset($this->post()['reihungstest_id']))
|
||||
{
|
||||
$result = $this->ReihungstestModel->update($this->post()["reihungstest_id"], $this->post());
|
||||
$result = $this->ReihungstestModel->update($this->post()['reihungstest_id'], $this->post());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user