static function _isPagePublic($a_node_id, $a_check_public_mode = false) { global $ilDB, $ilLog; if (empty($a_node_id)) { $message = sprintf('ilLMObject::_isPagePublic(): Invalid parameter! $a_node_id is empty'); $ilLog->write($message, $ilLog->WARNING); return false; } if ($a_check_public_mode === true) { $lm_id = ilLMObject::_lookupContObjId($a_node_id); $q = "SELECT public_access_mode FROM content_object WHERE id = " . $ilDB->quote($lm_id, "integer"); $r = $ilDB->query($q); $row = $ilDB->fetchAssoc($r); if ($row["public_access_mode"] == "complete") { return true; } } $q = "SELECT public_access FROM lm_data WHERE obj_id=" . $ilDB->quote($a_node_id, "integer"); $r = $ilDB->query($q); $row = $ilDB->fetchAssoc($r); return ilUtil::yn2tf($row["public_access"]); }