From f15735598c5d6bc0b9d57ad2beeec549041bd7db Mon Sep 17 00:00:00 2001 From: jheim2 Date: Thu, 10 Oct 2024 11:16:46 +0200 Subject: [PATCH] Update EContentId when course is updated during AttributeMapping process --- .../classes/Course/class.ilECSCourseCreationHandler.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Services/WebServices/ECS/classes/Course/class.ilECSCourseCreationHandler.php b/Services/WebServices/ECS/classes/Course/class.ilECSCourseCreationHandler.php index def771bbd778..ab066f8e766a 100644 --- a/Services/WebServices/ECS/classes/Course/class.ilECSCourseCreationHandler.php +++ b/Services/WebServices/ECS/classes/Course/class.ilECSCourseCreationHandler.php @@ -156,10 +156,14 @@ protected function doAttributeMapping($a_content_id, $course): bool if ($obj_id) { // do update $this->logger->debug('Performing update of already imported course.'); - + $refs = ilObject::_getAllReferences($obj_id); $ref = end($refs); - + + $import = new ilECSImport($this->getServer()->getServerId(), $obj_id); + $import->setEContentId((string) $a_content_id); + $import->save(); + $this->doSync( $a_content_id, $course,