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();
   136             strtolower($this->
ctrl->getCmdClass()) !== strtolower($a_class) &&
   137             strtolower($this->
ctrl->getNextClass()) !== strtolower($a_class)
   139             $this->
ctrl->redirectByClass($a_class);
   150         if (strlen($next_class = $this->
ctrl->getNextClass())) {
   151             if ($this->
getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP) {
   157             case self::LP_CONTEXT_REPOSITORY:
   158                 $cmd = $this->
ctrl->getCmd();
   161                     array(
"editManual", 
"updatemanual", 
"showtlt")
   170                 if (!$olp->isActive()) {
   173                             'edit_learning_progress',
   176                         return 'illplistofsettingsgui';
   182                 if (!$this->anonymized &&
   184                         'read_learning_progress',
   187                     return 'illplistofobjectsgui';
   191                         'edit_learning_progress',
   194                     return 'illplistofsettingsgui';
   196                 return 'illplistofprogressgui';
   198             case self::LP_CONTEXT_PERSONAL_DESKTOP:
   204                 if ($has_edit || $has_personal) {
   208                         $tgt = 
'illplistofprogressgui';
   209                     } elseif ($has_edit) {
   210                         $tgt = 
'illplistofobjectsgui';
   215                         case 'illplistofobjectsgui':
   221                         case 'illplistofprogressgui':
   222                             if (!$has_personal) {
   239             case self::LP_CONTEXT_USER_FOLDER:
   240             case self::LP_CONTEXT_ORG_UNIT:
   242                     return 'illplistofprogressgui';
   258             if ($olp->getCurrentMode(
   261                 $this->tpl->setContent($form->getHTML());
   269         $form->setFormAction($this->
ctrl->getFormAction($this, 
"updatemanual"));
   270         $form->setTitle($this->
lng->txt(
"learning_progress"));
   271         $form->setDescription(
   272             $this->
lng->txt(
"trac_collection_manual_learner_info")
   275         $coll_items = array();
   278         $collection = $olp->getCollectionInstance();
   281         $possible_items = [];
   283             $coll_items = $collection->getItems();
   284             $possible_items = $collection->getPossibleItems(
   290                     $subitem_title = $this->
lng->txt(
"objs_st");
   291                     $subitem_info = $this->
lng->txt(
   292                         "trac_collection_manual_learner_lm_info"   302         $lp_data = $class::_getObjectStatus($this->
getObjId(), $this->usr_id);
   307         $grp->setInfo($subitem_info);
   308         $form->addItem($grp);
   312         $completed = array();
   313         foreach (array_keys($possible_items) as $item_id) {
   314             if (!in_array($item_id, $coll_items)) {
   321             if (isset($lp_data[$item_id])) {
   323                 $info = $this->
lng->txt(
   324                     "trac_collection_manual_learner_changed_ts"   328                 if ($lp_data[$item_id][0]) {
   330                     $completed[] = $item_id;
   334             $icon = $icons->renderIconForStatus($status);
   337                 $icon . 
" " . $possible_items[$item_id][
"title"],
   341                 $opt->setInfo($info);
   343             $grp->addOption($opt);
   347             $grp->setValue($completed);
   350         $form->addCommandButton(
"updatemanual", $this->
lng->txt(
"save"));
   361             if ($olp->getCurrentMode(
   364                 if ($form->checkInput()) {
   369                     $class::_setObjectStatus(
   372                         $form->getInput(
"sids")
   375                     $this->tpl->setOnScreenMessage(
   384                 $this->
ctrl->redirect($this, 
"editManual");
   392         $form->setFormAction($this->
ctrl->getFormAction($this, 
"showtlt"));
   393         $form->setTitle($this->
lng->txt(
"learning_progress"));
   394         $form->setDescription(
   395             $this->
lng->txt(
"trac_collection_tlt_learner_info")
   398         $coll_items = array();
   401         $collection = $olp->getCollectionInstance();
   402         $possible_items = [];
   404             $coll_items = $collection->getItems();
   405             $possible_items = $collection->getPossibleItems(
   414         $info = $class::_getStatusInfo($this->
getObjId(), 
true);
   418         foreach ($coll_items as $item_id) {
   420             if (!array_key_exists($item_id, $possible_items)) {
   428             if (isset($info[
"completed"][$item_id]) &&
   429                 in_array($this->
user->getId(), $info[
"completed"][$item_id])) {
   431             } elseif (isset($info[
"in_progress"][$item_id]) &&
   433                     $this->
user->getId(),
   434                     $info[
"in_progress"][$item_id]
   438             $field->setHtml($icons->renderIconForStatus($status));
   442             if (isset($info[
"tlt_users"][$item_id][$this->
user->getId()])) {
   443                 $spent = $info[
"tlt_users"][$item_id][$this->
user->getId()];
   445             $needed = $info[
"tlt"][$item_id];
   449                         $this->
lng->txt(
"trac_collection_tlt_learner_subitem"),
   452                         min(100, round(abs($spent) / $needed * 100))
   457             $form->addItem($field);
   460         $this->tpl->setContent($form->getHTML());
 const LP_STATUS_COMPLETED_NUM
 
static get(string $a_var)
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
 
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
 
Class ilLPListOfSettingsGUI. 
 
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.