Skip to content

Commit

Permalink
PRG: init CRSR with LP from object during auto-content. (#37921)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastocker committed Sep 25, 2023
1 parent 310fa96 commit 2befe35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,10 @@ public static function addCrsToProgrammes(int $crs_ref_id, int $cat_ref_id) : vo
$course_ref->setPermissions($crs_ref_id);
$course_ref->setTargetId(ilObject::_lookupObjectId($crs_ref_id));
$course_ref->update();
$lp = new ilLPObjSettings($course_ref->getId());
$lp->insert();
$lp->setMode($lp::LP_MODE_COURSE_REFERENCE);
$lp->update(false);
}
}

Expand Down

0 comments on commit 2befe35

Please sign in to comment.