4 include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
36 public function __construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_ref_id, $a_print_view =
false)
43 $rbacsystem = $DIC[
'rbacsystem'];
45 $this->
setId(
"troup");
46 $this->obj_id = $a_obj_id;
47 $this->ref_id = $a_ref_id;
50 $this->in_group =
$tree->checkForParentType($this->ref_id,
"grp");
51 if ($this->in_group) {
54 $this->in_course =
$tree->checkForParentType($this->ref_id,
"crs");
55 if ($this->in_course) {
60 parent::__construct($a_parent_obj, $a_parent_cmd);
62 $this->
parseTitle($a_obj_id,
"trac_participants");
70 include_once
"Services/Mail/classes/class.ilMail.php";
72 if ($rbacsystem->checkAccess(
"internal_mail", $mail->getMailObjectReferenceId())) {
73 $this->
addMultiCommand(
"mailselectedusers", $this->lng->txt(
"send_mail"));
75 $this->lng->loadLanguageModule(
'user');
78 $this->lng->txt(
'clipboard_add_btn')
81 $this->has_multi =
true;
90 $sort_id = (substr($c, 0, 4) ==
"udf_") ?
"" : $c;
92 $this->
addColumn($labels[$c][
"txt"], $sort_id);
96 $this->
addColumn($this->lng->txt(
"actions"),
"");
103 $this->
setRowTemplate(
"tpl.object_users_props_row.html",
"Services/Tracking");
118 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
137 if ($this->selectable_columns) {
142 $this->user_fields =
$cols[1];
143 $this->selectable_columns =
$cols[0];
159 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
164 $check_agreement =
false;
165 if ($this->in_course) {
167 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
169 if ($privacy->courseConfirmationRequired()) {
172 } elseif ($this->in_group) {
174 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
176 if ($privacy->groupConfirmationRequired()) {
193 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0) {
209 $this->
setData($tr_data[
"set"]);
237 case "matriculation":
239 if ($column !=
"mark" ||
242 $this->filter[$column] = $item->getValue();
249 case 'status_changed':
251 $this->filter[$column] = $item->getDate();
256 $this->filter[$column] = $item->getDate();
262 $this->filter[$column] = $item->getValue();
267 $item->setOptions(array(
268 "" =>
$lng->txt(
"trac_all"),
269 "n" =>
$lng->txt(
"gender_n"),
270 "m" =>
$lng->txt(
"gender_m"),
271 "f" =>
$lng->txt(
"gender_f"),
273 $this->filter[
"gender"] = $item->getValue();
280 include_once(
"./Services/Utilities/classes/class.ilCountry.php");
285 $item->setOptions(array(
"" =>
$lng->txt(
"trac_all")) +
$options);
287 $this->filter[
"sel_country"] = $item->getValue();
291 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
293 $item->setOptions(array(
"" =>
$lng->txt(
"trac_all"),
298 $this->filter[
"status"] = $item->getValue();
299 if (is_numeric($this->filter[
"status"])) {
300 $this->filter[
"status"]--;
306 $this->filter[
"language"] = $item->getValue();
309 case "spent_seconds":
312 $this->filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
"from")->getValueInSeconds();
313 $this->filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
"to")->getValueInSeconds();
329 $objDefinition = $DIC[
'objDefinition'];
331 if ($this->has_multi) {
332 $this->tpl->setVariable(
"USER_ID",
$data[
"usr_id"]);
336 if (!(
bool)
$data[
"privacy_conflict"]) {
340 if ($timing !==
true) {
345 $this->tpl->setCurrentBlock(
'warning_img');
347 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed') . $timing);
348 $this->tpl->parseCurrentBlock();
353 if ($c ==
'login' && !$data[
"active"]) {
354 $this->tpl->setCurrentBlock(
'inactive_bl');
355 $this->tpl->setVariable(
'TXT_INACTIVE',
$lng->txt(
"inactive"));
356 $this->tpl->parseCurrentBlock();
359 $val = $this->
parseValue($c, $data[$c], $this->type);
362 $this->tpl->setCurrentBlock(
'inactive_bl');
363 $this->tpl->setVariable(
'TXT_INACTIVE',
$lng->txt(
"status_no_permission"));
364 $this->tpl->parseCurrentBlock();
370 $this->tpl->setCurrentBlock(
"user_field");
371 $this->tpl->setVariable(
"VAL_UF", $val);
372 $this->tpl->parseCurrentBlock();
375 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"user_id",
$data[
"usr_id"]);
379 if ($this->has_collection ||
380 $objDefinition->isContainer($this->type)) {
381 $this->tpl->setCurrentBlock(
"item_command");
382 $this->tpl->setVariable(
"HREF_COMMAND",
$ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"userdetails"));
383 $this->tpl->setVariable(
"TXT_COMMAND",
$lng->txt(
'details'));
384 $this->tpl->parseCurrentBlock();
387 if ($this->has_edit) {
388 $this->tpl->setCurrentBlock(
"item_command");
389 $this->tpl->setVariable(
"HREF_COMMAND",
$ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"edituser"));
390 $this->tpl->setVariable(
"TXT_COMMAND",
$lng->txt(
'edit'));
391 $this->tpl->parseCurrentBlock();
395 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
403 $a_excel->
setCell($a_row, $cnt++, $labels[$c][
"txt"]);
413 if ($c !=
'status') {
414 $val = $this->
parseValue($c, $a_set[$c], $this->type);
418 $a_excel->
setCell($a_row, $cnt++, $val);
426 $a_csv->addColumn($labels[$c][
"txt"]);
435 if ($c !=
'status') {
436 $val = $this->
parseValue($c, $a_set[$c], $this->type);
440 $a_csv->addColumn($val);
const LP_STATUS_COMPLETED_NUM
fillHeaderExcel(ilExcel $a_excel, &$a_row)
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.
setPrintMode($a_value=false)
Toogle print mode.
setShowTemplates($a_value)
Toggle templates.
const LP_STATUS_NOT_ATTEMPTED
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
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.
setExternalSegmentation($a_val)
Set external segmentation.
resetOffset($a_in_determination=false)
Reset offset.
const LP_STATUS_IN_PROGRESS_NUM
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
fillRowCSV($a_csv, $a_set)
getItems()
Get user items.
parseTitle($a_obj_id, $action, $a_user_id=false)
fillRowExcel(ilExcel $a_excel, &$a_row, $a_set)
parseValue($id, $value, $type)
getOrderDirection()
Get order direction.
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
const FILTER_NUMBER_RANGE
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.
getColumnCoord($a_col)
Get column "name" from number.
TableGUI class for learning progress.
setBold($a_coords)
Set cell(s) to bold.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
getSelectableColumns()
Get selectable columns.
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)
addMultiCommand($a_cmd, $a_text)
Add Command button.
getSelectedColumns()
Get selected columns.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
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
static supportsMark($a_obj_type)
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
const LP_STATUS_NOT_ATTEMPTED_NUM
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static supportsSpentSeconds($a_obj_type)
showTimingsWarning($a_ref_id, $a_user_id)
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.
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