4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
22 $this->
setId(
"sess_materials_".$a_parent_obj->object->getId());
24 parent::__construct($a_parent_obj, $a_parent_cmd);
26 $this->parent_ref_id = $tree->getParentId($a_parent_obj->object->getRefId());
30 $this->
setRowTemplate(
"tpl.session_materials_row.html",
"Modules/Session");
33 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj,$a_parent_cmd));
37 $this->
addColumn($lng->txt(
"crs_materials"),
"object",
"90%" );
38 $this->
addColumn($lng->txt(
"status"),
"active", 5);
47 global $tree, $objDefinition;
50 $nodes = $tree->getSubTree($tree->getNodeData($this->parent_ref_id));
53 foreach($nodes as $node)
56 if ($node[
'child'] == $this->parent_ref_id ||
57 $objDefinition->isSideBlock($node[
'type']) ||
58 in_array($node[
'type'],
array(
'sess',
'itgr',
'rolf')))
63 if($node[
'type'] ==
'rolf')
68 $node[
"sorthash"] = (int)(!in_array($node[
'ref_id'],$this->
getMaterialItems())).$node[
"title"];
82 $this->tpl->setVariable(
'IMG_ALT',$this->lng->txt(
'obj_'.$a_set[
'type']));
84 $this->tpl->setVariable(
"VAL_POSTNAME",
"items");
85 $this->tpl->setVariable(
"VAL_ID",$a_set[
'ref_id']);
89 $this->tpl->setVariable(
"VAL_CHECKED",
"checked");
92 $this->tpl->setVariable(
"COLL_TITLE",$a_set[
'title']);
94 if(strlen($a_set[
'description']))
96 $this->tpl->setVariable(
"COLL_DESC",$a_set[
'description']);
98 $this->tpl->setVariable(
"ASSIGNED_IMG_OK",in_array($a_set[
'ref_id'],$this->
getMaterialItems()) ?
101 $this->tpl->setVariable(
"ASSIGNED_STATUS",$this->lng->txt(
'event_material_assigned'));
103 include_once(
'./Services/Tree/classes/class.ilPathGUI.php');
105 $path->enableDisplayCut(
true);
106 $path->enableTextOnly(
false);
107 $this->tpl->setVariable(
"COLL_PATH",
$path->getPath($this->getContainerRefId(), $a_set[
'ref_id']));
116 $this->material_items = $a_set;
134 $this->container_ref_id = $a_set;
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
Creates a path for a start and endnode.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
getMaterialItems()
Get Material Items.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
setContainerRefId($a_set)
Set Mcontainer ref id.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
__construct($a_parent_obj, $a_parent_cmd)
getDataFromDb()
Get data and put it into an array.
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.
fillRow($a_set)
Fill a single data row.
setFormName($a_formname="")
Set Form name.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setMaterialItems($a_set)
Set Material Items.
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.
getContainerRefId()
Get container ref id.