|
| | __construct () |
| | Constructor. More...
|
| |
| | setBlock ($a_block) |
| | Do most of the initialisation. More...
|
| |
| & | executeCommand () |
| | execute command More...
|
| |
| | fillRow ($a_poll) |
| |
| | getHTML () |
| | Get block HTML code. More...
|
| |
| | ilBlockGUI () |
| | Constructor. More...
|
| |
| | addHeaderLink ($a_href, $a_text, $status=true) |
| |
| | getHeaderLinks () |
| |
| | setData ($a_data) |
| | Set Data. More...
|
| |
| | getData () |
| | Get Data. More...
|
| |
| | setBigMode ($a_bigmode) |
| | Set Big Mode. More...
|
| |
| | getBigMode () |
| | Get Big Mode. More...
|
| |
| | setBlockId ($a_block_id=0) |
| | Set Block Id. More...
|
| |
| | getBlockId () |
| | Get Block Id. More...
|
| |
| | setAvailableDetailLevels ($a_max, $a_min=0) |
| | Set Available Detail Levels. More...
|
| |
| | setCurrentDetailLevel ($a_currentdetaillevel) |
| | Set Current Detail Level. More...
|
| |
| | setGuiObject (&$a_gui_object) |
| | Set GuiObject. More...
|
| |
| | getGuiObject () |
| | Get GuiObject. More...
|
| |
| | getCurrentDetailLevel () |
| | Get Current Detail Level. More...
|
| |
| | setTitle ($a_title) |
| | Set Title. More...
|
| |
| | getTitle () |
| | Get Title. More...
|
| |
| | setImage ($a_image) |
| | Set Image. More...
|
| |
| | getImage () |
| | Get Image. More...
|
| |
| | setOffset ($a_offset) |
| | Set Offset. More...
|
| |
| | getOffset () |
| | Get Offset. More...
|
| |
| | correctOffset () |
| |
| | setLimit ($a_limit) |
| | Set Limit. More...
|
| |
| | getLimit () |
| | Get Limit. More...
|
| |
| | setEnableEdit ($a_enableedit) |
| | Set EnableEdit. More...
|
| |
| | getEnableEdit () |
| | Get EnableEdit. More...
|
| |
| | setRepositoryMode ($a_repositorymode) |
| | Set RepositoryMode. More...
|
| |
| | getRepositoryMode () |
| | Get RepositoryMode. More...
|
| |
| | setFooterInfo ($a_footerinfo, $a_hide_and_icon=false) |
| | Set Footer Info. More...
|
| |
| | getFooterInfo ($a_hide_and_icon=false) |
| | Get Footer Info. More...
|
| |
| | setSubtitle ($a_subtitle) |
| | Set Subtitle. More...
|
| |
| | getSubtitle () |
| | Get Subtitle. More...
|
| |
| | setRefId ($a_refid) |
| | Set Ref Id (only used if isRepositoryObject() is true). More...
|
| |
| | getRefId () |
| | Get Ref Id (only used if isRepositoryObject() is true). More...
|
| |
| | setAdminCommands ($a_admincommands) |
| | Set Administration Commmands. More...
|
| |
| | getAdminCommands () |
| | Get Administration Commmands. More...
|
| |
| | setColSpan ($a_colspan) |
| | Set Columns Span. More...
|
| |
| | getColSpan () |
| | Get Columns Span. More...
|
| |
| | setEnableDetailRow ($a_enabledetailrow) |
| | Set EnableDetailRow. More...
|
| |
| | getEnableDetailRow () |
| | Get EnableDetailRow. More...
|
| |
| | setEnableNumInfo ($a_enablenuminfo) |
| | Set Enable Item Number Info. More...
|
| |
| | getEnableNumInfo () |
| | Get Enable Item Number Info. More...
|
| |
| | setProperties ($a_properties) |
| | This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
|
| |
| | getProperty ($a_property) |
| |
| | setProperty ($a_property, $a_value) |
| |
| | setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="") |
| | Set Row Template Name. More...
|
| |
| | getNavParameter () |
| |
| | getDetailParameter () |
| |
| | getConfigParameter () |
| |
| | getMoveParameter () |
| |
| | getRowTemplateName () |
| | Get Row Template Name. More...
|
| |
| | getRowTemplateDir () |
| | Get Row Template Directory. More...
|
| |
| | addBlockCommand ($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false) |
| | Add Block Command. More...
|
| |
| | getBlockCommands () |
| | Get Block commands. More...
|
| |
| | addHeaderCommand ($a_href, $a_text, $a_as_close=false) |
| | Add Header Block Command. More...
|
| |
| | getHeaderCommands () |
| | Get Header Block commands. More...
|
| |
| | addFooterLink ($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false) |
| | Add a footer text/link. More...
|
| |
| | getFooterLinks () |
| | Get footer links. More...
|
| |
| | clearFooterLinks () |
| | Clear footer links. More...
|
| |
| | handleDetailLevel () |
| | Handle read/write current detail level. More...
|
| |
| | getHTML () |
| | Handle config status. More...
|
| |
| | fillHeaderCommands () |
| | Fill header commands block. More...
|
| |
| | fillHeaderTitleBlock () |
| | Fill header title block (title and. More...
|
| |
| | setDataSection ($a_content) |
| | Call this from overwritten fillDataSection(), if standard row based data is not used. More...
|
| |
| | fillDataSection () |
| | Standard implementation for row based data. More...
|
| |
| | fillRow ($a_set) |
| |
| | fillFooter () |
| |
| | fillPreviousNext () |
| | Fill previous/next row. More...
|
| |
| | setPreviousNextLinks () |
| | Get previous/next linkbar. More...
|
| |
| | fillFooterLinks ($a_top=false, $a_numinfo="") |
| | Fill footer links. More...
|
| |
| | fillDetailRow () |
| | Fill Detail Setting Row. More...
|
| |
BlockGUI class for polls.
- Author
- Jörg Lützenkirchen
- Version
- $Id$
ilPollBlockGUI: ilColumnGUI
Definition at line 17 of file class.ilPollBlockGUI.php.
| ilPollBlockGUI::fillRow |
( |
|
$a_poll | ) |
|
Definition at line 90 of file class.ilPollBlockGUI.php.
References $_SESSION, $ilCtrl, $ilUser, $img, $lng, $total, ilDatePresentation\formatDate(), ilBlockGUI\getRefId(), IL_CAL_UNIX, ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().
97 $mess = $this->poll_block->getMessage($ilUser->getId());
100 $this->tpl->setVariable(
"TXT_QUESTION", $mess);
110 if($this->poll_block->mayVote($ilUser->getId()))
112 $this->tpl->setCurrentBlock(
"answer");
113 foreach($a_poll->getAnswers() as $item)
115 $this->tpl->setVariable(
"VALUE_ANSWER", $item[
"id"]);
116 $this->tpl->setVariable(
"TXT_ANSWER_VOTE", nl2br($item[
"answer"]));
117 $this->tpl->parseCurrentBlock();
120 $ilCtrl->setParameterByClass(
"ilobjpollgui",
122 $url = $ilCtrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjpollgui"),
124 $ilCtrl->clearParametersByClass(
"ilobjpollgui");
126 $url .=
"#poll".$a_poll->getID();
128 $this->tpl->setVariable(
"URL_FORM", $url);
129 $this->tpl->setVariable(
"CMD_FORM",
"vote");
130 $this->tpl->setVariable(
"TXT_SUBMIT", $lng->txt(
"poll_vote"));
132 if($this->poll_block->getPoll()->getVotingPeriod())
134 $this->tpl->setVariable(
"TXT_VOTING_PERIOD",
135 sprintf($lng->txt(
"poll_voting_period_info"),
142 if($this->poll_block->maySeeResults($ilUser->getId()))
144 if(!$this->poll_block->mayNotResultsYet($ilUser->getId()))
146 $perc = $this->poll_block->getPoll()->getVotePercentages();
148 $perc = $perc[
"perc"];
150 $this->tpl->setVariable(
"TOTAL_ANSWERS", sprintf($lng->txt(
"poll_population"),
$total));
152 $this->tpl->setCurrentBlock(
"answer_result");
153 foreach($a_poll->getAnswers() as $item)
155 $this->tpl->setVariable(
"TXT_ANSWER_RESULT", nl2br($item[
"answer"]));
156 $this->tpl->setVariable(
"PERC_ANSWER_RESULT", round($perc[$item[
"id"]][
"perc"]));
157 $this->tpl->parseCurrentBlock();
164 $end = $this->poll_block->getPoll()->getVotingPeriodEnd();
170 if($this->poll_block->getPoll()->hasUserVoted($ilUser->getId()))
172 $info .= $lng->txt(
"poll_block_message_already_voted").
" ";
175 $this->tpl->setVariable(
"TOTAL_ANSWERS", $info.
176 sprintf($lng->txt(
"poll_block_results_available_on"), $end));
179 else if($this->poll_block->getPoll()->hasUserVoted($ilUser->getId()))
181 $this->tpl->setVariable(
"TOTAL_ANSWERS", $lng->txt(
"poll_block_message_already_voted"));
186 $this->tpl->setVariable(
"ANCHOR_ID", $a_poll->getID());
187 $this->tpl->setVariable(
"TXT_QUESTION", nl2br(trim($a_poll->getQuestion())));
189 $desc = trim($a_poll->getDescription());
192 $this->tpl->setVariable(
"TXT_DESC", nl2br($desc));
195 $img = $a_poll->getImageFullPath();
198 $this->tpl->setVariable(
"URL_IMAGE",
$img);
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
static formatDate(ilDateTime $date)
Format a date public.
getRefId()
Get Ref Id (only used if isRepositoryObject() is true).