Skip to content

Commit

Permalink
replaced broken addDesktopItem by addObjectRecommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Neumann committed Apr 7, 2022
1 parent dec1d69 commit 828cac1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions classes/class.ilVhbShibAuthMatching.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ class ilVhbShibAuthMatching
*/
protected $coursesToSelect = [];

/**
* @var ilRecommendedContentManager
*/
protected $recommendedContentManager;

/**
* Constructor
* @param ilVhbShibAuthPlugin $plugin
Expand All @@ -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();
}

/**
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 828cac1

Please sign in to comment.