BlockGUI class for Personal Desktop Feedback block. More...
Inheritance diagram for ilPDFeedbackBlockGUI:
Collaboration diagram for ilPDFeedbackBlockGUI:Public Member Functions | |
| ilPDFeedbackBlockGUI () | |
| Constructor. | |
| & | executeCommand () |
| execute command | |
| getHTML () | |
| Get HTML. | |
| fillDataSection () | |
| Fill data section. | |
| fillRow ($a_set) | |
| Fill feedback row. | |
| getOverview () | |
| Get overview. | |
Static Public Member Functions | |
| static | getBlockType () |
| Get block type. | |
| static | isRepositoryObject () |
| Is block used in repository object? | |
| static | getScreenMode () |
| Get Screen Mode for current command. | |
Static Public Attributes | |
| static | $block_type = "pdfeedb" |
BlockGUI class for Personal Desktop Feedback block.
ilPDFeedbackBlockGUI: ilColumnGUI
Definition at line 34 of file class.ilPDFeedbackBlockGUI.php.
| & ilPDFeedbackBlockGUI::executeCommand | ( | ) |
| ilPDFeedbackBlockGUI::fillDataSection | ( | ) |
Fill data section.
Reimplemented from ilBlockGUI.
Definition at line 115 of file class.ilPDFeedbackBlockGUI.php.
References ilBlockGUI::getCurrentDetailLevel(), getOverview(), ilBlockGUI::setData(), ilBlockGUI::setDataSection(), ilBlockGUI::setEnableNumInfo(), and ilBlockGUI::setRowTemplate().
{
global $ilAccess, $ilUser,$tree;
include_once('Services/Feedback/classes/class.ilFeedback.php');
$feedback = new ilFeedback();
$feedbacks = $feedback->getAllBarometer(0);
$this->feedbacks = array();
foreach($feedbacks as $feedback)
{
if($tree->isDeleted($feedback->getRefId()))
{
continue;
}
// do not show feedback for tutors/admins
if (!$ilAccess->checkAccess("write", "", $feedback->getRefId())
&& $feedback->canVote($ilUser->getId(), $feedback->getId()) == 1
&& !$feedback->getAnonymous())
{
$this->feedbacks[] = array (
"id" => $feedback->getId(),
"title" => $feedback->getTitle()
);
}
}
$this->setData($this->feedbacks);
if ($this->getCurrentDetailLevel() > 1 && count($this->feedbacks) > 0)
{
$this->setRowTemplate("tpl.feedback_pdbox.html", "Services/Feedback");
parent::fillDataSection();
}
else
{
$this->setEnableNumInfo(false);
$this->setDataSection($this->getOverview());
}
}
Here is the call graph for this function:| ilPDFeedbackBlockGUI::fillRow | ( | $ | a_set | ) |
Fill feedback row.
Reimplemented from ilBlockGUI.
Definition at line 159 of file class.ilPDFeedbackBlockGUI.php.
| static ilPDFeedbackBlockGUI::getBlockType | ( | ) | [static] |
Get block type.
Reimplemented from ilBlockGUI.
Definition at line 58 of file class.ilPDFeedbackBlockGUI.php.
{
return self::$block_type;
}
| ilPDFeedbackBlockGUI::getHTML | ( | ) |
Get HTML.
Reimplemented from ilBlockGUI.
Definition at line 99 of file class.ilPDFeedbackBlockGUI.php.
{
$html = parent::getHTML();
if (count($this->feedbacks) == 0)
{
return "";
}
else
{
return $html;
}
}
| ilPDFeedbackBlockGUI::getOverview | ( | ) |
Get overview.
Definition at line 172 of file class.ilPDFeedbackBlockGUI.php.
Referenced by fillDataSection().
{
global $ilUser, $lng, $ilCtrl;
return '<div class="small">'.((int) count($this->feedbacks))." ".$lng->txt("pdesk_feedbacks")."</div>";
}
Here is the caller graph for this function:| static ilPDFeedbackBlockGUI::getScreenMode | ( | ) | [static] |
Get Screen Mode for current command.
Reimplemented from ilBlockGUI.
Definition at line 76 of file class.ilPDFeedbackBlockGUI.php.
References $_GET.
{
switch($_GET["cmd"])
{
default:
return IL_SCREEN_SIDE;
break;
}
}
| ilPDFeedbackBlockGUI::ilPDFeedbackBlockGUI | ( | ) |
Constructor.
Definition at line 40 of file class.ilPDFeedbackBlockGUI.php.
References $ilCtrl, $lng, ilUtil::getImagePath(), ilBlockGUI::ilBlockGUI(), ilBlockGUI::setAvailableDetailLevels(), ilBlockGUI::setImage(), ilBlockGUI::setLimit(), and ilBlockGUI::setTitle().
{
global $ilCtrl, $lng, $ilUser;
parent::ilBlockGUI();
$this->setLimit(5);
$this->setImage(ilUtil::getImagePath("icon_feedb_s.gif"));
$this->setTitle($lng->txt("pdesk_feedback_request"));
$this->setAvailableDetailLevels(2, 1);
$this->allow_moving = false;
}
Here is the call graph for this function:| static ilPDFeedbackBlockGUI::isRepositoryObject | ( | ) | [static] |
Is block used in repository object?
Reimplemented from ilBlockGUI.
Definition at line 68 of file class.ilPDFeedbackBlockGUI.php.
{
return false;
}
ilPDFeedbackBlockGUI::$block_type = "pdfeedb" [static] |
Definition at line 36 of file class.ilPDFeedbackBlockGUI.php.
1.7.1