diff --git a/application/controllers/api/frontend/v1/lv/Lehreinheit.php b/application/controllers/api/frontend/v1/lv/Lehreinheit.php index d58489453..fd1c23667 100644 --- a/application/controllers/api/frontend/v1/lv/Lehreinheit.php +++ b/application/controllers/api/frontend/v1/lv/Lehreinheit.php @@ -414,7 +414,9 @@ class Lehreinheit extends FHCAPI_Controller if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL); - $oe_array = $result; + $oe_array = []; + if (hasData($result)) + $oe_array = getData($result); if (!$this->_ci->permissionlib->isBerechtigtMultipleOe('admin', $oe_array, 'suid') && !$this->_ci->permissionlib->isBerechtigtMultipleOe('assistenz', $oe_array, 'suid') && diff --git a/application/controllers/api/frontend/v1/lv/Lektor.php b/application/controllers/api/frontend/v1/lv/Lektor.php index 332bc47b6..4a244c1a1 100644 --- a/application/controllers/api/frontend/v1/lv/Lektor.php +++ b/application/controllers/api/frontend/v1/lv/Lektor.php @@ -284,7 +284,9 @@ class Lektor extends FHCAPI_Controller if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL); - $oe_array = $result; + $oe_array = []; + if (hasData($result)) + $oe_array = getData($result); return $this->checkPermissionGenerel($permissions, $oe_array); } diff --git a/application/models/ressource/Stundenplandev_model.php b/application/models/ressource/Stundenplandev_model.php index 82b3779ab..e718ba073 100644 --- a/application/models/ressource/Stundenplandev_model.php +++ b/application/models/ressource/Stundenplandev_model.php @@ -223,13 +223,14 @@ class Stundenplandev_model extends DB_Model public function deleteLektorPlanning($lehreinheit_id, $mitarbeiter_uid) { - $this->addDistinct('mitarbeiter_uid'); + //TODO (david) prüfen ob der check notwendig ist + /*$this->addDistinct('mitarbeiter_uid'); $this->addSelect('mitarbeiter_uid'); $stundenplan_result = $this->loadWhere(array('lehreinheit_id' => $lehreinheit_id)); $stundenplan_array = hasData($stundenplan_result) ? (getData($stundenplan_result)) : array(); if (sizeof($stundenplan_array) <= 1) - return error('Diese/r LektorIn kann nicht aus dem LVPlan entfernt werden da dies der/die letzte verplante LektorIn ist'); + return error('Diese/r LektorIn kann nicht aus dem LVPlan entfernt werden da dies der/die letzte verplante LektorIn ist');*/ $this->addJoin('lehre.tbl_stundenplan_betriebsmittel', 'stundenplandev_id'); $betriebsmittel_result = $this->loadWhere(array('lehreinheit_id' => $lehreinheit_id, 'tbl_stundenplandev.mitarbeiter_uid' => $mitarbeiter_uid)); diff --git a/public/js/api/lehrveranstaltung/gruppe.js b/public/js/api/lehrveranstaltung/gruppe.js index 12c55509c..e22fdd847 100644 --- a/public/js/api/lehrveranstaltung/gruppe.js +++ b/public/js/api/lehrveranstaltung/gruppe.js @@ -30,7 +30,7 @@ export default { { return { method: 'post', - url: '/api/frontend/v1/lv/gruppe/deleteLVPlan/', + url: '/api/frontend/v1/lv/gruppe/deleteFromLVPlan/', params: deleteData }; }, diff --git a/public/js/components/LVVerwaltung/Lektor/Daten.js b/public/js/components/LVVerwaltung/Lektor/Daten.js index bb40f56fe..0f6b9e0f7 100644 --- a/public/js/components/LVVerwaltung/Lektor/Daten.js +++ b/public/js/components/LVVerwaltung/Lektor/Daten.js @@ -253,6 +253,7 @@ export default{