REST Service for POPCORN - ILIAS
alex
2025-06-18 2d56dc168ebe5cadbbef53b3b8853d87bc2cfbba
php/globus-ilias-rest/api.php
@@ -6,6 +6,7 @@
try {
    # Init ILIAS
    chdir("..");
    require_once("Services/Init/classes/class.ilInitialisation.php");
    ilInitialisation::initILIAS();
@@ -39,8 +40,16 @@
        die(); // this ends here
    }
    try {
        switch ($command) {
            case "ping":
                if($method == "GET") {
                    $res["msg"] = "pong";
                    $res["status"] = "ok";
                    break;
                }
            case "deleteUser":
                if ($method == "DELETE") {
                    $res["msg"] = deleteUser($obj_id, $dry);
@@ -57,7 +66,8 @@
                }
            default:
                http_response_code(500);
                $res = array("status" => "error", "msg" => "unknown command or method");
                $res["status"] = "error";
                $res["msg"] = "unknown command or method";
        }
    } catch (Exception $err) {
        http_response_code(500);