/**
  * Get bloch HTML code.
  */
 function getHTML()
 {
     global $ilCtrl, $lng, $ilUser, $ilAccess;
     if ($this->getCurrentDetailLevel() == 0) {
         return "";
     }
     // add edit commands
     #if ($this->getEnableEdit())
     if ($this->mode == ilCalendarCategories::MODE_PERSONAL_DESKTOP_ITEMS or $this->mode == ilCalendarCategories::MODE_PERSONAL_DESKTOP_MEMBERSHIP) {
         include_once "./Services/News/classes/class.ilRSSButtonGUI.php";
         $this->addBlockCommand($this->ctrl->getLinkTarget($this, 'showCalendarSubscription'), $lng->txt('ical_export'), "", "", true, false, ilRSSButtonGUI::get(ilRSSButtonGUI::ICON_ICAL));
     }
     if ($this->mode == ilCalendarCategories::MODE_REPOSITORY) {
         if (!isset($_GET["bkid"])) {
             if ($ilAccess->checkAccess('edit_event', '', (int) $_GET['ref_id'])) {
                 $ilCtrl->setParameter($this, "add_mode", "block");
                 $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilCalendarAppointmentGUI", "add"), $lng->txt("add_appointment"));
                 $ilCtrl->setParameter($this, "add_mode", "");
             }
             global $ilObjDataCache;
             include_once "Modules/Course/classes/class.ilCourseParticipants.php";
             $obj_id = $ilObjDataCache->lookupObjId((int) $_GET['ref_id']);
             $participants = ilCourseParticipants::_getInstanceByObjId($obj_id);
             $users = array_unique(array_merge($participants->getTutors(), $participants->getAdmins()));
             //$users = $participants->getParticipants();
             include_once 'Services/Booking/classes/class.ilBookingEntry.php';
             //$users = ilBookingEntry::isBookable($users, $obj_id);
             $users = ilBookingEntry::lookupBookableUsersForObject($obj_id, $users);
             if ($users) {
                 foreach ($users as $user_id) {
                     if (!isset($_GET["bkid"])) {
                         $ilCtrl->setParameter($this, "bkid", $user_id);
                         $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilCalendarMonthGUI", ""), $lng->txt("cal_consultation_hours_for") . ' ' . ilObjUser::_lookupFullname($user_id));
                         $this->cal_footer[] = array('link' => $ilCtrl->getLinkTargetByClass('ilCalendarMonthGUI', ''), 'txt' => $lng->txt("cal_consultation_hours_for") . ' ' . ilObjUser::_lookupFullname($user_id));
                     }
                 }
                 $ilCtrl->setParameter($this, "bkid", "");
             }
         } else {
             $ilCtrl->setParameter($this, "bkid", "");
             $this->addBlockCommand($ilCtrl->getLinkTarget($this), $lng->txt("back"));
             $ilCtrl->setParameter($this, "bkid", (int) $_GET["bkid"]);
         }
     }
     if ($this->getProperty("settings") == true) {
         $this->addBlockCommand($ilCtrl->getLinkTarget($this, "editSettings"), $lng->txt("settings"));
     }
     $ilCtrl->setParameterByClass("ilcolumngui", "seed", isset($_GET["seed"]) ? $_GET["seed"] : "");
     $ret = parent::getHTML();
     $ilCtrl->setParameterByClass("ilcolumngui", "seed", "");
     return $ret;
 }