4 include_once(
"./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
32 function __construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_ref_id, $a_print_view =
false)
36 $this->
setId(
"troup");
37 $this->obj_id = $a_obj_id;
38 $this->ref_id = $a_ref_id;
41 $this->in_course = $tree->checkForParentType($this->ref_id,
"crs");
49 $this->
parseTitle($a_obj_id,
"trac_participants");
62 $sort_id = (substr($c, 0, 4) ==
"udf_") ?
"" : $c;
64 $this->
addColumn($labels[$c][
"txt"], $sort_id);
69 $this->
addColumn($this->lng->txt(
"actions"),
"");
75 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
76 $this->
setRowTemplate(
"tpl.object_users_props_row.html",
"Services/Tracking");
102 if($this->selectable_columns)
107 $anonymized_object =
false;
108 include_once
'./Modules/Test/classes/class.ilObjTest.php';
111 $anonymized_object =
true;
114 include_once(
"./Services/User/classes/class.ilUserProfile.php");
116 $up->skipGroup(
"preferences");
117 $up->skipGroup(
"settings");
118 $ufs = $up->getStandardFields();
122 $cols[
"login"] = array(
123 "txt" => $lng->txt(
"login"),
126 if(!$anonymized_object)
128 $cols[
"firstname"] = array(
129 "txt" => $lng->txt(
"firstname"),
131 $cols[
"lastname"] = array(
132 "txt" => $lng->txt(
"lastname"),
137 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
141 $cols[
"first_access"] = array(
142 "txt" => $lng->txt(
"trac_first_access"),
144 $cols[
"last_access"] = array(
145 "txt" => $lng->txt(
"trac_last_access"),
150 $cols[
"read_count"] = array(
151 "txt" => $lng->txt(
"trac_read_count"),
156 $cols[
"spent_seconds"] = array(
157 "txt" => $lng->txt(
"trac_spent_seconds"),
163 $cols[
"percentage"] = array(
164 "txt" => $lng->txt(
"trac_percentage"),
172 $cols[
"status"] = array(
173 "txt" => $lng->txt(
"trac_status"),
176 $cols[
'status_changed'] = array(
177 'txt' => $lng->txt(
'trac_status_changed'),
181 if($this->type !=
"lm")
183 $cols[
"mark"] = array(
184 "txt" => $lng->txt(
"trac_mark"),
188 $cols[
"u_comment"] = array(
189 "txt" => $lng->txt(
"trac_comment"),
192 $cols[
"create_date"] = array(
193 "txt" => $lng->txt(
"create_date"),
195 $cols[
"language"] = array(
196 "txt" => $lng->txt(
"language"),
200 if($this->in_course && !$anonymized_object)
202 $this->user_fields = array();
205 foreach ($ufs as $f => $fd)
207 if (!isset($cols[$f]) && $f !=
"username" && !$fd[
"lists_hide"] && ($fd[
"course_export_fix_value"] || $ilSetting->get(
"usr_settings_course_export_".$f)))
210 "txt" => $lng->txt($f),
213 $this->user_fields[] = $f;
218 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
220 foreach($user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
222 if($definition[
"field_type"] !=
UDF_TYPE_WYSIWYG && $definition[
"course_export"])
224 $f =
"udf_".$definition[
"field_id"];
226 "txt" => $definition[
"field_name"],
229 $this->user_fields[] = $f;
234 $this->selectable_columns = $cols;
248 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
253 $check_agreement =
false;
257 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
259 if($privacy->courseConfirmationRequired())
277 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0)
294 $this->
setData($tr_data[
"set"]);
322 case "matriculation":
325 $this->filter[$column] = $item->getValue();
332 case 'status_changed':
334 $this->filter[$column] = $item->getDate();
340 $this->filter[$column] = $item->getValue();
345 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
"m" => $lng->txt(
"gender_m"),
"f" => $lng->txt(
"gender_f")));
346 $this->filter[
"gender"] = $item->getValue();
353 include_once(
"./Services/Utilities/classes/class.ilCountry.php");
356 $options[$c] = $lng->txt(
"meta_c_".$c);
359 $item->setOptions(array(
"" => $lng->txt(
"trac_all"))+$options);
361 $this->filter[
"sel_country"] = $item->getValue();
365 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
367 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
372 $this->filter[
"status"] = $item->getValue();
373 if($this->filter[
"status"])
375 $this->filter[
"status"]--;
381 $this->filter[
"language"] = $item->getValue();
384 case "spent_seconds":
386 $this->filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
"from")->getValueInSeconds();
387 $this->filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
"to")->getValueInSeconds();
415 $this->tpl->setCurrentBlock(
'warning_img');
417 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
418 $this->tpl->parseCurrentBlock();
423 if($c ==
'login' && !
$data[
"active"])
425 $this->tpl->setCurrentBlock(
'inactive_bl');
426 $this->tpl->setVariable(
'TXT_INACTIVE', $lng->txt(
"inactive"));
427 $this->tpl->parseCurrentBlock();
430 $this->tpl->setCurrentBlock(
"user_field");
432 $this->tpl->setVariable(
"VAL_UF", $val);
433 $this->tpl->parseCurrentBlock();
436 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"user_id",
$data[
"usr_id"]);
440 if(in_array($this->type, array(
"crs",
"grp",
"cat",
"fold")))
442 $this->tpl->setCurrentBlock(
"item_command");
443 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"userdetails"));
444 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'details'));
445 $this->tpl->parseCurrentBlock();
448 $this->tpl->setCurrentBlock(
"item_command");
449 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"edituser"));
450 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'edit'));
451 $this->tpl->parseCurrentBlock();
454 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
463 $worksheet->write($a_row, $cnt, $labels[$c][
"txt"]);
475 $val = $this->
parseValue($c, $a_set[$c],
"user");
481 $worksheet->write($a_row, $cnt, $val);
491 $a_csv->addColumn($labels[$c][
"txt"]);
503 $val = $this->
parseValue($c, $a_set[$c],
"user");
509 $a_csv->addColumn($val);