From 828cac1d72b296bdbb601dc2cb383db5db7c54a1 Mon Sep 17 00:00:00 2001 From: Fred Neumann Date: Thu, 7 Apr 2022 17:35:41 +0200 Subject: [PATCH] replaced broken addDesktopItem by addObjectRecommendation --- classes/class.ilVhbShibAuthMatching.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/classes/class.ilVhbShibAuthMatching.php b/classes/class.ilVhbShibAuthMatching.php index dfc6f55..7c82113 100644 --- a/classes/class.ilVhbShibAuthMatching.php +++ b/classes/class.ilVhbShibAuthMatching.php @@ -30,6 +30,11 @@ class ilVhbShibAuthMatching */ protected $coursesToSelect = []; + /** + * @var ilRecommendedContentManager + */ + protected $recommendedContentManager; + /** * Constructor * @param ilVhbShibAuthPlugin $plugin @@ -43,6 +48,8 @@ public function __construct($plugin) $this->plugin->includeClass('class.ilVhbShibAuthData.php'); $this->data = ilVhbShibAuthData::getInstance()->configure($this->config, $this->plugin); + + $this->recommendedContentManager = new ilRecommendedContentManager(); } /** @@ -194,18 +201,20 @@ public function assignCourse($user_id, $ref_id, $role = 'student') { case 'student': $cp->add($user_id, IL_CRS_MEMBER); + $this->recommendedContentManager->addObjectRecommendation($user_id, $ref_id); break; case 'evaluation': $pattern = $this->config->get('evaluator_role'); $this->assignMatchingCourseRole($user_id, $ref_id, $pattern); - $cp->addDesktopItem($user_id); + $this->recommendedContentManager->addObjectRecommendation($user_id, $ref_id); + break; case 'appr': $pattern = $this->config->get('guest_role'); $this->assignMatchingCourseRole($user_id, $ref_id, $pattern); - $cp->addDesktopItem($user_id); + $this->recommendedContentManager->addObjectRecommendation($user_id, $ref_id); break; } }