From 9d21a0194a44dedf78d670dd52f06fe24e3295c2 Mon Sep 17 00:00:00 2001 From: Stefan Puraner Date: Thu, 14 Nov 2013 10:00:14 +0000 Subject: [PATCH] =?UTF-8?q?Verkn=C3=BCpfen=20von=20LVs=20mit=20kompatiblen?= =?UTF-8?q?=20LVs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soap/lehrveranstaltung.json.php | 9 +++++++++ vilesci/lehre/lehrveranstaltung_kompatibel.php | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/soap/lehrveranstaltung.json.php b/soap/lehrveranstaltung.json.php index 0ffe1489a..50fd9e381 100644 --- a/soap/lehrveranstaltung.json.php +++ b/soap/lehrveranstaltung.json.php @@ -27,6 +27,7 @@ require_once('../config/vilesci.config.inc.php'); require_once('../include/functions.inc.php'); require_once('../include/lehrveranstaltung.class.php'); require_once('../include/benutzerberechtigung.class.php'); +require_once('../include/webservicerecht.class.php'); $uid = get_uid(); @@ -85,6 +86,10 @@ switch($method) } break; case 'saveKompatibleLehrveranstaltung': + $wsrecht = new webservicerecht(); + if(!$wsrecht->isUserAuthorized($uid, $method)) + die('Sie haben keine Berechtigung fuer diesen Vorgang'); + $lv_id = $_REQUEST['lehrveranstaltung_id']; $lv_id_kompatibel = $_REQUEST['lehrveranstaltung_id_kompatibel']; $lehrveranstaltung = new lehrveranstaltung(); @@ -101,6 +106,10 @@ switch($method) } break; case 'deleteKompatibleLehrveranstaltung': + $wsrecht = new webservicerecht(); + if(!$wsrecht->isUserAuthorized($uid, $method)) + die('Sie haben keine Berechtigung fuer diesen Vorgang'); + $lv_id = $_REQUEST['lehrveranstaltung_id']; $lv_id_kompatibel = $_REQUEST['lehrveranstaltung_id_kompatibel']; $lehrveranstaltung = new lehrveranstaltung(); diff --git a/vilesci/lehre/lehrveranstaltung_kompatibel.php b/vilesci/lehre/lehrveranstaltung_kompatibel.php index 2379794ec..2c42637b5 100755 --- a/vilesci/lehre/lehrveranstaltung_kompatibel.php +++ b/vilesci/lehre/lehrveranstaltung_kompatibel.php @@ -132,8 +132,15 @@ if (!$db = new basis_db()) } }).success(function(data) { + if(data.error === "true") + { + alert(data.errormsg); + } var iframe = parent.document.getElementById("lv_detail"); iframe.src = "lehrveranstaltung_kompatibel.php?lehrveranstaltung_id="+lehrveranstaltung_id; + }).error(function(data) + { + alert(data.responseText); }); } @@ -153,8 +160,15 @@ if (!$db = new basis_db()) } }).success(function(data) { + if(data.error === "true") + { + alert(data.errormsg); + } var iframe = parent.document.getElementById("lv_detail"); iframe.src = "lehrveranstaltung_kompatibel.php?lehrveranstaltung_id="+lehrveranstaltung_id; + }).error(function(data) + { + alert(data.responseText); }); }