function __appendLPDetails(&$info, $item_id, $user_id) { global $ilObjDataCache; $type = $ilObjDataCache->lookupType($item_id); // Section learning_progress // $info->addSection($this->lng->txt('trac_learning_progress')); // see ilLPTableBaseGUI::parseTitle(); $info->addSection($this->lng->txt("trac_progress") . ": " . ilObject::_lookupTitle($item_id)); $olp = ilObjectLP::getInstance($item_id); $info->addProperty($this->lng->txt('trac_mode'), $olp->getModeText($olp->getCurrentMode())); switch ($type) { case 'lm': case 'htlm': include_once 'Services/Tracking/classes/class.ilLearningProgress.php'; $progress = ilLearningProgress::_getProgress($user_id, $item_id); if ($progress['access_time']) { $info->addProperty($this->lng->txt('last_access'), ilDatePresentation::formatDate(new ilDateTime($progress['access_time'], IL_CAL_DATETIME))); } else { $info->addProperty($this->lng->txt('last_access'), $this->lng->txt('trac_not_accessed')); } $info->addProperty($this->lng->txt('trac_visits'), (int) $progress['visits']); if ($type == 'lm') { $info->addProperty($this->lng->txt('trac_spent_time'), ilFormat::_secondsToString($progress['spent_seconds'])); } // fallthrough // fallthrough case 'exc': case 'tst': case 'crs': case 'sahs': case 'grp': // display status as image include_once "./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php"; $status = $this->__readStatus($item_id, $user_id); $status_path = ilLearningProgressBaseGUI::_getImagePathForStatus($status); $status_text = ilLearningProgressBaseGUI::_getStatusText($status); $info->addProperty($this->lng->txt('trac_status'), ilUtil::img($status_path, $status_text) . " " . $status_text); // #15334 - see ilLPTableBaseGUI::isPercentageAvailable() $mode = $olp->getCurrentMode(); if (in_array($mode, array(ilLPObjSettings::LP_MODE_TLT, ilLPObjSettings::LP_MODE_VISITS, ilLPObjSettings::LP_MODE_SCORM, ilLPObjSettings::LP_MODE_TEST_PASSED))) { include_once 'Services/Tracking/classes/class.ilLPStatus.php'; $perc = ilLPStatus::_lookupPercentage($item_id, $user_id); $info->addProperty($this->lng->txt('trac_percentage'), (int) $perc . "%"); } break; } include_once 'Services/Tracking/classes/class.ilLPMarks.php'; if (strlen($mark = ilLPMarks::_lookupMark($user_id, $item_id))) { $info->addProperty($this->lng->txt('trac_mark'), $mark); } if (strlen($comment = ilLPMarks::_lookupComment($user_id, $item_id))) { $info->addProperty($this->lng->txt('trac_comment'), $comment); } }