4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
21 $this->
setId(
"sess_materials_" . $a_parent_obj->object->getId());
23 parent::__construct($a_parent_obj, $a_parent_cmd);
25 $this->parent_ref_id = $tree->getParentId($a_parent_obj->object->getRefId());
29 $this->
setRowTemplate(
"tpl.session_materials_row.html",
"Modules/Session");
32 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
36 $this->
addColumn($lng->txt(
"crs_materials"),
"object",
"90%");
37 $this->
addColumn($lng->txt(
"status"),
"active", 5);
40 $this->lng->loadLanguageModule(
'sess');
48 global $tree, $objDefinition;
51 $nodes = $tree->getSubTree($tree->getNodeData($this->parent_ref_id));
54 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'))) {
62 if ($node[
'type'] ==
'rolf') {
66 $node[
"sorthash"] = (int) (!in_array($node[
'ref_id'], $this->
getMaterialItems())) . $node[
"title"];
80 $this->tpl->setVariable(
'IMG_ALT', $this->lng->txt(
'obj_' . $a_set[
'type']));
82 $this->tpl->setVariable(
"VAL_POSTNAME",
"items");
83 $this->tpl->setVariable(
"VAL_ID", $a_set[
'ref_id']);
86 $this->tpl->setVariable(
"VAL_CHECKED",
"checked");
89 $this->tpl->setVariable(
"COLL_TITLE", $a_set[
'title']);
91 if (strlen($a_set[
'description'])) {
92 $this->tpl->setVariable(
"COLL_DESC", $a_set[
'description']);
94 $this->tpl->setVariable(
"ASSIGNED_IMG_OK", in_array($a_set[
'ref_id'], $this->
getMaterialItems()) ?
98 $this->tpl->setVariable(
101 $this->lng->txt(
'sess_material_assigned') :
102 $this->lng->txt(
'sess_material_not_assigned')
105 include_once(
'./Services/Tree/classes/class.ilPathGUI.php');
107 $path->enableDisplayCut(
true);
108 $path->enableTextOnly(
false);
109 $this->tpl->setVariable(
"COLL_PATH",
$path->getPath($this->getContainerRefId(), $a_set[
'ref_id']));
118 $this->material_items = $a_set;
136 $this->container_ref_id = $a_set;
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
Creates a path for a start and endnode.
getMaterialItems()
Get Material Items.
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.
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.
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.
getContainerRefId()
Get container ref id.