4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
    5include_once  
'./Services/Search/classes/class.ilSearchSettings.php';
 
   20        public function __construct($a_parent_obj, $a_parent_cmd = 
"", $a_template_context = 
"")
 
   22                parent::__construct($a_parent_obj, $a_parent_cmd, $a_template_context);
 
   25                $this->lng->loadLanguageModule(
"meta");
 
   27                include_once(
"./Services/Object/classes/class.ilObjectLP.php");
 
   30                if(!$this->anonymized && $this->obj_id)
 
   32                        include_once 
"Services/Object/classes/class.ilObjectLP.php";
 
   34                        $this->anonymized = $olp->isAnonymized();
 
   44                if(!$ilCtrl->getNextClass($this))
 
   61                                        $to_hide = 
$_POST[
"item_id"];
 
   65                                        $to_hide = array((
int)
$_GET[
"hide"]);
 
   68                                case "mailselectedusers":
 
   75                                                $this->
sendMail(
$_POST[
"uid"], $this->parent_obj, $this->parent_cmd);                                                                                           
 
   89                                $value = array_unique(array_merge((array)$obj->getValue(), $to_hide));
 
   90                                $obj->setValue($value);
 
   91                                $obj->writeToSession();
 
   96                                $ilCtrl->setParameter($this->parent_obj, 
"tbltplcrt", 
$_REQUEST[
"tbltplcrt"]);
 
  100                                $ilCtrl->setParameter($this->parent_obj, 
"tbltpldel", 
$_REQUEST[
"tbltpldel"]);
 
  103                        $ilCtrl->redirect($this->parent_obj, $this->parent_cmd);
 
  108                        return parent::executeCommand();
 
  112        protected function sendMail(array $a_user_ids, $a_parent_obj, $a_parent_cmd)
 
  116                require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
  119                foreach($a_user_ids as $usr_id)
 
  132                        $tmpl_id = $obj_lp->getMailTemplateId();
 
  144                                include_once 
'./Services/Link/classes/class.ilLink.php';
 
  146                                $sig = rawurlencode(base64_encode($sig));                       
 
  157                                        'rcp_to' => implode(
',', $rcps),
 
  174        protected function searchObjects(array 
$filter, $permission, array $preset_obj_ids = 
null, $a_check_lp_activation = 
true)
 
  176                global $ilObjDataCache;
 
  178                include_once 
'./Services/Search/classes/class.ilQueryParser.php';
 
  181                $query_parser->setMinWordLength(0);
 
  183                $query_parser->parse();
 
  184                if(!$query_parser->validate())
 
  193                        $filter[
"type"] = array(
'lm',
'sahs',
'htlm',
'dbk');
 
  200                include_once 
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
 
  202                $object_search->setFilter(
$filter[
"type"]);
 
  205                        $object_search->setIdFilter($preset_obj_ids);
 
  207                $res =& $object_search->performSearch();
 
  211                        $res->setRequiredPermission($permission);
 
  214                $res->setMaxHits(1000);
 
  216                if($a_check_lp_activation)
 
  218                        $res->addObserver($this, 
"searchFilterListener");
 
  221                if(!$this->filter[
"area"])
 
  223                        $res->filter(ROOT_FOLDER_ID, 
false);
 
  227                        $res->filter($this->filter[
"area"], 
false);
 
  231                foreach(
$res->getResults() as $obj_data)
 
  233                        $objects[$obj_data[
'obj_id']][] = $obj_data[
'ref_id'];
 
  237                if(
$res->isLimitReached())
 
  239                        $this->lng->loadLanguageModule(
"search");
 
  243                return $objects ? $objects : array();
 
  253                if(is_array($this->filter[
"hide"]) && in_array($a_data[
"obj_id"], $this->filter[
"hide"]))
 
  258                if(get_class($olp) != 
"ilObjectLP" && 
 
  271        public function initFilter($a_split_learning_resources = 
false, $a_include_no_status_filter = 
true)
 
  273                global 
$lng, $ilObjDataCache;
 
  278                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  282                $si->readFromSession();
 
  285                        $si->setValue(
"crs");
 
  287                $this->filter[
"type"] = 
$si->getValue();
 
  290                include_once(
"./Services/Form/classes/class.ilMultiSelectInputGUI.php");
 
  293                $msi->readFromSession();
 
  294                $this->filter[
"hide"] = $msi->getValue();
 
  295                if($this->filter[
"hide"])
 
  299                        $type = $types[
"type"];
 
  303                                $type = array(
'lm',
'sahs',
'htlm',
'dbk');
 
  307                                $type = array($type);
 
  309                        foreach($this->filter[
"hide"] as $obj_id)
 
  311                                if(in_array($ilObjDataCache->lookupType($obj_id), $type))
 
  313                                        $options[$obj_id] = $ilObjDataCache->lookupTitle($obj_id);
 
  320                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  322                $ti->setMaxLength(64);
 
  325                $ti->readFromSession();
 
  326                $this->filter[
"query"] = $ti->getValue();
 
  329                include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
 
  331                $rs->setSelectText(
$lng->txt(
"trac_select_area"));
 
  333                $rs->readFromSession();
 
  334                $this->filter[
"area"] = $rs->getValue();
 
  337                if($a_include_no_status_filter)
 
  339                        include_once(
"./Services/Form/classes/class.ilCheckboxInputGUI.php");
 
  342                        $cb->readFromSession();
 
  343                        $this->filter[
"status"] = $cb->getChecked();
 
  357                include_once 
'./Services/Link/classes/class.ilLink.php';
 
  367                        $path_full = $tree->getPathFull(
$ref_id);
 
  368                        foreach($path_full as 
$data)
 
  370                                if(++$counter < (count($path_full)-1))
 
  374                                $path .= 
" » ";
 
  381                                        $path .= (
'<a target="_top" href="'.
 
  383                                                          $data[
'title'].
'</a>');
 
  399        protected function getPossibleTypes($a_split_learning_resources = 
false, $a_include_digilib = 
false, $a_allow_undefined_lp = 
false)
 
  401                global 
$lng, $ilPluginAdmin;
 
  405                if($a_split_learning_resources)
 
  411                        if($a_include_digilib)
 
  430                if($a_allow_undefined_lp)
 
  437                include_once 
'Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php';      
 
  438                $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE, 
"Repository", 
"robj");
 
  439                foreach ($pl_names as $pl)
 
  441                        $pl_id = $ilPluginAdmin->getId(
IL_COMP_SERVICE, 
"Repository", 
"robj", $pl);
 
  457                $pos = strrpos($id, 
"_");
 
  460                        $function = strtoupper(substr($id, $pos+1));
 
  461                        if(in_array($function, array(
"MIN", 
"MAX", 
"SUM", 
"AVG", 
"COUNT")))
 
  463                                $id = substr($id, 0, $pos);
 
  467                if(trim($value) == 
"" && $id != 
"status")
 
  470                                get_class($this) != 
"ilTrObjectUsersPropsTableGUI" &&
 
  471                                get_class($this) != 
"ilTrMatrixTableGUI")
 
  473                                return "--".$lng->txt(
"none").
"--";
 
  482                        case 'status_changed':
 
  494                        case "spent_seconds":
 
  501                                        include_once(
"./Services/Utilities/classes/class.ilFormat.php");                                        
 
  525                                $value = 
$lng->txt(
"gender_".$value);
 
  529                                include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
 
  536                                $lng->loadLanguageModule(
"meta");
 
  537                                $value = 
$lng->txt(
"meta_l_".$value);
 
  541                                $value = 
$lng->txt(
"meta_c_".$value);
 
  551                foreach($this->filter as $id => $value)
 
  572                                case "matriculation":
 
  594                                case "spent_seconds":
 
  595                                        if(is_array($value) && implode(
"", $value))
 
  605                                 case 'status_changed':
 
  625                                                         $result[$id][
"from"] = substr(
$result[$id][
"from"], 0, -8).
"00:00:00";
 
  630                                                         $result[$id][
"to"] = substr(
$result[$id][
"to"], 0, -8).
"23:59:59";
 
  644                $mode = $olp->getCurrentMode();
 
  657        protected function parseTitle($a_obj_id, $action, $a_user_id = 
false)
 
  664                        if($a_user_id != 
$ilUser->getId())
 
  672                        $user .= 
", ".$a_user->getFullName(); 
 
  675                if($a_obj_id != ROOT_FOLDER_ID)
 
  677                        $this->
setTitle($lng->txt($action).
": ".$ilObjDataCache->lookupTitle($a_obj_id).$user);
 
  680                        $this->
setDescription($this->lng->txt(
'trac_mode').
": ".$olp->getModeText($olp->getCurrentMode()));
 
  684                        $this->
setTitle($lng->txt($action));
 
  695                global 
$lng, $ilObjDataCache, 
$ilUser, $ilClientIniFile;
 
  708                include_once 
'./Services/Link/classes/class.ilLink.php';
 
  711                $data[
$lng->txt(
"trac_name_of_installation")] = $ilClientIniFile->readVariable(
'client', 
'name');
 
  715                        $data[
$lng->txt(
"trac_object_name")] = $ilObjDataCache->lookupTitle($this->obj_id);
 
  734                        $worksheet->write($a_row, 0, $caption);
 
  735                        $worksheet->write($a_row, 1, $value);
 
  745                        $a_csv->addColumn(strip_tags($caption));
 
  746                        $a_csv->addColumn(strip_tags($value));
 
  754                include_once 
'Modules/Course/classes/Timings/class.ilTimingCache.php';
 
  758                        if($timings[
'item'][
'changeable'] && $timings[
'user'][$a_user_id][
'end'])
 
  760                                $end = $timings[
'user'][$a_user_id][
'end'];
 
  762                        else if ($timings[
'item'][
'suggestion_end'])
 
  764                                $end = $timings[
'item'][
'suggestion_end'];
 
  776                $seconds = ((int)$seconds > 0) ? $seconds : 0;
 
  777                if($a_shorten_zero && !$seconds)
 
  782                $hours = floor($seconds / 3600);                
 
  783                $rest = $seconds % 3600;
 
  785                $minutes = floor(
$rest / 60);
 
  793                return sprintf(
"%dh%02dm",$hours,$minutes);
 
  801                if(is_numeric($a_value))
 
  804                        $a_value = (int)$a_value;
 
  805                        if($a_value <= $threshold)
 
  809                                        return "0-".$threshold;
 
  820        protected function buildValueScale($a_max_value, $a_anonymize = 
false, $a_format_seconds = 
false)
 
  825                        $step = $a_max_value / 10;
 
  826                        $base = ceil(log($step, 10));           
 
  827                        $fac = ceil($step / pow(10, (
$base - 1)));
 
  828                        $step = pow(10, 
$base - 1) * $fac;
 
  834                $ticks = range(0, $a_max_value+$step, $step);
 
  836                $value_ticks = array(0 => 0);
 
  837                foreach($ticks as $tick)
 
  839                        $value = $tvalue = $tick;
 
  845                        if($a_format_seconds)
 
  849                        $value_ticks[$value] = $tvalue;                         
 
  860                for($loop = 0; $loop < 10; $loop++)
 
  862                        $year = date(
"Y")-$loop;
 
  864                        for($loop2 = 12; $loop2 > 0; $loop2--)
 
  866                                $month = str_pad($loop2, 2, 
"0", STR_PAD_LEFT);
 
  867                                if($year.$month <= date(
"Ym"))
 
  871                                                $caption = $year.
" / ".
$lng->txt(
"month_".$month.
"_long");
 
  875                                                $caption = $year.
"/".$month;
 
  877                                        $options[$year.
"-".$month] = $caption;
 
  894                for($loop = 1; $loop<13; $loop++)
 
  896                        $month = str_pad($loop, 2, 
"0", STR_PAD_LEFT);
 
  897                        if($a_year.
"-".$month <= date(
"Y-m"))
 
  901                                        $caption = 
$lng->txt(
"month_".$month.
"_long");
 
  905                                        $caption = 
$lng->txt(
"month_".$month.
"_short");
 
  907                                $all[$a_year.
"-".$month] = $caption;
 
  917                $cols = $privacy_fields = array();      
 
  919                include_once(
"./Services/User/classes/class.ilUserProfile.php");
 
  921                $up->skipGroup(
"preferences");
 
  922                $up->skipGroup(
"settings");
 
  923                $up->skipGroup(
"interests");
 
  924                $ufs = $up->getStandardFields();
 
  927                $cols[
"login"] = array(
 
  928                        "txt" => 
$lng->txt(
"login"),
 
  931                if(!$this->anonymized)
 
  933                        $cols[
"firstname"] = array(
 
  934                                "txt" => 
$lng->txt(
"firstname"),
 
  936                        $cols[
"lastname"] = array(
 
  937                                "txt" => 
$lng->txt(
"lastname"),
 
  942                include_once 
'Services/Tracking/classes/class.ilObjUserTracking.php';
 
  946                        $cols[
"first_access"] = array(
 
  947                                "txt" => 
$lng->txt(
"trac_first_access"),
 
  949                        $cols[
"last_access"] = array(
 
  950                                "txt" => 
$lng->txt(
"trac_last_access"),
 
  955                        $cols[
"read_count"] = array(
 
  956                                "txt" => 
$lng->txt(
"trac_read_count"),
 
  962                        $cols[
"spent_seconds"] = array(
 
  963                                "txt" => 
$lng->txt(
"trac_spent_seconds"),
 
  969                        $cols[
"percentage"] = array(
 
  970                                "txt" => 
$lng->txt(
"trac_percentage"),
 
  978                        $cols[
"status"] = array(
 
  979                                "txt" => 
$lng->txt(
"trac_status"),
 
  982                        $cols[
'status_changed'] = array(
 
  983                                'txt' => 
$lng->txt(
'trac_status_changed'),
 
  989                        $cols[
"mark"] = array(
 
  990                                "txt" => 
$lng->txt(
"trac_mark"),
 
  994                $cols[
"u_comment"] = array(
 
  995                        "txt" => 
$lng->txt(
"trac_comment"),
 
  998                $cols[
"create_date"] = array(
 
  999                        "txt" => 
$lng->txt(
"create_date"),
 
 1000                        "default" => 
false);
 
 1001                $cols[
"language"] = array(
 
 1002                        "txt" => 
$lng->txt(
"language"),
 
 1003                        "default" => 
false);
 
 1006                if(!$this->anonymized && 
 
 1007                        ($a_in_course || $a_in_group))
 
 1010                        include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
 1014                                foreach ($ufs as $f => $fd)
 
 1016                                        if (!isset($cols[$f]) && $f != 
"username" && !$fd[
"lists_hide"])
 
 1019                                                        !($fd[
"course_export_fix_value"] || 
$ilSetting->get(
"usr_settings_course_export_".$f)))
 
 1024                                                        !($fd[
"group_export_fix_value"] || 
$ilSetting->get(
"usr_settings_group_export_".$f)))
 
 1030                                                        "txt" => 
$lng->txt($f),
 
 1031                                                        "default" => 
false);
 
 1033                                                $privacy_fields[] = $f;
 
 1038                                include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
 1042                                        $user_defined_fields = $user_defined_fields->getCourseExportableFields();
 
 1046                                        $user_defined_fields = $user_defined_fields->getGroupExportableFields();
 
 1048                                foreach($user_defined_fields as $definition)
 
 1052                                                $f = 
"udf_".$definition[
"field_id"];
 
 1054                                                                "txt" => $definition[
"field_name"],
 
 1055                                                                "default" => 
false);
 
 1057                                                $privacy_fields[] = $f;
 
 1063                return array($cols, $privacy_fields);           
 
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
const LP_MODE_TEST_PASSED
const LP_MODE_VISITED_PAGES
TableGUI class for learning progress.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
Constructor.
formatSeconds($seconds, $a_shorten_zero=false)
parseValue($id, $value, $type)
getCurrentFilter($as_query=false)
showTimingsWarning($a_ref_id, $a_user_id)
getMonthsYear($a_year=null, $a_short=false)
getSelectableUserColumns($a_in_course=false, $a_in_group=false)
isPercentageAvailable($a_obj_id)
buildValueScale($a_max_value, $a_anonymize=false, $a_format_seconds=false)
initFilter($a_split_learning_resources=false, $a_include_no_status_filter=true)
Init filter.
sendMail(array $a_user_ids, $a_parent_obj, $a_parent_cmd)
parseTitle($a_obj_id, $action, $a_user_id=false)
anonymizeValue($a_value, $a_force_number=false)
fillMetaExcel($worksheet, &$a_row)
Add meta information to excel export.
getMonthsFilter($a_short=false)
getExportMeta()
Build export meta data.
buildPath($ref_ids)
Build path with deep-link.
fillMetaCSV($a_csv)
Add meta information to csv export.
getPossibleTypes($a_split_learning_resources=false, $a_include_digilib=false, $a_allow_undefined_lp=false)
Get possible subtypes.
executeCommand()
Execute command.
searchObjects(array $filter, $permission, array $preset_obj_ids=null, $a_check_lp_activation=true)
Search objects that match current filters.
searchFilterListener($a_ref_id, $a_data)
Listener for SearchResultFilter Checks wheather the object is hidden and mode is not LP_MODE_DEACTIVA...
_getImagePathForStatus($a_status)
Get image path for status.
_getStatusText($a_status, $a_lng=null)
Get status alt text.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getLogger($a_component_id)
Get component logger.
const EXTENDED_DATA_READ_COUNT
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
const EXTENDED_DATA_SPENT_SECONDS
const EXTENDED_DATA_LAST_ACCESS
static _lookupLogin($a_user_id)
lookup login
_lookupFullname($a_user_id)
Lookup Full Name.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static supportsMark($a_obj_type)
static supportsSpentSeconds($a_obj_type)
static getInstance($a_obj_id)
static _lookupObjectId($a_ref_id)
lookup object id
_lookupOwner($a_id)
lookup object owner
static _lookupType($a_id, $a_reference=false)
lookup object type
static lookupTxt($a_mod_prefix, $a_pl_id, $a_lang_var)
Lookup language text.
static _getInstance()
Get instance of ilPrivacySettings.
static isTypePluginWithLP($a_type, $a_active_status=true)
Check whether a repository type is a plugin which has active learning progress.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
resetOffset($a_in_determination=false)
Reset offset.
getFilterItemByPostVar($a_post_var)
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
resetFilter()
Reset filter.
writeFilterToSession()
Write filter values to session.
setDescription($a_val)
Set description.
determineSelectedFilters()
Determine selected filters.
This class represents a text property in a property form.
_showWarning($a_ref_id, $a_usr_id)
static _getInstance()
Get instance.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options