ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLPListOfProgressGUI Class Reference
+ Inheritance diagram for ilLPListOfProgressGUI:
+ Collaboration diagram for ilLPListOfProgressGUI:

Public Member Functions

 ilLPListOfProgressGUI ($a_mode, $a_ref_id, $a_user_id=0)
executeCommand ()
 execute command
 show ()
 details ()
 __showProgressList ()
 __initUser ($a_usr_id=0)
 __initDetails ($a_details_id)
- Public Member Functions inherited from ilLearningProgressBaseGUI
 ilLearningProgressBaseGUI ($a_mode, $a_ref_id=0, $a_usr_id=0)
 isAnonymized ()
 getMode ()
 getRefId ()
 getObjId ()
 getUserId ()
 __getDefaultCommand ()
 __setSubTabs ($a_active)
 __buildFooter ()
 __buildHeader ()
 __insertPath (&$a_tpl, $a_ref_id)
 insert path
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 _getImagePathForStatus ($a_status)
 Get image path for status.
 _getStatusText ($a_status)
 Get status alt text.
__initTableGUI ()
 __showObjectDetails (&$info, $item_id=0, $add_section=true)
 show details about current object.
 __appendUserInfo (&$info, $a_user)
 __appendLPDetails (&$info, $item_id, $user_id)
 __readStatus ($a_obj_id, $user_id)
 __sort ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.
 __getPercent ($max, $reached)
 __readItemStatusInfo ($a_items)
 __getLegendHTML ()
 __showEditUser ($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
 __updateUser ($user_id, $obj_id)

Data Fields

 $tracked_user = null
 $details_id = 0
 $details_type = ''
 $details_mode = 0
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 $ctrl = null
 $lng = null
 $ref_id = 0
 $mode = 0
const LP_CONTEXT_PERSONAL_DESKTOP = 1
const LP_CONTEXT_ADMINISTRATION = 2
const LP_CONTEXT_REPOSITORY = 3
const LP_CONTEXT_USER_FOLDER = 4
const LP_CONTEXT_ORG_UNIT = 5
const LP_ACTIVE_SETTINGS = 1
const LP_ACTIVE_OBJECTS = 2
const LP_ACTIVE_PROGRESS = 3
const LP_ACTIVE_USERS = 5
const LP_ACTIVE_SUMMARY = 6
const LP_ACTIVE_OBJSTATACCESS = 7
const LP_ACTIVE_OBJSTATTYPES = 8
const LP_ACTIVE_OBJSTATDAILY = 9
const LP_ACTIVE_OBJSTATADMIN = 10
const LP_ACTIVE_MATRIX = 11

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
static isObjectOffline ($a_obj_id, $a_type=null)
- Protected Member Functions inherited from ilLearningProgressBaseGUI
 initEditUserForm ($a_user_id, $a_obj_id, $a_cancel=null)
- Protected Attributes inherited from ilLearningProgressBaseGUI
 $anonymized

Detailed Description

Definition at line 21 of file class.ilLPListOfProgressGUI.php.

Member Function Documentation

ilLPListOfProgressGUI::__initDetails (   $a_details_id)

Definition at line 218 of file class.ilLPListOfProgressGUI.php.

References ilObject\_getAllReferences(), ilObjectLP\getInstance(), and ilLearningProgressBaseGUI\getRefId().

Referenced by ilLPListOfProgressGUI(), and show().

{
global $ilObjDataCache;
if(!$a_details_id)
{
$a_details_id = $this->getRefId();
}
if($a_details_id)
{
$ref_ids = ilObject::_getAllReferences($a_details_id);
$this->details_id = $a_details_id;
$this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
$this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
include_once 'Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($this->details_obj_id);
$this->details_mode = $olp->getCurrentMode();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfProgressGUI::__initUser (   $a_usr_id = 0)

Definition at line 179 of file class.ilLPListOfProgressGUI.php.

References $_POST, $ilUser, ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), and ilObjectFactory\getInstanceByObjId().

Referenced by ilLPListOfProgressGUI(), and show().

{
global $ilUser,$rbacreview,$rbacsystem;
if($_POST['user_id'])
{
$a_usr_id = $_POST['user_id'];
$this->ctrl->setParameter($this,'user_id',$_POST['user_id']);
}
if($a_usr_id)
{
$this->tracked_user = ilObjectFactory::getInstanceByObjId($a_usr_id);
}
else
{
$this->tracked_user = $ilUser;
}
// #8762: see ilObjUserGUI->getTabs()
if($this->mode == self::LP_CONTEXT_USER_FOLDER && $rbacsystem->checkAccess('read',$this->ref_id))
{
return true;
}
if($this->mode == self::LP_CONTEXT_ORG_UNIT && ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->ref_id,$a_usr_id))
{
return true;
}
// Check access
if(!$rbacreview->isAssigned($ilUser->getId(),SYSTEM_ROLE_ID))
{
$this->tracked_user = $ilUser;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfProgressGUI::__showProgressList ( )

Definition at line 154 of file class.ilLPListOfProgressGUI.php.

References $ilCtrl, $ilUser, ilLearningProgressBaseGUI\__appendUserInfo(), ilLearningProgressBaseGUI\__getLegendHTML(), and ilLearningProgressBaseGUI\getMode().

Referenced by show().

{
global $ilUser,$ilObjDataCache,$ilCtrl;
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_list_progress.html','Services/Tracking');
// User info
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->setFormAction($ilCtrl->getFormAction($this));
if ($this->__appendUserInfo($info, $this->tracked_user))
{
$this->tpl->setCurrentBlock("info_user");
$this->tpl->setVariable("USER_INFO",$info->getHTML());
$this->tpl->parseCurrentBlock();
}
include_once("./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
$lp_table = new ilLPProgressTableGUI($this, "", $this->tracked_user,null,false,null,false,null,null,$this->getMode());
$this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
$this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfProgressGUI::details ( )

Definition at line 87 of file class.ilLPListOfProgressGUI.php.

References $_GET, $ilCtrl, ilLearningProgressBaseGUI\__appendLPDetails(), ilLearningProgressBaseGUI\__appendUserInfo(), ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__showObjectDetails(), ilObject\_lookupObjectId(), ilObjectLP\getInstance(), ilLearningProgressBaseGUI\getMode(), and ilLearningProgressBaseGUI\getRefId().

Referenced by show().

{
global $ilToolbar,$ilCtrl,$rbacsystem;
// Show back button to crs if called from crs. Otherwise if called from personal desktop or administration
// show back to list
if((int)$_GET['crs_id'])
{
$this->ctrl->setParameter($this,'details_id',(int) $_GET['crs_id']);
$ilToolbar->addButton($this->lng->txt('trac_view_crs'),
$this->ctrl->getLinkTarget($this,'details'));
}
elseif($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or
$this->getMode() == self::LP_CONTEXT_ADMINISTRATION or
$this->getMode() == self::LP_CONTEXT_USER_FOLDER)
{
$ilToolbar->addButton($this->lng->txt('trac_view_list'),
$this->ctrl->getLinkTarget($this,'show'));
}
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_progress_container.html','Services/Tracking');
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
$info->setFormAction($ilCtrl->getFormAction($this));
$this->__appendUserInfo($info, $this->tracked_user);
$this->__appendLPDetails($info,$this->details_obj_id,$this->tracked_user->getId());
$this->__showObjectDetails($info,$this->details_obj_id, false);
// Finally set template variable
$this->tpl->setVariable("LM_INFO",$info->getHTML());
include_once './Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($this->details_obj_id);
$collection = $olp->getCollectionInstance();
if($collection)
{
$obj_ids = array();
foreach($collection->getItems() as $item_id)
{
if($collection instanceof ilLPCollectionOfRepositoryObjects)
{
$obj_ids[ilObject::_lookupObjectId($item_id)] = array($item_id);
}
else
{
$obj_ids[] = $item_id;
}
}
}
// #15247
if(sizeof($obj_ids))
{
// seems obsolete
$personal_only = !$rbacsystem->checkAccess('read_learning_progress',$this->getRefId());
include_once("./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php");
$lp_table = new ilLPProgressTableGUI($this, "details", $this->tracked_user, $obj_ids, true, $this->details_mode, $personal_only, $this->details_obj_id, $this->details_id);
$this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
}
$this->tpl->setVariable("LEGEND",$this->__getLegendHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilLPListOfProgressGUI::executeCommand ( )

execute command

Definition at line 42 of file class.ilLPListOfProgressGUI.php.

References $cmd, $ilUser, ilLearningProgressBaseGUI\__getDefaultCommand(), and ilLearningProgressBaseGUI\getUserId().

{
global $ilUser;
$this->ctrl->setReturn($this, "show");
$this->ctrl->saveParameter($this,'user_id',$this->getUserId());
switch($this->ctrl->getNextClass())
{
case 'illpprogresstablegui':
include_once './Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php';
$table_gui = new ilLPProgressTableGUI($this, "", $this->tracked_user);
$this->ctrl->setReturn($this,'show');
$this->ctrl->forwardCommand($table_gui);
break;
default:
$this->$cmd();
}
return true;
}

+ Here is the call graph for this function:

ilLPListOfProgressGUI::ilLPListOfProgressGUI (   $a_mode,
  $a_ref_id,
  $a_user_id = 0 
)

Definition at line 28 of file class.ilLPListOfProgressGUI.php.

References $_GET, $_REQUEST, __initDetails(), __initUser(), and ilLearningProgressBaseGUI\ilLearningProgressBaseGUI().

{
parent::ilLearningProgressBaseGUI($a_mode,$a_ref_id,$a_user_id);
$this->__initUser($a_user_id);
// Set item id for details
$this->__initDetails((int) $_GET['details_id']);
$this->ctrl->saveParameter($this,'details_id',$_REQUEST['details_id']);
}

+ Here is the call graph for this function:

ilLPListOfProgressGUI::show ( )

Definition at line 65 of file class.ilLPListOfProgressGUI.php.

References __initDetails(), __initUser(), __showProgressList(), details(), ilLearningProgressBaseGUI\getMode(), ilLearningProgressBaseGUI\getRefId(), and ilLearningProgressBaseGUI\getUserId().

{
global $ilObjDataCache;
switch($this->getMode())
{
// Show only detail of current repository item if called from repository
case self::LP_CONTEXT_REPOSITORY:
$this->__initDetails($this->getRefId());
return $this->details();
case self::LP_CONTEXT_USER_FOLDER:
case self::LP_CONTEXT_ORG_UNIT:
// if called from user folder obj_id is id of current user
$this->__initUser($this->getUserId());
break;
}
// not called from repository
}

+ Here is the call graph for this function:

Field Documentation

ilLPListOfProgressGUI::$details_id = 0

Definition at line 24 of file class.ilLPListOfProgressGUI.php.

ilLPListOfProgressGUI::$details_mode = 0

Definition at line 26 of file class.ilLPListOfProgressGUI.php.

ilLPListOfProgressGUI::$details_type = ''

Definition at line 25 of file class.ilLPListOfProgressGUI.php.

ilLPListOfProgressGUI::$tracked_user = null

Definition at line 23 of file class.ilLPListOfProgressGUI.php.


The documentation for this class was generated from the following file: