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";
 
   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) {
 
   91            if (!isset($mappings[$item]) or !$mappings[$item]) {
 
   95            $new_collection->addEntry($mappings[$item]);
 
   98        $ilLog->write(__METHOD__ . 
': cloned learning progress collection.');
 
  111    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"));
 
  132    public function delete()
 
  138        $query = 
"DELETE FROM ut_lp_collections" .
 
  139            " WHERE obj_id = " . 
$ilDB->quote($this->obj_id, 
"integer");
 
  142        $query = 
"DELETE FROM ut_lp_coll_manual" .
 
  143            " WHERE obj_id = " . 
$ilDB->quote($this->obj_id, 
"integer");
 
  147        $this->items = array();
 
  163        if (is_array($this->items)) {
 
  164            return (
bool) in_array($a_item_id, $this->items);
 
  176            $query = 
"INSERT INTO ut_lp_collections" .
 
  177                " (obj_id, lpmode, item_id)" .
 
  178                " VALUES (" . 
$ilDB->quote($this->obj_id, 
"integer") .
 
  179                ", " . 
$ilDB->quote($this->mode, 
"integer") .
 
  180                ", " . 
$ilDB->quote($a_item_id, 
"integer") .
 
  183            $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");
 
  203        foreach ($a_item_ids as $item_id) {
 
  210        foreach ($a_item_ids as $item_id) {
 
An exception for terminatinating execution or to throw for unit testing.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
LP collection of learning module chapters.
LP collection of objectives.
LP collection of repository objects.
LP collection base class.
isAssignedEntry($a_item_id)
validateEntry($a_item_id)
static getCollectionModes()
activateEntries(array $a_item_ids)
cloneCollection($a_target_id, $a_copy_id)
__construct($a_obj_id, $a_mode)
deactivateEntries(array $a_item_ids)
static getInstanceByMode($a_obj_id, $a_mode)
const LP_MODE_COLLECTION_TLT
const LP_MODE_COLLECTION_MANUAL
const LP_MODE_MANUAL_BY_TUTOR
const LP_MODE_COLLECTION_MOBS
static _lookupObjId($a_id)
foreach($_POST as $key=> $value) $res