4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
5 include_once
'./Services/Search/classes/class.ilSearchSettings.php';
6 require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
21 public function __construct($a_parent_obj, $a_parent_cmd =
"", $a_template_context =
"")
23 parent::__construct($a_parent_obj, $a_parent_cmd, $a_template_context);
26 $this->lng->loadLanguageModule(
"meta");
28 include_once(
"./Services/Object/classes/class.ilObjectLP.php");
31 if(!$this->anonymized && $this->obj_id)
33 include_once
"Services/Object/classes/class.ilObjectLP.php";
35 $this->anonymized = $olp->isAnonymized();
45 if(!$ilCtrl->getNextClass($this))
49 switch($ilCtrl->getCmd())
62 $to_hide =
$_POST[
"item_id"];
69 case "mailselectedusers":
76 $this->
sendMail(
$_POST[
"uid"], $this->parent_obj, $this->parent_cmd);
80 case 'addToClipboard':
101 $value = array_unique(array_merge((
array)$obj->getValue(), $to_hide));
102 $obj->setValue($value);
103 $obj->writeToSession();
106 if(isset($_REQUEST[
"tbltplcrt"]))
108 $ilCtrl->setParameter($this->parent_obj,
"tbltplcrt", $_REQUEST[
"tbltplcrt"]);
110 if(isset($_REQUEST[
"tbltpldel"]))
112 $ilCtrl->setParameter($this->parent_obj,
"tbltpldel", $_REQUEST[
"tbltpldel"]);
115 $ilCtrl->redirect($this->parent_obj, $this->parent_cmd);
120 return parent::executeCommand();
124 protected function sendMail(
array $a_user_ids, $a_parent_obj, $a_parent_cmd)
128 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
131 foreach($a_user_ids as $usr_id)
140 $ref_id = (int)$_REQUEST[
"ref_id"];
144 $tmpl_id = $obj_lp->getMailTemplateId();
156 include_once
'./Services/Link/classes/class.ilLink.php';
158 $sig = rawurlencode(base64_encode($sig));
169 'rcp_to' => implode(
',', $rcps),
188 global $ilObjDataCache;
190 include_once
'./Services/Search/classes/class.ilQueryParser.php';
193 $query_parser->setMinWordLength(0);
195 $query_parser->parse();
196 if(!$query_parser->validate())
203 if($filter[
"type"] ==
"lres")
205 $filter[
"type"] =
array(
'lm',
'sahs',
'htlm');
209 $filter[
"type"] =
array($filter[
"type"]);
212 include_once
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
214 $object_search->setFilter($filter[
"type"]);
217 $object_search->setIdFilter($preset_obj_ids);
219 $res =& $object_search->performSearch();
223 $res->setRequiredPermission($permission);
226 $res->setMaxHits(1000);
228 if($a_check_lp_activation)
230 $res->addObserver($this,
"searchFilterListener");
233 if(!$this->filter[
"area"])
235 $res->filter(ROOT_FOLDER_ID,
false);
239 $res->filter($this->filter[
"area"],
false);
243 foreach(
$res->getResults() as $obj_data)
245 $objects[$obj_data[
'obj_id']][] = $obj_data[
'ref_id'];
249 if(
$res->isLimitReached())
251 $this->lng->loadLanguageModule(
"search");
255 return $objects ? $objects :
array();
265 if(is_array($this->filter[
"hide"]) && in_array($a_data[
"obj_id"], $this->filter[
"hide"]))
270 if(get_class($olp) !=
"ilObjectLP" &&
283 public function initBaseFilter($a_split_learning_resources =
false, $a_include_no_status_filter =
true)
285 global
$lng, $ilObjDataCache;
290 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
294 $si->readFromSession();
297 $si->setValue(
"crs");
299 $this->filter[
"type"] =
$si->getValue();
302 include_once(
"./Services/Form/classes/class.ilMultiSelectInputGUI.php");
305 $msi->readFromSession();
306 $this->filter[
"hide"] = $msi->getValue();
307 if($this->filter[
"hide"])
311 $type = $types[
"type"];
315 $type =
array(
'lm',
'sahs',
'htlm');
319 $type =
array($type);
321 foreach($this->filter[
"hide"] as $obj_id)
323 if(in_array($ilObjDataCache->lookupType($obj_id), $type))
325 $options[$obj_id] = $ilObjDataCache->lookupTitle($obj_id);
332 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
333 $ti =
new ilTextInputGUI($lng->txt(
"trac_title_description"),
"query");
337 $ti->readFromSession();
338 $this->filter[
"query"] = $ti->getValue();
341 include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
345 $rs->readFromSession();
346 $this->filter[
"area"] = $rs->getValue();
349 if($a_include_no_status_filter)
351 include_once(
"./Services/Form/classes/class.ilCheckboxInputGUI.php");
354 $cb->readFromSession();
355 $this->filter[
"status"] = $cb->getChecked();
369 include_once
'./Services/Link/classes/class.ilLink.php';
379 $path_full = $tree->getPathFull($ref_id);
380 foreach($path_full as
$data)
382 if(++
$counter < (count($path_full)-1))
386 $path .=
" » ";
387 if($ref_id != $data[
'ref_id'])
389 $path .= $data[
'title'];
393 $path .= (
'<a target="_top" href="'.
395 $data[
'title'].
'</a>');
411 protected function getPossibleTypes($a_split_learning_resources =
false, $a_include_digilib =
false, $a_allow_undefined_lp =
false)
413 global
$lng, $ilPluginAdmin;
417 if($a_split_learning_resources)
419 $options[
'lm'] = $lng->txt(
'objs_lm');
420 $options[
'sahs'] = $lng->txt(
'objs_sahs');
421 $options[
'htlm'] = $lng->txt(
'objs_htlm');
425 $options[
'lres'] = $lng->txt(
'learning_resources');
428 $options[
'crs'] = $lng->txt(
'objs_crs');
429 $options[
'grp'] = $lng->txt(
'objs_grp');
430 $options[
'exc'] = $lng->txt(
'objs_exc');
431 $options[
'file'] = $lng->txt(
'objs_file');
432 $options[
'mcst'] = $lng->txt(
'objs_mcst');
433 $options[
'svy'] = $lng->txt(
'objs_svy');
434 $options[
'tst'] = $lng->txt(
'objs_tst');
435 $options[
'prg'] = $lng->txt(
'objs_prg');
436 $options[
'iass'] = $lng->txt(
'objs_iass');
438 if($a_allow_undefined_lp)
440 $options[
"webr"] = $lng->txt(
"objs_webr");
441 $options[
"wiki"] = $lng->txt(
"objs_wiki");
442 $options[
"blog"] = $lng->txt(
"objs_blog");
443 $options[
"prtf"] = $lng->txt(
"objs_prtf");
444 $options[
"prtt"] = $lng->txt(
"objs_prtt");
448 include_once
'Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php';
449 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"Repository",
"robj");
450 foreach ($pl_names as $pl)
452 $pl_id = $ilPluginAdmin->getId(
IL_COMP_SERVICE,
"Repository",
"robj", $pl);
468 $pos = strrpos($id,
"_");
471 $function = strtoupper(substr($id, $pos+1));
472 if(in_array($function,
array(
"MIN",
"MAX",
"SUM",
"AVG",
"COUNT")))
474 $id = substr($id, 0, $pos);
478 if(trim($value) ==
"" && $id !=
"status")
481 get_class($this) !=
"ilTrObjectUsersPropsTableGUI" &&
482 get_class($this) !=
"ilTrMatrixTableGUI")
484 return "--".$lng->txt(
"none").
"--";
493 case 'status_changed':
505 case "spent_seconds":
535 $value = $lng->txt(
"gender_".$value);
539 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
546 $lng->loadLanguageModule(
"meta");
547 $value = $lng->txt(
"meta_l_".$value);
551 $value = $lng->txt(
"meta_c_".$value);
561 foreach((
array)$this->filter as $id => $value)
582 case "matriculation":
604 case "spent_seconds":
605 if(is_array($value) && implode(
"", $value))
615 case 'status_changed':
635 $result[$id][
"from"] = substr(
$result[$id][
"from"], 0, -8).
"00:00:00";
640 $result[$id][
"to"] = substr(
$result[$id][
"to"], 0, -8).
"23:59:59";
654 $mode = $olp->getCurrentMode();
667 protected function parseTitle($a_obj_id, $action, $a_user_id =
false)
674 if($a_user_id != $ilUser->getId())
682 $user .=
", ".$a_user->getFullName();
685 if($a_obj_id != ROOT_FOLDER_ID)
687 $this->
setTitle($lng->txt($action).
": ".$ilObjDataCache->lookupTitle($a_obj_id).$user);
690 $this->
setDescription($this->lng->txt(
'trac_mode').
": ".$olp->getModeText($olp->getCurrentMode()));
694 $this->
setTitle($lng->txt($action));
705 global
$lng, $ilObjDataCache,
$ilUser, $ilClientIniFile;
718 include_once
'./Services/Link/classes/class.ilLink.php';
721 $data[$lng->txt(
"trac_name_of_installation")] = $ilClientIniFile->readVariable(
'client',
'name');
725 $data[$lng->txt(
"trac_object_name")] = $ilObjDataCache->lookupTitle($this->obj_id);
733 $data[$lng->txt(
"trac_report_date")] =
735 $data[$lng->txt(
"trac_report_owner")] = $ilUser->getFullName();
744 $a_excel->
setCell($a_row, 0, $caption);
745 $a_excel->
setCell($a_row, 1, $value);
755 $a_csv->addColumn(strip_tags($caption));
756 $a_csv->addColumn(strip_tags($value));
764 include_once
'Modules/Course/classes/Timings/class.ilTimingCache.php';
768 if($timings[
'item'][
'changeable'] && $timings[
'user'][$a_user_id][
'end'])
770 $end = $timings[
'user'][$a_user_id][
'end'];
772 else if ($timings[
'item'][
'suggestion_end'])
774 $end = $timings[
'item'][
'suggestion_end'];
786 $seconds = ((int)$seconds > 0) ? $seconds : 0;
787 if($a_shorten_zero && !$seconds)
792 $hours = floor($seconds / 3600);
793 $rest = $seconds % 3600;
795 $minutes = floor(
$rest / 60);
803 return sprintf(
"%dh%02dm",$hours,$minutes);
811 if(is_numeric($a_value))
814 $a_value = (int)$a_value;
815 if($a_value <= $threshold)
819 return "0-".$threshold;
830 protected function buildValueScale($a_max_value, $a_anonymize =
false, $a_format_seconds =
false)
835 $step = $a_max_value / 10;
846 $value_ticks =
array(0 => 0);
847 foreach($ticks as $tick)
849 $value = $tvalue = $tick;
855 if($a_format_seconds)
859 $value_ticks[$value] = $tvalue;
870 for($loop = 0; $loop < 10; $loop++)
872 $year =
date(
"Y")-$loop;
874 for($loop2 = 12; $loop2 > 0; $loop2--)
876 $month = str_pad($loop2, 2,
"0", STR_PAD_LEFT);
877 if($year.$month <=
date(
"Ym"))
881 $caption = $year.
" / ".$lng->txt(
"month_".$month.
"_long");
885 $caption = $year.
"/".$month;
887 $options[$year.
"-".$month] = $caption;
904 for($loop = 1; $loop<13; $loop++)
906 $month = str_pad($loop, 2,
"0", STR_PAD_LEFT);
907 if($a_year.
"-".$month <=
date(
"Y-m"))
911 $caption = $lng->txt(
"month_".$month.
"_long");
915 $caption = $lng->txt(
"month_".$month.
"_short");
917 $all[$a_year.
"-".$month] = $caption;
927 $cols = $privacy_fields =
array();
929 include_once(
"./Services/User/classes/class.ilUserProfile.php");
931 $up->skipGroup(
"preferences");
932 $up->skipGroup(
"settings");
933 $up->skipGroup(
"interests");
934 $ufs = $up->getStandardFields();
937 $cols[
"login"] =
array(
938 "txt" => $lng->txt(
"login"),
941 if(!$this->anonymized)
943 $cols[
"firstname"] =
array(
944 "txt" => $lng->txt(
"firstname"),
946 $cols[
"lastname"] =
array(
947 "txt" => $lng->txt(
"lastname"),
952 include_once
'Services/Tracking/classes/class.ilObjUserTracking.php';
956 $cols[
"first_access"] =
array(
957 "txt" => $lng->txt(
"trac_first_access"),
959 $cols[
"last_access"] =
array(
960 "txt" => $lng->txt(
"trac_last_access"),
965 $cols[
"read_count"] =
array(
966 "txt" => $lng->txt(
"trac_read_count"),
972 $cols[
"spent_seconds"] =
array(
973 "txt" => $lng->txt(
"trac_spent_seconds"),
979 $cols[
"percentage"] =
array(
980 "txt" => $lng->txt(
"trac_percentage"),
988 $cols[
"status"] =
array(
989 "txt" => $lng->txt(
"trac_status"),
992 $cols[
'status_changed'] =
array(
993 'txt' => $lng->txt(
'trac_status_changed'),
999 $cols[
"mark"] =
array(
1000 "txt" => $lng->txt(
"trac_mark"),
1004 $cols[
"u_comment"] =
array(
1005 "txt" => $lng->txt(
"trac_comment"),
1006 "default" =>
false);
1008 $cols[
"create_date"] =
array(
1009 "txt" => $lng->txt(
"create_date"),
1010 "default" =>
false);
1011 $cols[
"language"] =
array(
1012 "txt" => $lng->txt(
"language"),
1013 "default" =>
false);
1016 if(!$this->anonymized &&
1017 ($a_in_course || $a_in_group))
1020 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1024 foreach ($ufs as $f => $fd)
1026 if (!isset($cols[$f]) && $f !=
"username" && !$fd[
"lists_hide"])
1029 !($fd[
"course_export_fix_value"] || $ilSetting->get(
"usr_settings_course_export_".$f)))
1034 !($fd[
"group_export_fix_value"] || $ilSetting->get(
"usr_settings_group_export_".$f)))
1040 "txt" => $lng->txt($f),
1041 "default" =>
false);
1043 $privacy_fields[] = $f;
1048 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
1052 $user_defined_fields = $user_defined_fields->getCourseExportableFields();
1056 $user_defined_fields = $user_defined_fields->getGroupExportableFields();
1058 foreach($user_defined_fields as $definition)
1062 $f =
"udf_".$definition[
"field_id"];
1064 "txt" => $definition[
"field_name"],
1065 "default" =>
false);
1067 $privacy_fields[] = $f;
1073 return array($cols, $privacy_fields);
1082 include_once
'./Services/User/classes/class.ilUserClipboard.php';
1087 $GLOBALS[
'lng']->loadLanguageModule(
'user');
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupLogin($a_user_id)
lookup login
anonymizeValue($a_value, $a_force_number=false)
const EXTENDED_DATA_LAST_ACCESS
setDescription($a_val)
Set description.
buildPath($ref_ids)
Build path with deep-link.
getSelectableUserColumns($a_in_course=false, $a_in_group=false)
static isTypePluginWithLP($a_type, $a_active_status=true)
Check whether a repository type is a plugin which has active learning progress.
static _getInstance()
Get instance.
static lookupTxtById($plugin_id, $lang_var)
static getInstance($a_usr_id)
Get singelton instance.
static _getImagePathForStatus($a_status)
Get image path for status.
static _lookupFullname($a_user_id)
Lookup Full Name.
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
getMonthsYear($a_year=null, $a_short=false)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
searchObjects(array $filter, $permission, array $preset_obj_ids=null, $a_check_lp_activation=true)
Search objects that match current filters.
resetOffset($a_in_determination=false)
Reset offset.
getFilterItemByPostVar($a_post_var)
const EXTENDED_DATA_READ_COUNT
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
static setUseRelativeDates($a_status)
set use relative dates
parseTitle($a_obj_id, $action, $a_user_id=false)
getPossibleTypes($a_split_learning_resources=false, $a_include_digilib=false, $a_allow_undefined_lp=false)
Get possible subtypes.
parseValue($id, $value, $type)
addToClipboard()
Add selected users to clipboard.
static _lookupObjectId($a_ref_id)
lookup object id
initBaseFilter($a_split_learning_resources=false, $a_include_no_status_filter=true)
Init filter.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
const LP_MODE_VISITED_PAGES
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
TableGUI class for learning progress.
if(!is_array($argv)) $options
getExportMeta()
Build export meta data.
const LP_MODE_TEST_PASSED
static _showWarning($a_ref_id, $a_usr_id)
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
buildValueScale($a_max_value, $a_anonymize=false, $a_format_seconds=false)
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
foreach( $_REQUEST as $var) foreach(array('_POST'=> 'HTTP_POST_VARS', '_GET'=> 'HTTP_GET_VARS', '_COOKIE'=> 'HTTP_COOKIE_VARS', '_SERVER'=> 'HTTP_SERVER_VARS', '_ENV'=> 'HTTP_ENV_VARS', '_FILES'=> 'HTTP_POST_FILES') as $array=> $other) $step
isPercentageAvailable($a_obj_id)
static _lookupOwner($a_id)
lookup object owner
setMaxLength($a_maxlength)
Set Max Length.
searchFilterListener($a_ref_id, $a_data)
Listener for SearchResultFilter Checks wheather the object is hidden and mode is not LP_MODE_DEACTIVA...
fillMetaExcel(ilExcel $a_excel, &$a_row)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const EXTENDED_DATA_SPENT_SECONDS
writeFilterToSession()
Write filter values to session.
static supportsMark($a_obj_type)
sendMail(array $a_user_ids, $a_parent_obj, $a_parent_cmd)
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
setCell($a_row, $a_col, $a_value)
Set cell value.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
determineSelectedFilters()
Determine selected filters.
static supportsSpentSeconds($a_obj_type)
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
getMonthsFilter($a_short=false)
formatSeconds($seconds, $a_shorten_zero=false)
showTimingsWarning($a_ref_id, $a_user_id)
static getLogger($a_component_id)
Get component logger.
static _getInstance()
Get instance of ilPrivacySettings.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
getCurrentFilter($as_query=false)
static redirect($a_script)
http redirect to other script
static getInstance($a_obj_id)
resetFilter()
Reset filter.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static & _getTimings($a_ref_id)