mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-05 14:19:27 +00:00
- Added method getStudienplan to the controller Studienplan
- Introduced parameter new in method postPrestudentstatus of the controller Prestudentstatus
This commit is contained in:
@@ -55,27 +55,24 @@ class Prestudentstatus extends APIv1_Controller
|
||||
*/
|
||||
public function postPrestudentstatus()
|
||||
{
|
||||
$prestudentstatus = $this->_parseData($this->post());
|
||||
|
||||
$this->response($prestudentstatus);
|
||||
|
||||
$prestudentstatus = $this->_parseData($this->post());
|
||||
|
||||
if ($this->_validate($prestudentstatus))
|
||||
{
|
||||
if (isset($prestudentstatus['ausbildungssemester']) && isset($prestudentstatus['studiensemester_kurzbz']) &&
|
||||
isset($prestudentstatus['status_kurzbz']) && isset($prestudentstatus['prestudent_id']))
|
||||
if(isset($prestudentstatus['new']) && $prestudentstatus['new'] == true)
|
||||
{
|
||||
$result = $this->PrestudentstatusModel->insert($prestudentstatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pksArray = array($prestudentstatus['ausbildungssemester'],
|
||||
$prestudentstatus['studiensemester_kurzbz'],
|
||||
$prestudentstatus['status_kurzbz'],
|
||||
$prestudentstatus['prestudent_id']
|
||||
);
|
||||
|
||||
|
||||
$result = $this->PrestudentstatusModel->update($pksArray, $prestudentstatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->PrestudentstatusModel->insert($prestudentstatus);
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -85,7 +82,7 @@ class Prestudentstatus extends APIv1_Controller
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($prestudentstatus = NULL)
|
||||
private function _validate($prestudentstatus = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,22 @@ class Studienplan extends APIv1_Controller
|
||||
$this->StudienplanModel->setUID($this->_getUID());
|
||||
}
|
||||
|
||||
public function getStudienplan()
|
||||
{
|
||||
$studienplan_id = $this->get('studienplan_id');
|
||||
|
||||
if (isset($studienplan_id))
|
||||
{
|
||||
$result = $this->StudienplanModel->load($studienplan_id);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response();
|
||||
}
|
||||
}
|
||||
|
||||
public function getStudienplaene()
|
||||
{
|
||||
$studiengang_kz = $this->get('studiengang_kz');
|
||||
|
||||
Reference in New Issue
Block a user