19declare(strict_types=1);
37 $view_factory =
new ViewFactory();
38 $this->data_retrieval = $view_factory->dataRetrieval();
39 $this->tracking_renderer = $view_factory->renderer()->service();
41 $this->
lng->loadLanguageModule(
'trac');
44 $this->
setTitle($this->
lng->txt(
'trac_progress_block_title'));
61 $filter = $this->data_retrieval
64 ->withUserIds($this->
user->getId());
65 $lp_info = $this->data_retrieval
67 ->retrieveViewInfo($filter)
71 $status = $lp_info->getLPStatus();
73 $progress = $this->tracking_renderer->fixedSizeProgressMeter($lp_info);
74 $mode_and_status = $this->
ui->factory()->item()->standard(
77 $this->
lng->txt(
'trac_mode_collection')
80 return $this->
ui->renderer()->render([
88 $read_only_allowed =
true;
95 $this->
ctrl->setParameterByClass(ilLearningProgressGUI::class,
'ref_id', $this->requested_ref_id);
96 $link = $this->
ctrl->getLinkTargetByClass(ilLearningProgressGUI::class);
97 $this->
ctrl->clearParameterByClass(ilLearningProgressGUI::class,
'ref_id');
106 }
catch (Exception) {
This class represents a block method of a block.
setTitle(string $a_title)
setPresentation(int $type)
addBlockCommand(string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
setBlockId(string $a_block_id="0")
@ilCtrl_IsCalledBy ilLPProgressBlockGUI: ilColumnGUI
DataRetrievalFactoryInterface $data_retrieval
RendererInterface $tracking_renderer
supportsMembers(int $ref_id)
getLegacyContent()
Get legacy content.
isRepositoryObject()
Returns whether block has a corresponding repository object.
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
static _lookupObjectId(int $ref_id)
static getInstance(int $a_ref_id)
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc