4include_once 
'./Services/WebServices/ECS/classes/class.ilECSConnector.php';
 
    5include_once 
'./Services/WebServices/ECS/classes/class.ilECSConnectorException.php';
 
    6include_once 
'./Services/WebServices/ECS/classes/Connectors/class.ilECSEnrolmentStatus.php';
 
   34            $this->path_postfix = 
'/campusconnect/member_status/' . (int) $a_enrole_id;
 
   36        if ($a_details and $a_enrole_id) {
 
   37            $this->path_postfix .= 
'/details';
 
   44                $this->
addHeader(
'Accept', 
'application/json');
 
   46                #$this->addHeader('Accept', 'text/uri-list'); 
   48            $this->curl->setOpt(CURLOPT_HTTPHEADER, $this->
getHeader());
 
   51            if (substr(
$res, 0, 4) == 
'http') {
 
   52                $json = file_get_contents(
$res);
 
   60                include_once 
'./Services/WebServices/ECS/classes/class.ilECSEContentDetails.php';
 
   63                $details->loadFromJson($ecs_result->getResult());
 
   66                include_once 
'./Services/WebServices/ECS/classes/Connectors/class.ilECSEnrolmentStatus.php';
 
   68                $enrolment->loadFromJson($ecs_result->getResult());
 
   86        $ilLog->write(__METHOD__ . 
': Add new enrolment status');
 
   88        $this->path_postfix = 
'/campusconnect/member_status';
 
   93            $this->
addHeader(
'Content-Type', 
'application/json');
 
   94            $this->
addHeader(
'Accept', 
'application/json');
 
   96            #$this->addHeader(ilECSConnector::HEADER_MEMBERSHIPS, 1); 
   98            $this->curl->setOpt(CURLOPT_HTTPHEADER, $this->
getHeader());
 
   99            $this->curl->setOpt(CURLOPT_POST, 
true);
 
  100            $this->curl->setOpt(CURLOPT_POSTFIELDS, json_encode($enrolment));
 
  103            $info = $this->curl->getInfo(CURLINFO_HTTP_CODE);
 
  105            $ilLog->write(__METHOD__ . 
': Checking HTTP status...');
 
  106            if (
$info != self::HTTP_CODE_CREATED) {
 
  107                $ilLog->write(__METHOD__ . 
': Cannot create auth resource, did not receive HTTP 201. ');
 
  108                $ilLog->write(__METHOD__ . 
': POST was: ' . print_r($enrolment, 
true));
 
  109                $ilLog->write(__METHOD__ . 
': HTTP code: ' . 
$info);
 
  112            $ilLog->write(__METHOD__ . 
': ... got HTTP 201 (created)');
 
  115            $enrolment_res = 
$result->getResult();
 
  117            $ilLog->write(__METHOD__ . 
': ... Received result: ' . print_r($enrolment_res, 
true));
 
  119            return $enrolment_res;
 
An exception for terminatinating execution or to throw for unit testing.
addHeader($a_name, $a_value)
Add Header.
prepareConnection()
prepare connection
setHeader($a_header_strings)
Presentation of ecs content details (http://...campusconnect/courselinks/id/details)
Connector for course member ressource.
addEnrolmentStatus(ilECSEnrolmentStatus $enrolment, $a_target_mid)
Add new enrolment status.
getEnrolmentStatus($a_enrole_id=0, $a_details=false)
Get single directory tree.
__construct(ilECSSetting $settings=null)
Constructor.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
foreach($_POST as $key=> $value) $res