/**
  *  Reads contents from Adobe Connect server
  * 
  * @param string $by_type null|content|record 
  * @return bool
  */
 public function readContents($by_type = NULL)
 {
     $session = $this->xmlApi->getBreezeSession();
     $ids = array();
     if ($session != NULL && $this->xmlApi->login($this->adminLogin, $this->adminPass, $session)) {
         $ids = $this->xmlApi->getContentIds($this->sco_id, $session) ? $this->xmlApi->getContentIds($this->sco_id, $session) : array();
         foreach ($ids as $id) {
             $date_created = $this->xmlApi->getDateCreated($id, $this->sco_id, $session);
             $date_end = $this->xmlApi->getDateEnd($id, $this->sco_id, $session);
             if ($date_end == '') {
                 $type = 'content';
             } else {
                 $type = 'record';
             }
             if ($by_type == NULL || $by_type == $type) {
                 $attributes = array("sco-id" => $id, "name" => $this->xmlApi->getName($id, $this->sco_id, $session), "url" => $this->xmlApi->getURL($id, $this->sco_id, $session), "date-created" => new ilDateTime(substr($date_created, 0, 10) . " " . substr($date_created, 11, 8), IL_CAL_DATETIME), "date-end" => $date_end, "description" => $this->xmlApi->getDescription($id, $this->sco_id, $session), "type" => $type);
                 $this->contents->addContent($attributes);
             }
         }
         return true;
     } else {
         return false;
     }
 }