4 include_once(
"./Services/Block/classes/class.ilCustomBlock.php");
26 include_once
"Modules/Poll/classes/class.ilObjPoll.php";
28 $this->answers = $this->poll->getAnswers();
49 if(!
sizeof($this->answers))
54 include_once
"Modules/Poll/classes/class.ilObjPollAccess.php";
61 if(!$this->
mayVote($a_user_id) &&
77 if($a_user_id == ANONYMOUS_USER_ID)
82 if($this->poll->hasUserVoted($a_user_id))
87 if($this->poll->getVotingPeriod() &&
88 ($this->poll->getVotingPeriodBegin() > time() ||
89 $this->poll->getVotingPeriodEnd() < time()))
100 $this->poll->getVotingPeriod() &&
101 $this->poll->getVotingPeriodEnd() > time())
115 switch($this->poll->getViewResults())
128 if($this->poll->hasUserVoted($a_user_id))
140 if(!
sizeof($this->answers))
142 return $lng->txt(
"poll_block_message_no_answers");
147 if(!$this->poll->isOnline())
149 return $lng->txt(
"poll_block_message_offline");
151 if($this->poll->getAccessBegin() > time())
154 return sprintf($lng->txt(
"poll_block_message_inactive"), $date);