19 declare(strict_types=1);
34 $this->
lng->loadLanguageModule(
'forum');
42 foreach ($drafts as $draft) {
51 $this->
lng->txt(
'frm_task_publishing_draft_title'),
52 $draft->getPostSubject()
55 $task = $this->taskService->derived()->factory()->task(
63 if (0 === $draft->getThreadId()) {
70 $params[
'draft_id'] = $draft->getDraftId();
71 $cmd =
'editThreadDraft';
73 $params[
'thr_pk'] = $draft->getThreadId();
74 $params[
'pos_pk'] = $draft->getPostId();
76 $anchor =
'draft_' . $draft->getDraftId();
79 foreach (
$params as $name => $value) {
80 $this->
ctrl->setParameterByClass(ilObjForumGUI::class, $name, $value);
82 $url = $this->
ctrl->getLinkTargetByClass(
84 ilRepositoryGUI::class,
90 foreach (array_keys(
$params) as $name) {
91 $this->
ctrl->setParameterByClass(ilObjForumGUI::class, $name,
null);
94 $tasks[] = $task->withUrl(
$url);
103 if ($this->accessHandler->checkAccessOfUser($userId, $operation,
'', $refId)) {
113 return (
bool) $this->
settings->get(
'save_post_drafts',
'0');
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isActive()
Is provider active?
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
static _getAllReferences(int $id)
get all reference ids for object ID
getTasks(int $user_id)
Get providers.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getFirstRefIdWithPermission(string $operation, int $objId, int $userId)
static _lookupObjIdForForumId(int $a_for_id)
static getDraftInstancesByUserId(int $user_id)
Class ilForumDraftsDerivedTaskProvider.
__construct(protected ilTaskService $taskService, protected ilAccessHandler $accessHandler, protected ilLanguage $lng, protected ilSetting $settings, protected ilCtrlInterface $ctrl)