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 = (bool)$tree->checkForParentType($this->ref_id,
"crs");
45 $this->
parseTitle($a_obj_id,
"trac_participants");
58 $sort_id = (substr($c, 0, 4) ==
"udf_") ?
"" : $c;
60 $this->
addColumn($labels[$c][
"txt"], $sort_id);
65 $this->
addColumn($this->lng->txt(
"actions"),
"");
71 $this->
setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
72 $this->
setRowTemplate(
"tpl.object_users_props_row.html",
"Services/Tracking");
98 if($this->selectable_columns)
103 $anonymized_object =
false;
104 include_once
'./Modules/Test/classes/class.ilObjTest.php';
107 $anonymized_object =
true;
110 include_once(
"./Services/User/classes/class.ilUserProfile.php");
112 $up->skipGroup(
"preferences");
113 $up->skipGroup(
"settings");
114 $ufs =
$up->getStandardFields();
118 $cols[
"login"] = array(
119 "txt" => $lng->txt(
"login"),
122 if(!$anonymized_object)
124 $cols[
"firstname"] = array(
125 "txt" => $lng->txt(
"firstname"),
127 $cols[
"lastname"] = array(
128 "txt" => $lng->txt(
"lastname"),
133 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
137 $cols[
"first_access"] = array(
138 "txt" => $lng->txt(
"trac_first_access"),
140 $cols[
"last_access"] = array(
141 "txt" => $lng->txt(
"trac_last_access"),
146 $cols[
"read_count"] = array(
147 "txt" => $lng->txt(
"trac_read_count"),
152 $cols[
"spent_seconds"] = array(
153 "txt" => $lng->txt(
"trac_spent_seconds"),
159 $cols[
"percentage"] = array(
160 "txt" => $lng->txt(
"trac_percentage"),
168 $cols[
"status"] = array(
169 "txt" => $lng->txt(
"trac_status"),
173 if($this->type !=
"lm")
175 $cols[
"mark"] = array(
176 "txt" => $lng->txt(
"trac_mark"),
180 $cols[
"u_comment"] = array(
181 "txt" => $lng->txt(
"trac_comment"),
184 $cols[
"create_date"] = array(
185 "txt" => $lng->txt(
"create_date"),
187 $cols[
"language"] = array(
188 "txt" => $lng->txt(
"language"),
192 if($this->in_course && !$anonymized_object)
194 $this->user_fields = array();
197 foreach ($ufs as
$f => $fd)
199 if (!isset($cols[
$f]) && $f !=
"username" && !$fd[
"lists_hide"] && ($fd[
"course_export_fix_value"] || $ilSetting->get(
"usr_settings_course_export_".$f)))
202 "txt" => $lng->txt($f),
205 $this->user_fields[] =
$f;
210 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
212 foreach($user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
214 if($definition[
"field_type"] !=
UDF_TYPE_WYSIWYG && $definition[
"course_export"])
216 $f =
"udf_".$definition[
"field_id"];
218 "txt" => $definition[
"field_name"],
221 $this->user_fields[] =
$f;
226 $this->selectable_columns = $cols;
240 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
245 $check_agreement =
false;
249 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
251 if($privacy->courseConfirmationRequired())
253 $check_agreement =
true;
269 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0)
286 $this->
setData($tr_data[
"set"]);
314 case "matriculation":
317 $this->filter[$column] = $item->getValue();
325 $this->filter[$column] = $item->getDate();
331 $this->filter[$column] = $item->getValue();
336 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
"m" => $lng->txt(
"gender_m"),
"f" => $lng->txt(
"gender_f")));
337 $this->filter[
"gender"] = $item->getValue();
344 include_once(
"./Services/Utilities/classes/class.ilCountry.php");
347 $options[$c] = $lng->txt(
"meta_c_".$c);
350 $item->setOptions(array(
"" => $lng->txt(
"trac_all"))+$options);
352 $this->filter[
"sel_country"] = $item->getValue();
356 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
358 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
363 $this->filter[
"status"] = $item->getValue();
364 if($this->filter[
"status"])
366 $this->filter[
"status"]--;
372 $this->filter[
"language"] = $item->getValue();
375 case "spent_seconds":
377 $this->filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
"from")->getValueInSeconds();
378 $this->filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
"to")->getValueInSeconds();
406 $this->tpl->setCurrentBlock(
'warning_img');
408 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
409 $this->tpl->parseCurrentBlock();
413 $this->tpl->setCurrentBlock(
"user_field");
415 $this->tpl->setVariable(
"VAL_UF", $val);
416 $this->tpl->parseCurrentBlock();
419 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"user_id",
$data[
"usr_id"]);
423 if(in_array($this->type, array(
"crs",
"grp",
"cat",
"fold")))
425 $this->tpl->setCurrentBlock(
"item_command");
426 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"userdetails"));
427 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'details'));
428 $this->tpl->parseCurrentBlock();
431 $this->tpl->setCurrentBlock(
"item_command");
432 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"edituser"));
433 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'edit'));
434 $this->tpl->parseCurrentBlock();
437 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
446 $worksheet->write($a_row, $cnt, $labels[$c][
"txt"]);
458 $val = $this->
parseValue($c, $a_set[$c],
"user");
464 $worksheet->write($a_row, $cnt, $val);
474 $a_csv->addColumn($labels[$c][
"txt"]);
486 $val = $this->
parseValue($c, $a_set[$c],
"user");
492 $a_csv->addColumn($val);