23    public function __construct($a_mode, $a_ref_id, $a_user_id = 0)
 
   30        $this->ctrl->saveParameter($this, 
'details_id', $_REQUEST[
'details_id']);
 
   43        $this->ctrl->setReturn($this, 
"show");
 
   44        $this->ctrl->saveParameter($this, 
'user_id', $this->
getUserId());
 
   45        switch ($this->ctrl->getNextClass()) {
 
   46            case 'illpprogresstablegui':
 
   47                include_once 
'./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php';
 
   49                $this->ctrl->setReturn($this, 
'show');
 
   50                $this->ctrl->forwardCommand($table_gui);
 
   65        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
   71                return $this->details();
 
   90        $info->setContextRefId((
int) $this->ref_id);
 
   91        $info->setContextObjId((
int) $this->details_obj_id);
 
   92        $info->setContentObjType((
string) $this->obj_type);
 
   93        $info->saveProgress(
false);
 
   94        $this->ctrl->redirect($this);
 
   97    public function details()
 
  101        $ilToolbar = 
$DIC[
'ilToolbar'];
 
  103        $rbacsystem = 
$DIC[
'rbacsystem'];
 
  104        $ilAccess = 
$DIC[
'ilAccess'];
 
  112        if ((
int) 
$_GET[
'crs_id']) {
 
  113            $this->ctrl->setParameter($this, 
'details_id', (
int) 
$_GET[
'crs_id']);
 
  115            $ilToolbar->addButton(
 
  116                $this->lng->txt(
'trac_view_crs'),
 
  117                $this->ctrl->getLinkTarget($this, 
'details')
 
  119        } elseif ($this->
getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or
 
  120               $this->
getMode() == self::LP_CONTEXT_ADMINISTRATION or
 
  121               $this->
getMode() == self::LP_CONTEXT_USER_FOLDER) {
 
  122            $ilToolbar->addButton(
 
  123                $this->lng->txt(
'trac_view_list'),
 
  124                $this->ctrl->getLinkTarget($this, 
'show')
 
  128        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.lp_progress_container.html', 
'Services/Tracking');
 
  130        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  132        $info->setContextRefId((
int) $this->details_id);
 
  133        $info->setContextObjId((
int) $this->details_obj_id);
 
  134        $info->setContentObjType((
string) $this->obj_type);
 
  135        $info->enableLearningProgress(
true);
 
  136        $info->setFormAction(
$ilCtrl->getFormAction($this));
 
  138        $this->
__appendLPDetails($info, $this->details_obj_id, $this->tracked_user->getId());
 
  142        $this->tpl->setVariable(
"LM_INFO", $info->getHTML());
 
  144        include_once 
'./Services/Object/classes/class.ilObjectLP.php';
 
  146        $collection = $olp->getCollectionInstance();
 
  149            foreach ($collection->getItems() as $item_id) {
 
  152                    if ($ilAccess->checkAccessOfUser($this->tracked_user->getId(), 
'visible', 
'', $item_id)) {
 
  153                        $obj_ids[$obj_id] = array( $item_id );
 
  156                    $obj_ids[] = $item_id;
 
  162        if (count($obj_ids) > 0) {
 
  164            include_once 
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
 
  167            include_once(
"./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
 
  168            $lp_table = 
new ilLPProgressTableGUI($this, 
"details", $this->tracked_user, $obj_ids, 
true, $this->details_mode, $personal_only, $this->details_obj_id, $this->details_id);
 
  169            $this->tpl->setVariable(
"LP_OBJECTS", $lp_table->getHTML());
 
  180        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
  183        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.lp_list_progress.html', 
'Services/Tracking');
 
  186        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
  188        $info->setFormAction(
$ilCtrl->getFormAction($this));
 
  191            $this->tpl->setCurrentBlock(
"info_user");
 
  192            $this->tpl->setVariable(
"USER_INFO", $info->getHTML());
 
  193            $this->tpl->parseCurrentBlock();
 
  196        include_once(
"./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
 
  198        $this->tpl->setVariable(
"LP_OBJECTS", $lp_table->getHTML());
 
  208        $rbacreview = 
$DIC[
'rbacreview'];
 
  209        $rbacsystem = 
$DIC[
'rbacsystem'];
 
  212            $a_usr_id = 
$_POST[
'user_id'];
 
  213            $this->ctrl->setParameter($this, 
'user_id', 
$_POST[
'user_id']);
 
  223        if ($this->mode == self::LP_CONTEXT_USER_FOLDER && $rbacsystem->checkAccess(
'read', $this->ref_id)) {
 
  232        if (!$rbacreview->isAssigned(
$ilUser->getId(), SYSTEM_ROLE_ID)) {
 
  243        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
  245        if (!$a_details_id) {
 
  251            $this->details_id = $a_details_id;
 
  252            $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
 
  253            $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
 
  255            include_once 
'Services/Object/classes/class.ilObjectLP.php';
 
  257            $this->details_mode = $olp->getCurrentMode();
 
An exception for terminatinating execution or to throw for unit testing.
LP collection of repository objects.
executeCommand()
execute command
__initDetails($a_details_id)
__construct($a_mode, $a_ref_id, $a_user_id=0)
TableGUI class for learning progress.
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
const LP_CONTEXT_ORG_UNIT
const LP_CONTEXT_REPOSITORY
__appendUserInfo(&$info, $a_user)
const LP_CONTEXT_USER_FOLDER
__showObjectDetails(&$info, $item_id=0, $add_section=true)
show details about current object.
__appendLPDetails(&$info, $item_id, $user_id)
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstance($a_obj_id)
static _lookupObjectId($a_ref_id)
lookup object id
static _getAllReferences($a_id)
get all reference ids of object
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc