41 $this->
ctrl = $DIC->ctrl();
42 $this->
lng = $DIC->language();
43 $this->
user = $DIC->user();
44 $lng = $DIC->language();
60 return self::$block_type;
86 $cmd = $ilCtrl->
getCmd(
"getHTML");
97 $collector = $DIC->task()->derived()->factory()->collector();
99 $this->tasks = $collector->getEntries($this->
user->getId());
101 if (count($this->tasks) > 0) {
103 $this->getListRowData();
104 parent::fillDataSection();
115 public function getListRowData():
void 120 foreach ($this->tasks as $task) {
122 "title" => $task->getTitle(),
123 "url" => $task->getUrl(),
124 "ref_id" => $task->getRefId(),
125 "wsp_id" => $task->getWspId(),
126 "deadline" => $task->getDeadline(),
127 "starting_time" => $task->getStartingTime()
142 $renderer = $DIC->ui()->renderer();
146 $info_screen->setFormAction(
"#");
147 $info_screen->addSection(
$lng->
txt(
""));
150 $info_screen->addProperty(
155 if ($a_set[
"ref_id"] > 0) {
162 $info_screen->addProperty(
164 $renderer->render($link)
168 if ($a_set[
"wsp_id"] > 0) {
176 $info_screen->addProperty(
178 $renderer->render($link)
182 if ($a_set[
"starting_time"] > 0) {
184 $info_screen->addProperty(
190 if ($a_set[
"deadline"] > 0) {
192 $info_screen->addProperty(
198 $modal =
$factory->modal()->roundtrip(
200 $factory->legacy($info_screen->getHTML())
202 ->withCancelButtonLabel(
"close");
203 $button1 =
$factory->button()->shy($a_set[
"title"],
'#')
204 ->withOnClick($modal->getShowSignal());
206 $this->tpl->setVariable(
"TITLE", $renderer->render([$button1, $modal]));
216 return '<div class="small">' . (count($this->tasks)) .
" " .
$lng->
txt(
"task_derived_tasks") .
"</div>";
231 $collector = $DIC->task()->derived()->factory()->collector();
233 $this->tasks = $collector->getEntries($this->
user->getId());
235 $this->getListRowData();
237 return parent::getHTMLNew();
251 if ($data[
"ref_id"] > 0) {
260 if ($data[
"wsp_id"] > 0) {
270 if ($data[
"starting_time"] > 0) {
277 ->withProperties($props);
279 if ($data[
"deadline"] > 0) {
295 return $this->
lng->txt(
"task_no_task_items");
__construct()
Constructor.
fillDataSection()
Fill data section.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getScreenMode()
Get Screen Mode for current command.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getCmd(string $fallback_command=null)
setDataSection(string $a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setEnableNumInfo(bool $a_enablenuminfo)
executeCommand()
execute command
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
getListItemForData(array $data)
loadLanguageModule(string $a_module)
Load language module.
BlockGUI class for Tasks on PD.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
setRowTemplate(string $a_rowtemplatename, string $a_rowtemplatedir="")
Set Row Template Name.
getNoItemFoundContent()
No item entry.
static _lookupTitle(int $obj_id)
Common interface to all items.
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
Get static link.
lookupObjectId(int $a_node_id)
Get object id for node id.
__construct(Container $dic, ilPlugin $plugin)
fillRow(array $a_set)
get flat list for personal desktop
setTitle(string $a_title)
getOverview()
Get overview.
This class represents a block method of a block.
static _lookupType(int $id, bool $reference=false)
setPresentation(int $type)
static string $block_type