19 declare(strict_types=1);
29 $request = $DIC->repository()->internal()->gui()->standardRequest();
36 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"dash_item_removed"),
true);
37 $this->
ctrl->returnToParent($this);
47 $this->
ctrl->setParameter($this,
'view', $this->viewSettings->getCurrentView());
58 $recommendations = $rec_manager->getOpenRecommendationsOfUser($this->
user->getId());
60 $short_desc = $this->
settings->get(
"rep_shorten_description");
61 $short_desc_max_length = (
int) $this->
settings->get(
"rep_shorten_description_length");
67 if ($short_desc && $short_desc_max_length !== 0) {
74 switch (get_class($obj)) {
75 case ilObjGroup::class:
79 case ilObjCourse::class:
80 $start =
new ilDateTime($obj->getActivationStart());
81 $end =
new ilDateTime($obj->getActivationEnd());
83 case ilObjTest::class:
84 $start =
new ilDateTime($obj->getStartingTime());
100 $this->
setData([
'' => $recommendations]);
110 $this->
ctrl->setParameter($this,
"item_ref_id", $ref_id);
112 $this->
ctrl->getLinkTarget($this,
"removeRecommendation"),
113 "dash_remove_from_list" 121 $rec_manager->declineObjectRecommendation($this->
user->getId(),
$ref_id);
123 $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'pd_remove_multi_confirm'),
true);
124 $this->
ctrl->returnToParent($this);
134 return $this->
lng->txt(
'pd_remove_multiple');
getRemoveMultipleActionText()
removeRecommendationObject()
confirmedRemove(array $ids)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const VIEW_RECOMMENDED_CONTENT
ILIAS Block StandardGUIRequest $request
static _lookupTitle(int $obj_id)
addCustomCommandsToActionMenu(ilObjectListGUI $itemListGui, int $ref_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
int $requested_item_ref_id
static _lookupObjectId(int $ref_id)
static _lookupDescription(int $obj_id)
addCustomCommand(string $link, string $lang_var, string $frame='', string $onclick='')
__construct(Container $dic, ilPlugin $plugin)
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
static _lookupType(int $id, bool $reference=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...