From 2befe3586771d70e37d16c1ba7421c89eb67f13e Mon Sep 17 00:00:00 2001 From: Luka Stocker Date: Mon, 25 Sep 2023 14:41:23 +0200 Subject: [PATCH] PRG: init CRSR with LP from object during auto-content. (#37921) --- Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php b/Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php index 42d4f0b376c1..88043d494a02 100644 --- a/Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php +++ b/Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php @@ -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); } }