19 declare(strict_types=1);
41 $this->poll_id = $poll->
getId();
45 $id = (
int) ($answer[
'id'] ?? 0);
46 $text = (string) ($answer[
'answer'] ??
'');
47 $answers[
$id] = $text;
58 if (isset($session_last_poll_vote[$this->poll_id])) {
60 unset($session_last_poll_vote[$this->poll_id]);
72 foreach ($this->answers as
$id => $answer) {
79 return (
string) ($this->answers[
$id] ??
'');
84 return count($this->answers);
91 if ($below_max && !$single_answer) {
static get(string $a_var)
__construct(ilObjPoll $poll, string $vote_url, string $vote_cmd)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
popLastVoteFromSession()
TODO session handling should get its own class.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static set(string $a_var, $a_val)
Set a value.