From 39cbed0ca8edce2f991d50a3f44f0b34fc02140f Mon Sep 17 00:00:00 2001 From: paolo Date: Thu, 19 May 2016 19:04:45 +0200 Subject: [PATCH] Added directory education and its relative controllers --- .../controllers/api/v1/education/Abgabe.php | 78 +++++++++++++++++ .../api/v1/education/Abschlussbeurteilung.php | 78 +++++++++++++++++ .../api/v1/education/Abschlusspruefung.php | 78 +++++++++++++++++ .../api/v1/education/Anrechnung.php | 78 +++++++++++++++++ .../api/v1/education/Anwesenheit.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Beispiel.php | 78 +++++++++++++++++ .../api/v1/education/Betreuerart.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Feedback.php | 78 +++++++++++++++++ .../api/v1/education/LeNotenschluessel.php | 79 +++++++++++++++++ .../api/v1/education/LePruefung.php | 78 +++++++++++++++++ .../api/v1/education/Legesamtnote.php | 79 +++++++++++++++++ .../api/v1/education/Lehreinheit.php | 78 +++++++++++++++++ .../api/v1/education/Lehreinheitgruppe.php | 78 +++++++++++++++++ .../v1/education/Lehreinheitmitarbeiter.php | 79 +++++++++++++++++ .../controllers/api/v1/education/Lehrfach.php | 78 +++++++++++++++++ .../api/v1/education/Lehrfunktion.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Lehrtyp.php | 78 +++++++++++++++++ .../api/v1/education/Lehrveranstaltung.php | 78 +++++++++++++++++ .../api/v1/education/Lvangebot.php | 78 +++++++++++++++++ .../api/v1/education/Lvgesamtnote.php | 85 +++++++++++++++++++ .../controllers/api/v1/education/Lvinfo.php | 79 +++++++++++++++++ .../controllers/api/v1/education/Lvregel.php | 78 +++++++++++++++++ .../api/v1/education/Lvregeltyp.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Moodle.php | 78 +++++++++++++++++ .../api/v1/education/Notenschluessel.php | 78 +++++++++++++++++ .../education/Notenschluesselaufteilung.php | 78 +++++++++++++++++ .../v1/education/Notenschluesseluebung.php | 79 +++++++++++++++++ .../v1/education/Notenschluesselzuordnung.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Paabgabe.php | 78 +++++++++++++++++ .../api/v1/education/Paabgabetyp.php | 78 +++++++++++++++++ .../api/v1/education/Projektarbeit.php | 78 +++++++++++++++++ .../api/v1/education/Projektbetreuer.php | 85 +++++++++++++++++++ .../api/v1/education/Projekttyp.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Pruefung.php | 78 +++++++++++++++++ .../api/v1/education/Pruefungsanmeldung.php | 78 +++++++++++++++++ .../api/v1/education/Pruefungsfenster.php | 78 +++++++++++++++++ .../api/v1/education/Pruefungsstatus.php | 78 +++++++++++++++++ .../api/v1/education/Pruefungstermin.php | 78 +++++++++++++++++ .../api/v1/education/Pruefungstyp.php | 78 +++++++++++++++++ .../api/v1/education/Studentbeispiel.php | 79 +++++++++++++++++ .../api/v1/education/Studentlehrverband.php | 79 +++++++++++++++++ .../api/v1/education/Studentuebung.php | 79 +++++++++++++++++ .../controllers/api/v1/education/Uebung.php | 78 +++++++++++++++++ .../controllers/api/v1/education/Zeugnis.php | 78 +++++++++++++++++ .../api/v1/education/Zeugnisnote.php | 85 +++++++++++++++++++ 45 files changed, 3539 insertions(+) create mode 100644 application/controllers/api/v1/education/Abgabe.php create mode 100644 application/controllers/api/v1/education/Abschlussbeurteilung.php create mode 100644 application/controllers/api/v1/education/Abschlusspruefung.php create mode 100644 application/controllers/api/v1/education/Anrechnung.php create mode 100644 application/controllers/api/v1/education/Anwesenheit.php create mode 100644 application/controllers/api/v1/education/Beispiel.php create mode 100644 application/controllers/api/v1/education/Betreuerart.php create mode 100644 application/controllers/api/v1/education/Feedback.php create mode 100644 application/controllers/api/v1/education/LeNotenschluessel.php create mode 100644 application/controllers/api/v1/education/LePruefung.php create mode 100644 application/controllers/api/v1/education/Legesamtnote.php create mode 100644 application/controllers/api/v1/education/Lehreinheit.php create mode 100644 application/controllers/api/v1/education/Lehreinheitgruppe.php create mode 100644 application/controllers/api/v1/education/Lehreinheitmitarbeiter.php create mode 100644 application/controllers/api/v1/education/Lehrfach.php create mode 100644 application/controllers/api/v1/education/Lehrfunktion.php create mode 100644 application/controllers/api/v1/education/Lehrtyp.php create mode 100644 application/controllers/api/v1/education/Lehrveranstaltung.php create mode 100644 application/controllers/api/v1/education/Lvangebot.php create mode 100644 application/controllers/api/v1/education/Lvgesamtnote.php create mode 100644 application/controllers/api/v1/education/Lvinfo.php create mode 100644 application/controllers/api/v1/education/Lvregel.php create mode 100644 application/controllers/api/v1/education/Lvregeltyp.php create mode 100644 application/controllers/api/v1/education/Moodle.php create mode 100644 application/controllers/api/v1/education/Notenschluessel.php create mode 100644 application/controllers/api/v1/education/Notenschluesselaufteilung.php create mode 100644 application/controllers/api/v1/education/Notenschluesseluebung.php create mode 100644 application/controllers/api/v1/education/Notenschluesselzuordnung.php create mode 100644 application/controllers/api/v1/education/Paabgabe.php create mode 100644 application/controllers/api/v1/education/Paabgabetyp.php create mode 100644 application/controllers/api/v1/education/Projektarbeit.php create mode 100644 application/controllers/api/v1/education/Projektbetreuer.php create mode 100644 application/controllers/api/v1/education/Projekttyp.php create mode 100644 application/controllers/api/v1/education/Pruefung.php create mode 100644 application/controllers/api/v1/education/Pruefungsanmeldung.php create mode 100644 application/controllers/api/v1/education/Pruefungsfenster.php create mode 100644 application/controllers/api/v1/education/Pruefungsstatus.php create mode 100644 application/controllers/api/v1/education/Pruefungstermin.php create mode 100644 application/controllers/api/v1/education/Pruefungstyp.php create mode 100644 application/controllers/api/v1/education/Studentbeispiel.php create mode 100644 application/controllers/api/v1/education/Studentlehrverband.php create mode 100644 application/controllers/api/v1/education/Studentuebung.php create mode 100644 application/controllers/api/v1/education/Uebung.php create mode 100644 application/controllers/api/v1/education/Zeugnis.php create mode 100644 application/controllers/api/v1/education/Zeugnisnote.php diff --git a/application/controllers/api/v1/education/Abgabe.php b/application/controllers/api/v1/education/Abgabe.php new file mode 100644 index 000000000..f9ad2ee8c --- /dev/null +++ b/application/controllers/api/v1/education/Abgabe.php @@ -0,0 +1,78 @@ +load->model('education/abgabe', 'AbgabeModel'); + // Load set the uid of the model to let to check the permissions + $this->AbgabeModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getAbgabe() + { + $abgabe_id = $this->get('abgabe_id'); + + if(isset($abgabe_id)) + { + $result = $this->AbgabeModel->load($abgabe_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postAbgabe() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['abgabe_id'])) + { + $result = $this->AbgabeModel->update($this->post()['abgabe_id'], $this->post()); + } + else + { + $result = $this->AbgabeModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($abgabe = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Abschlussbeurteilung.php b/application/controllers/api/v1/education/Abschlussbeurteilung.php new file mode 100644 index 000000000..a90e16b4f --- /dev/null +++ b/application/controllers/api/v1/education/Abschlussbeurteilung.php @@ -0,0 +1,78 @@ +load->model('education/abschlussbeurteilung', 'AbschlussbeurteilungModel'); + // Load set the uid of the model to let to check the permissions + $this->AbschlussbeurteilungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getAbschlussbeurteilung() + { + $abschlussbeurteilung_kurzbz = $this->get('abschlussbeurteilung_kurzbz'); + + if(isset($abschlussbeurteilung_kurzbz)) + { + $result = $this->AbschlussbeurteilungModel->load($abschlussbeurteilung_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postAbschlussbeurteilung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['$abschlussbeurteilung_kurzbz'])) + { + $result = $this->AbschlussbeurteilungModel->update($this->post()['$abschlussbeurteilung_kurzbz'], $this->post()); + } + else + { + $result = $this->AbschlussbeurteilungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($abschlussbeurteilung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Abschlusspruefung.php b/application/controllers/api/v1/education/Abschlusspruefung.php new file mode 100644 index 000000000..9ee39aba7 --- /dev/null +++ b/application/controllers/api/v1/education/Abschlusspruefung.php @@ -0,0 +1,78 @@ +load->model('education/abschlusspruefung', 'AbschlusspruefungModel'); + // Load set the uid of the model to let to check the permissions + $this->AbschlusspruefungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getAbschlusspruefung() + { + $abschlusspruefung_id = $this->get('abschlusspruefung_id'); + + if(isset($abschlusspruefung_id)) + { + $result = $this->AbschlusspruefungModel->load($abschlusspruefung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postAbschlusspruefung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['abschlusspruefung_id'])) + { + $result = $this->AbschlusspruefungModel->update($this->post()['abschlusspruefung_id'], $this->post()); + } + else + { + $result = $this->AbschlusspruefungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($abschlusspruefung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Anrechnung.php b/application/controllers/api/v1/education/Anrechnung.php new file mode 100644 index 000000000..94b622e35 --- /dev/null +++ b/application/controllers/api/v1/education/Anrechnung.php @@ -0,0 +1,78 @@ +load->model('education/anrechnung', 'AnrechnungModel'); + // Load set the uid of the model to let to check the permissions + $this->AnrechnungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getAnrechnung() + { + $anrechnung_id = $this->get('anrechnung_id'); + + if(isset($anrechnung_id)) + { + $result = $this->AnrechnungModel->load($anrechnung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postAnrechnung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['anrechnung_id'])) + { + $result = $this->AnrechnungModel->update($this->post()['anrechnung_id'], $this->post()); + } + else + { + $result = $this->AnrechnungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($anrechnung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Anwesenheit.php b/application/controllers/api/v1/education/Anwesenheit.php new file mode 100644 index 000000000..a717be2ae --- /dev/null +++ b/application/controllers/api/v1/education/Anwesenheit.php @@ -0,0 +1,78 @@ +load->model('education/anwesenheit', 'AnwesenheitModel'); + // Load set the uid of the model to let to check the permissions + $this->AnwesenheitModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getAnwesenheit() + { + $anwesenheit_id = $this->get('anwesenheit_id'); + + if(isset($anwesenheit_id)) + { + $result = $this->AnwesenheitModel->load($anwesenheit_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postAnwesenheit() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['anwesenheit_id'])) + { + $result = $this->AnwesenheitModel->update($this->post()['anwesenheit_id'], $this->post()); + } + else + { + $result = $this->AnwesenheitModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($anwesenheit = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Beispiel.php b/application/controllers/api/v1/education/Beispiel.php new file mode 100644 index 000000000..f2b899c66 --- /dev/null +++ b/application/controllers/api/v1/education/Beispiel.php @@ -0,0 +1,78 @@ +load->model('education/beispiel', 'BeispielModel'); + // Load set the uid of the model to let to check the permissions + $this->BeispielModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getBeispiel() + { + $beispiel_id = $this->get('beispiel_id'); + + if(isset($beispiel_id)) + { + $result = $this->BeispielModel->load($beispiel_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postBeispiel() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['beispiel_id'])) + { + $result = $this->BeispielModel->update($this->post()['beispiel_id'], $this->post()); + } + else + { + $result = $this->BeispielModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($beispiel = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Betreuerart.php b/application/controllers/api/v1/education/Betreuerart.php new file mode 100644 index 000000000..a4dc768af --- /dev/null +++ b/application/controllers/api/v1/education/Betreuerart.php @@ -0,0 +1,78 @@ +load->model('education/betreuerart', 'BetreuerartModel'); + // Load set the uid of the model to let to check the permissions + $this->BetreuerartModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getBetreuerart() + { + $betreuerart_id = $this->get('betreuerart_kurzbz'); + + if(isset($betreuerart_id)) + { + $result = $this->BetreuerartModel->load($betreuerart_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postBetreuerart() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['betreuerart_kurzbz'])) + { + $result = $this->BetreuerartModel->update($this->post()['betreuerart_kurzbz'], $this->post()); + } + else + { + $result = $this->BetreuerartModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($betreuerart = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Feedback.php b/application/controllers/api/v1/education/Feedback.php new file mode 100644 index 000000000..49761faf7 --- /dev/null +++ b/application/controllers/api/v1/education/Feedback.php @@ -0,0 +1,78 @@ +load->model('education/feedback', 'FeedbackModel'); + // Load set the uid of the model to let to check the permissions + $this->FeedbackModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getFeedback() + { + $feedback_id = $this->get('feedback_id'); + + if(isset($feedback_id)) + { + $result = $this->FeedbackModel->load($feedback_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postFeedback() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['feedback_id'])) + { + $result = $this->FeedbackModel->update($this->post()['feedback_id'], $this->post()); + } + else + { + $result = $this->FeedbackModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($feedback = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/LeNotenschluessel.php b/application/controllers/api/v1/education/LeNotenschluessel.php new file mode 100644 index 000000000..50816726b --- /dev/null +++ b/application/controllers/api/v1/education/LeNotenschluessel.php @@ -0,0 +1,79 @@ +load->model('education/lenotenschluessel', 'LeNotenschluesselModel'); + // Load set the uid of the model to let to check the permissions + $this->LeNotenschluesselModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLeNotenschluessel() + { + $note = $this->get('note'); + $lehreinheit_id = $this->get('lehreinheit_id'); + + if(isset($note) && isset($lehreinheit_id)) + { + $result = $this->LeNotenschluesselModel->load(array($note, $lehreinheit_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLeNotenschluessel() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['note']) && isset($this->post()['lehreinheit_id'])) + { + $result = $this->LeNotenschluesselModel->update(array($this->post()['note'], $this->post()['lehreinheit_id']), $this->post()); + } + else + { + $result = $this->LeNotenschluesselModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lenotenschluessel = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/LePruefung.php b/application/controllers/api/v1/education/LePruefung.php new file mode 100644 index 000000000..e5db63040 --- /dev/null +++ b/application/controllers/api/v1/education/LePruefung.php @@ -0,0 +1,78 @@ +load->model('education/lepruefung', 'LePruefungModel'); + // Load set the uid of the model to let to check the permissions + $this->LePruefungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLePruefung() + { + $lepruefung_id = $this->get('lepruefung_id'); + + if(isset($lepruefung_id)) + { + $result = $this->LePruefungModel->load($lepruefung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLePruefung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lepruefung_id'])) + { + $result = $this->LePruefungModel->update($this->post()['lepruefung_id'], $this->post()); + } + else + { + $result = $this->LePruefungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lepruefung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Legesamtnote.php b/application/controllers/api/v1/education/Legesamtnote.php new file mode 100644 index 000000000..ae2e1832b --- /dev/null +++ b/application/controllers/api/v1/education/Legesamtnote.php @@ -0,0 +1,79 @@ +load->model('education/legesamtnote', 'LegesamtnoteModel'); + // Load set the uid of the model to let to check the permissions + $this->LegesamtnoteModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLegesamtnote() + { + $lehreinheit_id = $this->get('lehreinheit_id'); + $student_uid = $this->get('student_uid'); + + if(isset($lehreinheit_id) && isset($student_uid)) + { + $result = $this->LegesamtnoteModel->load(array($lehreinheit_id, $student_uid)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLegesamtnote() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehreinheit_id']) && isset($this->post()['student_uid'])) + { + $result = $this->LegesamtnoteModel->update(array($this->post()['lehreinheit_id'], $this->post()['student_uid']), $this->post()); + } + else + { + $result = $this->LegesamtnoteModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($legesamtnote = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehreinheit.php b/application/controllers/api/v1/education/Lehreinheit.php new file mode 100644 index 000000000..fffbe4fdd --- /dev/null +++ b/application/controllers/api/v1/education/Lehreinheit.php @@ -0,0 +1,78 @@ +load->model('education/lehreinheit', 'LehreinheitModel'); + // Load set the uid of the model to let to check the permissions + $this->LehreinheitModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehreinheit() + { + $lehreinheit_id = $this->get('lehreinheit_id'); + + if(isset($lehreinheit_id)) + { + $result = $this->LehreinheitModel->load($lehreinheit_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehreinheit() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehreinheit_id'])) + { + $result = $this->LehreinheitModel->update($this->post()['lehreinheit_id'], $this->post()); + } + else + { + $result = $this->LehreinheitModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehreinheit = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehreinheitgruppe.php b/application/controllers/api/v1/education/Lehreinheitgruppe.php new file mode 100644 index 000000000..7c24fbe9b --- /dev/null +++ b/application/controllers/api/v1/education/Lehreinheitgruppe.php @@ -0,0 +1,78 @@ +load->model('education/lehreinheitgruppe', 'LehreinheitgruppeModel'); + // Load set the uid of the model to let to check the permissions + $this->LehreinheitgruppeModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehreinheitgruppe() + { + $lehreinheitgruppe_id = $this->get('lehreinheitgruppe_id'); + + if(isset($lehreinheitgruppe_id)) + { + $result = $this->LehreinheitgruppeModel->load($lehreinheitgruppe_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehreinheitgruppe() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehreinheitgruppe_id'])) + { + $result = $this->LehreinheitgruppeModel->update($this->post()['lehreinheitgruppe_id'], $this->post()); + } + else + { + $result = $this->LehreinheitgruppeModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehreinheitgruppe = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php new file mode 100644 index 000000000..fb4909b42 --- /dev/null +++ b/application/controllers/api/v1/education/Lehreinheitmitarbeiter.php @@ -0,0 +1,79 @@ +load->model('education/lehreinheitmitarbeiter', 'LehreinheitmitarbeiterModel'); + // Load set the uid of the model to let to check the permissions + $this->LehreinheitmitarbeiterModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehreinheitmitarbeiter() + { + $mitarbeiter_uid = $this->get('mitarbeiter_uid'); + $lehreinheit_id = $this->get('lehreinheit_id'); + + if(isset($mitarbeiter_uid) && isset($lehreinheit_id)) + { + $result = $this->LehreinheitmitarbeiterModel->load(array($mitarbeiter_uid, $lehreinheit_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehreinheitmitarbeiter() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['mitarbeiter_uid']) && isset($this->post()['lehreinheit_id'])) + { + $result = $this->LehreinheitmitarbeiterModel->update(array($this->post()['mitarbeiter_uid'], $this->post()['lehreinheit_id']), $this->post()); + } + else + { + $result = $this->LehreinheitmitarbeiterModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehreinheitmitarbeiter = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehrfach.php b/application/controllers/api/v1/education/Lehrfach.php new file mode 100644 index 000000000..458e860cd --- /dev/null +++ b/application/controllers/api/v1/education/Lehrfach.php @@ -0,0 +1,78 @@ +load->model('education/lehrfach', 'LehrfachModel'); + // Load set the uid of the model to let to check the permissions + $this->LehrfachModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehrfach() + { + $lehrfach_id = $this->get('lehrfach_id'); + + if(isset($lehrfach_id)) + { + $result = $this->LehrfachModel->load($lehrfach_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehrfach() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehrfach_id'])) + { + $result = $this->LehrfachModel->update($this->post()['lehrfach_id'], $this->post()); + } + else + { + $result = $this->LehrfachModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehrfach = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehrfunktion.php b/application/controllers/api/v1/education/Lehrfunktion.php new file mode 100644 index 000000000..1072d23fb --- /dev/null +++ b/application/controllers/api/v1/education/Lehrfunktion.php @@ -0,0 +1,78 @@ +load->model('education/lehrfunktion', 'LehrfunktionModel'); + // Load set the uid of the model to let to check the permissions + $this->LehrfunktionModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehrfunktion() + { + $lehrfunktion_kurzbz = $this->get('lehrfunktion_kurzbz'); + + if(isset($lehrfunktion_kurzbz)) + { + $result = $this->LehrfunktionModel->load($lehrfunktion_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehrfunktion() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehrfunktion_kurzbz'])) + { + $result = $this->LehrfunktionModel->update($this->post()['lehrfunktion_kurzbz'], $this->post()); + } + else + { + $result = $this->LehrfunktionModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehrfunktion = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehrtyp.php b/application/controllers/api/v1/education/Lehrtyp.php new file mode 100644 index 000000000..a1494b9fa --- /dev/null +++ b/application/controllers/api/v1/education/Lehrtyp.php @@ -0,0 +1,78 @@ +load->model('education/lehrtyp', 'LehrtypModel'); + // Load set the uid of the model to let to check the permissions + $this->LehrtypModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehrtyp() + { + $lehrtyp_kurzbz = $this->get('lehrtyp_kurzbz'); + + if(isset($lehrtyp_kurzbz)) + { + $result = $this->LehrtypModel->load($lehrtyp_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehrtyp() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehrtyp_kurzbz'])) + { + $result = $this->LehrtypModel->update($this->post()['lehrtyp_kurzbz'], $this->post()); + } + else + { + $result = $this->LehrtypModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehrtyp = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lehrveranstaltung.php b/application/controllers/api/v1/education/Lehrveranstaltung.php new file mode 100644 index 000000000..bbc4676c3 --- /dev/null +++ b/application/controllers/api/v1/education/Lehrveranstaltung.php @@ -0,0 +1,78 @@ +load->model('education/lehrveranstaltung', 'LehrveranstaltungModel'); + // Load set the uid of the model to let to check the permissions + $this->LehrveranstaltungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLehrveranstaltung() + { + $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); + + if(isset($lehrveranstaltung_id)) + { + $result = $this->LehrveranstaltungModel->load($lehrveranstaltung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLehrveranstaltung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lehrveranstaltung_id'])) + { + $result = $this->LehrveranstaltungModel->update($this->post()['lehrveranstaltung_id'], $this->post()); + } + else + { + $result = $this->LehrveranstaltungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lehrveranstaltung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lvangebot.php b/application/controllers/api/v1/education/Lvangebot.php new file mode 100644 index 000000000..c8d905060 --- /dev/null +++ b/application/controllers/api/v1/education/Lvangebot.php @@ -0,0 +1,78 @@ +load->model('education/lvangebot', 'LvangebotModel'); + // Load set the uid of the model to let to check the permissions + $this->LvangebotModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLvangebot() + { + $lvangebot_id = $this->get('lvangebot_id'); + + if(isset($lvangebot_id)) + { + $result = $this->LvangebotModel->load($lvangebot_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLvangebot() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lvangebot_id'])) + { + $result = $this->LvangebotModel->update($this->post()['lvangebot_id'], $this->post()); + } + else + { + $result = $this->LvangebotModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lvangebot = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lvgesamtnote.php b/application/controllers/api/v1/education/Lvgesamtnote.php new file mode 100644 index 000000000..1eff64f77 --- /dev/null +++ b/application/controllers/api/v1/education/Lvgesamtnote.php @@ -0,0 +1,85 @@ +load->model('education/lvgesamtnote', 'LvgesamtnoteModel'); + // Load set the uid of the model to let to check the permissions + $this->LvgesamtnoteModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLvgesamtnote() + { + $student_uid = $this->get('student_uid'); + $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); + $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); + + if(isset($student_uid) && isset($studiensemester_kurzbz) && isset($lehrveranstaltung_id)) + { + $result = $this->LvgesamtnoteModel->load(array($student_uid, $studiensemester_kurzbz, $lehrveranstaltung_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLvgesamtnote() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['student_uid']) && isset($this->post()['studiensemester_kurzbz']) && isset($this->post()['lehrveranstaltung_id'])) + { + $pksArray = array($this->post()['student_uid'], + $this->post()['studiensemester_kurzbz'], + $this->post()['lehrveranstaltung_id'] + ); + + $result = $this->LvgesamtnoteModel->update($pksArray, $this->post()); + } + else + { + $result = $this->LvgesamtnoteModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lvgesamtnote = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lvinfo.php b/application/controllers/api/v1/education/Lvinfo.php new file mode 100644 index 000000000..58cbbe523 --- /dev/null +++ b/application/controllers/api/v1/education/Lvinfo.php @@ -0,0 +1,79 @@ +load->model('education/lvinfo', 'LvinfoModel'); + // Load set the uid of the model to let to check the permissions + $this->LvinfoModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLvinfo() + { + $sprache = $this->get('sprache'); + $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); + + if(isset($sprache) && isset($lehrveranstaltung_id)) + { + $result = $this->LvinfoModel->load(array($sprache, $lehrveranstaltung_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLvinfo() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['sprache']) && isset($this->post()['lehrveranstaltung_id'])) + { + $result = $this->LvinfoModel->update(array($this->post()['sprache'], $this->post()['lehrveranstaltung_id']), $this->post()); + } + else + { + $result = $this->LvinfoModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lvinfo = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lvregel.php b/application/controllers/api/v1/education/Lvregel.php new file mode 100644 index 000000000..35af01822 --- /dev/null +++ b/application/controllers/api/v1/education/Lvregel.php @@ -0,0 +1,78 @@ +load->model('education/lvregel', 'LvregelModel'); + // Load set the uid of the model to let to check the permissions + $this->LvregelModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLvregel() + { + $lvregel_id = $this->get('lvregel_id'); + + if(isset($lvregel_id)) + { + $result = $this->LvregelModel->load($lvregel_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLvregel() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lvregel_id'])) + { + $result = $this->LvregelModel->update($this->post()['lvregel_id'], $this->post()); + } + else + { + $result = $this->LvregelModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lvregel = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Lvregeltyp.php b/application/controllers/api/v1/education/Lvregeltyp.php new file mode 100644 index 000000000..82b37fab1 --- /dev/null +++ b/application/controllers/api/v1/education/Lvregeltyp.php @@ -0,0 +1,78 @@ +load->model('education/lvregeltyp', 'LvregeltypModel'); + // Load set the uid of the model to let to check the permissions + $this->LvregeltypModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getLvregeltyp() + { + $lvregeltyp_kurzbz = $this->get('lvregeltyp_kurzbz'); + + if(isset($lvregeltyp_kurzbz)) + { + $result = $this->LvregeltypModel->load($lvregeltyp_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postLvregeltyp() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['lvregeltyp_kurzbz'])) + { + $result = $this->LvregeltypModel->update($this->post()['lvregeltyp_kurzbz'], $this->post()); + } + else + { + $result = $this->LvregeltypModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($lvregeltyp = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Moodle.php b/application/controllers/api/v1/education/Moodle.php new file mode 100644 index 000000000..7be95be3c --- /dev/null +++ b/application/controllers/api/v1/education/Moodle.php @@ -0,0 +1,78 @@ +load->model('education/moodle', 'MoodleModel'); + // Load set the uid of the model to let to check the permissions + $this->MoodleModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getMoodle() + { + $moodle_id = $this->get('moodle_id'); + + if(isset($moodle_id)) + { + $result = $this->MoodleModel->load($moodle_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postMoodle() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['moodle_id'])) + { + $result = $this->MoodleModel->update($this->post()['moodle_id'], $this->post()); + } + else + { + $result = $this->MoodleModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($moodle = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Notenschluessel.php b/application/controllers/api/v1/education/Notenschluessel.php new file mode 100644 index 000000000..93cc0f06c --- /dev/null +++ b/application/controllers/api/v1/education/Notenschluessel.php @@ -0,0 +1,78 @@ +load->model('education/notenschluessel', 'NotenschluesselModel'); + // Load set the uid of the model to let to check the permissions + $this->NotenschluesselModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getNotenschluessel() + { + $notenschluessel_kurzbz = $this->get('notenschluessel_kurzbz'); + + if(isset($notenschluessel_kurzbz)) + { + $result = $this->NotenschluesselModel->load($notenschluessel_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postNotenschluessel() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['notenschluessel_kurzbz'])) + { + $result = $this->NotenschluesselModel->update($this->post()['notenschluessel_kurzbz'], $this->post()); + } + else + { + $result = $this->NotenschluesselModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($notenschluessel = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Notenschluesselaufteilung.php b/application/controllers/api/v1/education/Notenschluesselaufteilung.php new file mode 100644 index 000000000..05096f41a --- /dev/null +++ b/application/controllers/api/v1/education/Notenschluesselaufteilung.php @@ -0,0 +1,78 @@ +load->model('education/notenschluesselaufteilung', 'NotenschluesselaufteilungModel'); + // Load set the uid of the model to let to check the permissions + $this->NotenschluesselaufteilungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getNotenschluesselaufteilung() + { + $notenschluesselaufteilung_id = $this->get('notenschluesselaufteilung_id'); + + if(isset($notenschluesselaufteilung_id)) + { + $result = $this->NotenschluesselaufteilungModel->load($notenschluesselaufteilung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postNotenschluesselaufteilung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['notenschluesselaufteilung_id'])) + { + $result = $this->NotenschluesselaufteilungModel->update($this->post()['notenschluesselaufteilung_id'], $this->post()); + } + else + { + $result = $this->NotenschluesselaufteilungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($notenschluesselaufteilung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Notenschluesseluebung.php b/application/controllers/api/v1/education/Notenschluesseluebung.php new file mode 100644 index 000000000..02efcbc80 --- /dev/null +++ b/application/controllers/api/v1/education/Notenschluesseluebung.php @@ -0,0 +1,79 @@ +load->model('education/notenschluesseluebung', 'NotenschluesseluebungModel'); + // Load set the uid of the model to let to check the permissions + $this->NotenschluesseluebungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getNotenschluesseluebung() + { + $note = $this->get('note'); + $uebung_id = $this->get('uebung_id'); + + if(isset($note) && isset($uebung_id)) + { + $result = $this->NotenschluesseluebungModel->load(array($note, $uebung_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postNotenschluesseluebung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['note']) && isset($this->post()['uebung_id'])) + { + $result = $this->NotenschluesseluebungModel->update(array($this->post()['note'], $this->post()['uebung_id']), $this->post()); + } + else + { + $result = $this->NotenschluesseluebungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($notenschluesseluebung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Notenschluesselzuordnung.php b/application/controllers/api/v1/education/Notenschluesselzuordnung.php new file mode 100644 index 000000000..b87713dee --- /dev/null +++ b/application/controllers/api/v1/education/Notenschluesselzuordnung.php @@ -0,0 +1,78 @@ +load->model('education/notenschluesselzuordnung', 'NotenschluesselzuordnungModel'); + // Load set the uid of the model to let to check the permissions + $this->NotenschluesselzuordnungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getNotenschluesselzuordnung() + { + $notenschluesselzuordnung_id = $this->get('notenschluesselzuordnung_id'); + + if(isset($notenschluesselzuordnung_id)) + { + $result = $this->NotenschluesselzuordnungModel->load($notenschluesselzuordnung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postNotenschluesselzuordnung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['notenschluesselzuordnung_id'])) + { + $result = $this->NotenschluesselzuordnungModel->update($this->post()['notenschluesselzuordnung_id'], $this->post()); + } + else + { + $result = $this->NotenschluesselzuordnungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($notenschluesselzuordnung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Paabgabe.php b/application/controllers/api/v1/education/Paabgabe.php new file mode 100644 index 000000000..09e9b0e69 --- /dev/null +++ b/application/controllers/api/v1/education/Paabgabe.php @@ -0,0 +1,78 @@ +load->model('education/paabgabe', 'PaabgabeModel'); + // Load set the uid of the model to let to check the permissions + $this->PaabgabeModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPaabgabe() + { + $paabgabe_id = $this->get('paabgabe_id'); + + if(isset($paabgabe_id)) + { + $result = $this->PaabgabeModel->load($paabgabe_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPaabgabe() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['paabgabe_id'])) + { + $result = $this->PaabgabeModel->update($this->post()['paabgabe_id'], $this->post()); + } + else + { + $result = $this->PaabgabeModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($paabgabe = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Paabgabetyp.php b/application/controllers/api/v1/education/Paabgabetyp.php new file mode 100644 index 000000000..e3aba1059 --- /dev/null +++ b/application/controllers/api/v1/education/Paabgabetyp.php @@ -0,0 +1,78 @@ +load->model('education/paabgabetyp', 'PaabgabetypModel'); + // Load set the uid of the model to let to check the permissions + $this->PaabgabetypModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPaabgabetyp() + { + $paabgabetyp_kurzbz = $this->get('paabgabetyp_kurzbz'); + + if(isset($paabgabetyp_kurzbz)) + { + $result = $this->PaabgabetypModel->load($paabgabetyp_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPaabgabetyp() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['paabgabetyp_kurzbz'])) + { + $result = $this->PaabgabetypModel->update($this->post()['paabgabetyp_kurzbz'], $this->post()); + } + else + { + $result = $this->PaabgabetypModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($paabgabetyp = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Projektarbeit.php b/application/controllers/api/v1/education/Projektarbeit.php new file mode 100644 index 000000000..316dd0cd4 --- /dev/null +++ b/application/controllers/api/v1/education/Projektarbeit.php @@ -0,0 +1,78 @@ +load->model('education/projektarbeit', 'ProjektarbeitModel'); + // Load set the uid of the model to let to check the permissions + $this->ProjektarbeitModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getProjektarbeit() + { + $projektarbeit_id = $this->get('projektarbeit_id'); + + if(isset($projektarbeit_id)) + { + $result = $this->ProjektarbeitModel->load($projektarbeit_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postProjektarbeit() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['projektarbeit_id'])) + { + $result = $this->ProjektarbeitModel->update($this->post()['projektarbeit_id'], $this->post()); + } + else + { + $result = $this->ProjektarbeitModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($projektarbeit = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Projektbetreuer.php b/application/controllers/api/v1/education/Projektbetreuer.php new file mode 100644 index 000000000..87ec25a7d --- /dev/null +++ b/application/controllers/api/v1/education/Projektbetreuer.php @@ -0,0 +1,85 @@ +load->model('education/projektbetreuer', 'ProjektbetreuerModel'); + // Load set the uid of the model to let to check the permissions + $this->ProjektbetreuerModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getProjektbetreuer() + { + $betreuerart_kurzbz = $this->get('betreuerart_kurzbz'); + $projektarbeit_id = $this->get('projektarbeit_id'); + $person_id = $this->get('person_id'); + + if(isset($betreuerart_kurzbz) && isset($projektarbeit_id) && isset($person_id)) + { + $result = $this->ProjektbetreuerModel->load(array($betreuerart_kurzbz, $projektarbeit_id, $person_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postProjektbetreuer() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['betreuerart_kurzbz']) && isset($this->post()['projektarbeit_id']) && isset($this->post()['person_id'])) + { + $pksArray = array($this->post()['betreuerart_kurzbz'], + $this->post()['projektarbeit_id'], + $this->post()['person_id'] + ); + + $result = $this->ProjektbetreuerModel->update($pksArray, $this->post()); + } + else + { + $result = $this->ProjektbetreuerModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($projektbetreuer = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Projekttyp.php b/application/controllers/api/v1/education/Projekttyp.php new file mode 100644 index 000000000..1881520b9 --- /dev/null +++ b/application/controllers/api/v1/education/Projekttyp.php @@ -0,0 +1,78 @@ +load->model('education/projekttyp', 'ProjekttypModel'); + // Load set the uid of the model to let to check the permissions + $this->ProjekttypModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getProjekttyp() + { + $projekttyp_kurzbz = $this->get('projekttyp_kurzbz'); + + if(isset($projekttyp_kurzbz)) + { + $result = $this->ProjekttypModel->load($projekttyp_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postProjekttyp() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['projekttyp_kurzbz'])) + { + $result = $this->ProjekttypModel->update($this->post()['projekttyp_kurzbz'], $this->post()); + } + else + { + $result = $this->ProjekttypModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($projekttyp = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Pruefung.php b/application/controllers/api/v1/education/Pruefung.php new file mode 100644 index 000000000..03d2c6246 --- /dev/null +++ b/application/controllers/api/v1/education/Pruefung.php @@ -0,0 +1,78 @@ +load->model('education/pruefung', 'PruefungModel'); + // Load set the uid of the model to let to check the permissions + $this->PruefungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPruefung() + { + $pruefung_id = $this->get('pruefung_id'); + + if(isset($pruefung_id)) + { + $result = $this->PruefungModel->load($pruefung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPruefung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['pruefung_id'])) + { + $result = $this->PruefungModel->update($this->post()['pruefung_id'], $this->post()); + } + else + { + $result = $this->PruefungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($pruefung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Pruefungsanmeldung.php b/application/controllers/api/v1/education/Pruefungsanmeldung.php new file mode 100644 index 000000000..afb00dcb7 --- /dev/null +++ b/application/controllers/api/v1/education/Pruefungsanmeldung.php @@ -0,0 +1,78 @@ +load->model('education/pruefungsanmeldung', 'PruefungsanmeldungModel'); + // Load set the uid of the model to let to check the permissions + $this->PruefungsanmeldungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPruefungsanmeldung() + { + $pruefungsanmeldung_id = $this->get('pruefungsanmeldung_id'); + + if(isset($pruefungsanmeldung_id)) + { + $result = $this->PruefungsanmeldungModel->load($pruefungsanmeldung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPruefungsanmeldung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['pruefungsanmeldung_id'])) + { + $result = $this->PruefungsanmeldungModel->update($this->post()['pruefungsanmeldung_id'], $this->post()); + } + else + { + $result = $this->PruefungsanmeldungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($pruefungsanmeldung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Pruefungsfenster.php b/application/controllers/api/v1/education/Pruefungsfenster.php new file mode 100644 index 000000000..e2f247600 --- /dev/null +++ b/application/controllers/api/v1/education/Pruefungsfenster.php @@ -0,0 +1,78 @@ +load->model('education/pruefungsfenster', 'PruefungsfensterModel'); + // Load set the uid of the model to let to check the permissions + $this->PruefungsfensterModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPruefungsfenster() + { + $pruefungsfenster_id = $this->get('pruefungsfenster_id'); + + if(isset($pruefungsfenster_id)) + { + $result = $this->PruefungsfensterModel->load($pruefungsfenster_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPruefungsfenster() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['pruefungsfenster_id'])) + { + $result = $this->PruefungsfensterModel->update($this->post()['pruefungsfenster_id'], $this->post()); + } + else + { + $result = $this->PruefungsfensterModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($pruefungsfenster = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Pruefungsstatus.php b/application/controllers/api/v1/education/Pruefungsstatus.php new file mode 100644 index 000000000..106bf018c --- /dev/null +++ b/application/controllers/api/v1/education/Pruefungsstatus.php @@ -0,0 +1,78 @@ +load->model('education/pruefungsstatus', 'PruefungsstatusModel'); + // Load set the uid of the model to let to check the permissions + $this->PruefungsstatusModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPruefungsstatus() + { + $status_kurzbz = $this->get('status_kurzbz'); + + if(isset($status_kurzbz)) + { + $result = $this->PruefungsstatusModel->load($status_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPruefungsstatus() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['status_kurzbz'])) + { + $result = $this->PruefungsstatusModel->update($this->post()['status_kurzbz'], $this->post()); + } + else + { + $result = $this->PruefungsstatusModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($pruefungsstatus = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Pruefungstermin.php b/application/controllers/api/v1/education/Pruefungstermin.php new file mode 100644 index 000000000..89d16b87a --- /dev/null +++ b/application/controllers/api/v1/education/Pruefungstermin.php @@ -0,0 +1,78 @@ +load->model('education/pruefungstermin', 'PruefungsterminModel'); + // Load set the uid of the model to let to check the permissions + $this->PruefungsterminModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPruefungstermin() + { + $pruefungstermin_id = $this->get('pruefungstermin_id'); + + if(isset($pruefungstermin_id)) + { + $result = $this->PruefungsterminModel->load($pruefungstermin_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPruefungstermin() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['pruefungstermin_id'])) + { + $result = $this->PruefungsterminModel->update($this->post()['pruefungstermin_id'], $this->post()); + } + else + { + $result = $this->PruefungsterminModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($pruefungstermin = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Pruefungstyp.php b/application/controllers/api/v1/education/Pruefungstyp.php new file mode 100644 index 000000000..6fc1e465b --- /dev/null +++ b/application/controllers/api/v1/education/Pruefungstyp.php @@ -0,0 +1,78 @@ +load->model('education/pruefungstyp', 'PruefungstypModel'); + // Load set the uid of the model to let to check the permissions + $this->PruefungstypModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getPruefungstyp() + { + $pruefungstyp_kurzbz = $this->get('pruefungstyp_kurzbz'); + + if(isset($pruefungstyp_kurzbz)) + { + $result = $this->PruefungstypModel->load($pruefungstyp_kurzbz); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postPruefungstyp() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['pruefungstyp_kurzbz'])) + { + $result = $this->PruefungstypModel->update($this->post()['pruefungstyp_kurzbz'], $this->post()); + } + else + { + $result = $this->PruefungstypModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($pruefungstyp = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Studentbeispiel.php b/application/controllers/api/v1/education/Studentbeispiel.php new file mode 100644 index 000000000..3e20d0803 --- /dev/null +++ b/application/controllers/api/v1/education/Studentbeispiel.php @@ -0,0 +1,79 @@ +load->model('education/studentbeispiel', 'StudentbeispielModel'); + // Load set the uid of the model to let to check the permissions + $this->StudentbeispielModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getStudentbeispiel() + { + $beispiel_id = $this->get('beispiel_id'); + $student_uid = $this->get('student_uid'); + + if(isset($beispiel_id) && isset($student_uid)) + { + $result = $this->StudentbeispielModel->load(array($beispiel_id, $student_uid)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postStudentbeispiel() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['beispiel_id']) && isset($this->post()['student_uid'])) + { + $result = $this->StudentbeispielModel->update(array($this->post()['beispiel_id'], $this->post()['student_uid']), $this->post()); + } + else + { + $result = $this->StudentbeispielModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($studentbeispiel = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Studentlehrverband.php b/application/controllers/api/v1/education/Studentlehrverband.php new file mode 100644 index 000000000..fed034881 --- /dev/null +++ b/application/controllers/api/v1/education/Studentlehrverband.php @@ -0,0 +1,79 @@ +load->model('education/studentlehrverband', 'StudentlehrverbandModel'); + // Load set the uid of the model to let to check the permissions + $this->StudentlehrverbandModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getStudentlehrverband() + { + $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); + $student_uid = $this->get('student_uid'); + + if(isset($studiensemester_kurzbz) && isset($student_uid)) + { + $result = $this->StudentlehrverbandModel->load(array($studiensemester_kurzbz, $student_uid)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postStudentlehrverband() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['studiensemester_kurzbz']) && isset($this->post()['student_uid'])) + { + $result = $this->StudentlehrverbandModel->update(array($this->post()['studiensemester_kurzbz'], $this->post()['student_uid']), $this->post()); + } + else + { + $result = $this->StudentlehrverbandModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($studentlehrverband = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Studentuebung.php b/application/controllers/api/v1/education/Studentuebung.php new file mode 100644 index 000000000..b869f0637 --- /dev/null +++ b/application/controllers/api/v1/education/Studentuebung.php @@ -0,0 +1,79 @@ +load->model('education/studentuebung', 'StudentuebungModel'); + // Load set the uid of the model to let to check the permissions + $this->StudentuebungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getStudentuebung() + { + $uebung_id = $this->get('uebung_id'); + $student_uid = $this->get('student_uid'); + + if(isset($uebung_id) && isset($student_uid)) + { + $result = $this->StudentuebungModel->load(array($uebung_id, $student_uid)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postStudentuebung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['uebung_id']) && isset($this->post()['student_uid'])) + { + $result = $this->StudentuebungModel->update(array($this->post()['uebung_id'], $this->post()['student_uid']), $this->post()); + } + else + { + $result = $this->StudentuebungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($studentuebung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Uebung.php b/application/controllers/api/v1/education/Uebung.php new file mode 100644 index 000000000..e8146e2e9 --- /dev/null +++ b/application/controllers/api/v1/education/Uebung.php @@ -0,0 +1,78 @@ +load->model('education/uebung', 'UebungModel'); + // Load set the uid of the model to let to check the permissions + $this->UebungModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getUebung() + { + $uebung_id = $this->get('uebung_id'); + + if(isset($uebung_id)) + { + $result = $this->UebungModel->load($uebung_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postUebung() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['uebung_id'])) + { + $result = $this->UebungModel->update($this->post()['uebung_id'], $this->post()); + } + else + { + $result = $this->UebungModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($uebung = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Zeugnis.php b/application/controllers/api/v1/education/Zeugnis.php new file mode 100644 index 000000000..1a57fdfdd --- /dev/null +++ b/application/controllers/api/v1/education/Zeugnis.php @@ -0,0 +1,78 @@ +load->model('education/zeugnis', 'ZeugnisModel'); + // Load set the uid of the model to let to check the permissions + $this->ZeugnisModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getZeugnis() + { + $zeugnis_id = $this->get('zeugnis_id'); + + if(isset($zeugnis_id)) + { + $result = $this->ZeugnisModel->load($zeugnis_id); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postZeugnis() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['zeugnis_id'])) + { + $result = $this->ZeugnisModel->update($this->post()['zeugnis_id'], $this->post()); + } + else + { + $result = $this->ZeugnisModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($zeugnis = NULL) + { + return true; + } +} \ No newline at end of file diff --git a/application/controllers/api/v1/education/Zeugnisnote.php b/application/controllers/api/v1/education/Zeugnisnote.php new file mode 100644 index 000000000..e093eb964 --- /dev/null +++ b/application/controllers/api/v1/education/Zeugnisnote.php @@ -0,0 +1,85 @@ +load->model('education/zeugnisnote', 'ZeugnisnoteModel'); + // Load set the uid of the model to let to check the permissions + $this->ZeugnisnoteModel->setUID($this->_getUID()); + } + + /** + * @return void + */ + public function getZeugnisnote() + { + $studiensemester_kurzbz = $this->get('studiensemester_kurzbz'); + $student_uid = $this->get('student_uid'); + $lehrveranstaltung_id = $this->get('lehrveranstaltung_id'); + + if(isset($studiensemester_kurzbz) && isset($student_uid) && isset($lehrveranstaltung_id)) + { + $result = $this->ZeugnisnoteModel->load(array($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id)); + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + /** + * @return void + */ + public function postZeugnisnote() + { + if($this->_validate($this->post())) + { + if(isset($this->post()['studiensemester_kurzbz']) && isset($this->post()['student_uid']) && isset($this->post()['lehrveranstaltung_id'])) + { + $pksArray = array($this->post()['studiensemester_kurzbz'], + $this->post()['student_uid'], + $this->post()['lehrveranstaltung_id'] + ); + + $result = $this->ZeugnisnoteModel->update($pksArray, $this->post()); + } + else + { + $result = $this->ZeugnisnoteModel->insert($this->post()); + } + + $this->response($result, REST_Controller::HTTP_OK); + } + else + { + $this->response(); + } + } + + private function _validate($zeugnisnote = NULL) + { + return true; + } +} \ No newline at end of file