22 $this->obj_id = $a_obj_id;
23 $this->mode = $a_mode;
26 $this->
read($a_obj_id);
32 $path =
"Services/Tracking/classes/collection/";
37 include_once
$path .
"class.ilLPCollectionOfRepositoryObjects.php";
41 include_once
$path .
"class.ilLPCollectionOfObjectives.php";
45 include_once
$path .
"class.ilLPCollectionOfSCOs.php";
50 include_once
$path .
"class.ilLPCollectionOfLMChapters.php";
54 include_once
$path .
"class.ilLPCollectionOfMediaObjects.php";
82 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
84 $mappings = $cwo->getMappings();
87 $new_collection =
new static($target_obj_id,
$this->mode);
88 foreach ($this->items as $item) {
89 if (!isset($mappings[$item]) or !$mappings[$item]) {
93 $new_collection->addEntry($mappings[$item]);
96 $ilLog->write(__METHOD__ .
': cloned learning progress collection.');
109 protected function read($a_obj_id)
115 $res = $ilDB->query(
"SELECT * FROM ut_lp_collections" .
116 " WHERE obj_id = " . $ilDB->quote($a_obj_id,
"integer"));
128 public function delete()
132 $query =
"DELETE FROM ut_lp_collections" .
133 " WHERE obj_id = " . $ilDB->quote($this->obj_id,
"integer");
134 $ilDB->manipulate(
$query);
136 $query =
"DELETE FROM ut_lp_coll_manual" .
137 " WHERE obj_id = " . $ilDB->quote($this->obj_id,
"integer");
138 $ilDB->manipulate(
$query);
141 $this->items =
array();
157 if (is_array($this->items)) {
158 return (
bool) in_array($a_item_id, $this->items);
168 $query =
"INSERT INTO ut_lp_collections" .
169 " (obj_id, lpmode, item_id)" .
170 " VALUES (" . $ilDB->quote($this->obj_id,
"integer") .
171 ", " . $ilDB->quote($this->mode,
"integer") .
172 ", " . $ilDB->quote($a_item_id,
"integer") .
174 $ilDB->manipulate(
$query);
175 $this->items[] = $a_item_id;
184 $query =
"DELETE FROM ut_lp_collections" .
185 " WHERE obj_id = " . $ilDB->quote($this->obj_id,
"integer") .
186 " AND item_id = " . $ilDB->quote($a_item_id,
"integer");
187 $ilDB->manipulate(
$query);
193 foreach ($a_item_ids as $item_id) {
200 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.
foreach($_POST as $key=> $value) $res
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()