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

Public Member Functions

 ilLPListOfObjectsGUI ($a_mode, $a_ref_id)
executeCommand ()
 execute command
 updateUser ()
 editUser ()
 __showEditUser ()
 __renderContainerRow ($a_parent_id, $a_item_id, $a_usr_id, $type, $level)
 details ()
 __showUsersList ()
 showDetails ()
 hideDetails ()
 __detailsShown ($a_usr_id, $item_id)
 show ()
 __listObjects ()
 __showFilter ()
 __initFilterGUI ()
 __initFilter ()
 __initDetails ($a_details_id)
- Public Member Functions inherited from ilLearningProgressBaseGUI
 ilLearningProgressBaseGUI ($a_mode, $a_ref_id=0, $a_usr_id=0)
 activePDF ()
 __checkPDF ()
 isAnonymized ()
 isObjectAnonymized ()
 getMode ()
 getRefId ()
 getObjId ()
 getUserId ()
 activateStatistics ($a_act=true)
 __getDefaultCommand ()
 __setSubTabs ($a_active)
 __buildFooter ()
 __buildHeader ()
 __insertPath (&$a_tpl, $a_ref_id)
 insert path
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
__initTableGUI ()
 __showObjectDetails (&$info, $item_id=0)
 show details about current object.
 __appendLPDetails (&$info, $item_id, $user_id)
 __readStatus ($a_obj_id, $user_id)
 __showButton ($a_link, $a_text, $a_target= '')
 __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 ()

Data Fields

 $details_id = 0
 $details_type = ''
 $details_mode = 0
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 $ctrl = null
 $lng = null
 $ref_id = 0
 $mode = 0
 $statistics_activated = false

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")

Detailed Description

Definition at line 43 of file class.ilLPListOfObjectsGUI.php.

Member Function Documentation

ilLPListOfObjectsGUI::__detailsShown (   $a_usr_id,
  $item_id 
)

Definition at line 483 of file class.ilLPListOfObjectsGUI.php.

References $_SESSION, and $details_id.

Referenced by __renderContainerRow().

{
return $_SESSION['lp_show'][$this->details_id][$a_usr_id.'_'.$item_id] ? true : false;
#return $_SESSION['lp_show'][$this->details_id][$a_usr_id];
}

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__initDetails (   $a_details_id)

Definition at line 648 of file class.ilLPListOfObjectsGUI.php.

References $_GET, ilLPObjSettings\_lookupMode(), and ilLearningProgressBaseGUI\getRefId().

Referenced by ilLPListOfObjectsGUI(), and show().

{
global $ilObjDataCache;
if(!$a_details_id)
{
$a_details_id = $this->getRefId();
}
if($a_details_id)
{
$_GET['details_id'] = $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);
$this->details_mode = ilLPObjSettings::_lookupMode($this->details_obj_id);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__initFilter ( )

Definition at line 639 of file class.ilLPListOfObjectsGUI.php.

Referenced by __listObjects(), and __showUsersList().

{
global $ilUser;
include_once './Services/Tracking/classes/class.ilLPFilter.php';
$this->filter = new ilLPFilter($ilUser->getId());
}

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__initFilterGUI ( )

Definition at line 630 of file class.ilLPListOfObjectsGUI.php.

Referenced by ilLPListOfObjectsGUI().

{
global $ilUser;
include_once './Services/Tracking/classes/class.ilLPFilterGUI.php';
$this->filter_gui = new ilLPFilterGUI($ilUser->getId());
}

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__listObjects ( )

Definition at line 515 of file class.ilLPListOfObjectsGUI.php.

References $type, __initFilter(), ilLearningProgressBaseGUI\__showButton(), ilLearningProgressBaseGUI\__sort(), ilLearningProgressBaseGUI\activePDF(), and ilUtil\sendFailure().

Referenced by show().

{
global $ilUser,$ilObjDataCache;
include_once './Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
#$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_list_objects.html','Services/Tracking');
#$this->__showFilter();
#$tpl = new ilTemplate('tpl.lp_loo_objects.html',true,true,'Services/Tracking');
if($this->activePDF())
{
$this->__showButton($this->ctrl->getLinkTargetByClass('ilpdfpresentation','createList'),$this->lng->txt('pdf_export'));
}
$this->__initFilter();
$this->filter->setRequiredPermission('edit_learning_progress');
if(!count($objs = $this->filter->getObjects()))
{
ilUtil::sendFailure($this->lng->txt('trac_filter_no_access'));
// if there are no objects because of filter settings, we have to
// display the filters to be able to change them
// return true;
}
// Limit info
if($this->filter->limitReached())
{
$info = sprintf($this->lng->txt('trac_filter_limit_reached'),$this->filter->getLimit());
$this->tpl->setVariable("LIMIT_REACHED",$info);
}
// Show table header
/*
$tpl->setVariable("HEAD_STATUS",$this->lng->txt('trac_status'));
$tpl->setVariable("HEAD_OPTIONS",$this->lng->txt('actions'));
$type = $this->filter->getFilterType();
$tpl->setVariable("HEADER_IMG",ilUtil::getImagePath('icon_'.$type.'.gif'));
$tpl->setVariable("HEADER_ALT",$this->lng->txt('objs_'.$type));
$tpl->setVariable("BLOCK_HEADER_CONTENT",$this->lng->txt('objs_'.$type));
*/
// Sort objects by title
$sorted_objs = $this->__sort(array_keys($objs),'object_data','title','obj_id');
/*
// Render item list
$counter = 0;
foreach($sorted_objs as $object_id)
{
$item_list =& ilLPItemListFactory::_getInstance(0,$object_id,$ilObjDataCache->lookupType($object_id));
$item_list->read();
$item_list->addCheckbox(array('item_id[]',$object_id,false));
$item_list->setCmdClass(get_class($this));
$item_list->addReferences($objs[$object_id]['ref_ids']);
$item_list->enable('path');
$item_list->renderObjectList();
// Details link
#if(!$this->isAnonymized())
#{
# $tpl->setCurrentBlock("item_command");
# $this->ctrl->setParameter($this,'details_id',$object_id);
# $tpl->setVariable("HREF_COMMAND",$this->ctrl->getLinkTarget($this,'details'));
# $tpl->setVariable("TXT_COMMAND",$this->lng->txt('details'));
# $tpl->parseCurrentBlock();
#}
// Hide link
$tpl->setCurrentBlock("item_command");
$this->ctrl->setParameterByClass('illpfiltergui','hide',$object_id);
$tpl->setVariable("HREF_COMMAND",$this->ctrl->getLinkTargetByClass('illpfiltergui','hide'));
$tpl->setVariable("TXT_COMMAND",$this->lng->txt('trac_hide'));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("container_standard_row");
$tpl->setVariable("ITEM_HTML",$item_list->getHTML());
$tpl->setVariable("TBLROW",ilUtil::switchColor($counter++,'tblrow1','tblrow2'));
$tpl->parseCurrentBlock();
}
*/
reset($sorted_objs);
include_once("./Services/Tracking/classes/class.ilLPProgressTableGUI.php");
$lp_table = new ilLPObjectsTableGUI($this, "", $type, $objs);
$lp_table->setMaxCount(count($sorted_objs));
$lp_table->setData($sorted_objs);
$this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
/*
// Hide button
$tpl->setVariable("DOWNRIGHT",ilUtil::getImagePath('arrow_downright.gif'));
$tpl->setVariable("BTN_HIDE_SELECTED",$this->lng->txt('trac_hide'));
$tpl->setVariable("FORMACTION",$this->ctrl->getFormActionByClass('illpfiltergui'));
$this->tpl->setVariable("LP_OBJECTS",$tpl->get());
*/
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__renderContainerRow (   $a_parent_id,
  $a_item_id,
  $a_usr_id,
  $type,
  $level 
)

Definition at line 212 of file class.ilLPListOfObjectsGUI.php.

References $type, __detailsShown(), ilLearningProgressBaseGUI\__showImageByStatus(), ilLPItemListFactory\_getInstanceByRefId(), ilLPCollectionCache\_getItems(), ilLPObjSettings\_isContainer(), ilTimingCache\_showWarning(), ilDatePresentation\formatDate(), ilUtil\getImagePath(), IL_CAL_UNIX, LP_MODE_OBJECTIVES, LP_MODE_SCORM, and ilUtil\switchColor().

Referenced by __showUsersList().

{
global $ilObjDataCache,$ilUser;
include_once 'Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
$item_list =& ilLPItemListFactory::_getInstanceByRefId($a_parent_id,$a_item_id,$type);
if($this->has_timings)
{
$item_list->readTimings();
$item_list->enable('timings');
}
$item_list->setCurrentUser($a_usr_id);
$item_list->readUserInfo();
$item_list->setIndentLevel($level);
// Mark
$this->obj_tpl->setVariable("MARK",$item_list->getMark());
// Edit link, details
if($type != 'sahs_item' and
$type != 'objective' and
$type != 'event' and
!$item_list->isAnonymized())
{
// Edit link
$this->obj_tpl->setCurrentBlock("item_command");
$this->ctrl->setParameter($this,'details_id',$this->details_id);
$this->ctrl->setParameter($this,"user_id",$a_usr_id);
$this->ctrl->setParameter($this,'item_id',$a_item_id);
$this->obj_tpl->setVariable('HREF_COMMAND',$this->ctrl->getLinkTarget($this,'editUser'));
$this->obj_tpl->setVariable("TXT_COMMAND",$this->lng->txt('edit'));
$this->obj_tpl->parseCurrentBlock();
// Show checkbox and details button
if(ilLPObjSettings::_isContainer($item_list->getMode()))
{
$item_list->addCheckbox(array('user_item_ids[]',
$a_usr_id.'_'.$a_item_id,
$this->__detailsShown($a_usr_id,$a_item_id)));
$this->obj_tpl->setCurrentBlock("item_command");
$this->ctrl->setParameter($this,'details_id',$this->details_id);
$this->ctrl->setParameter($this,'user_item_ids',$a_usr_id.'_'.$a_item_id);
if($this->__detailsShown($a_usr_id,$a_item_id))
{
$this->obj_tpl->setVariable('HREF_COMMAND',$this->ctrl->getLinkTarget($this,'hideDetails'));
$this->obj_tpl->setVariable("TXT_COMMAND",$this->lng->txt('hide_details'));
}
else
{
$this->obj_tpl->setVariable('HREF_COMMAND',$this->ctrl->getLinkTarget($this,'showDetails'));
$this->obj_tpl->setVariable("TXT_COMMAND",$this->lng->txt('show_details'));
}
$this->ctrl->clearParameters($this);
$this->obj_tpl->parseCurrentBlock();
}
}
if($this->has_timings)
{
if(ilTimingCache::_showWarning($a_item_id,$a_usr_id))
{
$this->obj_tpl->setCurrentBlock('warning_img');
$this->obj_tpl->setVariable('WARNING_IMG',ilUtil::getImagePath('warning.gif'));
$this->obj_tpl->setVariable('WARNING_ALT',$this->lng->txt('trac_editing_time_passed'));
$this->obj_tpl->parseCurrentBlock();
}
$this->obj_tpl->setCurrentBlock('timing');
$this->obj_tpl->setVariable('END_EDITING_TIME',$item_list->getEditingTime() ?
ilDatePresentation::formatDate(new ilDateTime($item_list->getEditingTime(),IL_CAL_UNIX)) :
'');
$this->obj_tpl->parseCurrentBlock();
}
// Status image
$this->obj_tpl->setCurrentBlock("container_standard_row");
$item_list->renderObjectDetails();
$this->obj_tpl->setVariable("ITEM_HTML",$item_list->getHTML());
if(!$item_list->isAnonymized())
{
$this->__showImageByStatus($this->obj_tpl,$item_list->getUserStatus());
}
$this->obj_tpl->setVariable("TBLROW",ilUtil::switchColor($this->container_row_counter,'tblrow1','tblrow2'));
$this->obj_tpl->parseCurrentBlock();
if(!$this->__detailsShown($a_usr_id,$a_item_id))
{
return true;
}
if($type == 'sahs_item' or
$type == 'objective' or
$type == 'event')
{
return true;
}
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
foreach(ilLPCollectionCache::_getItems($ilObjDataCache->lookupObjId($a_item_id)) as $child_id)
{
switch($item_list->getMode())
{
$this->__renderContainerRow($a_item_id,$child_id,$a_usr_id,'objective',$level + 2);
break;
$this->__renderContainerRow($a_item_id,$child_id,$a_usr_id,'sahs_item',$level + 2);
break;
default:
$this->__renderContainerRow($a_item_id,$child_id,$a_usr_id,
$ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($child_id)),$level + 2);
break;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__showEditUser ( )

Definition at line 166 of file class.ilLPListOfObjectsGUI.php.

References $_GET, ilLearningProgressBaseGUI\$mode, $type, ilLPStatusWrapper\_getCompleted(), ilObjUser\_getPersonalPicturePath(), ilLPObjSettings\_lookupMode(), ilUtil\formCheckbox(), LP_MODE_MANUAL, LP_MODE_MANUAL_BY_TUTOR, and ilUtil\prepareFormOutput().

Referenced by editUser().

{
global $ilObjDataCache;
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($this->item_id,$_REQUEST['user_id']);
$this->ctrl->setParameter($this,'user_id',(int) $_GET['user_id']);
$this->ctrl->setParameter($this,'item_id',(int) $this->item_ref_id);
$this->ctrl->setParameter($this,'details_id',$this->details_id);
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TYPE_IMG",ilObjUser::_getPersonalPicturePath((int) $_GET['user_id'],'xxsmall'));
$this->tpl->setVariable("ALT_IMG",$ilObjDataCache->lookupTitle((int) $_GET['user_id']));
$this->tpl->setVariable("TXT_LP",$this->lng->txt('trac_learning_progress_tbl_header'));
$this->tpl->setVariable("COMMENT",ilUtil::prepareFormOutput($marks->getComment(),false));
$type = $ilObjDataCache->lookupType($this->item_id);
if($type != 'lm')
{
$this->tpl->setVariable("TXT_MARK",$this->lng->txt('trac_mark'));
$this->tpl->setVariable("MARK",ilUtil::prepareFormOutput($marks->getMark(),false));
}
$this->tpl->setVariable("TXT_COMMENT",$this->lng->txt('trac_comment'));
{
$completed = ilLPStatusWrapper::_getCompleted($this->item_id);
$this->tpl->setVariable("mode_manual");
$this->tpl->setVariable("TXT_COMPLETED",$this->lng->txt('trac_completed'));
$this->tpl->setVariable("CHECK_COMPLETED",ilUtil::formCheckbox(in_array((int) $_GET['user_id'],$completed),
'completed',
'1'));
}
$this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel'));
$this->tpl->setVariable("TXT_SAVE",$this->lng->txt('save'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::__showFilter ( )

Definition at line 621 of file class.ilLPListOfObjectsGUI.php.

References $ilBench.

{
global $ilBench;
$ilBench->start('LearningProgress','1110_LPListOfObjects_showFilter');
$this->tpl->setVariable("FILTER",$this->filter_gui->getHTML());
$ilBench->stop('LearningProgress','1110_LPListOfObjects_showFilter');
}
ilLPListOfObjectsGUI::__showUsersList ( )

Definition at line 367 of file class.ilLPListOfObjectsGUI.php.

References $failed, $type, $user, ilLearningProgressBaseGUI\__getLegendHTML(), __initFilter(), __renderContainerRow(), ilLearningProgressBaseGUI\__sort(), ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), ilLPStatusWrapper\_getNotAttempted(), ilCourseItems\_hasCollectionTimings(), ilUserFilter\enableMemberFilter(), ilUtil\getImagePath(), ilUtil\Linkbar(), and ilUtil\sendFailure().

Referenced by details().

{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
include_once 'Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
global $ilObjDataCache,$ilUser;
$not_attempted = ilLPStatusWrapper::_getNotAttempted($this->details_obj_id);
$in_progress = ilLPStatusWrapper::_getInProgress($this->details_obj_id);
$completed = ilLPStatusWrapper::_getCompleted($this->details_obj_id);
$failed = ilLPStatusWrapper::_getFailed($this->details_obj_id);
$all_users = array_merge($completed,$in_progress,$not_attempted,$failed);
if(count($all_users) > 1)
{
include_once 'Services/Search/classes/class.ilUserFilterGUI.php';
$user_filter_gui = new ilUserFilterGUI($ilUser->getId());
$this->tpl->setVariable("FILTER",$user_filter_gui->getHTML());
$user_filter = new ilUserFilter($ilUser->getId());
$user_filter->enableMemberFilter(true);
$user_filter->setPossibleUsers($all_users);
$all_users = $user_filter->getUsers();
if(!count($all_users))
{
ilUtil::sendFailure($this->lng->txt('trac_filter_no_access'));
return false;
}
}
$all_users = $this->__sort($all_users,'usr_data','lastname','usr_id');
$sliced_users = array_slice($all_users,$this->offset,$this->max_count);
$this->obj_tpl = new ilTemplate('tpl.lp_loo_user_list.html',true,true,'Services/Tracking');
$this->__initFilter();
$type = $this->filter->getFilterType();
$this->obj_tpl->setVariable("HEADER_IMG",ilUtil::getImagePath('icon_usr.gif'));
$this->obj_tpl->setVariable("HEADER_ALT",$this->lng->txt('objs_usr'));
$this->obj_tpl->setVariable("BLOCK_HEADER_CONTENT",$this->lng->txt('trac_usr_list'));
// Show table header
$this->obj_tpl->setVariable("HEAD_STATUS",$this->lng->txt('trac_status'));
$this->obj_tpl->setVariable("HEAD_MARK",$this->lng->txt('trac_mark'));
$this->obj_tpl->setVariable("HEAD_OPTIONS",$this->lng->txt('actions'));
// Show timings header
include_once 'Modules/Course/classes/class.ilCourseItems.php';
if($this->has_timings = ilCourseItems::_hasCollectionTimings($this->details_id))
{
$this->obj_tpl->setVariable('HEAD_TIMING',$this->lng->txt('trac_head_timing'));
$this->obj_tpl->setVariable('HEAD_TIME_PASSED',$this->lng->txt('trac_time_passed'));
}
// Show linkbar
if(count($all_users) > $this->max_count)
{
$this->obj_tpl->setCurrentBlock("lp_linkbar_block");
$this->ctrl->setParameter($this,'details_id',$this->details_id);
$this->obj_tpl->setVariable("LP_LINKBAR",ilUtil::Linkbar($this->ctrl->getLinkTarget($this,'details'),
count($all_users),
$this->max_count,
(int) $this->offset,
array(),
array('link' => '',
'prev' => '<<<',
'next' => '>>>')));
$this->obj_tpl->parseCurrentBlock();
}
// Render item list
$this->container_row_counter = 0;
foreach($sliced_users as $user)
{
$this->__renderContainerRow(0,$this->details_id,$user,'usr',0);
$this->container_row_counter++;
}
// Hide button
$this->obj_tpl->setVariable("DOWNRIGHT",ilUtil::getImagePath('arrow_downright.gif'));
$this->obj_tpl->setVariable("BTN_HIDE_SELECTED",$this->lng->txt('show_details'));
$this->obj_tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("LP_OBJECTS",$this->obj_tpl->get());
$this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::details ( )

Definition at line 335 of file class.ilLPListOfObjectsGUI.php.

References $ilBench, ilLearningProgressBaseGUI\__showButton(), __showUsersList(), ilLPItemListFactory\_getInstanceByRefId(), ilLearningProgressBaseGUI\activePDF(), ilLearningProgressBaseGUI\getMode(), LP_MODE_ADMINISTRATION, and LP_MODE_PERSONAL_DESKTOP.

Referenced by hideDetails(), show(), showDetails(), and updateUser().

{
global $ilObjDataCache;
global $ilBench;
$ilBench->start('LearningProgress','1200_LPListOfObjects_details');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
// Show back button
{
$this->__showButton($this->ctrl->getLinkTarget($this,'show'),$this->lng->txt('trac_view_list'));
}
if($this->activePDF())
{
$this->__showButton($this->ctrl->getLinkTargetByClass('ilpdfpresentation','createDetails'),$this->lng->txt('pdf_export'));
}
include_once 'Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
$item_list = & ilLPItemListFactory::_getInstanceByRefId(0,$this->details_id,$this->details_type);
$info =& $item_list->renderObjectInfo();
$this->tpl->setVariable("INFO_TABLE",$info->getHTML());
$this->__showUsersList();
$ilBench->stop('LearningProgress','1200_LPListOfObjects_details');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLPListOfObjectsGUI::editUser ( )

Definition at line 147 of file class.ilLPListOfObjectsGUI.php.

References $_GET, ilLearningProgressBaseGUI\__appendLPDetails(), __showEditUser(), and ilLPItemListFactory\_getInstanceByRefId().

{
global $ilObjDataCache;
// Load template
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_edit_user.html','Services/Tracking');
include_once 'Services/Tracking/classes/ItemList/class.ilLPItemListFactory.php';
$item_list = & ilLPItemListFactory::_getInstanceByRefId(0,$this->item_ref_id,$ilObjDataCache->lookupType($this->item_id));
$info =& $item_list->renderObjectInfo();
$this->__appendLPDetails($info,$this->item_id,(int) $_GET['user_id']);
// Finally set template variable
$this->tpl->setVariable("INFO_TABLE",$info->getHTML());
$this->__showEditUser();
}

+ Here is the call graph for this function:

& ilLPListOfObjectsGUI::executeCommand ( )

execute command

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

References $cmd, $ilBench, ilLearningProgressBaseGUI\__getDefaultCommand(), ilLearningProgressBaseGUI\getMode(), ilLearningProgressBaseGUI\getUserId(), LP_ACTIVE_OBJECTS, and LP_MODE_REPOSITORY.

{
global $ilBench,$ilUser;
$ilBench->start('LearningProgress','1000_LPListOfObjects');
$this->ctrl->setReturn($this, "");
switch($this->ctrl->getNextClass())
{
case 'illpfiltergui':
$this->ctrl->forwardCommand($this->filter_gui);
break;
case 'ilpdfpresentation':
include_once './Services/Tracking/classes/class.ilPDFPresentation.php';
$pdf_gui = new ilPDFPresentation($this->getMode(),$this->details_id,$this->getUserId());
$pdf_gui->setType(LP_ACTIVE_OBJECTS);
$this->ctrl->setReturn($this,'show');
$this->ctrl->forwardCommand($pdf_gui);
break;
case 'iluserfiltergui':
switch($this->getMode())
{
$this->ctrl->setReturn($this,'show');
break;
default:
$this->ctrl->setReturn($this,'details');
break;
}
$this->user_filter_gui = new ilUserFilterGUI($ilUser->getId());
$this->ctrl->forwardCommand($this->user_filter_gui);
break;
case 'illpprogresstablegui':
include_once("./Services/Tracking/classes/class.ilLPProgressTableGUI.php");
$lp_table = new ilLPProgressTableGUI($this, "");
$lp_table->initFilter();
$this->ctrl->setReturn($this,'show');
$this->ctrl->forwardCommand($lp_table);
break;
case 'illpobjectstablegui':
include_once("./Services/Tracking/classes/class.ilLPObjectsTableGUI.php");
$lp_table = new ilLPObjectsTableGUI($this, "");
$lp_table->initFilter();
$this->ctrl->setReturn($this,'show');
$this->ctrl->forwardCommand($lp_table);
break;
default:
$this->$cmd();
}
$ilBench->stop('LearningProgress','1000_LPListOfObjects');
return true;
}

+ Here is the call graph for this function:

ilLPListOfObjectsGUI::hideDetails ( )

Definition at line 473 of file class.ilLPListOfObjectsGUI.php.

References $_GET, $_SESSION, and details().

{
if(isset($_GET['user_item_ids']))
{
unset($_SESSION['lp_show'][$this->details_id]["$_GET[user_item_ids]"]);
$this->details();
return true;
}
}

+ Here is the call graph for this function:

ilLPListOfObjectsGUI::ilLPListOfObjectsGUI (   $a_mode,
  $a_ref_id 
)

Definition at line 49 of file class.ilLPListOfObjectsGUI.php.

References $_GET, ilLearningProgressBaseGUI\__checkPDF(), __initDetails(), __initFilterGUI(), and ilLearningProgressBaseGUI\ilLearningProgressBaseGUI().

{
global $ilUser,$ilObjDataCache;
$this->__checkPDF();
$this->__initFilterGUI();
// Set item id for details
$this->__initDetails((int) $_REQUEST['details_id']);
$this->item_ref_id = (int) $_REQUEST['item_id'];
$this->item_id = $ilObjDataCache->lookupObjId($this->item_ref_id);
$this->offset = (int) $_GET['offset'];
$this->ctrl->saveParameter($this,'offset',$this->offset);
$this->ctrl->saveParameter($this,'details_id',$_REQUEST['details_id']);
$this->max_count = $ilUser->getPref('hits_per_page');
}

+ Here is the call graph for this function:

ilLPListOfObjectsGUI::show ( )

Definition at line 490 of file class.ilLPListOfObjectsGUI.php.

References $ilBench, __initDetails(), __listObjects(), details(), ilLearningProgressBaseGUI\getMode(), ilLearningProgressBaseGUI\getRefId(), and LP_MODE_REPOSITORY.

{
global $ilObjDataCache;
global $ilBench;
$ilBench->start('LearningProgress','1100_LPListOfObjects_show');
// Clear table offset
$this->ctrl->saveParameter($this,'offset',0);
// Show only detail of current repository item if called from repository
switch($this->getMode())
{
$this->__initDetails($this->getRefId());
$this->details();
$ilBench->stop('LearningProgress','1100_LPListOfObjects_show');
return true;
}
$this->__listObjects();
$ilBench->stop('LearningProgress','1100_LPListOfObjects_show');
return true;
}

+ Here is the call graph for this function:

ilLPListOfObjectsGUI::showDetails ( )

Definition at line 453 of file class.ilLPListOfObjectsGUI.php.

References $_GET, $_POST, $_SESSION, $details_id, and details().

{
if(isset($_GET['user_item_ids']))
{
$ids = array($_GET['user_item_ids']);
}
else
{
unset($_SESSION['lp_show'][$this->details_id]);
$ids = $_POST['user_item_ids'] ? $_POST['user_item_ids'] : array();
}
foreach($ids as $id)
{
$_SESSION['lp_show'][$this->details_id][$id] = true;
}
$this->details();
return true;
}

+ Here is the call graph for this function:

ilLPListOfObjectsGUI::updateUser ( )

Definition at line 134 of file class.ilLPListOfObjectsGUI.php.

References $_POST, details(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($this->item_id,$_REQUEST['user_id']);
$marks->setMark(ilUtil::stripSlashes($_POST['mark']));
$marks->setComment(ilUtil::stripSlashes($_POST['comment']));
$marks->setCompleted((bool) $_POST['completed']);
$marks->update();
ilUtil::sendSuccess($this->lng->txt('trac_update_edit_user'));
$this->details();
}

+ Here is the call graph for this function:

Field Documentation

ilLPListOfObjectsGUI::$details_id = 0

Definition at line 45 of file class.ilLPListOfObjectsGUI.php.

Referenced by __detailsShown(), and showDetails().

ilLPListOfObjectsGUI::$details_mode = 0

Definition at line 47 of file class.ilLPListOfObjectsGUI.php.

ilLPListOfObjectsGUI::$details_type = ''

Definition at line 46 of file class.ilLPListOfObjectsGUI.php.


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