4 include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
33 function __construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_ref_id, $a_print_view =
false)
37 $this->
setId(
"troup");
38 $this->obj_id = $a_obj_id;
39 $this->ref_id = $a_ref_id;
42 $this->in_group = $tree->checkForParentType($this->ref_id,
"grp");
49 $this->in_course = $tree->checkForParentType($this->ref_id,
"crs");
56 parent::__construct($a_parent_obj, $a_parent_cmd);
58 $this->
parseTitle($a_obj_id,
"trac_participants");
72 $sort_id = (substr($c, 0, 4) ==
"udf_") ?
"" : $c;
74 $this->
addColumn($labels[$c][
"txt"], $sort_id);
79 $this->
addColumn($this->lng->txt(
"actions"),
"");
85 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
86 $this->
setRowTemplate(
"tpl.object_users_props_row.html",
"Services/Tracking");
110 if($this->selectable_columns)
116 $this->user_fields = $cols[1];
117 $this->selectable_columns = $cols[0];
131 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
136 $check_agreement =
false;
140 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
142 if($privacy->courseConfirmationRequired())
147 else if($this->in_group)
150 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
152 if($privacy->groupConfirmationRequired())
170 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0)
187 $this->
setData($tr_data[
"set"]);
215 case "matriculation":
218 $this->filter[$column] = $item->getValue();
224 case 'status_changed':
226 $this->filter[$column] = $item->getDate();
231 $this->filter[$column] = $item->getDate();
237 $this->filter[$column] = $item->getValue();
242 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
"m" => $lng->txt(
"gender_m"),
"f" => $lng->txt(
"gender_f")));
243 $this->filter[
"gender"] = $item->getValue();
250 include_once(
"./Services/Utilities/classes/class.ilCountry.php");
253 $options[$c] = $lng->txt(
"meta_c_".$c);
256 $item->setOptions(array(
"" => $lng->txt(
"trac_all"))+
$options);
258 $this->filter[
"sel_country"] = $item->getValue();
262 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
264 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
269 $this->filter[
"status"] = $item->getValue();
270 if($this->filter[
"status"])
272 $this->filter[
"status"]--;
278 $this->filter[
"language"] = $item->getValue();
281 case "spent_seconds":
283 $this->filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
"from")->getValueInSeconds();
284 $this->filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
"to")->getValueInSeconds();
299 if(!(
bool)
$data[
"privacy_conflict"])
314 $this->tpl->setCurrentBlock(
'warning_img');
316 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
317 $this->tpl->parseCurrentBlock();
322 if($c ==
'login' && !$data[
"active"])
324 $this->tpl->setCurrentBlock(
'inactive_bl');
325 $this->tpl->setVariable(
'TXT_INACTIVE', $lng->txt(
"inactive"));
326 $this->tpl->parseCurrentBlock();
329 $val = $this->
parseValue($c, $data[$c],
"user");
336 $this->tpl->setCurrentBlock(
"user_field");
337 $this->tpl->setVariable(
"VAL_UF", $val);
338 $this->tpl->parseCurrentBlock();
341 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"user_id",
$data[
"usr_id"]);
345 if(in_array($this->type, array(
"crs",
"grp",
"cat",
"fold")))
347 $this->tpl->setCurrentBlock(
"item_command");
348 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"userdetails"));
349 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'details'));
350 $this->tpl->parseCurrentBlock();
353 $this->tpl->setCurrentBlock(
"item_command");
354 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"edituser"));
355 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'edit'));
356 $this->tpl->parseCurrentBlock();
359 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
368 $worksheet->write($a_row, $cnt, $labels[$c][
"txt"]);
380 $val = $this->
parseValue($c, $a_set[$c],
"user");
386 $worksheet->write($a_row, $cnt, $val);
396 $a_csv->addColumn($labels[$c][
"txt"]);
408 $val = $this->
parseValue($c, $a_set[$c],
"user");
414 $a_csv->addColumn($val);
const LP_STATUS_COMPLETED_NUM
getSelectableUserColumns($a_in_course=false, $a_in_group=false)
setExternalSorting($a_val)
Set external sorting.
fillRow($data)
Fill table row.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
Add filter by standard type.
setPrintMode($a_value=false)
Toogle print mode.
setShowTemplates($a_value)
Toggle templates.
const LP_STATUS_NOT_ATTEMPTED
setExternalSegmentation($a_val)
Set external segmentation.
resetOffset($a_in_determination=false)
Reset offset.
const LP_STATUS_IN_PROGRESS_NUM
fillRowCSV($a_csv, $a_set)
getItems()
Get user items.
parseTitle($a_obj_id, $action, $a_user_id=false)
parseValue($id, $value, $type)
getOrderDirection()
Get order direction.
fillHeaderExcel($worksheet, &$a_row)
const FILTER_NUMBER_RANGE
_getStatusText($a_status)
Get status alt text.
const LP_STATUS_IN_PROGRESS
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
const FILTER_DATETIME_RANGE
__construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_ref_id, $a_print_view=false)
Constructor.
TableGUI class for learning progress.
if(!is_array($argv)) $options
getSelectableColumns()
Get selectable columns.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Learning progress table: One object, rows: users, columns: properties Example: A course, rows: members, columns: name, status, mark, ...
const FILTER_DURATION_RANGE
static _lookupObjId($a_id)
fillRowExcel($worksheet, &$a_row, $a_set)
getSelectedColumns()
Get selected columns.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _lookupType($a_id, $a_reference=false)
lookup object type
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
const LP_STATUS_NOT_ATTEMPTED_NUM
static getUserDataForObject($a_ref_id, $a_order_field="", $a_order_dir="", $a_offset=0, $a_limit=9999, array $a_filters=NULL, array $a_additional_fields=NULL, $check_agreement=false, $privacy_fields=NULL)
Get all user-based tracking data for object.
showTimingsWarning($a_ref_id, $a_user_id)
setFormAction($a_form_action)
Set Form action parameter.
getPrintMode()
Get print mode.
setEnableHeader($a_enableheader)
Set Enable Header.
static getCountryCodes()
Get country codes (DIN EN 3166-1)
static _getInstance()
Get instance of ilPrivacySettings.
setMaxCount($a_max_count)
set max.
getCurrentFilter($as_query=false)
setEnableTitle($a_enabletitle)
Set Enable Title.
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED_NUM