Show list of tasks.
102 {
106
109 $this->
help->setScreenId(
'derived_tasks');
110
112 $renderer =
$ui->renderer();
113
114 $collector = $this->task->derived()->factory()->collector();
115
116 $entries = $collector->getEntries($this->
user->getId());
117
118 $list_items_with_deadline = [];
119 $list_items_without_deadline = [];
120 $item_groups = [];
121
122
123 foreach ($entries as
$i) {
124 $props = [];
125
126 $title =
$i->getTitle();
127 $link = '';
128
129 if (
$i->getRefId() > 0) {
133
135 }
136
137 if (
$i->getWspId() > 0) {
139 $obj_id = $wst->lookupObjectId(
$i->getWspId());
142 }
143
144 if (strlen(
$i->getUrl()) > 0) {
145 $link =
$i->getUrl();
146 }
147
148 if (strlen($link) > 0) {
149 $title =
$f->button()->shy($title, $link);
150 }
151
152 if (
$i->getStartingTime() > 0) {
155 }
156 if (
$i->getDeadline() > 0) {
159 }
160 $item =
$f->item()->standard($title)->withProperties($props);
161 if (
$i->getDeadline() > 0) {
162 $list_items_with_deadline[] = $item;
163 } else {
164 $list_items_without_deadline[] = $item;
165 }
166 }
167
168
169 if (count($list_items_with_deadline) > 0 || count($list_items_without_deadline) > 0) {
170 $panels = [];
171
172 if (count($list_items_with_deadline) > 0) {
173 $panels[] =
$f->panel()->listing()->standard(
174 $lng->txt(
"task_tasks_with_deadline"),
175 [
$f->item()->group(
"", $list_items_with_deadline)]
176 );
177 }
178 if (count($list_items_without_deadline) > 0) {
179 $panels[] =
$f->panel()->listing()->standard(
180 $lng->txt(
"task_tasks_without_deadline"),
181 [
$f->item()->group(
"", $list_items_without_deadline)]
182 );
183 }
184
185
186 $main_tpl->setContent($renderer->render($panels));
187 } else {
189 }
190 }
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Tree handler for personal workspace.