4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
26 $this->start_object = $a_start_objects;
27 $this->enable_desktop = (bool)$a_enable_desktop;
29 parent::__construct($a_parent_obj, $a_parent_cmd);
31 $this->
addColumn($this->lng->txt(
'crs_nr'),
'nr');
32 $this->
addColumn($this->lng->txt(
'title'),
'title');
33 $this->
addColumn($this->lng->txt(
'crs_objective_accomplished'),
'status');
34 $this->
addColumn($this->lng->txt(
'actions'),
'');
36 $this->
setTitle($this->lng->txt(
'crs_table_start_objects'));
39 $this->
setRowTemplate(
"tpl.start_objects_content_row.html",
"Services/Container");
40 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
50 global
$ilUser, $ilObjDataCache, $ilAccess;
52 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
53 include_once
'./Services/Link/classes/class.ilLink.php';
55 $lm_continue =
new ilCourseLMHistory($this->start_object->getRefId(),$ilUser->getId());
60 foreach($this->start_object->getStartObjects() as
$start)
62 $obj_id = $ilObjDataCache->lookupObjId(
$start[
'item_ref_id']);
64 $type = $ilObjDataCache->lookupType($obj_id);
66 if(!$ilAccess->checkAccess(
"visible",
"",
$ref_id))
72 if($this->start_object->isFullfilled($ilUser->getId(),
$ref_id))
74 $accomplished =
'accomplished';
78 $accomplished =
'not_accomplished';
83 if((
bool)$this->enable_desktop)
86 if(!$ilUser->isDesktopItem(
$ref_id,$type))
88 if ($ilAccess->checkAccess(
'read',
'',
$ref_id))
94 $actions[
$url] = $this->lng->txt(
"to_desktop");
103 $actions[
$url] = $this->lng->txt(
"unsubscribe");
107 $default_params = null;
110 $default_params[
"crs_show_result"] =
$ref_id;
121 if ($accomplished ==
'accomplished')
134 "append_default" => $default_params,
135 "title" => $ilObjDataCache->lookupTitle($obj_id),
136 "description" => $ilObjDataCache->lookupDescription($obj_id),
137 "status" => $this->lng->txt(
'crs_objective_'.$accomplished),
138 "status_img" =>
$icon,
139 "actions" => $actions);
142 include_once(
"./Services/Object/classes/class.ilObjectListGUIPreloader.php");
144 foreach($items as $item)
146 $preloader->addItem($item[
"obj_id"], $item[
"type"], $item[
"ref_id"]);
148 $preloader->preload();
165 global $objDefinition;
167 if (!isset($this->item_list_guis[
$a_type]))
169 $class = $objDefinition->getClassName($a_type);
176 $location = $objDefinition->getLocation($a_type);
181 $full_class =
"ilObj".$class.
"ListGUI";
182 include_once(
$location.
"/class.".$full_class.
".php");
183 $item_list_gui =
new $full_class();
184 $this->item_list_guis[
$a_type] = $item_list_gui;
188 $item_list_gui = $this->item_list_guis[
$a_type];
191 $item_list_gui->setDefaultCommandParameters(
array());
193 return $item_list_gui;
210 $item_list_gui->setContainerObject($this);
211 $item_list_gui->enableCommands(
true,
true);
216 $item_list_gui->enableNotes(
false);
217 $item_list_gui->enableComments(
false);
218 $item_list_gui->enableTags(
false);
220 $item_list_gui->enableIcon(
true);
221 $item_list_gui->enableDelete(
false);
222 $item_list_gui->enableCut(
false);
223 $item_list_gui->enableCopy(
false);
224 $item_list_gui->enableLink(
false);
225 $item_list_gui->enableInfoScreen(
true);
226 $item_list_gui->enableSubscribe(
false);
232 $item_list_gui->enableDescription(
false);
233 $item_list_gui->enableProperties(
false);
234 $item_list_gui->enablePreconditions(
false);
237 if($a_item[
"append_default"])
239 $item_list_gui->setDefaultCommandParameters($a_item[
"append_default"]);
241 if (is_object($item_list_gui))
243 return $item_list_gui->getListItemHTML($a_item[
"ref_id"],
244 $a_item[
"obj_id"], $a_item[
"title"], $a_item[
"description"]);
250 $this->tpl->setVariable(
"VAL_NR", $a_set[
"nr"]);
253 $this->tpl->setVariable(
"TXT_TITLE", $this->
getListItem($a_set));
273 $this->tpl->setVariable(
"TXT_STATUS", $a_set[
"status"]);
274 $this->tpl->setVariable(
"IMG_STATUS", $a_set[
"status_img"]);
276 if($a_set[
"actions"])
278 $this->tpl->setCurrentBlock(
"link");
279 foreach($a_set[
"actions"] as
$url => $caption)
281 $this->tpl->setVariable(
"LINK_HREF",
$url);
282 $this->tpl->setVariable(
"LINK_NAME", $caption);
284 $this->tpl->parseCurrentBlock();
setDescription($a_val)
Set description.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
__construct($a_parent_obj, $a_parent_cmd, ilContainerStartObjects $a_start_objects, $a_enable_desktop=true)
getParentObject()
Get parent object.
getItemListGUI($a_type)
Get list gui for object type.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Preloader for object list GUIs.
getListItem($a_item)
Get list gui for object instance.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
ilContainerStartObjectsContentTableGUI
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.