ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLPCollectionOfLMChapters Class Reference

LP collection of learning module chapters. More...

+ Inheritance diagram for ilLPCollectionOfLMChapters:
+ Collaboration diagram for ilLPCollectionOfLMChapters:

Public Member Functions

 getPossibleItems ($a_ref_id)
 
 getTableGUIData ($a_parent_ref_id)
 
- Public Member Functions inherited from ilLPCollection
 __construct ($a_obj_id, $a_mode)
 
 hasSelectableItems ()
 
 cloneCollection ($a_target_id, $a_copy_id)
 
 getItems ()
 
 delete ()
 
 isAssignedEntry ($a_item_id)
 
 deactivateEntries (array $a_item_ids)
 
 activateEntries (array $a_item_ids)
 

Static Protected Attributes

static $possible_items = array()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLPCollection
static getInstanceByMode ($a_obj_id, $a_mode)
 
static getCollectionModes ()
 
- Protected Member Functions inherited from ilLPCollection
 read ()
 
 validateEntry ($a_item_id)
 
 addEntry ($a_item_id)
 
 deleteEntry ($a_item_id)
 
- Protected Attributes inherited from ilLPCollection
 $obj_id
 
 $mode
 
 $items
 

Detailed Description

LP collection of learning module chapters.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id
class.ilLPCollections.php 40326 2013-03-05 11:39:24Z jluetzen

Definition at line 16 of file class.ilLPCollectionOfLMChapters.php.

Member Function Documentation

◆ getPossibleItems()

ilLPCollectionOfLMChapters::getPossibleItems (   $a_ref_id)

Definition at line 20 of file class.ilLPCollectionOfLMChapters.php.

21 {
22 if(!isset(self::$possible_items[$a_ref_id]))
23 {
25
26 $items = array();
27
28 // only top-level chapters
29
30 include_once "Services/MetaData/classes/class.ilMDEducational.php";
31 $tree = new ilTree($obj_id);
32 $tree->setTableNames('lm_tree','lm_data');
33 $tree->setTreeTablePK("lm_id");
34 foreach ($tree->getChilds($tree->readRootId()) as $child)
35 {
36 if($child["type"] == "st")
37 {
38 $child["tlt"] = ilMDEducational::_getTypicalLearningTimeSeconds($obj_id, $child["obj_id"]);
39 $items[$child["obj_id"]] = $child;
40 }
41 }
42
43 self::$possible_items[$a_ref_id] = $items;
44 }
45
46 return self::$possible_items[$a_ref_id];
47 }
_getTypicalLearningTimeSeconds($a_rbac_id, $a_obj_id=0)
static _lookupObjectId($a_ref_id)
lookup object id
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...

References ilLPCollection\$items, ilLPCollection\$obj_id, ilMDEducational\_getTypicalLearningTimeSeconds(), and ilObject\_lookupObjectId().

Referenced by getTableGUIData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTableGUIData()

ilLPCollectionOfLMChapters::getTableGUIData (   $a_parent_ref_id)

Definition at line 54 of file class.ilLPCollectionOfLMChapters.php.

55 {
56 $data = array();
57
58 $parent_type = ilObject::_lookupType($a_parent_ref_id, true);
59 include_once './Services/Link/classes/class.ilLink.php';
60
61 foreach ($this->getPossibleItems($a_parent_ref_id) as $item)
62 {
63 $tmp = array();
64 $tmp['id'] = $item['obj_id'];
65 $tmp['ref_id'] = 0;
66 $tmp['title'] = $item['title'];
67 $tmp['type'] = $item['type'];
68 $tmp['status'] = $this->isAssignedEntry($item['obj_id']);
69
70 // #12158
71 $tmp['url'] = ilLink::_getLink($a_parent_ref_id, $parent_type, null, "_".$tmp['id']);
72
74 {
75 $tmp['tlt'] = $item['tlt'];
76 }
77
78 $data[] = $tmp;
79 }
80
81 return $data;
82 }
isAssignedEntry($a_item_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
$data

References $data, ilLink\_getLink(), ilObject\_lookupType(), getPossibleItems(), ilLPCollection\isAssignedEntry(), and ilLPObjSettings\LP_MODE_COLLECTION_TLT.

+ Here is the call graph for this function:

Field Documentation

◆ $possible_items

ilLPCollectionOfLMChapters::$possible_items = array()
staticprotected

Definition at line 18 of file class.ilLPCollectionOfLMChapters.php.


The documentation for this class was generated from the following file: