24 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
48 $this->
setTitle($lng->txt(
"pdesk_feedback_request"));
50 $this->allow_moving =
false;
93 $next_class = $ilCtrl->getNextClass();
94 $cmd = $ilCtrl->getCmd(
"getHTML");
102 if (count($this->feedbacks) == 0)
117 global $ilAccess,
$ilUser,$tree;
119 include_once(
'Services/Feedback/classes/class.ilFeedback.php');
121 $feedbacks = $feedback->getAllBarometer(0);
122 $this->feedbacks = array();
123 foreach($feedbacks as $feedback)
125 if($tree->isDeleted($feedback->getRefId()))
131 if (!$ilAccess->checkAccess(
"write",
"", $feedback->getRefId())
132 && $feedback->canVote($ilUser->getId(), $feedback->getId()) == 1
133 && !$feedback->getAnonymous())
135 $this->feedbacks[] = array (
136 "id" => $feedback->getId(),
137 "title" => $feedback->getTitle()
142 $this->
setData($this->feedbacks);
146 $this->
setRowTemplate(
"tpl.feedback_pdbox.html",
"Services/Feedback");
163 $ilCtrl->setParameterByClass(
"ilfeedbackgui",
"barometer_id",$a_set[
"id"]);
164 $this->tpl->setVariable(
'LINK_FEEDBACK',
165 $ilCtrl->getLinkTargetByClass(array(
"ilpersonaldesktopgui",
'ilfeedbackgui'),
'voteform'));
166 $this->tpl->setVariable(
'TXT_FEEDBACK', $a_set[
"title"]);
176 return '<div class="small">'.((int) count($this->feedbacks)).
" ".$lng->txt(
"pdesk_feedbacks").
"</div>";