Added method getAppliedStudiengangFromNow to controller Studiengang.

This method can retrive all the applied studiengang for a person from
the current studiensemester
This commit is contained in:
Paolo
2017-08-07 15:15:08 +02:00
parent a3e63a99b8
commit 35e8df3b22
2 changed files with 76 additions and 0 deletions
@@ -107,4 +107,29 @@ class Studiengang2 extends APIv1_Controller
$this->response();
}
}
/**
* @return void
*/
public function getAppliedStudiengangFromNow()
{
$person_id = $this->get('person_id');
$titel = $this->get('titel');
if (isset($person_id) && isset($titel))
{
$this->load->model('organisation/Studiengang_model', 'StudiengangModel');
$result = $this->StudiengangModel->getAppliedStudiengangFromNow(
$person_id,
$titel
);
$this->response($result, REST_Controller::HTTP_OK);
}
else
{
$this->response();
}
}
}