ILIAS  eassessment Revision 61809
 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)
 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="")
 _getImagePathForStatus ($a_status)
 Get image path for status.
 _getStatusText ($a_status)
 Get status alt text.
__initTableGUI ()
 __showObjectDetails (&$info, $item_id=0)
 show details about current object.
 __appendUserInfo (&$info, $a_user)
 __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 ()
 __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="")

Data Fields

 $tpl = null
 $ctrl = null
 $lng = null
 $ref_id = 0
 $mode = 0
 $statistics_activated = false

Detailed Description

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

Member Function Documentation

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

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

References $comment, $type, __readStatus(), ilLearningProgress\_getProgress(), ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilFormat\_secondsToString(), ilDatePresentation\formatDate(), and IL_CAL_DATETIME.

Referenced by ilLPListOfProgressGUI\details().

{
global $ilObjDataCache;
$type = $ilObjDataCache->lookupType($item_id);
// Section learning_progress
$info->addSection($this->lng->txt('trac_learning_progress'));
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']));
}
$info->addProperty($this->lng->txt('trac_status'),$this->lng->txt($this->__readStatus($item_id,$user_id)));
break;
case 'exc':
case 'tst':
case 'crs':
case 'sahs':
case 'grp':
$info->addProperty($this->lng->txt('trac_status'),$this->lng->txt($this->__readStatus($item_id,$user_id)));
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 460 of file class.ilLearningProgressBaseGUI.php.

References ilOnlineTracking\_getOnlineTime(), ilFormat\_secondsToString(), ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), and IL_CAL_DATETIME.

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

{
global $ilUser;
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'),
return true;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__buildFooter ( )

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

References getMode(), and LP_MODE_PERSONAL_DESKTOP.

Referenced by ilLearningProgressGUI\executeCommand().

{
switch($this->getMode())
{
$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 261 of file class.ilLearningProgressBaseGUI.php.

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

Referenced by ilLearningProgressGUI\executeCommand().

{
{
$this->tpl->setCurrentBlock("header_image");
$this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_pd_b.gif"));
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("HEADER",$this->lng->txt("personal_desktop"));
// 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::__checkPDF ( )

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

References ilRPCServerSettings\getInstance().

{
include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
$this->active_pdf = $rpc_server->getHost() ? true : false;
}

+ Here is the call graph for this function:

ilLearningProgressBaseGUI::__getDefaultCommand ( )

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

References $cmd.

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

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

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__getLegendHTML ( )

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

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

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.gif"));
$tpl->setVariable("IMG_IN_PROGRESS",
ilUtil::getImagePath("scorm/incomplete.gif"));
$tpl->setVariable("IMG_COMPLETED",
ilUtil::getImagePath("scorm/completed.gif"));
$tpl->setVariable("IMG_FAILED",
ilUtil::getImagePath("scorm/failed.gif"));
$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"));
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__getPercent (   $max,
  $reached 
)

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

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

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

Referenced by ilLMStatisticsGUI\__showSearchGroupTable(), ilLMStatisticsGUI\__showSearchRoleTable(), and ilLMStatisticsGUI\__showSearchUserTable().

{
include_once "./Services/Table/classes/class.ilTableGUI.php";
return new ilTableGUI(0,false);
}

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__insertPath ( $a_tpl,
  $a_ref_id 
)

insert path

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

References $data, and $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 624 of file class.ilLearningProgressBaseGUI.php.

References ilLPCollectionCache\_getItems(), ilMDEducational\_getTypicalLearningTimeSeconds(), ilLPObjSettings\_lookupMode(), ilLPObjSettings\_lookupVisits(), LP_MODE_SCORM, LP_MODE_TLT, and LP_MODE_VISITS.

{
global $ilObjDataCache;
foreach($a_items as $item_id)
{
$this->obj_data[$item_id]['mode'] = ilLPObjSettings::_lookupMode($item_id);
$this->obj_data[$item_id]['type'] = $ilObjDataCache->lookupType($item_id);
if($this->obj_data[$item_id]['mode'] == 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'] == LP_MODE_VISITS)
{
include_once './Services/Tracking/classes/class.ilLPObjSettings.php';
$this->obj_data[$item_id]['visits'] = ilLPObjSettings::_lookupVisits($item_id);
}
if($this->obj_data[$item_id]['mode'] == LP_MODE_SCORM)
{
include_once './Services/Tracking/classes/class.ilLPCollectionCache.php';
$this->obj_data[$item_id]['scos'] = count(ilLPCollectionCache::_getItems($item_id));
}
}
}

+ Here is the call graph for this function:

ilLearningProgressBaseGUI::__readStatus (   $a_obj_id,
  $user_id 
)

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

References ilLPStatusWrapper\_getCompleted(), ilLPStatusWrapper\_getFailed(), ilLPStatusWrapper\_getInProgress(), LP_STATUS_COMPLETED, LP_STATUS_FAILED, LP_STATUS_IN_PROGRESS, and LP_STATUS_NOT_ATTEMPTED.

Referenced by __appendLPDetails().

{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
if(in_array($user_id,ilLPStatusWrapper::_getInProgress($a_obj_id)))
{
return $status = LP_STATUS_IN_PROGRESS;
}
elseif(in_array($user_id,ilLPStatusWrapper::_getCompleted($a_obj_id)))
{
return $status = LP_STATUS_COMPLETED;
}
elseif(in_array($user_id,ilLPStatusWrapper::_getFailed($a_obj_id)))
{
return $status = LP_STATUS_FAILED;
}
else
{
return $status = LP_STATUS_NOT_ATTEMPTED;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__setSubTabs (   $a_active)

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

References $lng, getMode(), getUserId(), isAnonymized(), LP_ACTIVE_LM_STATISTICS, LP_ACTIVE_OBJECTS, LP_ACTIVE_PROGRESS, LP_ACTIVE_SETTINGS, LP_ACTIVE_SUMMARY, LP_MODE_ADMINISTRATION, LP_MODE_PERSONAL_DESKTOP, LP_MODE_REPOSITORY, and LP_MODE_USER_FOLDER.

Referenced by ilLearningProgressGUI\executeCommand().

{
global $rbacsystem,$ilObjDataCache,$lng;
switch($this->getMode())
{
$this->tabs_gui->addSubTabTarget('trac_progress',
$this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
"","","",$a_active == LP_ACTIVE_PROGRESS);
$this->tabs_gui->addSubTabTarget('trac_objects',
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
"","","",$a_active == LP_ACTIVE_OBJECTS);
break;
if($rbacsystem->checkAccess('edit_learning_progress',$this->getRefId()))
{
if($this->isAnonymized())
{
$this->ctrl->setParameterByClass('illplistofprogressgui','user_id',$this->getUserId());
$this->tabs_gui->addSubTabTarget('trac_progress',
$this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
"","","",$a_active == 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 == LP_ACTIVE_OBJECTS);
}
if ($this->statistics_activated)
{
$this->tabs_gui->addSubTabTarget('trac_lm_statistics',
$this->ctrl->getLinkTargetByClass('illmstatisticsgui',''),
"","","",$a_active == LP_ACTIVE_LM_STATISTICS);
}
if(!$this->isAnonymized() && !in_array($this->obj_type, array('tst', 'lm', 'htlm', 'exc')))
{
$this->tabs_gui->addSubTabTarget("trac_matrix",
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui", 'showUserObjectMatrix'),
"", "", "", $a_active == LP_ACTIVE_MATRIX);
}
$this->tabs_gui->addSubTabTarget("trac_summary",
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui", 'showObjectSummary'),
"", "", "", $a_active == LP_ACTIVE_SUMMARY);
$this->tabs_gui->addSubTabTarget('trac_settings',
$this->ctrl->getLinkTargetByClass('illplistofsettingsgui',''),
"","","",$a_active == LP_ACTIVE_SETTINGS);
}
break;
$this->tabs_gui->addSubTabTarget('trac_progress',
$this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
"","","",$a_active == LP_ACTIVE_PROGRESS);
$this->tabs_gui->addSubTabTarget('trac_objects',
$this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
"","","",$a_active == LP_ACTIVE_OBJECTS);
break;
// 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::__showButton (   $a_link,
  $a_text,
  $a_target = '' 
)

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

Referenced by ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\details(), ilLMStatisticsGUI\listUsersGroup(), ilLMStatisticsGUI\listUsersRole(), and ilLMStatisticsGUI\search().

{
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
// display button
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK",$a_link);
$this->tpl->setVariable("BTN_TXT",$a_text);
if($a_target)
{
$this->tpl->setVariable("BTN_TARGET",$a_target);
}
$this->tpl->parseCurrentBlock();
}

+ 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 674 of file class.ilLearningProgressBaseGUI.php.

References $ilCtrl, $lng, $mode, $tpl, $type, ilLPStatusWrapper\_getCompleted(), ilObjUser\_getPersonalPicturePath(), ilLPObjSettings\_lookupMode(), ilLPObjSettings\_mode2Text(), ilUtil\formCheckbox(), LP_MODE_MANUAL, LP_MODE_MANUAL_BY_TUTOR, and ilUtil\prepareFormOutput().

Referenced by ilLPListOfObjectsGUI\editUser().

{
global $ilObjDataCache, $lng, $ilCtrl;
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
if(!$a_sub_id)
{
$obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
}
else
{
$ilCtrl->setParameter($this,'userdetails_id',$a_sub_id);
$obj_id = $ilObjDataCache->lookupObjId($a_sub_id);
}
$marks = new ilLPMarks($obj_id, $a_user_id);
$tpl = new ilTemplate('tpl.lp_edit_user.html', true, true, 'Services/Tracking');
$tpl->setVariable("OBJ_TITLE", $lng->txt("edit").": ".$ilObjDataCache->lookupTitle($obj_id));
$tpl->setVariable("OBJ_SUBTITLE", $this->lng->txt('trac_mode').": ".ilLPObjSettings::_mode2Text(ilLPObjSettings::_lookupMode($obj_id)));
$ilCtrl->setParameter($this,'user_id',$a_user_id);
$ilCtrl->setParameter($this,'details_id',$a_ref_id);
$tpl->setVariable("FORMACTION",$ilCtrl->getFormAction($this));
$tpl->setVariable("TYPE_IMG",ilObjUser::_getPersonalPicturePath($a_user_id,'xxsmall'));
$tpl->setVariable("ALT_IMG",$ilObjDataCache->lookupTitle($a_user_id));
$tpl->setVariable("TXT_LP",$lng->txt('trac_learning_progress_tbl_header'));
$tpl->setVariable("COMMENT",ilUtil::prepareFormOutput($marks->getComment(),false));
$type = $ilObjDataCache->lookupType($obj_id);
if($type != 'lm')
{
$tpl->setVariable("TXT_MARK",$lng->txt('trac_mark'));
$tpl->setVariable("MARK",ilUtil::prepareFormOutput($marks->getMark(),false));
}
$tpl->setVariable("TXT_COMMENT",$lng->txt('trac_comment'));
{
$completed = ilLPStatusWrapper::_getCompleted($obj_id);
$tpl->setVariable("mode_manual");
$tpl->setVariable("TXT_COMPLETED",$lng->txt('trac_completed'));
$tpl->setVariable("CHECK_COMPLETED",ilUtil::formCheckbox(in_array($a_user_id,$completed),
'completed',
'1'));
}
$tpl->setVariable("TXT_CANCEL",$lng->txt('cancel'));
$tpl->setVariable("TXT_SAVE",$lng->txt('save'));
$tpl->setVariable("CMD_CANCEL", $a_cancel);
return $tpl->get();
}

+ 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 321 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 
)

show details about current object.

Uses an existing info_gui object.

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

References ilMDEducational\_getTypicalLearningTimeSeconds(), ilLPObjSettings\_lookupMode(), ilLPObjSettings\_lookupVisits(), ilFormat\_secondsToString(), and 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/MetaData/classes/class.ilMDEducational.php';
{
// Section object details
$info->addSection($this->lng->txt('details'));
/*
$info->addProperty($this->lng->txt('title'),$ilObjDataCache->lookupTitle($details_id));
// :TODO: event title
if(strlen($desc = $ilObjDataCache->lookupDescription($details_id)))
{
$info->addProperty($this->lng->txt('description'),$desc);
}
$info->addProperty($this->lng->txt('trac_mode'),ilLPObjSettings::_mode2Text(ilLPObjSettings::_lookupMode($details_id)));
*/
{
$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 588 of file class.ilLearningProgressBaseGUI.php.

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

Referenced by ilPDFPresentation\__createObjectList(), ilPDFPresentation\__createPersonalProgressList(), and ilPDFPresentation\__showItems().

{
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();
}

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::__updateUser (   $user_id,
  $obj_id 
)

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

References $_POST, ilLPStatusWrapper\_updateStatus(), and ilUtil\stripSlashes().

Referenced by ilLPListOfObjectsGUI\updateUser().

{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($obj_id, $user_id);
$marks->setMark(ilUtil::stripSlashes($_POST['mark']));
$marks->setComment(ilUtil::stripSlashes($_POST['comment']));
$marks->setCompleted((bool) $_POST['completed']);
$marks->update();
include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
}

+ 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 341 of file class.ilLearningProgressBaseGUI.php.

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

Referenced by _showImageByStatus(), ilLPProgressTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilTrSummaryTableGUI\getItems(), and ilLPTableBaseGUI\parseValue().

{
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.gif');
break;
return ilUtil::getImagePath('scorm/complete.gif');
break;
return ilUtil::getImagePath('scorm/not_attempted.gif');
break;
return ilUtil::getImagePath('scorm/failed.gif');
break;
default:
return ilUtil::getImagePath('scorm/not_attempted.gif');
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 327 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::activateStatistics (   $a_act = true)

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

Referenced by ilObjContentObjectGUI\executeCommand().

{
$this->statistics_activated = $a_act;
}

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::activePDF ( )

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

{
return $this->active_pdf;
}
ilLearningProgressBaseGUI::getObjId ( )
ilLearningProgressBaseGUI::getUserId ( )

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

References $_GET, and $usr_id.

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 66 of file class.ilLearningProgressBaseGUI.php.

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

Referenced by ilLearningProgressGUI\ilLearningProgressGUI(), ilLMStatisticsGUI\ilLMStatisticsGUI(), ilLPListOfObjectsGUI\ilLPListOfObjectsGUI(), ilLPListOfProgressGUI\ilLPListOfProgressGUI(), ilLPListOfSettingsGUI\ilLPListOfSettingsGUI(), and ilPDFPresentation\ilPDFPresentation().

{
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();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::isAnonymized ( )

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

Referenced by __setSubTabs(), ilLPListOfObjectsGUI\__showUsersList(), ilLPListOfObjectsGUI\showUserObjectMatrix(), and ilLPListOfObjectsGUI\userDetails().

{
return $this->anonymized;
}

+ Here is the caller graph for this function:

ilLearningProgressBaseGUI::isObjectAnonymized ( )

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

References ilObjTest\_lookupAnonymity().

Referenced by ilLearningProgressGUI\__getNextClass().

{
switch($this->obj_type)
{
case 'tst':
include_once './Modules/Test/classes/class.ilObjTest.php';
if(ilObjTest::_lookupAnonymity($this->obj_id))
{
return true;
}
default:
return false;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilLearningProgressBaseGUI::$ctrl = null

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

ilLearningProgressBaseGUI::$mode = 0
ilLearningProgressBaseGUI::$statistics_activated = false

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


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