Verknüpfen von LVs mit kompatiblen LVs

This commit is contained in:
Stefan Puraner
2013-11-14 10:00:14 +00:00
parent eac0decdaa
commit 9d21a0194a
2 changed files with 23 additions and 0 deletions
+9
View File
@@ -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();
@@ -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);
});
}
</script>