ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLPCollectionOfMediaObjects Class Reference

LP collection of media objects. More...

+ Inheritance diagram for ilLPCollectionOfMediaObjects:
+ Collaboration diagram for ilLPCollectionOfMediaObjects:

Public Member Functions

 getPossibleItems ()
 
 getTableGUIData ($a_parent_ref_id)
 
 cloneCollection ($a_target_id, $a_copy_id, $mob_mapping=null)
 Scorm items are not copied, they are newly created by reading the manifest. More...
 
- 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 ($a_obj_id)
 
 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 media objects.

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 15 of file class.ilLPCollectionOfMediaObjects.php.

Member Function Documentation

◆ cloneCollection()

ilLPCollectionOfMediaObjects::cloneCollection (   $a_target_id,
  $a_copy_id,
  $mob_mapping = null 
)

Scorm items are not copied, they are newly created by reading the manifest.

Therefore, they do not have a mapping. So we need to map them via the import_id/identifierref

Parameters
$a_target_id
$a_copy_id

Definition at line 67 of file class.ilLPCollectionOfMediaObjects.php.

68 {
69 global $DIC;
70
71 $target_obj_id = ilObject::_lookupObjId($a_target_id);
72 $new_collection = new static($target_obj_id, $this->mode);
73 $possible_items = $new_collection->getPossibleItems();
74 foreach ($this->items as $item_id) {
75 if (isset($mob_mapping[$item_id]) && isset($possible_items[$mob_mapping[$item_id]])) {
76 $new_collection->addEntry($mob_mapping[$item_id]);
77 }
78 }
79
80 $DIC->logger()->root()->write(__METHOD__ . ': cloned learning progress collection.');
81 }
static _lookupObjId($a_id)
$DIC
Definition: xapitoken.php:46

References $DIC, ilLPCollection\$mode, $possible_items, and ilObject\_lookupObjId().

+ Here is the call graph for this function:

◆ getPossibleItems()

ilLPCollectionOfMediaObjects::getPossibleItems ( )

Definition at line 19 of file class.ilLPCollectionOfMediaObjects.php.

20 {
21 if (!isset(self::$possible_items[$this->obj_id])) {
22 $items = array();
23
24 include_once "Modules/MediaCast/classes/class.ilObjMediaCast.php";
25 $cast = new ilObjMediaCast($this->obj_id, false);
26
27 foreach ($cast->getSortedItemsArray() as $item) {
28 $items[$item["mob_id"]] = array("title" => $item["title"]);
29 }
30
31 self::$possible_items[$this->obj_id] = $items;
32 }
33
34 return self::$possible_items[$this->obj_id];
35 }
Class ilObjMediaCast.

References ilLPCollection\$items, and ilLPCollection\$obj_id.

Referenced by getTableGUIData().

+ Here is the caller graph for this function:

◆ getTableGUIData()

ilLPCollectionOfMediaObjects::getTableGUIData (   $a_parent_ref_id)

Definition at line 42 of file class.ilLPCollectionOfMediaObjects.php.

43 {
44 $data = array();
45
46 foreach ($this->getPossibleItems() as $mob_id => $item) {
47 $tmp = array();
48 $tmp['id'] = $mob_id;
49 $tmp['ref_id'] = 0;
50 $tmp['type'] = 'mob';
51 $tmp['title'] = $item['title'];
52 $tmp['status'] = $this->isAssignedEntry($mob_id);
53
54 $data[] = $tmp;
55 }
56
57 return $data;
58 }
isAssignedEntry($a_item_id)
$data
Definition: storeScorm.php:23

References $data, getPossibleItems(), and ilLPCollection\isAssignedEntry().

+ Here is the call graph for this function:

Field Documentation

◆ $possible_items

ilLPCollectionOfMediaObjects::$possible_items = array()
staticprotected

Definition at line 17 of file class.ilLPCollectionOfMediaObjects.php.

Referenced by cloneCollection().


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