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)
40 $this->
setId(
"troup");
41 $this->obj_id = $a_obj_id;
42 $this->ref_id = $a_ref_id;
45 $this->in_group = $tree->checkForParentType($this->ref_id,
"grp");
46 if ($this->in_group) {
49 $this->in_course = $tree->checkForParentType($this->ref_id,
"crs");
50 if ($this->in_course) {
55 parent::__construct($a_parent_obj, $a_parent_cmd);
57 $this->
parseTitle($a_obj_id,
"trac_participants");
65 include_once
"Services/Mail/classes/class.ilMail.php";
66 $mail =
new ilMail($ilUser->getId());
67 if ($rbacsystem->checkAccess(
"internal_mail", $mail->getMailObjectReferenceId())) {
68 $this->
addMultiCommand(
"mailselectedusers", $this->lng->txt(
"send_mail"));
70 $this->lng->loadLanguageModule(
'user');
73 $this->lng->txt(
'clipboard_add_btn')
76 $this->has_multi =
true;
85 $sort_id = (substr($c, 0, 4) ==
"udf_") ?
"" : $c;
87 $this->
addColumn($labels[$c][
"txt"], $sort_id);
91 $this->
addColumn($this->lng->txt(
"actions"),
"");
97 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
98 $this->
setRowTemplate(
"tpl.object_users_props_row.html",
"Services/Tracking");
113 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
132 if ($this->selectable_columns) {
137 $this->user_fields =
$cols[1];
138 $this->selectable_columns =
$cols[0];
152 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
157 $check_agreement =
false;
158 if ($this->in_course) {
160 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
162 if ($privacy->courseConfirmationRequired()) {
165 } elseif ($this->in_group) {
167 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
169 if ($privacy->groupConfirmationRequired()) {
186 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0) {
202 $this->
setData($tr_data[
"set"]);
228 case "matriculation":
233 $this->filter[
$column] = $item->getValue();
240 case 'status_changed':
242 $this->filter[
$column] = $item->getDate();
247 $this->filter[
$column] = $item->getDate();
253 $this->filter[
$column] = $item->getValue();
258 $item->setOptions(
array(
259 "" => $lng->txt(
"trac_all"),
260 "n" => $lng->txt(
"gender_n"),
261 "m" => $lng->txt(
"gender_m"),
262 "f" => $lng->txt(
"gender_f"),
264 $this->filter[
"gender"] = $item->getValue();
271 include_once(
"./Services/Utilities/classes/class.ilCountry.php");
273 $options[$c] = $lng->txt(
"meta_c_" . $c);
276 $item->setOptions(
array(
"" => $lng->txt(
"trac_all"))+
$options);
278 $this->filter[
"sel_country"] = $item->getValue();
282 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
284 $item->setOptions(
array(
"" => $lng->txt(
"trac_all"),
289 $this->filter[
"status"] = $item->getValue();
290 if (is_numeric($this->filter[
"status"])) {
291 $this->filter[
"status"]--;
297 $this->filter[
"language"] = $item->getValue();
300 case "spent_seconds":
303 $this->filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
"from")->getValueInSeconds();
304 $this->filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
"to")->getValueInSeconds();
318 if ($this->has_multi) {
319 $this->tpl->setVariable(
"USER_ID",
$data[
"usr_id"]);
323 if (!(
bool)
$data[
"privacy_conflict"]) {
327 if ($timing !==
true) {
332 $this->tpl->setCurrentBlock(
'warning_img');
334 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed') . $timing);
335 $this->tpl->parseCurrentBlock();
340 if ($c ==
'login' && !$data[
"active"]) {
341 $this->tpl->setCurrentBlock(
'inactive_bl');
342 $this->tpl->setVariable(
'TXT_INACTIVE', $lng->txt(
"inactive"));
343 $this->tpl->parseCurrentBlock();
346 $val = $this->
parseValue($c, $data[$c], $this->type);
349 $this->tpl->setCurrentBlock(
'inactive_bl');
350 $this->tpl->setVariable(
'TXT_INACTIVE', $lng->txt(
"status_no_permission"));
351 $this->tpl->parseCurrentBlock();
357 $this->tpl->setCurrentBlock(
"user_field");
358 $this->tpl->setVariable(
"VAL_UF", $val);
359 $this->tpl->parseCurrentBlock();
362 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"user_id",
$data[
"usr_id"]);
366 if ($this->has_collection ||
367 $objDefinition->isContainer($this->type)) {
368 $this->tpl->setCurrentBlock(
"item_command");
369 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"userdetails"));
370 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'details'));
371 $this->tpl->parseCurrentBlock();
374 if ($this->has_edit) {
375 $this->tpl->setCurrentBlock(
"item_command");
376 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"edituser"));
377 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'edit'));
378 $this->tpl->parseCurrentBlock();
382 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
390 $a_excel->
setCell($a_row, $cnt++, $labels[$c][
"txt"]);
400 if ($c !=
'status') {
401 $val = $this->
parseValue($c, $a_set[$c], $this->type);
405 $a_excel->
setCell($a_row, $cnt++, $val);
413 $a_csv->addColumn($labels[$c][
"txt"]);
422 if ($c !=
'status') {
423 $val = $this->
parseValue($c, $a_set[$c], $this->type);
427 $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.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
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
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.
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, ...
This class handles base functions for mail handling.
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.
Create styles array
The data for the language used.
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.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options