3 declare(strict_types=0);
    82         $this->tpl = $DIC->ui()->mainTemplate();
    83         $this->
help = $DIC->help();
    84         $this->
ctrl = $DIC->ctrl();
    85         $this->
lng = $DIC->language();
    86         $this->
lng->loadLanguageModule(
'trac');
    87         $this->tabs_gui = $DIC->tabs();
    88         $this->
toolbar = $DIC->toolbar();
    90         $this->
user = $DIC->user();
    91         $this->
access = $DIC->access();
    92         $this->rbacsystem = $DIC->rbac()->system();
    93         $this->rbacreview = $DIC->rbac()->review();
    94         $this->tree = $DIC->repositoryTree();
    96         $this->
http = $DIC->http();
    99         $this->mode = $a_mode;
   100         $this->ref_id = $a_ref_id;
   103         $this->usr_id = $a_usr_id;
   106         if (!$this->anonymized && $this->obj_id) {
   108             $this->anonymized = $olp->isAnonymized();
   110         $this->
logger = $DIC->logger()->trac();
   135         if ($this->
http->wrapper()->query()->has(
'user_id')) {
   136             return $this->
http->wrapper()->query()->retrieve(
   157         if (strlen($cmd = $this->
ctrl->getCmd())) {
   166             case self::LP_CONTEXT_PERSONAL_DESKTOP:
   170                     $this->tabs_gui->addTarget(
   172                         $this->
ctrl->getLinkTargetByClass(
   173                             'illplistofprogressgui',
   179                         $a_active == self::LP_ACTIVE_PROGRESS
   184                     $this->tabs_gui->addTarget(
   186                         $this->
ctrl->getLinkTargetByClass(
   187                             "illplistofobjectsgui",
   193                         $a_active == self::LP_ACTIVE_OBJECTS
   198             case self::LP_CONTEXT_REPOSITORY:
   201                 if ($olp->isActive()) {
   203                         'read_learning_progress',
   208                         $this->
ctrl->setParameterByClass(
   209                             'illplistofprogressgui',
   213                         $this->tabs_gui->addSubTabTarget(
   215                             $this->
ctrl->getLinkTargetByClass(
   216                                 'illplistofprogressgui',
   222                             $a_active == self::LP_ACTIVE_PROGRESS
   234                         $this->tabs_gui->addSubTabTarget(
   236                             $this->
ctrl->getLinkTargetByClass(
   237                                 "illplistofobjectsgui",
   243                             $a_active == self::LP_ACTIVE_OBJECTS
   251                             $this->tabs_gui->addSubTabTarget(
   253                                 $this->
ctrl->getLinkTargetByClass(
   254                                     "illplistofobjectsgui",
   255                                     'showUserObjectMatrix'   260                                 $a_active == self::LP_ACTIVE_MATRIX
   264                         $this->tabs_gui->addSubTabTarget(
   266                             $this->
ctrl->getLinkTargetByClass(
   267                                 "illplistofobjectsgui",
   273                             $a_active == self::LP_ACTIVE_SUMMARY
   279                         'edit_learning_progress',
   282                     $this->tabs_gui->addSubTabTarget(
   284                         $this->
ctrl->getLinkTargetByClass(
   285                             'illplistofsettingsgui',
   291                         $a_active == self::LP_ACTIVE_SETTINGS
   296             case self::LP_CONTEXT_ADMINISTRATION:
   302                 $this->tabs_gui->addSubTabTarget(
   304                     $this->
ctrl->getLinkTargetByClass(
   305                         "illplistofobjectsgui",
   311                     $a_active == self::LP_ACTIVE_OBJECTS
   315             case self::LP_CONTEXT_USER_FOLDER:
   316             case self::LP_CONTEXT_ORG_UNIT:
   321                 die(
'No valid mode given');
   329             case self::LP_CONTEXT_PERSONAL_DESKTOP:
   330                 $this->tpl->printToStdout();
   348         $lng = $DIC->language();
   366                 return $a_lng->txt((
string) $a_status);
   376         bool $add_section = 
true   378         $details_id = $item_id ?: $this->details_id;
   381         $mode = $olp->getCurrentMode();
   391                     $this->
lng->txt(
'trac_required_visits'),
   400                     $this->
lng->txt(
'meta_typical_learning_time'),
   425             $this->
lng->txt(
'trac_mode'),
   426             $olp->getModeText($olp->getCurrentMode())
   436                 $this->
lng->txt(
'trac_status'),
   445                     "tpl.lp_edit_manual_info_page.html",
   452                     $this->
lng->txt(
"trac_info_edited")
   462                         [0 => $this->
lng->txt(
'trac_not_completed'),
   463                          1 => $this->
lng->txt(
'trac_completed')
   469                 $i_tpl->setVariable(
"TXT_SAVE", $this->
lng->txt(
"save"));
   470                 $info->
addProperty($this->
lng->txt(
'trac_status'), $i_tpl->get());
   474             $mode = $olp->getCurrentMode();
   493                     $this->
lng->txt(
'trac_percentage'),
   510         if (in_array($type, [
"lm", 
"htlm"])) {
   512             if ($progress[
'access_time'] ?? 
false) {
   514                     $this->
lng->txt(
'trac_last_access'),
   521                     $this->
lng->txt(
'trac_last_access'),
   522                     $this->
lng->txt(
'trac_not_accessed')
   527                 $this->
lng->txt(
'trac_visits'),
   528                 (string) ($progress[
'visits'] ?? 
"")
   533                     $this->
lng->txt(
'trac_spent_time'),
   535                         $progress[
'spent_seconds']
   543     public static function __readStatus(
int $a_obj_id, 
int $user_id): string
   568             "tpl.lp_legend.html",
   591             $this->
lng->txt(
"trac_not_attempted")
   595             $this->
lng->txt(
"trac_in_progress")
   599             $this->
lng->txt(
"trac_completed")
   603             $this->
lng->txt(
"trac_failed")
   608         $panel->setBody($tpl->
get());
   610         return $panel->getHTML();
   616         ?
string $a_cancel = null
   619         $lp_mode = $olp->getCurrentMode();
   623         $form->setFormAction($this->
ctrl->getFormAction($this, 
"updateUser"));
   628         $form->setDescription(
   629             $this->
lng->txt(
'trac_mode') . 
": " . $olp->getModeText($lp_mode)
   634         $form->addItem($user);
   636         $marks = 
new ilLPMarks($a_obj_id, $a_user_id);
   640             $mark->setValue($marks->getMark());
   641             $mark->setMaxLength(32);
   642             $form->addItem($mark);
   646         $comm->setValue($marks->getComment());
   647         $form->addItem($comm);
   654                 $this->
lng->txt(
'trac_completed'),
   660             $form->addItem($status);
   663         $form->addCommandButton(
"updateUser", $this->
lng->txt(
'save'));
   666             $form->addCommandButton($a_cancel, $this->
lng->txt(
'cancel'));
   675         ?
string $a_cancel = null,
   681             $this->
ctrl->setParameter($this, 
'userdetails_id', $a_sub_id);
   684         $this->
ctrl->setParameter($this, 
'user_id', $a_user_id);
   685         $this->
ctrl->setParameter($this, 
'details_id', $a_ref_id);
   687         return $form->getHTML();
   693         if ($form->checkInput()) {
   694             $marks = 
new ilLPMarks($obj_id, $user_id);
   695             $marks->setMark($form->getInput(
"mark"));
   696             $marks->setComment($form->getInput(
"comment"));
   701             $status = $form->getItemByPostVar(
"completed");
   702             if (is_object($status)) {
   703                 if ($marks->getCompleted() != $form->getInput(
"completed")) {
   704                     $marks->setCompleted($form->getInput(
"completed"));
   730         $objDefinition = $DIC[
'objDefinition'];
   731         $ilObjDataCache = $DIC[
'ilObjDataCache'];
   734             $a_type = $ilObjDataCache->lookupType($a_obj_id);
   737         if ($objDefinition->isPluginTypeName($a_type)) {
   740         $class = 
"ilObj" . $objDefinition->getClassName($a_type) . 
"Access";
   741         return (
bool) $class::_isOffline($a_obj_id);
 const LP_STATUS_COMPLETED_NUM
 
static _lookupVisits(int $a_obj_id)
 
const LP_MODE_CMIX_COMPLETED
 
ilObjectDataCache $ilObjectDataCache
 
const LP_MODE_CMIX_COMPLETED_OR_PASSED
 
__showEditUser(int $a_user_id, int $a_ref_id, ?string $a_cancel=null, int $a_sub_id=0)
 
static _lookupComment(int $a_usr_id, int $a_obj_id)
 
static _getProgress(int $a_user_id, int $a_obj_id)
 
const LP_MODE_MANUAL_BY_TUTOR
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
__showObjectDetails(ilInfoScreenGUI $info, int $item_id=0, bool $add_section=true)
show details about current object. 
 
static isSupportedObjectType(string $type)
 
const LP_MODE_CMIX_PASSED_WITH_FAILED
 
static _hasLearningProgressLearner()
 
static supportsMatrixView(string $obj_type)
 
const LP_STATUS_NOT_ATTEMPTED
 
const LP_MODE_CMIX_PASSED
 
static _lookupPercentage(int $a_obj_id, int $a_user_id)
Lookup percentage. 
 
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section 
 
const LP_STATUS_IN_PROGRESS_NUM
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
 
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string. 
 
static _hasLearningProgressOtherUsers()
 
__updateUser(int $user_id, int $obj_id)
 
setVariable(string $variable, $value='')
Sets the given variable to the given value. 
 
const LP_ACTIVE_OBJSTATADMIN
 
const LP_CONTEXT_USER_FOLDER
 
static secondsToString(int $seconds, bool $force_with_seconds=false, ?ilLanguage $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ... 
 
const LP_CONTEXT_ADMINISTRATION
 
initEditUserForm(int $a_user_id, int $a_obj_id, ?string $a_cancel=null)
 
const LP_STATUS_IN_PROGRESS
 
const LP_MODE_CMIX_COMPL_WITH_FAILED
 
static _lookupObjId(int $ref_id)
 
static _hasCompleted(int $a_usr_id, int $a_obj_id)
 
static _getTypicalLearningTimeSeconds(int $a_rbac_id, int $a_obj_id=0)
 
static _enabledUserRelatedData()
 
static http()
Fetches the global http state from ILIAS. 
 
const LP_ACTIVE_OBJSTATDAILY
 
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is: 
 
static _lookupTitle(int $obj_id)
 
RefineryFactory $refinery
 
__setSubTabs(int $a_active)
 
const LP_MODE_TEST_PASSED
 
addSection(string $a_title)
 
const LP_CONTEXT_PERSONAL_DESKTOP
 
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text. 
 
static _lookupStatus(int $a_obj_id, int $a_user_id, bool $a_create=true)
Lookup status. 
 
const LP_CONTEXT_ORG_UNIT
 
const LP_STATUS_NOT_ATTEMPTED_NUM
 
static _lookupMark(int $a_usr_id, int $a_obj_id)
 
__construct(int $a_mode, int $a_ref_id=0, int $a_usr_id=0)
 
static __readStatus(int $a_obj_id, int $user_id)
PhpInconsistentReturnPointsInspection 
 
__appendLPDetails(ilInfoScreenGUI $info, int $item_id, int $user_id)
 
const LP_ACTIVE_OBJSTATTYPES
 
const LP_CONTEXT_REPOSITORY
 
const LP_MODE_CMIX_COMPL_OR_PASSED_WITH_FAILED
 
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks 
 
const PANEL_STYLE_SECONDARY
 
__getLegendHTML(int $variant=ilLPStatusIcons::ICON_VARIANT_LONG)
 
const LP_ACTIVE_OBJSTATACCESS
 
static supportsMark(string $obj_type)
 
static _lookupType(int $id, bool $reference=false)
 
ilGlobalTemplateInterface $tpl
 
static isObjectOffline(int $a_obj_id, string $a_type='')
 
const LP_STATUS_COMPLETED
 
const LP_MODE_LTI_OUTCOME
 
static getInstance(int $obj_id)
 
const LP_STATUS_FAILED_NUM
 
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)