22 $this->obj_id = $a_obj_id;
23 $this->mode = $a_mode;
27 $this->
read($a_obj_id);
33 $path =
"Services/Tracking/classes/collection/";
39 include_once
$path.
"class.ilLPCollectionOfRepositoryObjects.php";
43 include_once
$path.
"class.ilLPCollectionOfObjectives.php";
47 include_once
$path.
"class.ilLPCollectionOfSCOs.php";
52 include_once
$path.
"class.ilLPCollectionOfLMChapters.php";
56 include_once
$path.
"class.ilLPCollectionOfMediaObjects.php";
84 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
86 $mappings = $cwo->getMappings();
89 $new_collection =
new static($target_obj_id,
$this->mode);
90 foreach($this->items as $item)
92 if(!isset($mappings[$item])
or !$mappings[$item])
97 $new_collection->addEntry($mappings[$item]);
100 $ilLog->write(__METHOD__.
': cloned learning progress collection.');
113 protected function read($a_obj_id)
119 $res = $ilDB->query(
"SELECT * FROM ut_lp_collections".
120 " WHERE obj_id = ".$ilDB->quote($a_obj_id,
"integer"));
136 public function delete()
140 $query =
"DELETE FROM ut_lp_collections".
141 " WHERE obj_id = ".$ilDB->quote($this->obj_id ,
"integer");
142 $ilDB->manipulate(
$query);
144 $query =
"DELETE FROM ut_lp_coll_manual".
145 " WHERE obj_id = ".$ilDB->quote($this->obj_id,
"integer");
146 $ilDB->manipulate(
$query);
149 $this->items =
array();
165 if(is_array($this->items))
167 return (
bool)in_array($a_item_id, $this->items);
178 $query =
"INSERT INTO ut_lp_collections".
179 " (obj_id, lpmode, item_id)".
180 " VALUES (".$ilDB->quote($this->obj_id ,
"integer").
181 ", ".$ilDB->quote($this->mode,
"integer").
182 ", ".$ilDB->quote($a_item_id ,
"integer").
184 $ilDB->manipulate(
$query);
185 $this->items[] = $a_item_id;
194 $query =
"DELETE FROM ut_lp_collections".
195 " WHERE obj_id = ".$ilDB->quote($this->obj_id,
"integer").
196 " AND item_id = ".$ilDB->quote($a_item_id,
"integer");
197 $ilDB->manipulate(
$query);
203 foreach($a_item_ids as $item_id)
211 foreach($a_item_ids as $item_id)
const LP_MODE_MANUAL_BY_TUTOR
LP collection of objectives.
LP collection of learning module chapters.
const LP_MODE_COLLECTION_MANUAL
const LP_MODE_COLLECTION_TLT
static getInstanceByMode($a_obj_id, $a_mode)
LP collection of repository objects.
cloneCollection($a_target_id, $a_copy_id)
static _getInstance($a_copy_id)
Get instance of copy wizard options.
deactivateEntries(array $a_item_ids)
static _lookupObjId($a_id)
Create styles array
The data for the language used.
LP collection base class.
validateEntry($a_item_id)
__construct($a_obj_id, $a_mode)
isAssignedEntry($a_item_id)
const LP_MODE_COLLECTION_MOBS
activateEntries(array $a_item_ids)
static getCollectionModes()