3 declare(strict_types=0);
    34         $this->
ctrl->setReturn($this, 
"");
    39             case 'illplistofprogressgui':
    41                 $this->
help->setScreenIdComponent(
    52                 $this->
ctrl->forwardCommand($lop_gui);
    55             case 'illplistofobjectsgui':
    58                         'read_learning_progress',
    64                 if (stristr($this->
ctrl->getCmd(), 
"matrix")) {
    66                 } elseif (stristr($this->
ctrl->getCmd(), 
"summary")) {
    76                 $this->
ctrl->forwardCommand($loo_gui);
    79             case 'illplistofsettingsgui':
    82                         'edit_learning_progress',
    94                 $this->
ctrl->forwardCommand($los_gui);
    97             case 'illpobjectstatisticsgui':
    98                 if (stristr($this->
ctrl->getCmd(), 
"access")) {
   100                 } elseif (stristr($this->
ctrl->getCmd(), 
"types")) {
   102                 } elseif (stristr($this->
ctrl->getCmd(), 
"daily")) {
   108                 $this->tabs_gui->activateTab(
'statistics');
   113                 $this->
ctrl->forwardCommand($ost_gui);
   117                 $cmd = $this->
ctrl->getCmd();
   122                 $this->tpl->printToStdout();
   132         if (strcasecmp(ilLearningProgressGUI::class, $this->
ctrl->getCmdClass()) === 0) {
   133             $this->
ctrl->setCmdClass($a_class);
   145         if (strlen($next_class = $this->
ctrl->getNextClass())) {
   146             if ($this->
getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP) {
   152             case self::LP_CONTEXT_ADMINISTRATION:
   153                 return 'illplistofobjectsgui';
   155             case self::LP_CONTEXT_REPOSITORY:
   156                 $cmd = $this->
ctrl->getCmd();
   159                     array(
"editManual", 
"updatemanual", 
"showtlt")
   168                 if (!$olp->isActive()) {
   171                             'edit_learning_progress',
   174                         return 'illplistofsettingsgui';
   180                 if (!$this->anonymized &&
   182                         'read_learning_progress',
   185                     return 'illplistofobjectsgui';
   189                     'edit_learning_progress',
   192                     return 'illplistofsettingsgui';
   194                 return 'illplistofprogressgui';
   196             case self::LP_CONTEXT_PERSONAL_DESKTOP:
   202                 if ($has_edit || $has_personal) {
   206                         $tgt = 
'illplistofprogressgui';
   207                     } elseif ($has_edit) {
   208                         $tgt = 
'illplistofobjectsgui';
   213                         case 'illplistofobjectsgui':
   219                         case 'illplistofprogressgui':
   220                             if (!$has_personal) {
   237             case self::LP_CONTEXT_USER_FOLDER:
   238             case self::LP_CONTEXT_ORG_UNIT:
   240                     return 'illplistofprogressgui';
   256             if ($olp->getCurrentMode(
   259                 $this->tpl->setContent($form->getHTML());
   267         $form->setFormAction($this->
ctrl->getFormAction($this, 
"updatemanual"));
   268         $form->setTitle($this->
lng->txt(
"learning_progress"));
   269         $form->setDescription(
   270             $this->
lng->txt(
"trac_collection_manual_learner_info")
   273         $coll_items = array();
   276         $collection = $olp->getCollectionInstance();
   279         $possible_items = [];
   281             $coll_items = $collection->getItems();
   282             $possible_items = $collection->getPossibleItems(
   288                     $subitem_title = $this->
lng->txt(
"objs_st");
   289                     $subitem_info = $this->
lng->txt(
   290                         "trac_collection_manual_learner_lm_info"   300         $lp_data = $class::_getObjectStatus($this->
getObjId(), $this->usr_id);
   305         $grp->setInfo($subitem_info);
   306         $form->addItem($grp);
   310         $completed = array();
   311         foreach (array_keys($possible_items) as $item_id) {
   312             if (!in_array($item_id, $coll_items)) {
   319             if (isset($lp_data[$item_id])) {
   321                 $info = $this->
lng->txt(
   322                     "trac_collection_manual_learner_changed_ts"   326                 if ($lp_data[$item_id][0]) {
   328                     $completed[] = $item_id;
   332             $icon = $icons->renderIconForStatus($status);
   335                 $icon . 
" " . $possible_items[$item_id][
"title"],
   339                 $opt->setInfo($info);
   341             $grp->addOption($opt);
   345             $grp->setValue($completed);
   348         $form->addCommandButton(
"updatemanual", $this->
lng->txt(
"save"));
   359             if ($olp->getCurrentMode(
   362                 if ($form->checkInput()) {
   367                     $class::_setObjectStatus(
   370                         $form->getInput(
"sids")
   373                     $this->tpl->setOnScreenMessage(
   382                 $this->
ctrl->redirect($this, 
"editManual");
   390         $form->setFormAction($this->
ctrl->getFormAction($this, 
"showtlt"));
   391         $form->setTitle($this->
lng->txt(
"learning_progress"));
   392         $form->setDescription(
   393             $this->
lng->txt(
"trac_collection_tlt_learner_info")
   396         $coll_items = array();
   399         $collection = $olp->getCollectionInstance();
   400         $possible_items = [];
   402             $coll_items = $collection->getItems();
   403             $possible_items = $collection->getPossibleItems(
   412         $info = $class::_getStatusInfo($this->
getObjId(), 
true);
   416         foreach ($coll_items as $item_id) {
   418             if (!array_key_exists($item_id, $possible_items)) {
   426             if (isset($info[
"completed"][$item_id]) &&
   427                 in_array($this->
user->getId(), $info[
"completed"][$item_id])) {
   429             } elseif (isset($info[
"in_progress"][$item_id]) &&
   431                     $this->
user->getId(),
   432                     $info[
"in_progress"][$item_id]
   436             $field->setHtml($icons->renderIconForStatus($status));
   440             if (isset($info[
"tlt_users"][$item_id][$this->
user->getId()])) {
   441                 $spent = $info[
"tlt_users"][$item_id][$this->
user->getId()];
   443             $needed = $info[
"tlt"][$item_id];
   447                         $this->
lng->txt(
"trac_collection_tlt_learner_subitem"),
   450                         min(100, round(abs($spent) / $needed * 100))
   455             $form->addItem($field);
   458         $this->tpl->setContent($form->getHTML());
 const LP_STATUS_COMPLETED_NUM
 
static get(string $a_var)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _hasLearningProgressLearner()
 
executeCommand()
execute command 
 
const LP_STATUS_IN_PROGRESS_NUM
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
const LP_MODE_COLLECTION_MANUAL
 
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
 
static _hasLearningProgressOtherUsers()
 
const LP_MODE_COLLECTION_TLT
 
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress 
 
static secondsToString(int $seconds, bool $force_with_seconds=false, ?ilLanguage $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ... 
 
static _lookupObjId(int $ref_id)
 
__setCmdClass(string $a_class)
 
static _enabledUserRelatedData()
 
static _enabledLearningProgress()
 
editManual()
Show progress screen for "edit manual". 
 
__setSubTabs(int $a_active)
 
initCollectionManualForm()
 
static _getClassById(int $a_obj_id, ?int $a_mode=null)
 
static redirect(string $a_script)
 
const LP_STATUS_NOT_ATTEMPTED_NUM
 
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks 
 
static _lookupType(int $id, bool $reference=false)
 
static getInstance(int $obj_id)
 
static clear(string $a_var)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static set(string $a_var, $a_val)
Set a value.