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_course = $tree->checkForParentType($this->ref_id,
"crs");
49 $this->in_group = $tree->checkForParentType($this->ref_id,
"grp");
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");
112 if($this->selectable_columns)
117 $anonymized_object =
false;
118 include_once
'./Modules/Test/classes/class.ilObjTest.php';
121 $anonymized_object =
true;
124 include_once(
"./Services/User/classes/class.ilUserProfile.php");
126 $up->skipGroup(
"preferences");
127 $up->skipGroup(
"settings");
128 $ufs = $up->getStandardFields();
132 $cols[
"login"] = array(
133 "txt" => $lng->txt(
"login"),
136 if(!$anonymized_object)
138 $cols[
"firstname"] = array(
139 "txt" => $lng->txt(
"firstname"),
141 $cols[
"lastname"] = array(
142 "txt" => $lng->txt(
"lastname"),
147 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
151 $cols[
"first_access"] = array(
152 "txt" => $lng->txt(
"trac_first_access"),
154 $cols[
"last_access"] = array(
155 "txt" => $lng->txt(
"trac_last_access"),
160 $cols[
"read_count"] = array(
161 "txt" => $lng->txt(
"trac_read_count"),
166 $cols[
"spent_seconds"] = array(
167 "txt" => $lng->txt(
"trac_spent_seconds"),
173 $cols[
"percentage"] = array(
174 "txt" => $lng->txt(
"trac_percentage"),
182 $cols[
"status"] = array(
183 "txt" => $lng->txt(
"trac_status"),
186 $cols[
'status_changed'] = array(
187 'txt' => $lng->txt(
'trac_status_changed'),
191 if($this->type !=
"lm")
193 $cols[
"mark"] = array(
194 "txt" => $lng->txt(
"trac_mark"),
198 $cols[
"u_comment"] = array(
199 "txt" => $lng->txt(
"trac_comment"),
202 $cols[
"create_date"] = array(
203 "txt" => $lng->txt(
"create_date"),
205 $cols[
"language"] = array(
206 "txt" => $lng->txt(
"language"),
210 if(!$anonymized_object &&
211 ($this->in_course || $this->in_group))
214 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
217 $this->user_fields = array();
220 foreach ($ufs as $f => $fd)
222 if (!isset($cols[$f]) && $f !=
"username" && !$fd[
"lists_hide"])
224 if($this->in_course &&
225 !($fd[
"course_export_fix_value"] || $ilSetting->get(
"usr_settings_course_export_".$f)))
229 if($this->in_group &&
230 !($fd[
"group_export_fix_value"] || $ilSetting->get(
"usr_settings_group_export_".$f)))
236 "txt" => $lng->txt($f),
239 $this->user_fields[] = $f;
244 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
248 $user_defined_fields = $user_defined_fields->getCourseExportableFields();
252 $user_defined_fields = $user_defined_fields->getGroupExportableFields();
254 foreach($user_defined_fields as $definition)
258 $f =
"udf_".$definition[
"field_id"];
260 "txt" => $definition[
"field_name"],
263 $this->user_fields[] = $f;
269 $this->selectable_columns = $cols;
283 include_once(
"./Services/Tracking/classes/class.ilTrQuery.php");
288 $check_agreement =
false;
292 include_once
"Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
294 if($privacy->courseConfirmationRequired())
312 if (count($tr_data[
"set"]) == 0 && $this->
getOffset() > 0)
329 $this->
setData($tr_data[
"set"]);
357 case "matriculation":
360 $this->filter[$column] = $item->getValue();
366 case 'status_changed':
368 $this->filter[$column] = $item->getDate();
373 $this->filter[$column] = $item->getDate();
379 $this->filter[$column] = $item->getValue();
384 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
"m" => $lng->txt(
"gender_m"),
"f" => $lng->txt(
"gender_f")));
385 $this->filter[
"gender"] = $item->getValue();
392 include_once(
"./Services/Utilities/classes/class.ilCountry.php");
395 $options[$c] = $lng->txt(
"meta_c_".$c);
398 $item->setOptions(array(
"" => $lng->txt(
"trac_all"))+$options);
400 $this->filter[
"sel_country"] = $item->getValue();
404 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
406 $item->setOptions(array(
"" => $lng->txt(
"trac_all"),
411 $this->filter[
"status"] = $item->getValue();
412 if($this->filter[
"status"])
414 $this->filter[
"status"]--;
420 $this->filter[
"language"] = $item->getValue();
423 case "spent_seconds":
425 $this->filter[
"spent_seconds"][
"from"] = $item->getCombinationItem(
"from")->getValueInSeconds();
426 $this->filter[
"spent_seconds"][
"to"] = $item->getCombinationItem(
"to")->getValueInSeconds();
454 $this->tpl->setCurrentBlock(
'warning_img');
456 $this->tpl->setVariable(
'WARNING_ALT', $this->lng->txt(
'trac_time_passed').$timing);
457 $this->tpl->parseCurrentBlock();
462 if($c ==
'login' && !
$data[
"active"])
464 $this->tpl->setCurrentBlock(
'inactive_bl');
465 $this->tpl->setVariable(
'TXT_INACTIVE', $lng->txt(
"inactive"));
466 $this->tpl->parseCurrentBlock();
469 $this->tpl->setCurrentBlock(
"user_field");
471 $this->tpl->setVariable(
"VAL_UF", $val);
472 $this->tpl->parseCurrentBlock();
475 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
"user_id",
$data[
"usr_id"]);
479 if(in_array($this->type, array(
"crs",
"grp",
"cat",
"fold")))
481 $this->tpl->setCurrentBlock(
"item_command");
482 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"userdetails"));
483 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'details'));
484 $this->tpl->parseCurrentBlock();
487 $this->tpl->setCurrentBlock(
"item_command");
488 $this->tpl->setVariable(
"HREF_COMMAND", $ilCtrl->getLinkTargetByClass(
"illplistofobjectsgui",
"edituser"));
489 $this->tpl->setVariable(
"TXT_COMMAND", $lng->txt(
'edit'));
490 $this->tpl->parseCurrentBlock();
493 $ilCtrl->setParameterByClass(
"illplistofobjectsgui",
'user_id',
'');
502 $worksheet->write($a_row, $cnt, $labels[$c][
"txt"]);
514 $val = $this->
parseValue($c, $a_set[$c],
"user");
520 $worksheet->write($a_row, $cnt, $val);
530 $a_csv->addColumn($labels[$c][
"txt"]);
542 $val = $this->
parseValue($c, $a_set[$c],
"user");
548 $a_csv->addColumn($val);