ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

- 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

ilLPCollectionOfLMChapters::getPossibleItems (   $a_ref_id)

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

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

Referenced by getTableGUIData().

{
if(!isset(self::$possible_items[$a_ref_id]))
{
$items = array();
// only top-level chapters
include_once "Services/MetaData/classes/class.ilMDEducational.php";
$tree = new ilTree($obj_id);
$tree->setTableNames('lm_tree','lm_data');
$tree->setTreeTablePK("lm_id");
foreach ($tree->getChilds($tree->readRootId()) as $child)
{
if($child["type"] == "st")
{
$child["tlt"] = ilMDEducational::_getTypicalLearningTimeSeconds($obj_id, $child["obj_id"]);
$items[$child["obj_id"]] = $child;
}
}
self::$possible_items[$a_ref_id] = $items;
}
return self::$possible_items[$a_ref_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPCollectionOfLMChapters::getTableGUIData (   $a_parent_ref_id)

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

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

{
$data = array();
$parent_type = ilObject::_lookupType($a_parent_ref_id, true);
include_once './Services/Link/classes/class.ilLink.php';
foreach ($this->getPossibleItems($a_parent_ref_id) as $item)
{
$tmp = array();
$tmp['id'] = $item['obj_id'];
$tmp['ref_id'] = 0;
$tmp['title'] = $item['title'];
$tmp['type'] = $item['type'];
$tmp['status'] = $this->isAssignedEntry($item['obj_id']);
// #12158
$tmp['url'] = ilLink::_getLink($a_parent_ref_id, $parent_type, null, "_".$tmp['id']);
{
$tmp['tlt'] = $item['tlt'];
}
$data[] = $tmp;
}
return $data;
}

+ Here is the call graph for this function:

Field Documentation

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: