function isClickable($a_type, $a_ref_id, $a_obj_id = 0)
 {
     global $rbacsystem, $ilDB, $ilUser, $ilAccess;
     if (!ilConditionHandler::_checkAllConditionsOfTarget($a_ref_id, $a_obj_id)) {
         return false;
     }
     switch ($a_type) {
         case "crs":
             return $ilAccess->checkAccess("read", "", $a_ref_id);
             // visible groups can allways be clicked; group processing decides
             // what happens next
         // visible groups can allways be clicked; group processing decides
         // what happens next
         case "grp":
             return true;
         case 'tst':
             if (!$rbacsystem->checkAccess("read", $a_ref_id)) {
                 return false;
             }
             $query = sprintf("SELECT * FROM tst_tests WHERE obj_fi=%s", $a_obj_id);
             $res = $ilDB->query($query);
             while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
                 return (bool) $row->complete;
             }
             return false;
         case 'svy':
             if (!$rbacsystem->checkAccess("read", $a_ref_id)) {
                 return false;
             }
             $query = sprintf("SELECT * FROM svy_svy WHERE obj_fi=%s", $a_obj_id);
             $res = $ilDB->query($query);
             while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
                 return (bool) $row->complete;
             }
             return false;
             // media pools can only be edited
         // media pools can only be edited
         case "mep":
             if ($rbacsystem->checkAccess("read", $a_ref_id)) {
                 return true;
             } else {
                 return false;
             }
             break;
         case 'crsr':
         case 'catr':
             include_once './Services/ContainerReference/classes/class.ilContainerReferenceAccess.php';
             return ilContainerReferenceAccess::_isAccessible($a_ref_id);
             // all other types are only clickable, if read permission is given
         // all other types are only clickable, if read permission is given
         default:
             if ($rbacsystem->checkAccess("read", $a_ref_id)) {
                 // check if lm is online
                 if ($a_type == "lm") {
                     include_once "./Modules/LearningModule/classes/class.ilObjLearningModule.php";
                     $lm_obj =& new ilObjLearningModule($a_ref_id);
                     if (!$lm_obj->getOnline() && !$rbacsystem->checkAccess('write', $a_ref_id)) {
                         return false;
                     }
                 }
                 // check if fblm is online
                 if ($a_type == "htlm") {
                     include_once "./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php";
                     $lm_obj =& new ilObjFileBasedLM($a_ref_id);
                     if (!$lm_obj->getOnline() && !$rbacsystem->checkAccess('write', $a_ref_id)) {
                         return false;
                     }
                 }
                 // check if fblm is online
                 if ($a_type == "sahs") {
                     include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
                     $lm_obj =& new ilObjSAHSLearningModule($a_ref_id);
                     if (!$lm_obj->getOnline() && !$rbacsystem->checkAccess('write', $a_ref_id)) {
                         return false;
                     }
                 }
                 // check if glossary is online
                 if ($a_type == "glo") {
                     $obj_id = ilObject::_lookupObjectId($a_ref_id);
                     include_once "./Modules/Glossary/classes/class.ilObjGlossary.php";
                     if (!ilObjGlossary::_lookupOnline($obj_id) && !$rbacsystem->checkAccess('write', $a_ref_id)) {
                         return false;
                     }
                 }
                 return true;
             } else {
                 return false;
             }
             break;
     }
 }