4include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
 
    5require_once(
"./Services/Tracking/classes/class.ilLearningProgressGUI.php");
 
   21        function __construct($a_parent_obj, $a_parent_cmd, $a_user = 
"", $obj_ids = NULL, $details = 
false, $mode = 
null, $personal_only = 
false, $a_parent_id = 
null, $a_parent_ref_id = 
null, $lp_context = 
null)
 
   25                $this->tracked_user = $a_user;
 
   26                $this->obj_ids = $obj_ids;
 
   27                $this->details = $details;              
 
   29                $this->parent_obj_id = $a_parent_id;
 
   30                $this->lp_context = $lp_context;
 
   35                        $this->obj_id = $this->parent_obj_id;
 
   36                        $this->ref_id = $a_parent_ref_id;
 
   39                $this->
setId(
"lpprgtbl");
 
   41                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   47                        $this->has_object_subitems = 
true;
 
   49                        $user = $this->tracked_user;
 
   56                        $this->
addColumn($this->lng->txt(
"trac_title"), 
"title", 
"26%");
 
   57                        $this->
addColumn($this->lng->txt(
"status"), 
"status", 
"7%");
 
   58                        $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
 
   59                        $this->
addColumn($this->lng->txt(
"trac_percentage"), 
"percentage", 
"7%");
 
   60                        $this->
addColumn($this->lng->txt(
"trac_mark"), 
"", 
"5%");
 
   61                        $this->
addColumn($this->lng->txt(
"comment"), 
"", 
"10%");
 
   62                        $this->
addColumn($this->lng->txt(
"trac_mode"), 
"", 
"20%");
 
   63                        $this->
addColumn($this->lng->txt(
"path"), 
"", 
"20%");
 
   64                        $this->
addColumn($this->lng->txt(
"actions"), 
"", 
"5%");
 
   66                        $this->
setTitle(sprintf($this->lng->txt(
"trac_learning_progress_of"), $user->getFullName()));
 
   70                        $this->
addMultiCommand(
"hideSelected", $lng->txt(
"trac_hide_selected"));
 
   76                        include_once 
'./Services/Object/classes/class.ilObjectLP.php';
 
   78                        $collection = $olp->getCollectionInstance();
 
   91                        $this->
setTitle($this->lng->txt(
"details")); 
 
   93                        $this->
addColumn($this->lng->txt(
"trac_title"), 
"title", 
"31%");
 
   94                        $this->
addColumn($this->lng->txt(
"status"), 
"status", 
"7%");
 
   98                                $this->lng->loadLanguageModule(
'content');
 
   99                                $this->
addColumn($this->lng->txt(
'cont_score'),
'score',
'10%');
 
  101                        else if($this->has_object_subitems)
 
  103                                $this->
addColumn($this->lng->txt(
'trac_status_changed'),
'status_changed',
'10%');
 
  104                                $this->
addColumn($this->lng->txt(
"trac_percentage"), 
"percentage", 
"7%");
 
  105                                $this->
addColumn($this->lng->txt(
"trac_mark"), 
"", 
"5%");
 
  106                                $this->
addColumn($this->lng->txt(
"comment"), 
"", 
"10%");
 
  107                                $this->
addColumn($this->lng->txt(
"trac_mode"), 
"", 
"20%");
 
  108                                $this->
addColumn($this->lng->txt(
"path"), 
"", 
"20%");
 
  113                $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
 
  114                $this->
setRowTemplate(
"tpl.lp_progress_list_row.html", 
"Services/Tracking");
 
  121                if($this->has_object_subitems)
 
  127                if($this->tracked_user)
 
  135                return ($a_field == 
"percentage"); 
 
  140                $obj_ids = $this->obj_ids;
 
  141                if(!$obj_ids && !$this->details)
 
  144                        $membership_ids = 
null;
 
  145                        if($this->filter[
"type"] == 
"crs" || $this->filter[
"type"] == 
"grp")
 
  147                                include_once 
"Services/Membership/classes/class.ilParticipants.php";
 
  149                                        $this->filter[
"type"]);
 
  151                        if($membership_ids === 
null || 
sizeof($membership_ids))
 
  153                                switch($this->lp_context)
 
  166                        include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
 
  184                                        foreach(
$data as $idx => $item)
 
  186                                                if(!$item[
"status"] && !$this->filter[
"status"] && !$this->details)
 
  210                        $this->tpl->setCurrentBlock(
"column_checkbox");
 
  211                        $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
 
  212                        $this->tpl->parseCurrentBlock();
 
  216                $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
 
  217                $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
 
  219                if($a_set[
"offline"])
 
  221                        $this->tpl->setCurrentBlock(
"offline");
 
  222                        $this->tpl->setVariable(
"TEXT_STATUS", $this->lng->txt(
"status"));
 
  223                        $this->tpl->setVariable(
"TEXT_OFFLINE", $this->lng->txt(
"offline"));
 
  224                        $this->tpl->parseCurrentBlock();
 
  232                        $this->tpl->setVariable(
'SCORE_VAL', $a_set[
"score"]); 
 
  234                else if($this->has_object_subitems)
 
  236                        $this->tpl->setCurrentBlock(
"status_details");          
 
  241                        $this->tpl->setVariable(
"MODE_TEXT", $olp->getModeText($a_set[
"u_mode"]));
 
  242                        $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
 
  243                        $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
 
  247                                $this->tpl->setVariable(
"PERCENTAGE_VALUE", 
"");
 
  251                                $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
 
  258                                $this->tpl->setCurrentBlock(
"item_path");
 
  259                                foreach(
$path as $path_item)
 
  261                                        $this->tpl->setVariable(
"PATH_ITEM", $path_item);
 
  262                                        $this->tpl->parseCurrentBlock();
 
  266                        $this->tpl->parseCurrentBlock();
 
  288                                        $this->tpl->setCurrentBlock(
'warning_img');
 
  290                                        $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
 
  291                                        $this->tpl->parseCurrentBlock();
 
  298                                $this->tpl->setCurrentBlock(
"item_command");
 
  299                                $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
 
  300                                $this->tpl->setVariable(
"HREF_COMMAND", 
$ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
 
  301                                $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
 
  302                                $this->tpl->parseCurrentBlock();
 
  305                                if($olp->getCollectionInstance() && $a_set[
"ref_ids"])
 
  310                                        $this->tpl->setVariable(
"HREF_COMMAND", 
$ilCtrl->getLinkTargetByClass(
$ilCtrl->getCmdClass(), 
'details'));
 
  311                                        $ilCtrl->setParameterByClass(
$ilCtrl->getCmdClass(), 
'details_id', 
'');
 
  312                                        $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
 
  313                                        $this->tpl->parseCurrentBlock();
 
  316                                $this->tpl->setCurrentBlock(
"column_action");
 
  317                                $this->tpl->parseCurrentBlock();
 
  324                $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
 
  325                $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
 
  326                $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
 
  327                $worksheet->write($a_row, 3, $this->lng->txt(
"trac_status_changed"));
 
  328                $worksheet->write($a_row, 4, $this->lng->txt(
"trac_percentage"));
 
  329                $worksheet->write($a_row, 5, $this->lng->txt(
"trac_mark"));
 
  330                $worksheet->write($a_row, 6, $this->lng->txt(
"comment"));
 
  331                $worksheet->write($a_row, 7, $this->lng->txt(
"trac_mode"));
 
  337                $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
 
  338                $worksheet->write($a_row, 1, $a_set[
"title"]);
 
  345                $worksheet->write($a_row, 4, sprintf(
"%d%%", $a_set[
"percentage"]));
 
  346                $worksheet->write($a_row, 5, $a_set[
"mark"]);
 
  347                $worksheet->write($a_row, 6, $a_set[
"comment"]);
 
  368                $a_csv->addColumn($this->lng->txt(
"type"));
 
  369                $a_csv->addColumn($this->lng->txt(
"trac_title"));
 
  370                $a_csv->addColumn($this->lng->txt(
"status"));
 
  371                $a_csv->addColumn($this->lng->txt(
"trac_status_changed"));
 
  372                $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
 
  373                $a_csv->addColumn($this->lng->txt(
"trac_mark"));
 
  374                $a_csv->addColumn($this->lng->txt(
"comment"));
 
  375                $a_csv->addColumn($this->lng->txt(
"trac_mode"));
 
  382                $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
 
  383                $a_csv->addColumn($a_set[
"title"]);
 
  390                $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
 
  391                $a_csv->addColumn($a_set[
"mark"]);
 
  392                $a_csv->addColumn($a_set[
"comment"]);
 
static resetToDefaults()
reset to defaults
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
LP collection of repository objects.
const LP_MODE_COLLECTION_TLT
static _mode2Text($a_mode)
const LP_MODE_COLLECTION_MANUAL
TableGUI class for learning progress.
fillRow($a_set)
Fill table row.
fillHeaderExcel($worksheet, &$a_row)
Excel Version of Fill Header.
numericOrdering($a_field)
Should this field be sorted numeric?
__construct($a_parent_obj, $a_parent_cmd, $a_user="", $obj_ids=NULL, $details=false, $mode=null, $personal_only=false, $a_parent_id=null, $a_parent_ref_id=null, $lp_context=null)
Constructor.
fillRowCSV($a_csv, $a_set)
CSV Version of Fill Row.
fillRowExcel($worksheet, &$a_row, $a_set)
Excel Version of Fill Row.
fillHeaderCSV($a_csv)
CSV Version of Fill Header.
const LP_STATUS_COMPLETED_NUM
TableGUI class for learning progress.
searchObjects(array $filter, $permission, array $preset_obj_ids=null)
Search objects that match current filters.
getCurrentFilter($as_query=false)
showTimingsWarning($a_ref_id, $a_user_id)
isPercentageAvailable($a_obj_id)
buildPath($ref_ids)
Build path with deep-link.
const LP_CONTEXT_ORG_UNIT
_getImagePathForStatus($a_status)
Get image path for status.
_getStatusText($a_status)
Get status alt text.
static isObjectOffline($a_obj_id, $a_type=null)
static getInstance($a_obj_id)
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
setEnableHeader($a_enableheader)
Set Enable Header.
setExportFormats(array $formats)
Set available export formats.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setEnableNumInfo($a_val)
Set enable num info.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setShowTemplates($a_value)
Toggle templates.
setLimit($a_limit=0, $a_default_limit=0)
set max.
getObjectivesStatusForUser($a_user_id, array $a_objective_ids)
getSubItemsStatusForUser($a_user_id, $a_parent_obj_id, array $a_item_ids)
getSCOsStatusForUser($a_user_id, $a_parent_obj_id, array $a_sco_ids)
getObjectsStatusForUser($a_user_id, array $obj_refs)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)