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

Public Member Functions

 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)

Static Public Member Functions

static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
static isObjectOffline ($a_obj_id, $a_type=null)

Data Fields

 $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

Protected Member Functions

 initEditUserForm ($a_user_id, $a_obj_id, $a_cancel=null)

Protected Attributes

 $anonymized

Detailed Description

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

Member Function Documentation

ilLearningProgressBaseGUI::__appendLPDetails ( $info,
  $item_id,
  $user_id 
)

Definition at line 444 of file class.ilLearningProgressBaseGUI.php.

References $comment, $mode, __readStatus(), _getImagePathForStatus(), ilLearningProgress\_getProgress(), _getStatusText(), ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilLPStatus\_lookupPercentage(), ilObject\_lookupTitle(), ilFormat\_secondsToString(), ilDatePresentation\formatDate(), ilObjectLP\getInstance(), IL_CAL_DATETIME, ilUtil\img(), ilLPObjSettings\LP_MODE_SCORM, ilLPObjSettings\LP_MODE_TEST_PASSED, ilLPObjSettings\LP_MODE_TLT, and ilLPObjSettings\LP_MODE_VISITS.

Referenced by ilLPListOfProgressGUI\details().

{
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'),
}
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
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);
$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_OBJECTIVES,
{
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);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__appendUserInfo ( $info,
  $a_user 
)

Definition at line 419 of file class.ilLearningProgressBaseGUI.php.

References $ilUser, ilFormat\_secondsToString(), ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), and IL_CAL_DATETIME.

Referenced by ilLPListOfProgressGUI\__showProgressList(), ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\editUser(), and ilLPListOfObjectsGUI\userDetails().

{
global $ilUser;
// #13525 - irrelevant personal data is not to be presented
return;
if(!is_object($a_user))
{
}
if($a_user->getId() != $ilUser->getId())
{
$info->addSection($this->lng->txt("trac_user_data"));
// $info->addProperty($this->lng->txt('username'),$a_user->getLogin());
// $info->addProperty($this->lng->txt('name'),$a_user->getFullname());
$info->addProperty($this->lng->txt('last_login'),
$info->addProperty($this->lng->txt('trac_total_online'),
ilFormat::_secondsToString(ilOnlineTracking::getOnlineTime($a_user->getId())));
return true;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__buildFooter ( )

Definition at line 219 of file class.ilLearningProgressBaseGUI.php.

References getMode().

Referenced by ilLearningProgressGUI\executeCommand().

{
switch($this->getMode())
{
case self::LP_CONTEXT_PERSONAL_DESKTOP:
$this->tpl->show(true);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__buildHeader ( )

Definition at line 229 of file class.ilLearningProgressBaseGUI.php.

References getMode(), and ilUtil\infoPanel().

Referenced by ilLearningProgressGUI\executeCommand().

{
if($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP)
{
$this->tpl->setTitle($this->lng->txt("learning_progress"));
// set locator
/*
$this->tpl->setVariable("TXT_LOCATOR", $this->lng->txt("locator"));
$this->tpl->touchBlock("locator_separator");
$this->tpl->touchBlock("locator_item");
//$this->tpl->setCurrentBlock("locator_item");
//$this->tpl->setVariable("ITEM", $this->lng->txt("personal_desktop"));
//$this->tpl->setVariable("LINK_ITEM",
// $this->ctrl->getLinkTargetByClass("ilpersonaldesktopgui"));
//$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("locator_item");
$this->tpl->setVariable("ITEM", $this->lng->txt("learning_progress"));
$this->tpl->setVariable("LINK_ITEM",
$this->ctrl->getLinkTargetByClass('illearningprogressgui'));
$this->tpl->parseCurrentBlock();
*/
// display infopanel if something happened
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__getDefaultCommand ( )

Definition at line 108 of file class.ilLearningProgressBaseGUI.php.

References $cmd.

Referenced by ilLPListOfSettingsGUI\executeCommand(), ilLPListOfObjectsGUI\executeCommand(), ilLPListOfProgressGUI\executeCommand(), and ilLPObjectStatisticsGUI\executeCommand().

{
if(strlen($cmd = $this->ctrl->getCmd()))
{
return $cmd;
}
return 'show';
}

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__getLegendHTML ( )

Definition at line 627 of file class.ilLearningProgressBaseGUI.php.

References $lng, $tpl, ilUtil\getImagePath(), ilPanelGUI\getInstance(), and ilPanelGUI\PANEL_STYLE_SECONDARY.

Referenced by ilLPListOfObjectsGUI\__listObjects(), ilLPListOfProgressGUI\__showProgressList(), ilLPListOfObjectsGUI\__showUsersList(), ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\showUserObjectMatrix(), and ilLPListOfObjectsGUI\userDetails().

{
global $lng;
$tpl = new ilTemplate("tpl.lp_legend.html", true, true, "Services/Tracking");
$tpl->setVariable("IMG_NOT_ATTEMPTED",
ilUtil::getImagePath("scorm/not_attempted.svg"));
$tpl->setVariable("IMG_IN_PROGRESS",
ilUtil::getImagePath("scorm/incomplete.svg"));
$tpl->setVariable("IMG_COMPLETED",
ilUtil::getImagePath("scorm/completed.svg"));
$tpl->setVariable("IMG_FAILED",
ilUtil::getImagePath("scorm/failed.svg"));
$tpl->setVariable("TXT_NOT_ATTEMPTED",
$lng->txt("trac_not_attempted"));
$tpl->setVariable("TXT_IN_PROGRESS",
$lng->txt("trac_in_progress"));
$tpl->setVariable("TXT_COMPLETED",
$lng->txt("trac_completed"));
$tpl->setVariable("TXT_FAILED",
$lng->txt("trac_failed"));
include_once "Services/UIComponent/Panel/classes/class.ilPanelGUI.php";
$panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
$panel->setBody($tpl->get());
return $panel->getHTML();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__getPercent (   $max,
  $reached 
)

Definition at line 585 of file class.ilLearningProgressBaseGUI.php.

{
if(!$max)
{
return "0%";
}
return sprintf("%d%%",$reached / $max * 100);
}
& ilLearningProgressBaseGUI::__initTableGUI ( )

Definition at line 373 of file class.ilLearningProgressBaseGUI.php.

{
include_once "./Services/Table/classes/class.ilTableGUI.php";
return new ilTableGUI(0,false);
}
ilLearningProgressBaseGUI::__insertPath ( $a_tpl,
  $a_ref_id 
)

insert path

Definition at line 262 of file class.ilLearningProgressBaseGUI.php.

References $path.

{
global $tree;
$path_arr = $tree->getPathFull($a_ref_id);
$counter = 0;
foreach($tree->getPathFull($a_ref_id) as $data)
{
if($counter++)
{
$path .= " -> ";
}
$path .= $data['title'];
}
$a_tpl->setCurrentBlock("path_item");
$a_tpl->setVariable("PATH_ITEM",$path);
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("path");
$a_tpl->parseCurrentBlock();
return $path;
}
ilLearningProgressBaseGUI::__readItemStatusInfo (   $a_items)

Definition at line 595 of file class.ilLearningProgressBaseGUI.php.

References ilMDEducational\_getTypicalLearningTimeSeconds(), ilLPObjSettings\_lookupVisits(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_SCORM, ilLPObjSettings\LP_MODE_TLT, and ilLPObjSettings\LP_MODE_VISITS.

{
global $ilObjDataCache;
include_once 'Services/Object/classes/class.ilObjectLP.php';
foreach($a_items as $item_id)
{
$olp = ilObjectLP::getInstance($item_id);
$this->obj_data[$item_id]['type'] = $ilObjDataCache->lookupType($item_id);
$this->obj_data[$item_id]['mode'] = $olp->getCurrentMode();
if($this->obj_data[$item_id]['mode'] == ilLPObjSettings::LP_MODE_TLT)
{
include_once './Services/MetaData/classes/class.ilMDEducational.php';
$this->obj_data[$item_id]['tlt'] = ilMDEducational::_getTypicalLearningTimeSeconds($item_id);
}
if($this->obj_data[$item_id]['mode'] == ilLPObjSettings::LP_MODE_VISITS)
{
$this->obj_data[$item_id]['visits'] = ilLPObjSettings::_lookupVisits($item_id);
}
if($this->obj_data[$item_id]['mode'] == ilLPObjSettings::LP_MODE_SCORM)
{
$collection = $olp->getCollectionInstance();
if($collection)
{
$this->obj_data[$item_id]['scos'] = count($collection->getItems());
}
}
}
}

+ Here is the call graph for this function:

ilLearningProgressBaseGUI::__readStatus (   $a_obj_id,
  $user_id 
)
ilLearningProgressBaseGUI::__setSubTabs (   $a_active)

Definition at line 117 of file class.ilLearningProgressBaseGUI.php.

References ilObjUserTracking\_enabledUserRelatedData(), ilObjUserTracking\_hasLearningProgressLearner(), ilObjUserTracking\_hasLearningProgressOtherUsers(), ilObjectLP\getInstance(), getMode(), getRefId(), getUserId(), isAnonymized(), LP_ACTIVE_MATRIX, LP_ACTIVE_OBJECTS, LP_ACTIVE_PROGRESS, LP_ACTIVE_SETTINGS, and LP_ACTIVE_SUMMARY.

Referenced by ilLearningProgressGUI\executeCommand().

{
global $rbacsystem,$ilObjDataCache;
switch($this->getMode())
{
case self::LP_CONTEXT_PERSONAL_DESKTOP:
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
{
$this->tabs_gui->addTarget('trac_progress',
$this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
"","","",$a_active == self::LP_ACTIVE_PROGRESS);
}
{
$this->tabs_gui->addTarget('trac_objects',
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
"","","",$a_active == self::LP_ACTIVE_OBJECTS);
}
break;
case self::LP_CONTEXT_REPOSITORY:
// #12771 - do not show status if learning progress is deactivated
include_once './Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($this->obj_id);
if($olp->isActive())
{
$has_read = $rbacsystem->checkAccess('read_learning_progress',$this->getRefId());
if($this->isAnonymized() || !$has_read)
{
$this->ctrl->setParameterByClass('illplistofprogressgui','user_id',$this->getUserId());
$this->tabs_gui->addSubTabTarget('trac_progress',
$this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
"","","",$a_active == self::LP_ACTIVE_PROGRESS);
}
else
{
// Check if it is a course
$sub_tab = ($ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($this->getRefId())) == 'crs') ?
'trac_crs_objects' :
'trac_objects';
$this->tabs_gui->addSubTabTarget($sub_tab,
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
"","","",$a_active == self::LP_ACTIVE_OBJECTS);
}
if($has_read)
{
if(!$this->isAnonymized() && !in_array($this->obj_type, array('tst', 'htlm', 'exc', 'sess')) && !($olp instanceof ilPluginLP))
{
$this->tabs_gui->addSubTabTarget("trac_matrix",
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui", 'showUserObjectMatrix'),
"", "", "", $a_active == self::LP_ACTIVE_MATRIX);
}
$this->tabs_gui->addSubTabTarget("trac_summary",
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui", 'showObjectSummary'),
"", "", "", $a_active == self::LP_ACTIVE_SUMMARY);
}
}
if(!($olp instanceof ilPluginLP) &&
$rbacsystem->checkAccess('edit_learning_progress',$this->getRefId()))
{
$this->tabs_gui->addSubTabTarget('trac_settings',
$this->ctrl->getLinkTargetByClass('illplistofsettingsgui',''),
"","","",$a_active == self::LP_ACTIVE_SETTINGS);
}
break;
case self::LP_CONTEXT_ADMINISTRATION:
/*
$this->tabs_gui->addSubTabTarget('trac_progress',
$this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
"","","",$a_active == self::LP_ACTIVE_PROGRESS);
*/
$this->tabs_gui->addSubTabTarget('trac_objects',
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
"","","",$a_active == self::LP_ACTIVE_OBJECTS);
break;
case self::LP_CONTEXT_USER_FOLDER:
case self::LP_CONTEXT_ORG_UNIT:
// No tabs default class is lpprogressgui
break;
default:
die ('No valid mode given');
break;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__showEditUser (   $a_user_id,
  $a_ref_id,
  $a_cancel,
  $a_sub_id = false 
)

Definition at line 715 of file class.ilLearningProgressBaseGUI.php.

References $ilCtrl, ilObject\_lookupObjId(), and initEditUserForm().

Referenced by ilLPListOfObjectsGUI\editUser().

{
global $ilCtrl;
if(!$a_sub_id)
{
$obj_id = ilObject::_lookupObjId($a_ref_id);
}
else
{
$ilCtrl->setParameter($this,'userdetails_id',$a_sub_id);
$obj_id = ilObject::_lookupObjId($a_sub_id);
}
$ilCtrl->setParameter($this, 'user_id', $a_user_id);
$ilCtrl->setParameter($this, 'details_id', $a_ref_id);
$form = $this->initEditUserForm($a_user_id, $obj_id, $a_cancel);
return $form->getHTML();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__showImageByStatus ( $tpl,
  $a_status,
  $tpl_prefix = "" 
)

Definition at line 286 of file class.ilLearningProgressBaseGUI.php.

References $tpl, and _showImageByStatus().

{
return ilLearningProgressBaseGUI::_showImageByStatus($tpl,$a_status,$tpl_prefix);
}

+ Here is the call graph for this function:

ilLearningProgressBaseGUI::__showObjectDetails ( $info,
  $item_id = 0,
  $add_section = true 
)

show details about current object.

Uses an existing info_gui object.

Definition at line 384 of file class.ilLearningProgressBaseGUI.php.

References $mode, ilMDEducational\_getTypicalLearningTimeSeconds(), ilLPObjSettings\_lookupVisits(), ilFormat\_secondsToString(), ilObjectLP\getInstance(), and ilLPObjSettings\LP_MODE_VISITS.

Referenced by ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\details(), ilLPListOfObjectsGUI\editUser(), ilLPListOfObjectsGUI\showUserObjectMatrix(), and ilLPListOfObjectsGUI\userDetails().

{
global $ilObjDataCache;
$details_id = $item_id ? $item_id : $this->details_id;
include_once 'Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($details_id);
$mode = $olp->getCurrentMode();
include_once './Services/MetaData/classes/class.ilMDEducational.php';
{
// Section object details
if($add_section)
{
$info->addSection($this->lng->txt('details'));
}
{
$info->addProperty($this->lng->txt('trac_required_visits'), ilLPObjSettings::_lookupVisits($details_id));
}
{
$info->addProperty($this->lng->txt('meta_typical_learning_time'), ilFormat::_secondsToString($seconds));
}
return true;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__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.

Parameters
arrayArray of ids
stringtable name
stringtable field
stringid name
Returns
array sorted ids

protected

Definition at line 559 of file class.ilLearningProgressBaseGUI.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
if(!$a_ids)
{
return array();
}
// comment by mjansen: Requesting database in gui classes?
// use database to sort user array
$where = "WHERE ".$ilDB->in($a_id_name, $a_ids, false, 'integer')." ";
$query = "SELECT ".$a_id_name." FROM ".$a_table." ".
$where.
"ORDER BY ".$a_field;
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->$a_id_name;
}
return $ids ? $ids : array();
}
ilLearningProgressBaseGUI::__updateUser (   $user_id,
  $obj_id 
)

Definition at line 737 of file class.ilLearningProgressBaseGUI.php.

References ilLPStatusWrapper\_updateStatus(), and initEditUserForm().

Referenced by ilLPListOfObjectsGUI\updateUser().

{
$form = $this->initEditUserForm($user_id, $obj_id);
if($form->checkInput())
{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($obj_id, $user_id);
$marks->setMark($form->getInput("mark"));
$marks->setComment($form->getInput("comment"));
$do_lp = false;
// status/completed is optional
$status = $form->getItemByPostVar("completed");
if(is_object($status))
{
if($marks->getCompleted() != $form->getInput("completed"))
{
$marks->setCompleted($form->getInput("completed"));
$do_lp = true;
}
}
$marks->update();
// #11600
if($do_lp)
{
include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
ilLPStatusWrapper::_updateStatus($obj_id, $user_id);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::_getImagePathForStatus (   $a_status)

Get image path for status.

Definition at line 306 of file class.ilLearningProgressBaseGUI.php.

References ilUtil\getImagePath(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, ilLPStatus\LP_STATUS_NOT_PARTICIPATED, ilLPStatus\LP_STATUS_NOT_REGISTERED, ilLPStatus\LP_STATUS_PARTICIPATED, and ilLPStatus\LP_STATUS_REGISTERED.

Referenced by __appendLPDetails(), ilLPObjectStatisticsLPTableGUI\__construct(), _showImageByStatus(), ilLMExplorerGUI\checkLPIcon(), ilLPProgressTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilLPObjectStatisticsLPTableGUI\getDetailItems(), ilTrSummaryTableGUI\getItems(), ilDataCollectionRecordListTableGUI\getStatus(), ilLearningProgressGUI\initCollectionManualForm(), ilSCORMTrackingItemsTableGUI\parseValue(), ilSCORM2004TrackingItemsTableGUI\parseValue(), ilLPTableBaseGUI\parseValue(), ilLPStatus\preloadListGUIData(), ilPortfolioPageGUI\renderMyCourses(), and ilLearningProgressGUI\showtlt().

{
include_once("./Services/Tracking/classes/class.ilLPStatus.php");
// constants are either number or string, so make comparison string-based
switch((string)$a_status)
{
return ilUtil::getImagePath('scorm/incomplete.svg');
break;
return ilUtil::getImagePath('scorm/complete.svg');
break;
return ilUtil::getImagePath('scorm/not_attempted.svg');
break;
return ilUtil::getImagePath('scorm/failed.svg');
break;
default:
return ilUtil::getImagePath('scorm/not_attempted.svg');
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::_getStatusText (   $a_status)

Get status alt text.

Definition at line 345 of file class.ilLearningProgressBaseGUI.php.

References $lng, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.

Referenced by __appendLPDetails(), ilLPObjectStatisticsLPTableGUI\__construct(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilLPProgressTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilSCORM2004TrackingItemsTableGUI\fillRowCSV(), ilSCORMTrackingItemsTableGUI\fillRowCSV(), ilLPProgressTableGUI\fillRowCSV(), ilTrObjectUsersPropsTableGUI\fillRowCSV(), ilTrUserObjectsPropsTableGUI\fillRowCSV(), ilTrMatrixTableGUI\fillRowCSV(), ilSCORM2004TrackingItemsTableGUI\fillRowExcel(), ilSCORMTrackingItemsTableGUI\fillRowExcel(), ilLPProgressTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilLPObjectStatisticsLPTableGUI\getDetailItems(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilTrSummaryTableGUI\getItems(), ilLearningProgressGUI\initCollectionManualForm(), ilLPObjectStatisticsLPTableGUI\initFilter(), ilSCORM2004TrackingItemsTableGUI\parseValue(), ilSCORMTrackingItemsTableGUI\parseValue(), ilLPTableBaseGUI\parseValue(), ilLPStatus\preloadListGUIData(), ilPortfolioPageGUI\renderMyCourses(), and ilLearningProgressGUI\showtlt().

{
global $lng;
include_once("./Services/Tracking/classes/class.ilLPStatus.php");
//echo "#".$a_status."#";
switch($a_status)
{
return $lng->txt(ilLPStatus::LP_STATUS_FAILED);
default:
{
}
return $lng->txt($a_status);
}
}

+ Here is the caller graph for this function:

static ilLearningProgressBaseGUI::_showImageByStatus ( $tpl,
  $a_status,
  $tpl_prefix = "" 
)
static

Definition at line 292 of file class.ilLearningProgressBaseGUI.php.

References $lng, $tpl, and _getImagePathForStatus().

Referenced by __showImageByStatus().

{
global $lng;
$tpl->setVariable($tpl_prefix."STATUS_IMG",
$tpl->setVariable($tpl_prefix."STATUS_ALT",$lng->txt($a_status));
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::getUserId ( )

Definition at line 94 of file class.ilLearningProgressBaseGUI.php.

References $_GET.

Referenced by __setSubTabs(), ilLearningProgressGUI\executeCommand(), ilLPListOfProgressGUI\executeCommand(), and ilLPListOfProgressGUI\show().

{
if($this->usr_id)
{
return $this->usr_id;
}
if((int) $_GET['user_id'])
{
return (int) $_GET['user_id'];
}
return 0;
}

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::ilLearningProgressBaseGUI (   $a_mode,
  $a_ref_id = 0,
  $a_usr_id = 0 
)

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

References $ilCtrl, $lng, $tpl, ilObjUserTracking\_enabledUserRelatedData(), and ilObjectLP\getInstance().

Referenced by ilLearningProgressGUI\ilLearningProgressGUI(), ilLPListOfObjectsGUI\ilLPListOfObjectsGUI(), ilLPListOfProgressGUI\ilLPListOfProgressGUI(), and ilLPObjectStatisticsGUI\ilLPObjectStatisticsGUI().

{
global $tpl,$ilCtrl,$lng,$ilObjDataCache,$ilTabs;
$this->tpl =& $tpl;
$this->ctrl =& $ilCtrl;
$this->lng =& $lng;
$this->lng->loadLanguageModule('trac');
$this->tabs_gui =& $ilTabs;
$this->mode = $a_mode;
$this->ref_id = $a_ref_id;
$this->obj_id = $ilObjDataCache->lookupObjId($this->ref_id);
$this->obj_type = $ilObjDataCache->lookupType($this->obj_id);
$this->usr_id = $a_usr_id;
$this->anonymized = (bool)!ilObjUserTracking::_enabledUserRelatedData();
if(!$this->anonymized && $this->obj_id)
{
include_once "Services/Object/classes/class.ilObjectLP.php";
$olp = ilObjectLP::getInstance($this->obj_id);
$this->anonymized = $olp->isAnonymized();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::initEditUserForm (   $a_user_id,
  $a_obj_id,
  $a_cancel = null 
)
protected

Definition at line 657 of file class.ilLearningProgressBaseGUI.php.

References $ilCtrl, $lng, ilLPStatus\_lookupStatus(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilObjectLP\getInstance(), ilUserUtil\getNamePresentation(), ilLPObjSettings\LP_MODE_MANUAL, ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilCheckboxInputGUI\setChecked(), ilTextInputGUI\setValue(), and ilNonEditableValueGUI\setValue().

Referenced by __showEditUser(), and __updateUser().

{
global $lng, $ilCtrl;
include_once 'Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($a_obj_id);
$lp_mode = $olp->getCurrentMode();
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this, "updateUser"));
$form->setTitle($lng->txt("edit").": ".ilObject::_lookupTitle($a_obj_id));
$form->setDescription($lng->txt('trac_mode').": ".$olp->getModeText($lp_mode));
include_once "Services/User/classes/class.ilUserUtil.php";
$user = new ilNonEditableValueGUI($lng->txt("user"), null, true);
$user->setValue(ilUserUtil::getNamePresentation($a_user_id, true));
$form->addItem($user);
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($a_obj_id, $a_user_id);
$type = ilObject::_lookupType($a_obj_id);
if($type != 'lm')
{
$mark = new ilTextInputGUI($lng->txt("trac_mark"), "mark");
$mark->setValue($marks->getMark());
$mark->setMaxLength(32);
$form->addItem($mark);
}
$comm = new ilTextInputGUI($lng->txt("trac_comment"), "comment");
$comm->setValue($marks->getComment());
$form->addItem($comm);
{
include_once("./Services/Tracking/classes/class.ilLPStatus.php");
$completed = ilLPStatus::_lookupStatus($a_obj_id, $a_user_id);
$status = new ilCheckboxInputGUI($lng->txt('trac_completed'), "completed");
$form->addItem($status);
}
$form->addCommandButton("updateUser", $lng->txt('save'));
if($a_cancel)
{
$form->addCommandButton($a_cancel, $lng->txt('cancel'));
}
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::isAnonymized ( )
static ilLearningProgressBaseGUI::isObjectOffline (   $a_obj_id,
  $a_type = null 
)
static

Definition at line 772 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilLPProgressTableGUI\getItems(), and ilTrSummaryTableGUI\getItems().

{
global $objDefinition, $ilObjDataCache;
if(!$a_type)
{
$a_type = $ilObjDataCache->lookupType($a_obj_id);
}
if($objDefinition->isPluginTypeName($a_type))
{
return false;
}
$class = "ilObj".$objDefinition->getClassName($a_type)."Access";
include_once $objDefinition->getLocation($a_type)."/class.".$class.".php";
return call_user_func(array($class,'_isOffline'), $a_obj_id);
// PHP 5.3 only ?
//return $class::_isOffline($obj_id);
}

+ Here is the caller graph for this function:

Field Documentation

ilLearningProgressBaseGUI::$anonymized
protected

Definition at line 29 of file class.ilLearningProgressBaseGUI.php.

Referenced by isAnonymized().

ilLearningProgressBaseGUI::$ctrl = null

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

ilLearningProgressBaseGUI::$mode = 0
ilLearningProgressBaseGUI::$ref_id = 0

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

Referenced by getRefId().

const ilLearningProgressBaseGUI::LP_ACTIVE_MATRIX = 11

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

Referenced by __setSubTabs().

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJECTS = 2

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

Referenced by __setSubTabs().

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATACCESS = 7

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

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATADMIN = 10

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

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATDAILY = 9

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

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATTYPES = 8

Definition at line 44 of file class.ilLearningProgressBaseGUI.php.

const ilLearningProgressBaseGUI::LP_ACTIVE_PROGRESS = 3

Definition at line 39 of file class.ilLearningProgressBaseGUI.php.

Referenced by __setSubTabs().

const ilLearningProgressBaseGUI::LP_ACTIVE_SETTINGS = 1

Definition at line 37 of file class.ilLearningProgressBaseGUI.php.

Referenced by __setSubTabs().

const ilLearningProgressBaseGUI::LP_ACTIVE_SUMMARY = 6

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

Referenced by __setSubTabs().

const ilLearningProgressBaseGUI::LP_ACTIVE_USERS = 5

Definition at line 41 of file class.ilLearningProgressBaseGUI.php.

const ilLearningProgressBaseGUI::LP_CONTEXT_ADMINISTRATION = 2
const ilLearningProgressBaseGUI::LP_CONTEXT_ORG_UNIT = 5
const ilLearningProgressBaseGUI::LP_CONTEXT_PERSONAL_DESKTOP = 1
const ilLearningProgressBaseGUI::LP_CONTEXT_USER_FOLDER = 4

Definition at line 34 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilObjUserGUI\executeCommand().


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