3 declare(strict_types=1);
39 if (!$single_answer && empty($last_vote)) {
40 $error = $this->
lng->txt(
"poll_vote_error_multi_no_answer");
41 } elseif (!$single_answer) {
43 $this->
lng->txt(
"poll_vote_error_multi"),
47 $error = $this->
lng->txt(
"poll_vote_error_single");
67 if (!$disable_input) {
90 if (!empty($last_vote) && is_array($last_vote) && in_array($id, $last_vote)) {
91 $status[] =
'checked="checked"';
94 $status[] =
'disabled';
97 $tpl->
setVariable(
"ANSWER_STATUS", implode(
' ', $status));
111 return htmlspecialchars(
113 ENT_QUOTES | ENT_SUBSTITUTE,
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
renderAnswer(ilTemplate $tpl, int $id, string $answer, ?array $last_vote, bool $single_answer, bool $disable_input)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setVariable($variable, $value='')
Sets a variable value.
render(ilTemplate $tpl, ilPollAnswersHandler $answers, bool $disable_input)
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
popLastVoteFromSession()
TODO session handling should get its own class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilLanguage $lng)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
specialCharsAsEntities(string $string)