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)
 
  143                        switch($this->lp_context)
 
  153                                        include_once 
"Services/Object/classes/class.ilObjectLP.php";            
 
  158                                                        unset($obj_ids[$obj_id]);
 
  166                        include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
 
  185                                        foreach(
$data as $idx => $item)
 
  187                                                if(!$item[
"status"] && !$this->filter[
"status"] && !$this->details)
 
  205                                        $data[$idx][
"percentage"] = -1;                 
 
  222                        $this->tpl->setCurrentBlock(
"column_checkbox");
 
  223                        $this->tpl->setVariable(
"OBJ_ID", $a_set[
"obj_id"]);
 
  224                        $this->tpl->parseCurrentBlock();
 
  228                $this->tpl->setVariable(
"ICON_ALT", $this->lng->txt($a_set[
"type"]));
 
  229                $this->tpl->setVariable(
"TITLE_TEXT", $a_set[
"title"]);
 
  231                if($a_set[
"offline"])
 
  233                        $this->tpl->setCurrentBlock(
"offline");
 
  234                        $this->tpl->setVariable(
"TEXT_STATUS", $this->lng->txt(
"status"));
 
  235                        $this->tpl->setVariable(
"TEXT_OFFLINE", $this->lng->txt(
"offline"));
 
  236                        $this->tpl->parseCurrentBlock();
 
  244                        $this->tpl->setVariable(
'SCORE_VAL', $a_set[
"score"]); 
 
  246                else if($this->has_object_subitems)
 
  248                        $this->tpl->setCurrentBlock(
"status_details");          
 
  253                        $this->tpl->setVariable(
"MODE_TEXT", $olp->getModeText($a_set[
"u_mode"]));
 
  254                        $this->tpl->setVariable(
"MARK_VALUE", $a_set[
"mark"]);
 
  255                        $this->tpl->setVariable(
"COMMENT_TEXT", $a_set[
"comment"]);
 
  257                        if($a_set[
"percentage"] < 0)
 
  259                                $this->tpl->setVariable(
"PERCENTAGE_VALUE", 
"");
 
  263                                $this->tpl->setVariable(
"PERCENTAGE_VALUE", sprintf(
"%d%%", $a_set[
"percentage"]));
 
  270                                $this->tpl->setCurrentBlock(
"item_path");
 
  271                                foreach(
$path as $path_item)
 
  273                                        $this->tpl->setVariable(
"PATH_ITEM", $path_item);
 
  274                                        $this->tpl->parseCurrentBlock();
 
  278                        $this->tpl->parseCurrentBlock();
 
  300                                        $this->tpl->setCurrentBlock(
'warning_img');
 
  302                                        $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
 
  303                                        $this->tpl->parseCurrentBlock();
 
  310                                $this->tpl->setCurrentBlock(
"item_command");
 
  311                                $ilCtrl->setParameterByClass(get_class($this),
'hide', $a_set[
"obj_id"]);
 
  312                                $this->tpl->setVariable(
"HREF_COMMAND", 
$ilCtrl->getLinkTargetByClass(get_class($this),
'hide'));
 
  313                                $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_hide'));
 
  314                                $this->tpl->parseCurrentBlock();
 
  317                                if($olp->getCollectionInstance() && $a_set[
"ref_ids"])
 
  322                                        $this->tpl->setVariable(
"HREF_COMMAND", 
$ilCtrl->getLinkTargetByClass(
$ilCtrl->getCmdClass(), 
'details'));
 
  323                                        $ilCtrl->setParameterByClass(
$ilCtrl->getCmdClass(), 
'details_id', 
'');
 
  324                                        $this->tpl->setVariable(
"TXT_COMMAND", $this->lng->txt(
'trac_subitems'));
 
  325                                        $this->tpl->parseCurrentBlock();
 
  328                                $this->tpl->setCurrentBlock(
"column_action");
 
  329                                $this->tpl->parseCurrentBlock();
 
  336                $worksheet->write($a_row, 0, $this->lng->txt(
"type"));
 
  337                $worksheet->write($a_row, 1, $this->lng->txt(
"trac_title"));
 
  338                $worksheet->write($a_row, 2, $this->lng->txt(
"status"));
 
  339                $worksheet->write($a_row, 3, $this->lng->txt(
"trac_status_changed"));
 
  340                $worksheet->write($a_row, 4, $this->lng->txt(
"trac_percentage"));
 
  341                $worksheet->write($a_row, 5, $this->lng->txt(
"trac_mark"));
 
  342                $worksheet->write($a_row, 6, $this->lng->txt(
"comment"));
 
  343                $worksheet->write($a_row, 7, $this->lng->txt(
"trac_mode"));
 
  349                $worksheet->write($a_row, 0, $this->lng->txt($a_set[
"type"]));
 
  350                $worksheet->write($a_row, 1, $a_set[
"title"]);
 
  357                $worksheet->write($a_row, 4, sprintf(
"%d%%", $a_set[
"percentage"]));
 
  358                $worksheet->write($a_row, 5, $a_set[
"mark"]);
 
  359                $worksheet->write($a_row, 6, $a_set[
"comment"]);
 
  380                $a_csv->addColumn($this->lng->txt(
"type"));
 
  381                $a_csv->addColumn($this->lng->txt(
"trac_title"));
 
  382                $a_csv->addColumn($this->lng->txt(
"status"));
 
  383                $a_csv->addColumn($this->lng->txt(
"trac_status_changed"));
 
  384                $a_csv->addColumn($this->lng->txt(
"trac_percentage"));
 
  385                $a_csv->addColumn($this->lng->txt(
"trac_mark"));
 
  386                $a_csv->addColumn($this->lng->txt(
"comment"));
 
  387                $a_csv->addColumn($this->lng->txt(
"trac_mode"));
 
  394                $a_csv->addColumn($this->lng->txt($a_set[
"type"]));
 
  395                $a_csv->addColumn($a_set[
"title"]);
 
  402                $a_csv->addColumn(sprintf(
"%d%%", $a_set[
"percentage"]));
 
  403                $a_csv->addColumn($a_set[
"mark"]);
 
  404                $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
const LP_MODE_COLLECTION_MOBS
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.
getCurrentFilter($as_query=false)
showTimingsWarning($a_ref_id, $a_user_id)
isPercentageAvailable($a_obj_id)
buildPath($ref_ids)
Build path with deep-link.
searchObjects(array $filter, $permission, array $preset_obj_ids=null, $a_check_lp_activation=true)
Search objects that match current filters.
const LP_CONTEXT_ORG_UNIT
_getImagePathForStatus($a_status)
Get image path for status.
_getStatusText($a_status, $a_lng=null)
Get status alt text.
static isObjectOffline($a_obj_id, $a_type=null)
static getLPMemberships($a_usr_id, array $a_obj_ids, $a_parent_ref_id=null, $a_mapped_ref_ids=false)
Get all objects where given user is member (from LP POV)
static getInstance($a_obj_id)
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
setEnableHeader($a_enableheader)
Set Enable Header.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the 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.
setLimit($a_limit=0, $a_default_limit=0)
set max.
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.
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)
getObjectivesStatusForUser($a_user_id, $a_obj_id, array $a_objective_ids)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)