19 declare(strict_types=0);
    38         $this->objective_id = $a_objective_id;
    40         $this->
setId(
'tbl_crs_obj_mat_assignment');
    42         $this->
lng->loadLanguageModule(
'crs');
    46         $this->
addColumn($this->
lng->txt(
'type'), 
'type', 
"1px");
    47         $this->
addColumn($this->
lng->txt(
'title'), 
'title', 
'99%');
    49         $this->
setRowTemplate(
"tpl.crs_objective_list_materials_row.html", 
"components/ILIAS/Course");
    57     protected function fillRow(array $a_set): void
    59         foreach ($a_set[
'sub'] as $sub_data) {
    61             for ($i = $sub_data[
'depth']; $i > 1; $i--) {
    62                 $this->tpl->touchBlock(
'begin_depth');
    63                 $this->tpl->touchBlock(
'end_depth');
    66             $this->tpl->setCurrentBlock(
'chapter');
    68             if ($this->objective_lm->isChapterAssigned($a_set[
'id'], $sub_data[
'id'])) {
    69                 $this->tpl->setVariable(
'CHAP_CHECKED', 
'checked="checked"');
    73             $this->tpl->setVariable(
'CHAP_ID', $a_set[
'id'] . 
'_' . $sub_data[
'id']);
    74             $this->tpl->setVariable(
'CHAP_TYPE_IMG', 
ilObject::_getIcon((
int) $sub_data[
'id'], 
"tiny", $sub_data[
'type']));
    75             $this->tpl->setVariable(
'CHAP_TYPE_ALT', $this->
lng->txt(
'obj_' . $sub_data[
'type']));
    76             $this->tpl->parseCurrentBlock();
    78         if (count($a_set[
'sub']) > 0) {
    79             $this->tpl->setVariable(
'TXT_CHAPTER', $this->
lng->txt(
'objs_st'));
    82         $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
    84         if ($this->objective_lm->isAssigned($a_set[
'id'])) {
    85             $this->tpl->setVariable(
'VAL_CHECKED', 
'checked="checked"');
    88         $this->tpl->setVariable(
'ROW_TYPE_IMG', 
ilObject::_getIcon((
int) $a_set[
'obj_id'], 
"tiny", $a_set[
'type']));
    89         $this->tpl->setVariable(
'ROW_TYPE_ALT', $this->
lng->txt(
'obj_' . $a_set[
'type']));
    91         $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
    92         if (strlen($a_set[
'description']) !== 0) {
    93             $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
    97     public function parse(array $a_assignable): void
   100         foreach ($a_assignable as $node) {
   107             $subobjects = array();
   108             if ($node[
'type'] == 
'lm') {
   110                 foreach ($chapters = $this->
getAllSubObjects($node[
'child']) as $chapter => $chapter_data) {
   112                     $sub[
'id'] = $chapter;
   113                     $sub[
'depth'] = $chapter_data[
'depth'];
   114                     $sub[
'type'] = $chapter_data[
'type'];
   116                     $subobjects[] = $sub;
   119             $tmp_data[
'sub'] = $subobjects;
   120             $tmp_data[
'title'] = $node[
'title'];
   121             $tmp_data[
'description'] = $node[
'description'];
   122             $tmp_data[
'type'] = $node[
'type'];
   123             $tmp_data[
'id'] = $node[
'child'];
   124             $tmp_data[
'obj_id'] = $node[
'obj_id'];
   125             $materials[] = $tmp_data;
   133         $tree->setTableNames(
'lm_tree', 
'lm_data');
   134         $tree->setTreeTablePK(
"lm_id");
   136         foreach ($tree->getSubTree($tree->getNodeData($tree->getRootId())) as $node) {
   137             if ($node[
'type'] == 
'st' || $node[
'type'] == 
'pg') {
   138                 $depth = $node[
'depth'] - 1;
   139                 $child = $node[
'child'];
   140                 $chapter[$child][
'depth'] = $depth;
   141                 $chapter[$child][
'type'] = $node[
'type'];
 setNoEntriesText(string $a_text)
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item. 
 
parse(array $a_assignable)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
getAllSubObjects(int $a_ref_id)
 
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
TableGUI for material assignments of course objectives. 
 
setFormName(string $a_name="")
 
static _lookupObjId(int $ref_id)
 
static _lookupTitle(int $a_obj_id)
 
class ilCourseObjectiveMaterials 
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
setDefaultOrderField(string $a_defaultorderfield)
 
initObjectiveAssignments()
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
ilObjectDefinition $objectDefinition
 
__construct(Container $dic, ilPlugin $plugin)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
ilCourseObjectiveMaterials $objective_lm
 
__construct(object $a_parent_obj, ilObject $a_course_obj, int $a_objective_id)