/**
  * Check if course allocation is activated for one recipient of the 
  * @param ilECSSetting $server
  * @param type $a_content_id
  */
 public function checkAllocationActivation(ilECSSetting $server, $a_content_id)
 {
     try {
         include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseConnector.php';
         $crs_reader = new ilECSCourseConnector($server);
         $details = $crs_reader->getCourse($a_content_id, true);
         $this->mid = $details->getMySender();
         // Check if import is enabled
         include_once './Services/WebServices/ECS/classes/class.ilECSParticipantSetting.php';
         $part = ilECSParticipantSetting::getInstance($this->getServer()->getServerId(), $this->getMid());
         if (!$part->isImportEnabled()) {
             $GLOBALS['ilLog']->write(__METHOD__ . ': Import disabled for mid ' . $this->getMid());
             return false;
         }
         // Check course allocation setting
         include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingSettings.php';
         $gl_settings = ilECSNodeMappingSettings::getInstanceByServerMid($this->getServer()->getServerId(), $this->getMid());
         $enabled = $gl_settings->isCourseAllocationEnabled();
         if (!$enabled) {
             $GLOBALS['ilLog']->write(__METHOD__ . ': Course allocation disabled for ' . $this->getMid());
         }
         return $enabled;
     } catch (ilECSConnectorException $e) {
         $GLOBALS['ilLog']->write(__METHOD__ . ': Reading course details failed with message ' . $e->getMessage());
         return false;
     }
 }