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"]);
 
   78                                $value = array_unique(array_merge((array)$obj->getValue(), $to_hide));
 
   79                                $obj->setValue($value);
 
   80                                $obj->writeToSession();
 
   85                                $ilCtrl->setParameter($this->parent_obj, 
"tbltplcrt", 
$_REQUEST[
"tbltplcrt"]);
 
   89                                $ilCtrl->setParameter($this->parent_obj, 
"tbltpldel", 
$_REQUEST[
"tbltpldel"]);
 
   92                        $ilCtrl->redirect($this->parent_obj, $this->parent_cmd);
 
   97                        return parent::executeCommand();
 
  110                global $ilObjDataCache;
 
  118                include_once 
'./Services/Search/classes/class.ilQueryParser.php';
 
  121                $query_parser->setMinWordLength(0);
 
  123                $query_parser->parse();
 
  124                if(!$query_parser->validate())
 
  132                        $filter[
"type"] = array(
'lm',
'sahs',
'htlm',
'dbk');
 
  139                include_once 
'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
 
  141                $object_search->setFilter(
$filter[
"type"]);
 
  144                        $object_search->setIdFilter($preset_obj_ids);
 
  146                $res =& $object_search->performSearch();
 
  150                        $res->setRequiredPermission($permission);
 
  153                $res->setMaxHits(1000);
 
  154                $res->addObserver($this, 
"searchFilterListener");
 
  156                if(!$this->filter[
"area"])
 
  158                        $res->filter(ROOT_FOLDER_ID, 
false);
 
  162                        $res->filter($this->filter[
"area"], 
false);
 
  166                foreach(
$res->getResults() as $obj_data)
 
  168                        $objects[$obj_data[
'obj_id']][] = $obj_data[
'ref_id'];
 
  172                if(
$res->isLimitReached())
 
  174                        $this->lng->loadLanguageModule(
"search");
 
  178                return $objects ? $objects : array();
 
  188                if(is_array($this->filter[
"hide"]) && in_array($a_data[
"obj_id"], $this->filter[
"hide"]))
 
  193                if(get_class($olp) != 
"ilObjectLP" && 
 
  206        public function initFilter($a_split_learning_resources = 
false, $a_include_no_status_filter = 
true)
 
  208                global 
$lng, $ilObjDataCache;
 
  213                include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
 
  217                $si->readFromSession();
 
  220                        $si->setValue(
"crs");
 
  222                $this->filter[
"type"] = 
$si->getValue();
 
  225                include_once(
"./Services/Form/classes/class.ilMultiSelectInputGUI.php");
 
  228                $msi->readFromSession();
 
  229                $this->filter[
"hide"] = $msi->getValue();
 
  230                if($this->filter[
"hide"])
 
  234                        $type = $types[
"type"];
 
  238                                $type = array(
'lm',
'sahs',
'htlm',
'dbk');
 
  242                                $type = array($type);
 
  244                        foreach($this->filter[
"hide"] as $obj_id)
 
  246                                if(in_array($ilObjDataCache->lookupType($obj_id), $type))
 
  248                                        $options[$obj_id] = $ilObjDataCache->lookupTitle($obj_id);
 
  255                include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
 
  257                $ti->setMaxLength(64);
 
  260                $ti->readFromSession();
 
  261                $this->filter[
"query"] = $ti->getValue();
 
  264                include_once(
"./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
 
  266                $rs->setSelectText(
$lng->txt(
"trac_select_area"));
 
  268                $rs->readFromSession();
 
  269                $this->filter[
"area"] = $rs->getValue();
 
  272                if($a_include_no_status_filter)
 
  274                        include_once(
"./Services/Form/classes/class.ilCheckboxInputGUI.php");
 
  277                        $cb->readFromSession();
 
  278                        $this->filter[
"status"] = $cb->getChecked();
 
  292                include_once 
'./Services/Link/classes/class.ilLink.php';
 
  302                        $path_full = $tree->getPathFull(
$ref_id);
 
  303                        foreach($path_full as 
$data)
 
  305                                if(++$counter < (count($path_full)-1))
 
  309                                $path .= 
" » ";
 
  316                                        $path .= (
'<a target="_top" href="'.
 
  318                                                          $data[
'title'].
'</a>');
 
  334        protected function getPossibleTypes($a_split_learning_resources = 
false, $a_include_digilib = 
false, $a_allow_undefined_lp = 
false)
 
  336                global 
$lng, $ilPluginAdmin;
 
  340                if($a_split_learning_resources)
 
  346                        if($a_include_digilib)
 
  361                if($a_allow_undefined_lp)
 
  369                include_once 
'Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php';      
 
  370                $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE, 
"Repository", 
"robj");
 
  371                foreach ($pl_names as $pl)
 
  373                        $pl_id = $ilPluginAdmin->getId(
IL_COMP_SERVICE, 
"Repository", 
"robj", $pl);
 
  389                $pos = strrpos($id, 
"_");
 
  392                        $function = strtoupper(substr($id, $pos+1));
 
  393                        if(in_array($function, array(
"MIN", 
"MAX", 
"SUM", 
"AVG", 
"COUNT")))
 
  395                                $id = substr($id, 0, $pos);
 
  399                if(trim($value) == 
"" && $id != 
"status")
 
  402                                get_class($this) != 
"ilTrObjectUsersPropsTableGUI" &&
 
  403                                get_class($this) != 
"ilTrMatrixTableGUI")
 
  405                                return "--".$lng->txt(
"none").
"--";
 
  414                        case 'status_changed':
 
  426                        case "spent_seconds":
 
  427                                if(in_array($type, array(
"exc")))
 
  433                                        include_once(
"./Services/Utilities/classes/class.ilFormat.php");                                        
 
  455                                if(in_array($type, array(
"lm", 
"dbk")))
 
  462                                $value = 
$lng->txt(
"gender_".$value);
 
  466                                include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
 
  473                                $lng->loadLanguageModule(
"meta");
 
  474                                $value = 
$lng->txt(
"meta_l_".$value);
 
  478                                $value = 
$lng->txt(
"meta_c_".$value);
 
  488                foreach($this->filter as $id => $value)
 
  509                                case "matriculation":
 
  531                                case "spent_seconds":
 
  532                                        if(is_array($value) && implode(
"", $value))
 
  542                                 case 'status_changed':
 
  562                                                         $result[$id][
"from"] = substr(
$result[$id][
"from"], 0, -8).
"00:00:00";
 
  567                                                         $result[$id][
"to"] = substr(
$result[$id][
"to"], 0, -8).
"23:59:59";
 
  581                $mode = $olp->getCurrentMode();
 
  593        protected function parseTitle($a_obj_id, $action, $a_user_id = 
false)
 
  600                        if($a_user_id != 
$ilUser->getId())
 
  608                        $user .= 
", ".$a_user->getFullName(); 
 
  611                if($a_obj_id != ROOT_FOLDER_ID)
 
  613                        $this->
setTitle($lng->txt($action).
": ".$ilObjDataCache->lookupTitle($a_obj_id).$user);
 
  616                        $this->
setDescription($this->lng->txt(
'trac_mode').
": ".$olp->getModeText($olp->getCurrentMode()));
 
  620                        $this->
setTitle($lng->txt($action));
 
  631                global 
$lng, $ilObjDataCache, 
$ilUser, $ilClientIniFile;
 
  644                include_once 
'./Services/Link/classes/class.ilLink.php';
 
  647                $data[
$lng->txt(
"trac_name_of_installation")] = $ilClientIniFile->readVariable(
'client', 
'name');
 
  651                        $data[
$lng->txt(
"trac_object_name")] = $ilObjDataCache->lookupTitle($this->obj_id);
 
  670                        $worksheet->write($a_row, 0, $caption);
 
  671                        $worksheet->write($a_row, 1, $value);
 
  681                        $a_csv->addColumn(strip_tags($caption));
 
  682                        $a_csv->addColumn(strip_tags($value));
 
  690                include_once 
'Modules/Course/classes/Timings/class.ilTimingCache.php';
 
  694                        if($timings[
'item'][
'changeable'] && $timings[
'user'][$a_user_id][
'end'])
 
  696                                $end = $timings[
'user'][$a_user_id][
'end'];
 
  698                        else if ($timings[
'item'][
'suggestion_end'])
 
  700                                $end = $timings[
'item'][
'suggestion_end'];
 
  712                $seconds = ((int)$seconds > 0) ? $seconds : 0;
 
  713                if($a_shorten_zero && !$seconds)
 
  718                $hours = floor($seconds / 3600);                
 
  719                $rest = $seconds % 3600;
 
  721                $minutes = floor(
$rest / 60);
 
  729                return sprintf(
"%dh%02dm",$hours,$minutes);
 
  737                if(is_numeric($a_value))
 
  740                        $a_value = (int)$a_value;
 
  741                        if($a_value <= $threshold)
 
  745                                        return "0-".$threshold;
 
  756        protected function buildValueScale($a_max_value, $a_anonymize = 
false, $a_format_seconds = 
false)
 
  761                        $step = $a_max_value / 10;
 
  762                        $base = ceil(log($step, 10));           
 
  763                        $fac = ceil($step / pow(10, (
$base - 1)));
 
  764                        $step = pow(10, 
$base - 1) * $fac;
 
  770                $ticks = range(0, $a_max_value+$step, $step);
 
  772                $value_ticks = array(0 => 0);
 
  773                foreach($ticks as $tick)
 
  775                        $value = $tvalue = $tick;
 
  781                        if($a_format_seconds)
 
  785                        $value_ticks[$value] = $tvalue;                         
 
  796                for($loop = 0; $loop < 10; $loop++)
 
  798                        $year = date(
"Y")-$loop;
 
  800                        for($loop2 = 12; $loop2 > 0; $loop2--)
 
  802                                $month = str_pad($loop2, 2, 
"0", STR_PAD_LEFT);
 
  803                                if($year.$month <= date(
"Ym"))
 
  807                                                $caption = $year.
" / ".
$lng->txt(
"month_".$month.
"_long");
 
  811                                                $caption = $year.
"/".$month;
 
  813                                        $options[$year.
"-".$month] = $caption;
 
  830                for($loop = 1; $loop<13; $loop++)
 
  832                        $month = str_pad($loop, 2, 
"0", STR_PAD_LEFT);
 
  833                        if($a_year.
"-".$month <= date(
"Y-m"))
 
  837                                        $caption = 
$lng->txt(
"month_".$month.
"_long");
 
  841                                        $caption = 
$lng->txt(
"month_".$month.
"_short");
 
  843                                $all[$a_year.
"-".$month] = $caption;
 
  853                $cols = $privacy_fields = array();      
 
  855                include_once(
"./Services/User/classes/class.ilUserProfile.php");
 
  857                $up->skipGroup(
"preferences");
 
  858                $up->skipGroup(
"settings");
 
  859                $up->skipGroup(
"interests");
 
  860                $ufs = $up->getStandardFields();
 
  863                $cols[
"login"] = array(
 
  864                        "txt" => 
$lng->txt(
"login"),
 
  867                if(!$this->anonymized)
 
  869                        $cols[
"firstname"] = array(
 
  870                                "txt" => 
$lng->txt(
"firstname"),
 
  872                        $cols[
"lastname"] = array(
 
  873                                "txt" => 
$lng->txt(
"lastname"),
 
  878                include_once 
'Services/Tracking/classes/class.ilObjUserTracking.php';
 
  882                        $cols[
"first_access"] = array(
 
  883                                "txt" => 
$lng->txt(
"trac_first_access"),
 
  885                        $cols[
"last_access"] = array(
 
  886                                "txt" => 
$lng->txt(
"trac_last_access"),
 
  891                        $cols[
"read_count"] = array(
 
  892                                "txt" => 
$lng->txt(
"trac_read_count"),
 
  897                        $cols[
"spent_seconds"] = array(
 
  898                                "txt" => 
$lng->txt(
"trac_spent_seconds"),
 
  904                        $cols[
"percentage"] = array(
 
  905                                "txt" => 
$lng->txt(
"trac_percentage"),
 
  913                        $cols[
"status"] = array(
 
  914                                "txt" => 
$lng->txt(
"trac_status"),
 
  917                        $cols[
'status_changed'] = array(
 
  918                                'txt' => 
$lng->txt(
'trac_status_changed'),
 
  922                if($this->type != 
"lm")
 
  924                        $cols[
"mark"] = array(
 
  925                                "txt" => 
$lng->txt(
"trac_mark"),
 
  929                $cols[
"u_comment"] = array(
 
  930                        "txt" => 
$lng->txt(
"trac_comment"),
 
  933                $cols[
"create_date"] = array(
 
  934                        "txt" => 
$lng->txt(
"create_date"),
 
  936                $cols[
"language"] = array(
 
  937                        "txt" => 
$lng->txt(
"language"),
 
  941                if(!$this->anonymized && 
 
  942                        ($a_in_course || $a_in_group))
 
  945                        include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
  949                                foreach ($ufs as $f => $fd)
 
  951                                        if (!isset($cols[$f]) && $f != 
"username" && !$fd[
"lists_hide"])
 
  954                                                        !($fd[
"course_export_fix_value"] || 
$ilSetting->get(
"usr_settings_course_export_".$f)))
 
  959                                                        !($fd[
"group_export_fix_value"] || 
$ilSetting->get(
"usr_settings_group_export_".$f)))
 
  965                                                        "txt" => 
$lng->txt($f),
 
  968                                                $privacy_fields[] = $f;
 
  973                                include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
  977                                        $user_defined_fields = $user_defined_fields->getCourseExportableFields();
 
  981                                        $user_defined_fields = $user_defined_fields->getGroupExportableFields();
 
  983                                foreach($user_defined_fields as $definition)
 
  987                                                $f = 
"udf_".$definition[
"field_id"];
 
  989                                                                "txt" => $definition[
"field_name"],
 
  992                                                $privacy_fields[] = $f;
 
  998                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
TableGUI class for learning progress.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
Constructor.
searchObjects(array $filter, $permission, array $preset_obj_ids=null)
Search objects that match current filters.
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.
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.
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)
Get status alt text.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
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
_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 getInstance($a_obj_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 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