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

Public Member Functions

 ilLPObjectItemListGUI ($a_id, $a_type)
 addReferences ($a_references)
 __readTitle ()
 __readDescription ()
 __readStatusInfo ()
 __readMark ()
 __readComment ()
 __readTypicalLearningTime ()
 __readUserStatus ()
 __readUserStatusInfo ()
 renderPath ($a_force_details=true)
- Public Member Functions inherited from ilLPItemListGUI
 ilLPItemListGUI ($a_id, $a_type)
 isAnonymized ()
 setCmdClass ($a_class)
 getCmdClass ()
 setRefId ($a_ref_id)
 getRefId ()
 getId ()
 getType ()
 setCurrentUser ($a_user)
 getCurrentUser ()
 getMode ()
 getTitle ()
 getDescription ()
 getMark ()
 getComment ()
 getTypicalLearningTime ()
 hasDetails ()
 enabled ($a_key)
 enable ($a_key)
 disable ($a_key)
 setIndentLevel ($a_level)
 getUserStatus ()
 getEditingTime ()
 showTimingWarning ()
 addCheckBox ($a_check)
 __readMode ()
 __readTimings ()
 getHTML ()
 read ()
 Read all necassary data for output.
 readUserInfo ()
 readTimings ()
 renderTypeImage ()
 renderContainerProgress ()
 renderSimpleProgress ()
 renderSimpleProgressFO ()
 renderObjectList ()
 renderObjectListFO ()
 renderObjectDetails ()
 renderObjectDetailsXML (&$writer)
renderObjectInfo ($enable_details=false)
 renderObjectInfoXML (&$writer, $a_enable_progress=false, $a_enable_user_info=false)
 __readEditingTime ()
 __getPercent ($max, $reached)

Data Fields

 $references = array()
- Data Fields inherited from ilLPItemListGUI
 $db = null
 $anonymized = false

Detailed Description

Definition at line 38 of file class.ilLPObjectItemListGUI.php.

Member Function Documentation

ilLPObjectItemListGUI::__readComment ( )

Reimplemented in ilLPSAHSItemListGUI, ilLPObjectiveItemListGUI, and ilLPEventListGUI.

Definition at line 77 of file class.ilLPObjectItemListGUI.php.

References ilLPMarks\_lookupComment(), ilLPItemListGUI\getCurrentUser(), and ilLPItemListGUI\getId().

{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$this->comment = ilLPMarks::_lookupComment($this->getCurrentUser(),$this->getId());
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readDescription ( )

Reimplemented in ilLPEventListGUI, ilLPUserItemListGUI, ilLPObjectiveItemListGUI, and ilLPSAHSItemListGUI.

Definition at line 60 of file class.ilLPObjectItemListGUI.php.

References ilLPItemListGUI\getId().

{
global $ilObjDataCache;
$this->description = $ilObjDataCache->lookupDescription($this->getId());
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readMark ( )

Reimplemented in ilLPSAHSItemListGUI, ilLPObjectiveItemListGUI, and ilLPEventListGUI.

Definition at line 71 of file class.ilLPObjectItemListGUI.php.

References ilLPMarks\_lookupMark(), ilLPItemListGUI\getCurrentUser(), and ilLPItemListGUI\getId().

{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$this->mark = ilLPMarks::_lookupMark($this->getCurrentUser(),$this->getId());
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readStatusInfo ( )

Reimplemented from ilLPItemListGUI.

Reimplemented in ilLPEventListGUI.

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

References ilLPStatusWrapper\_getStatusInfo(), and ilLPItemListGUI\getId().

{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$this->status_info = ilLPStatusWrapper::_getStatusInfo($this->getId());
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readTitle ( )

Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, ilLPSAHSItemListGUI, and ilLPUserItemListGUI.

Definition at line 55 of file class.ilLPObjectItemListGUI.php.

References ilLPItemListGUI\getId().

{
global $ilObjDataCache;
$this->title = $ilObjDataCache->lookupTitle($this->getId());
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readTypicalLearningTime ( )

Reimplemented from ilLPItemListGUI.

Reimplemented in ilLPEventListGUI.

Definition at line 83 of file class.ilLPObjectItemListGUI.php.

References ilLPStatusWrapper\_getTypicalLearningTime(), and ilLPItemListGUI\getId().

{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readUserStatus ( )

Reimplemented from ilLPItemListGUI.

Reimplemented in ilLPEventListGUI, ilLPObjectiveItemListGUI, and ilLPSAHSItemListGUI.

Definition at line 89 of file class.ilLPObjectItemListGUI.php.

References ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), elseif(), ilLPItemListGUI\getCurrentUser(), ilLPItemListGUI\getId(), LP_STATUS_COMPLETED, LP_STATUS_FAILED, LP_STATUS_IN_PROGRESS, and LP_STATUS_NOT_ATTEMPTED.

{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getInProgress($this->getId())))
{
$this->status = LP_STATUS_IN_PROGRESS;
}
{
$this->status = LP_STATUS_COMPLETED;
}
{
$this->status = LP_STATUS_FAILED;
}
else
{
$this->status = LP_STATUS_NOT_ATTEMPTED;
}
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::__readUserStatusInfo ( )

Reimplemented in ilLPSAHSItemListGUI, and ilLPObjectiveItemListGUI.

Definition at line 111 of file class.ilLPObjectItemListGUI.php.

References $res, ilLPItemListGUI\__getPercent(), ilLPStatusWrapper\_getCompleted(), ilLearningProgress\_getProgress(), ilLPStatusWrapper\_getTypicalLearningTime(), ilLPItemListGUI\getCurrentUser(), ilLPItemListGUI\getId(), ilLPItemListGUI\getMode(), LP_MODE_COLLECTION, LP_MODE_OBJECTIVES, LP_MODE_SCORM, LP_MODE_TEST_PASSED, LP_MODE_TLT, and LP_MODE_VISITS.

{
global $ilObjDataCache;
$this->user_status_info = null;
switch($this->getMode())
{
// Get stored test results
$found = false;
foreach($this->status_info['results'] as $res)
{
if($this->getCurrentUser() == $res['user_id'])
{
$this->user_status_info = array($this->lng->txt('trac_reached_points'),
$this->__getPercent($res['max_points'],$res['reached_points']));
return true;
}
}
return $this->user_status_info = array($this->lng->txt('trac_reached_points'),
"0%");
if(!$this->status_info['tlt'])
{
return false;
}
include_once './Services/Tracking/classes/class.ilLearningProgress.php';
$user_data = ilLearningProgress::_getProgress($this->getCurrentUser(),$this->getId());
return $this->user_status_info = array($this->lng->txt('trac_edit_time'),
$this->__getPercent($this->status_info['tlt'],$user_data['spent_seconds']));
if(!$this->status_info['visits'])
{
return false;
}
include_once './Services/Tracking/classes/class.ilLearningProgress.php';
$user_data = ilLearningProgress::_getProgress($this->getCurrentUser(),$this->getId());
return $this->user_status_info = array($this->lng->txt('trac_reached_visits'),
$this->__getPercent($this->status_info['visits'],$user_data['visits']));
if(!$this->status_info['num_objectives'])
{
return false;
}
$fullfilled = $this->status_info['objective_result'][$this->getCurrentUser()] ?
$this->status_info['objective_result'][$this->getCurrentUser()] : array();
return $this->user_status_info = array($this->lng->txt('trac_reached_objectives'),
$this->__getPercent($this->status_info['num_objectives'],
count($fullfilled)));
if(!$this->status_info['num_scos'])
{
return false;
}
return $this->user_status_info = array($this->lng->txt('trac_edited_scos'),
$this->__getPercent($this->status_info['num_scos'],
$this->status_info['num_completed'][$this->getCurrentUser()]));
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
$user_time = 0;
if(!is_array($this->status_info['collections']) or !$this->tlt)
{
return false;
}
foreach($this->status_info['collections'] as $item)
{
$object_id = $ilObjDataCache->lookupObjId($item);
// count full time if status is completed
if(in_array($this->getCurrentUser(),ilLPStatusWrapper::_getCompleted($object_id)))
{
$user_time += ilLPStatusWrapper::_getTypicalLearningTime($object_id);
continue;
}
switch($ilObjDataCache->lookupType($object_id))
{
case 'lm':
$progress = ilLearningProgress::_getProgress($this->getCurrentUser(),$object_id);
$user_time += min($progress['spent_seconds'],
break;
}
}
if($user_time)
{
$this->user_status_info = array($this->lng->txt('trac_processing_time'),
$this->__getPercent($this->tlt,$user_time));
}
break;
}
}

+ Here is the call graph for this function:

ilLPObjectItemListGUI::addReferences (   $a_references)

Definition at line 48 of file class.ilLPObjectItemListGUI.php.

{
$this->references = $a_references;
}
ilLPObjectItemListGUI::renderPath (   $a_force_details = true)

Definition at line 215 of file class.ilLPObjectItemListGUI.php.

References $data, $ref_id, ilObjUserTracking\_enabledUserRelatedData(), ilLink\_getLink(), ilLPItemListGUI\getCmdClass(), and ilLPItemListGUI\isAnonymized().

{
include_once 'Services/Tracking/classes/class.ilObjUserTracking.php';
include_once 'classes/class.ilLink.php';
if(!count($this->references))
{
return true;
}
foreach($this->references as $ref_id)
{
$path = '...';
$counter = 0;
$path_full = $this->tree->getPathFull($ref_id);
foreach($path_full as $data)
{
if(++$counter < (count($path_full)-1))
{
continue;
}
$path .= " -> ";
if($ref_id != $data['ref_id'])
{
$path .= $data['title'];
}
else
{
$path .= ('<a target="_top" href="'.
ilLink::_getLink($data['ref_id'],$data['type']).'">'.
$data['title'].'</a>');
}
}
$this->tpl->setCurrentBlock("path_item");
#var_dump("<pre>",$a_force_details,ilObjUserTracking::_enabledUserRelatedData(),!$this->isAnonymized(),"<pre>");
if($a_force_details or (ilObjUserTracking::_enabledUserRelatedData() and !$this->isAnonymized()))
{
$this->ctrl->setParameterByClass($this->getCmdClass(),'details_id',$ref_id);
$this->tpl->setVariable("PATH_DETAILS",$this->ctrl->getLinkTargetByClass($this->getCmdClass(),'details'));
$this->tpl->setVariable("TXT_PATH_DETAILS",$this->lng->txt('details'));
}
$this->tpl->setVariable("OCCURRENCES",$this->lng->txt('trac_occurrences'));
$this->tpl->setVariable("PATH_ITEM",$path);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("path");
$this->tpl->parseCurrentBlock();
}
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilLPObjectItemListGUI::$references = array()

Definition at line 40 of file class.ilLPObjectItemListGUI.php.


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