ILIAS  release_7 Revision v7.30-3-g800a261c036
ilUtil Class Reference

@noRector More...

+ Collaboration diagram for ilUtil:

Public Member Functions

 includeMathjax ($a_tpl=null)
 Include Mathjax. More...
 
 rangeDownload ($file)
 Send a file via range request, see http://mobiforge.com/design-development/content-delivery-mobile-devices alternatives could be. More...
 

Static Public Member Functions

static getImageTagByType ($a_type, $a_path, $a_big=false)
 Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Code to your template file @access public. More...
 
static getTypeIconPath ($a_type, $a_obj_id, $a_size='small')
 Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Deprecated, use ilObject::_getIcon instead. More...
 
static getImagePath ($img, $module_path="", $mode="output", $offline=false)
 get image path (for images located in a template directory) More...
 
static getHtmlPath ($relative_path)
 get url of path More...
 
static getStyleSheetLocation ($mode="output", $a_css_name="", $a_css_location="")
 get full style sheet file name (path inclusive) of current user More...
 
static getJSLocation ($a_js_name, $a_js_location="", $add_version=false)
 get full javascript file name (path inclusive) of current user More...
 
static getP3PLocation ()
 Get p3p file path. More...
 
static getNewContentStyleSheetLocation ($mode="output")
 get full style sheet file name (path inclusive) of current user More...
 
static formSelect ( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
 Builds a select form field with options and shows the selected option first. More...
 
static getSelectName ($selected, $values)
 ??? More...
 
static formCheckbox ($checked, $varname, $value, $disabled=false)
 ??? @access public More...
 
static formDisabledRadioButton ($checked, $varname, $value, $disabled)
 ??? @accesspublic @paramstring @paramstring @paramstring More...
 
static formRadioButton ($checked, $varname, $value, $onclick=null, $disabled=false)
 ??? @access public More...
 
static formInput ($varname, $value, $disabled=false)
 create html input area More...
 
static checkInput ($vars)
 ??? More...
 
static setPathStr ($a_path)
 ??? @access public More...
 
static switchColor ($a_num, $a_css1, $a_css2)
 switches style sheets for each even $a_num (used for changing colors of different result rows) More...
 
static checkFormEmpty ($emptyFields)
 ??? @access public More...
 
static Linkbar ($AScript, $AHits, $ALimit, $AOffset, $AParams=array(), $ALayout=array(), $prefix='')
 Linkbar Diese Funktion erzeugt einen typischen Navigationsbalken mit "Previous"- und "Next"-Links und den entsprechenden Seitenzahlen. More...
 
static makeClickable ($a_text, $detectGotoLinks=false)
 makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen More...
 
static replaceLinkProperties ($matches)
 replaces target _blank with _self and the link text with the according object title. More...
 
static makeDateSelect ($prefix, $year="", $month="", $day="", $startyear="", $a_long_month=true, $a_further_options=array(), $emptyoption=false)
 Creates a combination of HTML selects for date inputs. More...
 
static makeTimeSelect ($prefix, $short=true, $hour="", $minute="", $second="", $a_use_default=true, $a_further_options=array())
 Creates a combination of HTML selects for time inputs. More...
 
static is_email ($a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
 This preg-based function checks whether an e-mail address is formally valid. More...
 
static isPassword ($a_passwd, &$customError=null)
 validates a password @access public More...
 
static isPasswordValidForUserContext ($clear_text_password, $user, &$error_language_variable=null)
 
static getPasswordValidChars ($a_as_regex=true, $a_only_special_chars=false)
 All valid chars for password. More...
 
static getPasswordRequirementsInfo ()
 infotext for ilPasswordInputGUI setInfo() More...
 
static isLogin ($a_login)
 
static shortenText ( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
 shorten a string to given length. More...
 
static shortenWords ($a_str, $a_len=30, $a_dots=true)
 Ensure that the maximum word lenght within a text is not longer than $a_len. More...
 
static attribsToArray ($a_str)
 converts a string of format var1 = "val1" var2 = "val2" ... into an array More...
 
static rCopy ($a_sdir, $a_tdir, $preserveTimeAttributes=false)
 Copies content of a directory $a_sdir recursively to a directory $a_tdir. More...
 
static getWebspaceDir ($mode="filesystem")
 get webspace directory More...
 
static getDataDir ()
 get data directory (outside webspace) More...
 
static getUsersOnline ($a_user_id=0)
 reads all active sessions from db and returns users that are online OR returns only one active user if a user_id is given More...
 
static ilTempnam ($a_temp_path=null)
 Returns a unique and non existing Path for e temporary file or directory. More...
 
static createDirectory ($a_dir, $a_mod=0755)
 create directory More...
 
static unzip (string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
 
static zip ($a_dir, $a_file, $compress_content=false)
 zips given directory/file into given zip.file More...
 
static CreateIsoFromFolder ($a_dir, $a_file)
 
static getConvertCmd ()
 get convert command More...
 
static execConvert ($args)
 execute convert command More...
 
static isConvertVersionAtLeast ($a_version)
 Compare convert version numbers. More...
 
static convertImage ( $a_from, $a_to, $a_target_format="", $a_geometry="", $a_background_color="")
 convert image More...
 
static resizeImage ($a_from, $a_to, $a_width, $a_height, $a_constrain_prop=false)
 resize image More...
 
static img ($a_src, $a_alt=null, $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
 Build img tag. More...
 
static deliverData ($a_data, $a_filename, $mime="application/octet-stream", $charset="")
 deliver data for download via browser. More...
 
static deliverFile ( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
 deliver file for download via browser. More...
 
static readFile ($a_file)
 there are some known problems with the original readfile method, which sometimes truncates delivered files regardless of php.ini setting (see http://de.php.net/manual/en/function.readfile.php) use this method to avoid these problems. More...
 
static getASCIIFilename ($a_filename)
 convert utf8 to ascii filename More...
 
static htmlentitiesOutsideHTMLTags ($htmlText)
 Encodes HTML entities outside of HTML tags. More...
 
static getJavaPath ()
 get full java path (dir + java command) More...
 
static appendUrlParameterString ($a_url, $a_par, $xml_style=false)
 append URL parameter string ("par1=value1&par2=value2...") to given URL string More...
 
static makeDir ($a_dir)
 creates a new directory and inherits all filesystem permissions of the parent directory You may pass only the name of your new directory or with the entire path or relative path information. More...
 
static makeDirParents ($a_dir)
 Create a new directory and all parent directories. More...
 
static delDir ($a_dir, $a_clean_only=false)
 removes a dir and all its content (subdirs and files) recursively More...
 
static getDir ($a_dir, $a_rec=false, $a_sub_dir="")
 get directory More...
 
static stripSlashesArray ($a_arr, $a_strip_html=true, $a_allow="")
 Strip slashes from array. More...
 
static getClientIdByString (string $clientId)
 
static stripSlashesRecursive ($a_data, $a_strip_html=true, $a_allow="")
 Strip slashes from array and sub-arrays. More...
 
static stripSlashes ($a_str, $a_strip_html=true, $a_allow="")
 strip slashes if magic qoutes is enabled More...
 
static stripOnlySlashes ($a_str)
 strip slashes if magic qoutes is enabled More...
 
static secureString ($a_str, $a_strip_html=true, $a_allow="")
 Remove unsecure tags. More...
 
static getSecureTags ()
 
static maskSecureTags ($a_str, $allow_array)
 
static unmaskSecureTags ($a_str, $allow_array)
 
static securePlainString ($a_str)
 Remove unsecure characters from a plain text string. More...
 
static htmlencodePlainString ($a_str, $a_make_links_clickable, $a_detect_goto_links=false)
 Encodes a plain text string into HTML for display in a browser. More...
 
static maskAttributeTag ($a_str, $tag, $tag_att)
 
static unmaskAttributeTag ($a_str, $tag, $tag_att)
 
static maskTag ($a_str, $t, $fix_param="")
 
static unmaskTag ($a_str, $t, $fix_param="")
 
static secureLink ($a_str)
 
static stripScriptHTML ($a_str, $a_allow="", $a_rm_js=true)
 strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b are allowed todo: needs to be optimized-> not very efficient More...
 
static prepareFormOutput ($a_str, $a_strip=false)
 prepares string output for html forms @access public More...
 
static secureUrl ($url)
 Prepare secure href attribute. More...
 
static prepareDBString ($a_str)
 prepare a string for db writing (insert/update) More...
 
static extractParameterString ($a_parstr)
 extracts parameter value pairs from a string into an array More...
 
static assembleParameterString ($a_par_arr)
 
static dumpString ($a_str)
 dumps ord values of every character of string $a_str More...
 
static yn2tf ($a_yn)
 convert "y"/"n" to true/false More...
 
static tf2yn ($a_tf)
 convert true/false to "y"/"n" More...
 
static sort_func ($a, $b)
 sub-function to sort an array More...
 
static sort_func_numeric ($a, $b)
 sub-function to sort an array More...
 
static sortArray ( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
 sortArray More...
 
static stableSortArray ($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false)
 Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which have the same sort value. More...
 
static mergesort (&$array, $cmp_function='strcmp')
 
static unique_multi_array ($array, $sub_key)
 Make a multi-dimensional array to have only DISTINCT values for a certain "column". More...
 
static getGDSupportedImageType ($a_desired_type)
 returns the best supported image type by this PHP build More...
 
static deducibleSize ($a_mime)
 checks if mime type is provided by getimagesize() More...
 
static redirect ($a_script)
 
static insertInstIntoID ($a_value)
 inserts installation id into ILIAS id More...
 
static groupNameExists ($a_group_name, $a_id=0)
 checks if group name already exists. More...
 
static getMemString ()
 get current memory usage as string More...
 
static isWindows ()
 check wether the current client system is a windows system More...
 
static escapeShellArg ($a_arg)
 
static escapeShellCmd ($a_arg)
 escape shell cmd More...
 
static execQuoted ($cmd, $args=null)
 exec command and fix spaces on windows More...
 
static excelTime ($year="", $month="", $day="", $hour="", $minute="", $second="")
 Calculates a Microsoft Excel date/time value. More...
 
static renameExecutables ($a_dir)
 Rename uploaded executables for security reasons. More...
 
static getSafeFilename ($a_initial_filename)
 
static rRenameSuffix (string $a_dir, string $a_old_suffix, string $a_new_suffix)
 Renames all files with certain suffix and gives them a new suffix. More...
 
static isAPICall ()
 
static KT_replaceParam ($qstring, $paramName, $paramValue)
 
static replaceUrlParameterString ($url, $parametersArray)
 
static generatePasswords ($a_number)
 Generate a number of passwords. More...
 
static removeTrailingPathSeparators ($path)
 
static array_php2js ($data)
 convert php arrays to javascript arrays More...
 
static virusHandling ($a_file, $a_orig_name="", $a_clean=true)
 scan file for viruses and clean files if possible More...
 
static moveUploadedFile ($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
 move uploaded file More...
 
static date_mysql2time ($mysql_date_time)
 make time object from mysql_date_time More...
 
static now ()
 Return current timestamp in Y-m-d H:i:s format. More...
 
static & processCSVRow (&$row, $quoteAll=false, $separator=";", $outUTF8=false, $compatibleWithMSExcel=true)
 Convertes an array for CSV usage. More...
 
static isDN ($a_str)
 
static isIPv4 ($a_str)
 
static _getObjectsByOperations ($a_obj_type, $a_operation, $a_usr_id=0, $limit=0)
 Get all objects of a specific type and check access This function is not recursive, instead it parses the serialized rbac_pa entries. More...
 
static insertLatexImages ($a_text, $a_start='[tex]', $a_end='[/tex]')
 replace [tex]...[/tex] tags with formula image code More...
 
static buildLatexImages ($a_text, $a_dir)
 replace [tex]...[/tex] tags with formula image code for offline use More...
 
static prepareTextareaOutput ($txt_output, $prepare_for_latex_output=false, $omitNl2BrWhenTextArea=false)
 Prepares a string for a text area output where latex code may be in it If the text is HTML-free, CHR(13) will be converted to a line break. More...
 
static isHTML ($a_text)
 Checks if a given string contains HTML or not. More...
 
static period2String (ilDateTime $a_from, $a_to=null)
 Return a string of time period. More...
 
static getFileSizeInfo ()
 
static formatBytes ($size, $decimals=0)
 
static getUploadSizeLimitBytes ()
 
static convertPhpIniSizeValueToBytes ($phpIniSizeValue)
 
static __extractRefId ($role_title)
 extract ref id from role title, e.g. More...
 
static __extractId ($ilias_id, $inst_id)
 extract ref id from role title, e.g. More...
 
static _sortIds ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. More...
 
static getMySQLTimestamp ($a_ts)
 Get MySQL timestamp in 4.1.x or higher format (yyyy-mm-dd hh:mm:ss) This function converts a timestamp, if MySQL 4.0 is used. More...
 
static quoteArray ($a_array)
 Quotes all members of an array for usage in DB query statement. More...
 
static getSystemMessageHTML ($a_txt, $a_type="info")
 Get HTML for a system message. More...
 
static sendInfo ($a_info="", $a_keep=false)
 Send Info Message to Screen. More...
 
static sendFailure ($a_info="", $a_keep=false)
 Send Failure Message to Screen. More...
 
static sendQuestion ($a_info="", $a_keep=false)
 Send Question to Screen. More...
 
static infoPanel ($a_keep=true)
 
static dirsize ($directory)
 get size of a directory or a file. More...
 
static randomhash ()
 
static setCookie ($a_cookie_name, $a_cookie_value='', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
 
static _sanitizeFilemame ($a_filename)
 
static _getHttpPath ()
 
static printBacktrace ($a_limit=0)
 printBacktrace More...
 
static parseImportId ($a_import_id)
 Parse an ilias import id Typically of type il_[IL_INST_ID]_[OBJ_TYPE]_[OBJ_ID] returns array( 'orig' => 'il_4800_rolt_123' 'prefix' => 'il' 'inst_id => '4800' 'type' => 'rolt' 'id' => '123'. More...
 
static unserializeSession ($data)
 Returns the unserialized ILIAS session data. More...
 
static formatSize ($size, $a_mode='short', $a_lng=null)
 Returns the specified file size value in a human friendly form. More...
 
static MB2Bytes ($a_value)
 
static Bytes2MB ($a_value)
 
static dbSupportsDisctinctUmlauts ()
 Only temp fix for #8603, should go to db classes. More...
 
static dumpVar ($mixed=null)
 Dump var. More...
 

Static Protected Member Functions

static processConvertVersion ($a_version)
 Parse convert version string, e.g. More...
 
static sanitateTargetPath ($a_target)
 
static _getSizeMagnitude ()
 Returns the magnitude used for size units. More...
 
static fmtFloat ($a_float, $a_decimals=0, $a_dec_point=null, $a_thousands_sep=null, $a_suppress_dot_zero=false)
 format a float More...
 

Static Protected Attributes

static $db_supports_distinct_umlauts
 

Detailed Description

@noRector

Util class various functions, usage as namespace

Author
Sascha Hofmann sasch.nosp@m.ahof.nosp@m.mann@.nosp@m.gmx..nosp@m.de
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 38 of file class.ilUtil.php.

Member Function Documentation

◆ __extractId()

static ilUtil::__extractId (   $ilias_id,
  $inst_id 
)
static

extract ref id from role title, e.g.

893 from 'il_122_role_893'

Parameters
iliasid with format like il_<instid>_<objTyp>_ID
intinst_id Installation ID must match inst id in param ilias_id
Returns
id or false

Definition at line 4397 of file class.ilUtil.php.

4398 {
4399 $test_str = explode('_', $ilias_id);
4400
4401 if ($test_str[0] == 'il' && $test_str[1] == $inst_id && count($test_str) == 4) {
4402 $test2 = (int) $test_str[3];
4403 return is_numeric($test2) ? (int) $test2 : false;
4404 }
4405 return false;
4406 }

Referenced by ilGroupXMLParser\__save(), ilObjUser\_getUserData(), ilUserImportParser\extractRolesBeginTag(), ilExerciseXMLParser\handlerBeginTag(), ilFileXMLParser\handlerBeginTag(), ilObjectXMLParser\handlerBeginTag(), ilUserImportParser\importBeginTag(), ilSoapUserAdministration\importUsers(), ilSoapRBACAdministration\parseUserID(), and ilUserImportParser\verifyBeginTag().

+ Here is the caller graph for this function:

◆ __extractRefId()

static ilUtil::__extractRefId (   $role_title)
static

extract ref id from role title, e.g.

893 from 'il_crs_member_893'

Parameters
role_titlewith format like il_crs_member_893
Returns
ref id or false

Definition at line 4376 of file class.ilUtil.php.

4377 {
4378 $test_str = explode('_', $role_title);
4379
4380 if ($test_str[0] == 'il') {
4381 $test2 = (int) $test_str[3];
4382 return is_numeric($test2) ? (int) $test2 : false;
4383 }
4384 return false;
4385 }

Referenced by ilSoapCourseAdministration\getCoursesForUser(), ilSoapGroupAdministration\getGroupsForUser(), and ilSoapRoleObjectXMLWriter\start().

+ Here is the caller graph for this function:

◆ _getHttpPath()

static ilUtil::_getHttpPath ( )
static

Definition at line 4718 of file class.ilUtil.php.

4719 {
4720 global $DIC;
4721
4722 $ilIliasIniFile = $DIC["ilIliasIniFile"];
4723
4724 if ($_SERVER['SHELL'] || php_sapi_name() == 'cli' ||
4725 // fallback for windows systems, useful in crons
4726 (class_exists("ilContext") && !ilContext::usesHTTP())) {
4727 return $ilIliasIniFile->readVariable('server', 'http_path');
4728 } else {
4729 return ILIAS_HTTP_PATH;
4730 }
4731 }
static usesHTTP()
Uses HTTP aka browser.
global $DIC
Definition: goto.php:24
$ilIliasIniFile
Definition: imgupload.php:16
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10

References $_SERVER, $DIC, $ilIliasIniFile, and ilContext\usesHTTP().

Referenced by ilMail\_getAutoGeneratedMessageString(), ilMail\_getInstallationSignature(), ilTestPlayerAbstractGUI\getNavigationUrlParameter(), ilForumMailNotification\getPermanentLink(), ilForumMailEventNotificationSender\getPermanentLink(), ilChatroomAdminViewGUI\getReadmePath(), ilMailFormCall\getRefererRedirectUrl(), ilSoapClient\init(), ilCronManager\runActiveJobs(), and ilCronDeleteInactiveUserReminderMail\sendReminder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getObjectsByOperations()

static ilUtil::_getObjectsByOperations (   $a_obj_type,
  $a_operation,
  $a_usr_id = 0,
  $limit = 0 
)
static

Get all objects of a specific type and check access This function is not recursive, instead it parses the serialized rbac_pa entries.

Get all objects of a specific type where access is granted for the given operation. This function does a checkAccess call for all objects in the object hierarchy and return only the objects of the given type. Please note if access is not granted to any object in the hierarchy the function skips all objects under it. Example: You want a list of all Courses that are visible and readable for the user. The function call would be: $your_list = IlUtil::getObjectsByOperation ("crs", "visible"); Lets say there is a course A where the user would have access to according to his role assignments. Course A lies within a group object which is not readable for the user. Therefore course A won't appear in the result list although the queried operations 'read' would actually permit the user to access course A.

@access public

Parameters
string/arrayobject type 'lm' or array('lm','sahs')
stringpermission to check e.g. 'visible' or 'read'
intid of user in question
intlimit of results. if not given it defaults to search max hits.If limit is -1 limit is unlimited
Returns
array of ref_ids

Definition at line 4014 of file class.ilUtil.php.

4015 {
4016 global $DIC;
4017
4018 $ilDB = $DIC->database();
4019 $rbacreview = $DIC->rbac()->review();
4020 $ilAccess = $DIC->access();
4021 $ilUser = $DIC->user();
4022 $ilSetting = $DIC->settings();
4023 $tree = $DIC->repositoryTree();
4024
4025 if (!is_array($a_obj_type)) {
4026 $where = "WHERE type = " . $ilDB->quote($a_obj_type, "text") . " ";
4027 } else {
4028 $where = "WHERE " . $ilDB->in("type", $a_obj_type, false, "text") . " ";
4029 }
4030
4031 // limit number of results default is search result limit
4032 if (!$limit) {
4033 $limit = $ilSetting->get('search_max_hits', 100);
4034 }
4035 if ($limit == -1) {
4036 $limit = 10000;
4037 }
4038
4039 // default to logged in usr
4040 $a_usr_id = $a_usr_id ? $a_usr_id : $ilUser->getId();
4041 $a_roles = $rbacreview->assignedRoles($a_usr_id);
4042
4043 // Since no rbac_pa entries are available for the system role. This function returns !all! ref_ids in the case the user
4044 // is assigned to the system role
4045 if ($rbacreview->isAssigned($a_usr_id, SYSTEM_ROLE_ID)) {
4046 $query = "SELECT ref_id FROM object_reference obr LEFT JOIN object_data obd ON obr.obj_id = obd.obj_id " .
4047 "LEFT JOIN tree ON obr.ref_id = tree.child " .
4048 $where .
4049 "AND tree = 1";
4050
4051 $res = $ilDB->query($query);
4052 $counter = 0;
4053 while ($row = $ilDB->fetchObject($res)) {
4054 // Filter recovery folder
4055 if ($tree->isGrandChild(RECOVERY_FOLDER_ID, $row->ref_id)) {
4056 continue;
4057 }
4058
4059 if ($counter++ >= $limit) {
4060 break;
4061 }
4062
4063 $ref_ids[] = $row->ref_id;
4064 }
4065 return $ref_ids ? $ref_ids : array();
4066 } // End Administrators
4067
4068 // Check ownership if it is not asked for edit_permission or a create permission
4069 if ($a_operation == 'edit_permissions' or strpos($a_operation, 'create') !== false) {
4070 $check_owner = ") ";
4071 } else {
4072 $check_owner = "OR owner = " . $ilDB->quote($a_usr_id, "integer") . ") ";
4073 }
4074
4075 $ops_ids = ilRbacReview::_getOperationIdsByName(array($a_operation));
4076 $ops_id = $ops_ids[0];
4077
4078 $and = "AND ((" . $ilDB->in("rol_id", $a_roles, false, "integer") . " ";
4079
4080 $query = "SELECT DISTINCT(obr.ref_id),obr.obj_id,type FROM object_reference obr " .
4081 "JOIN object_data obd ON obd.obj_id = obr.obj_id " .
4082 "LEFT JOIN rbac_pa ON obr.ref_id = rbac_pa.ref_id " .
4083 $where .
4084 $and .
4085 "AND (" . $ilDB->like("ops_id", "text", "%i:" . $ops_id . "%") . " " .
4086 "OR " . $ilDB->like("ops_id", "text", "%:\"" . $ops_id . "\";%") . ")) " .
4087 $check_owner;
4088
4089 $res = $ilDB->query($query);
4090 $counter = 0;
4091 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4092 if ($counter >= $limit) {
4093 break;
4094 }
4095
4096 // Filter objects in recovery folder
4097 if ($tree->isGrandChild(RECOVERY_FOLDER_ID, $row->ref_id)) {
4098 continue;
4099 }
4100
4101 // Check deleted, hierarchical access ...
4102 if ($ilAccess->checkAccessOfUser($a_usr_id, $a_operation, '', $row->ref_id, $row->type, $row->obj_id)) {
4103 $counter++;
4104 $ref_ids[] = $row->ref_id;
4105 }
4106 }
4107 return $ref_ids ? $ref_ids : array();
4108 }
static _getOperationIdsByName($operations)
get ops_id's by name.
const RECOVERY_FOLDER_ID
Definition: constants.php:35
const SYSTEM_ROLE_ID
Definition: constants.php:27
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
$query
foreach($_POST as $key=> $value) $res
global $ilDB

References $DIC, $ilDB, $ilSetting, $ilUser, $query, $res, ilRbacReview\_getOperationIdsByName(), ilDBConstants\FETCHMODE_OBJECT, RECOVERY_FOLDER_ID, and SYSTEM_ROLE_ID.

Referenced by ilGroupActionTargetExplorerGUI\__construct(), ilObjSurveyQuestionPool\_getAvailableQuestionpools(), ilObjQuestionPool\_getAvailableQuestionpools(), ilObjTest\_getAvailableTests(), ilECSSettingsGUI\exportImported(), ilGroupUserActionProvider\getCommandAccess(), ilCourseGroupingAssignmentTableGUI\getItems(), ilObjSurvey\getQuestionblocksTable(), ilECSSettingsGUI\imported(), ilWebResourceCronLinkCheck\run(), ilObjectCopyGUI\sourceExists(), ilRBACTest\testRbacUA(), and ilObjectTest\testTreeTrash().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getSizeMagnitude()

static ilUtil::_getSizeMagnitude ( )
staticprotected

Returns the magnitude used for size units.

This function always returns the value 1024. Thus the value returned by this function is the same value that Windows and Mac OS X return for a file. The value is a GibiBit, MebiBit, KibiBit or byte unit.

For more information about these units see: http://en.wikipedia.org/wiki/Megabyte

Returns
<type>

Definition at line 4929 of file class.ilUtil.php.

4930 {
4931 return 1024;
4932 }

Referenced by formatSize().

+ Here is the caller graph for this function:

◆ _sanitizeFilemame()

static ilUtil::_sanitizeFilemame (   $a_filename)
static

Definition at line 4713 of file class.ilUtil.php.

4714 {
4715 return strip_tags(self::stripSlashes($a_filename));
4716 }

Referenced by ilSoapUtils\distributeMails(), ilFileDataMail\storeAsAttachment(), ilFileDataMail\storeUploadedFile(), ilFileDataForum\storeUploadedFile(), and ilFileDataForumDrafts\storeUploadedFile().

+ Here is the caller graph for this function:

◆ _sortIds()

static ilUtil::_sortIds (   $a_ids,
  $a_table,
  $a_field,
  $a_id_name 
)
static

Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.

Parameters
arrayArray of ids
stringtable name
stringtable field
stringid name
Returns
array sorted ids

@access protected

Definition at line 4422 of file class.ilUtil.php.

4423 {
4424 global $DIC;
4425
4426 $ilDB = $DIC->database();
4427
4428 if (!$a_ids) {
4429 return array();
4430 }
4431
4432 // use database to sort user array
4433 $where = "WHERE " . $a_id_name . " IN (";
4434 $where .= implode(",", ilUtil::quoteArray($a_ids));
4435 $where .= ") ";
4436
4437 $query = "SELECT " . $a_id_name . " FROM " . $a_table . " " .
4438 $where .
4439 "ORDER BY " . $a_field;
4440
4441 $res = $ilDB->query($query);
4442 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
4443 $ids[] = $row->$a_id_name;
4444 }
4445 return $ids ? $ids : array();
4446 }
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and quoteArray().

Referenced by ilObjRoleGUI\adoptPermObject(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilMemberExport\fetchUsers(), ilAttendanceList\getHTML(), ilCourseGroupingAssignmentTableGUI\getItems(), ilPermissionGUI\initRoleForm(), ilConsultationHoursTableGUI\parse(), ilLDAPSettingsGUI\prepareGlobalRoleSelection(), ilAuthShibbolethSettingsGUI\prepareRoleSelect(), ilLDAPSettingsGUI\prepareRoleSelect(), ilECSSettingsGUI\prepareRoleSelect(), ilOpenIdConnectSettingsGUI\prepareRoleSelection(), ilCASSettingsGUI\prepareRoleSelection(), ilRadiusSettingsGUI\prepareRoleSelection(), ilSamlSettingsGUI\prepareRoleSelection(), and ilMailSearchCoursesGUI\showMembers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ appendUrlParameterString()

static ilUtil::appendUrlParameterString (   $a_url,
  $a_par,
  $xml_style = false 
)
static

append URL parameter string ("par1=value1&par2=value2...") to given URL string

Definition at line 2135 of file class.ilUtil.php.

2136 {
2137 $amp = $xml_style
2138 ? "&amp;"
2139 : "&";
2140
2141 $url = (is_int(strpos($a_url, "?")))
2142 ? $a_url . $amp . $a_par
2143 : $a_url . "?" . $a_par;
2144
2145 return $url;
2146 }
$url

References $url.

Referenced by ilObjectListGUI\appendRepositoryFrameParameter(), ilXapiCompliantStatementsReportLinkBuilder\appendRequestParameters(), ilCmiXapiAbstractReportLinkBuilder\appendRequestParameters(), ilCtrl\appendRequestTokenParameterString(), assImagemapQuestionGUI\buildAreaLinkTarget(), ilCmiXapiLaunchGUI\buildLaunchLink(), ilPasswordAssistanceGUI\buildUrl(), ilAssQuestionHintRequestGUI\confirmRequestCmd(), ilStartUpGUI\doApacheAuthentication(), ilTestExpressPageObjectGUI\executeCommand(), ilObjTestGUI\executeCreateQuestionObject(), ilDataCollectionGlobalTemplate\fillFooter(), ilCOPageGlobalTemplate\fillFooter(), ilRTEGlobalTemplate\fillFooter(), ilGlobalTemplate\fillFooter(), ilDataCollectionGlobalTemplate\fillJavascriptFile(), ilCOPageGlobalTemplate\fillJavascriptFile(), ilRTEGlobalTemplate\fillJavascriptFile(), ilGlobalTemplate\fillJavascriptFile(), ilAssQuestionHintsTableGUI\fillRow(), ilSecurImageUtil\getAudioScript(), ilObjTestListGUI\getCommandLink(), ilObjQuestionPoolListGUI\getCommandLink(), ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI\getDeleteHref(), ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI\getEditHref(), ILIAS\LearningModule\Menu\ilLMMenuGUI\getEntries(), ilCtrl\getFormActionByClass(), ilIntLinkRepItemExplorerGUI\getNodeHref(), assImagemapQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), ilLMPresentationGUI\getSourcecodeDownloadLink(), ilCtrl\getUrlParameters(), ilInitialisation\redirect(), ilInternalLinkGUI\renderLink(), ilNoteGUI\renderTargets(), ilCtrl\returnToParent(), ilObjContentObjectGUI\setilLMMenu(), ilPCQuestionGUI\setTabs(), and ilAuthFrontendCredentialsSoap\tryAuthenticationOnLoginPage().

+ Here is the caller graph for this function:

◆ array_php2js()

static ilUtil::array_php2js (   $data)
static

convert php arrays to javascript arrays

Author
gigi@.nosp@m.orso.nosp@m.ne.co.nosp@m.m @access public
Parameters
array
Returns
string

Definition at line 3767 of file class.ilUtil.php.

3768 {
3769 if (empty($data)) {
3770 $data = array();
3771 }
3772
3773 foreach ($data as $k => $datum) {
3774 if (is_null($datum)) {
3775 $data[$k] = 'null';
3776 }
3777 if (is_string($datum)) {
3778 $data[$k] = "'" . $datum . "'";
3779 }
3780 if (is_array($datum)) {
3781 $data[$k] = array_php2js($datum);
3782 }
3783 }
3784
3785 return "[" . implode(', ', $data) . "]";
3786 }
static array_php2js($data)
convert php arrays to javascript arrays
$data
Definition: storeScorm.php:23

References $data, and array_php2js().

Referenced by array_php2js().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assembleParameterString()

static ilUtil::assembleParameterString (   $a_par_arr)
static

Definition at line 2934 of file class.ilUtil.php.

2935 {
2936 if (is_array($a_par_arr)) {
2937 $target_arr = array();
2938 foreach ($a_par_arr as $par => $val) {
2939 $target_arr[] = "$par=\"$val\"";
2940 }
2941 $target_str = implode(", ", $target_arr);
2942 }
2943
2944 return $target_str;
2945 }
$target_arr
Definition: goto.php:49

References $target_arr.

Referenced by ilMediaItem\getParameterString().

+ Here is the caller graph for this function:

◆ attribsToArray()

static ilUtil::attribsToArray (   $a_str)
static

converts a string of format var1 = "val1" var2 = "val2" ... into an array

Parameters
string$a_strstring in format: var1 = "val1" var2 = "val2" ...
Returns
array array of variable value pairs

Definition at line 1423 of file class.ilUtil.php.

1424 {
1425 $attribs = array();
1426 while (is_int(strpos($a_str, "="))) {
1427 $eq_pos = strpos($a_str, "=");
1428 $qu1_pos = strpos($a_str, "\"");
1429 $qu2_pos = strpos(substr($a_str, $qu1_pos + 1), "\"") + $qu1_pos + 1;
1430 if (is_int($eq_pos) && is_int($qu1_pos) && is_int($qu2_pos)) {
1431 $var = trim(substr($a_str, 0, $eq_pos));
1432 $val = trim(substr($a_str, $qu1_pos + 1, ($qu2_pos - $qu1_pos) - 1));
1433 $attribs[$var] = $val;
1434 $a_str = substr($a_str, $qu2_pos + 1);
1435 } else {
1436 $a_str = "";
1437 }
1438 }
1439 return $attribs;
1440 }

Referenced by ilPCParagraph\_input2xml(), ilPCParagraph\handleAjaxContent(), ilPCParagraph\intLinks2xml(), ilPCParagraph\xml2output(), and ilPCParagraphGUI\xml2outputJS().

+ Here is the caller graph for this function:

◆ buildLatexImages()

static ilUtil::buildLatexImages (   $a_text,
  $a_dir 
)
static

replace [tex]...[/tex] tags with formula image code for offline use

Deprecated:

Definition at line 4168 of file class.ilUtil.php.

4169 {
4170 include_once './Services/MathJax/classes/class.ilMathJax.php';
4171 return ilMathJax::getInstance()->insertLatexImages($a_text, '[tex]', '[/tex]', $a_dir . '/teximg', './teximg');
4172 }
static getInstance()
Singleton: get instance.

References ilMathJax\getInstance().

+ Here is the call graph for this function:

◆ Bytes2MB()

static ilUtil::Bytes2MB (   $a_value)
static

Definition at line 5050 of file class.ilUtil.php.

5051 {
5052 return ((int) $a_value) / (pow(self::_getSizeMagnitude(), 2));
5053 }

◆ checkFormEmpty()

static ilUtil::checkFormEmpty (   $emptyFields)
static

??? @access public

Parameters
array
Returns
string

Definition at line 619 of file class.ilUtil.php.

620 {
621 $feedback = "";
622
623 foreach ($emptyFields as $key => $val) {
624 if ($val == "") {
625 if ($feedback != "") {
626 $feedback .= ", ";
627 }
628 $feedback .= $key;
629 }
630 }
631
632 return $feedback;
633 }

◆ checkInput()

static ilUtil::checkInput (   $vars)
static

???

Parameters
string

Definition at line 567 of file class.ilUtil.php.

568 {
569 // TO DO:
570 // Diese Funktion soll Formfeldeingaben berprfen (empty und required)
571 }

◆ convertImage()

static ilUtil::convertImage (   $a_from,
  $a_to,
  $a_target_format = "",
  $a_geometry = "",
  $a_background_color = "" 
)
static

convert image

Parameters
string$a_fromsource file
string$a_totarget file
string$a_target_formattarget image file format

Definition at line 1837 of file class.ilUtil.php.

1843 {
1844 $format_str = ($a_target_format != "")
1845 ? strtoupper($a_target_format) . ":"
1846 : "";
1847 $geometry = "";
1848 if ($a_geometry != "") {
1849 if (is_int(strpos($a_geometry, "x"))) {
1850 $geometry = " -geometry " . $a_geometry . " ";
1851 } else {
1852 $geometry = " -geometry " . $a_geometry . "x" . $a_geometry . " ";
1853 }
1854 }
1855
1856 $bg_color = ($a_background_color != "")
1857 ? " -background color " . $a_background_color . " "
1858 : "";
1859 $convert_cmd = ilUtil::escapeShellArg($a_from) . " " . $bg_color . $geometry . ilUtil::escapeShellArg($format_str . $a_to);
1860
1861 ilUtil::execConvert($convert_cmd);
1862 }
static escapeShellArg($a_arg)
static execConvert($args)
execute convert command

References escapeShellArg(), and execConvert().

Referenced by ilCertificateUtilHelper\convertImage(), ilMediaItem\copyOriginal(), assKprimChoice\generateThumbForFile(), assMatchingQuestion\generateThumbForFile(), assMultipleChoice\generateThumbForFile(), assOrderingQuestion\generateThumbForFile(), assSingleChoice\generateThumbForFile(), assOrderingQuestionImport\handleUploadedFile(), ilObjMediaObject\makeThumbnail(), assMatchingQuestion\setImageFile(), assOrderingQuestion\storeImageFile(), and ilObjCertificateSettings\uploadBackgroundImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ convertPhpIniSizeValueToBytes()

static ilUtil::convertPhpIniSizeValueToBytes (   $phpIniSizeValue)
static

Definition at line 4338 of file class.ilUtil.php.

4339 {
4340 if (is_numeric($phpIniSizeValue)) {
4341 return $phpIniSizeValue;
4342 }
4343
4344 $suffix = substr($phpIniSizeValue, -1);
4345 $value = substr($phpIniSizeValue, 0, -1);
4346
4347 switch (strtoupper($suffix)) {
4348 case 'P':
4349 $value *= 1024;
4350 // no break
4351 case 'T':
4352 $value *= 1024;
4353 // no break
4354 case 'G':
4355 $value *= 1024;
4356 // no break
4357 case 'M':
4358 $value *= 1024;
4359 // no break
4360 case 'K':
4361 $value *= 1024;
4362 break;
4363 }
4364
4365 return $value;
4366 }

◆ createDirectory()

static ilUtil::createDirectory (   $a_dir,
  $a_mod = 0755 
)
static

create directory

Parameters
string$a_dir
int$a_mod
Deprecated:
in favour of Filesystem::createDir() located at the filesystem service.
See also
\ILIAS\Filesystem\Filesystem::createDir()

Definition at line 1587 of file class.ilUtil.php.

1588 {
1589 ilUtil::makeDir($a_dir);
1590 //@mkdir($a_dir);
1591 //@chmod($a_dir, $a_mod);
1592 }
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...

References makeDir().

Referenced by ilObjMediaObject\_createThumbnailDirectory(), ilObjCategoryGUI\_importCategories(), ilExerciseManagementCollectFilesJob\createSubmissionsDirectory(), ilMediaItem\createWorkDirectory(), ilTempnam(), ilSCORM2004ScoGUI\importSave(), and assQuestion\moveUploadedMediaFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateIsoFromFolder()

static ilUtil::CreateIsoFromFolder (   $a_dir,
  $a_file 
)
static

Definition at line 1741 of file class.ilUtil.php.

1742 {
1743 $cdir = getcwd();
1744
1745 $pathinfo = pathinfo($a_dir);
1746 chdir($pathinfo["dirname"]);
1747
1748 $pathinfo = pathinfo($a_file);
1749 $dir = $pathinfo["dirname"];
1750 $file = $pathinfo["basename"];
1751 $zipcmd = "-r " . ilUtil::escapeShellArg($a_file) . " " . $source;
1752
1753 $mkisofs = PATH_TO_MKISOFS;
1754 if (!$mkisofs) {
1755 chdir($cdir);
1756 return false;
1757 }
1758
1759 $name = basename($a_dir);
1761
1762 $zipcmd = "-r -J -o " . $a_file . " " . $source;
1763 ilUtil::execQuoted($mkisofs, $zipcmd);
1764 chdir($cdir);
1765 return true;
1766 }
static execQuoted($cmd, $args=null)
exec command and fix spaces on windows
if($format !==null) $name
Definition: metadata.php:230
$source
Definition: metadata.php:76

References $name, $source, escapeShellArg(), and execQuoted().

Referenced by ilScorm2004Export\buildExportFileISO().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ date_mysql2time()

static ilUtil::date_mysql2time (   $mysql_date_time)
static

make time object from mysql_date_time

Definition at line 3902 of file class.ilUtil.php.

3903 {
3904 list($datum, $uhrzeit) = explode(" ", $mysql_date_time);
3905 list($jahr, $monat, $tag) = explode("-", $datum);
3906 list($std, $min, $sec) = explode(":", $uhrzeit);
3907 return mktime((int) $std, (int) $min, (int) $sec, (int) $monat, (int) $tag, (int) $jahr);
3908 }

Referenced by ilFileXMLWriter\start().

+ Here is the caller graph for this function:

◆ dbSupportsDisctinctUmlauts()

static ilUtil::dbSupportsDisctinctUmlauts ( )
static

Only temp fix for #8603, should go to db classes.

Parameters

xrefitem deprecated 257.

Returns
bool

Definition at line 5062 of file class.ilUtil.php.

5063 {
5064 global $DIC;
5065
5066 if (!isset(self::$db_supports_distinct_umlauts)) {
5067 $ilDB = $DIC->database();
5068 $set = $ilDB->query("SELECT (" . $ilDB->quote("A", "text") . " = " . $ilDB->quote("Ä", "text") . ") t FROM DUAL ");
5069 $rec = $ilDB->fetchAssoc($set);
5070 self::$db_supports_distinct_umlauts = !(bool) $rec["t"];
5071 }
5072
5074 }
static $db_supports_distinct_umlauts

References $db_supports_distinct_umlauts, $DIC, and $ilDB.

Referenced by ilAlphabetInputGUI\fixDBUmlauts().

+ Here is the caller graph for this function:

◆ deducibleSize()

static ilUtil::deducibleSize (   $a_mime)
static

checks if mime type is provided by getimagesize()

Parameters
string$a_mimemime format
Returns
boolean returns true if size is deducible by getimagesize()_DiffEngine

Definition at line 3284 of file class.ilUtil.php.

3285 {
3286 if (($a_mime == "image/gif") || ($a_mime == "image/jpeg") ||
3287 ($a_mime == "image/png") || ($a_mime == "application/x-shockwave-flash") ||
3288 ($a_mime == "image/tiff") || ($a_mime == "image/x-ms-bmp") ||
3289 ($a_mime == "image/psd") || ($a_mime == "image/iff")) {
3290 return true;
3291 } else {
3292 return false;
3293 }
3294 }

Referenced by ilObjMediaObject\_determineWidthHeight(), ilObjMediaObject\_saveTempFileAsMediaObject(), ilMediaPoolTableGUI\fillRow(), ilClipboardTableGUI\fillRow(), ilMediaItem\getOriginalSize(), and ilObjMediaPoolSubItemListGUI\parseImage().

+ Here is the caller graph for this function:

◆ delDir()

static ilUtil::delDir (   $a_dir,
  $a_clean_only = false 
)
static

removes a dir and all its content (subdirs and files) recursively

@access public

Parameters
string$a_dirdir to delete
bool$a_clean_only
Author
Unknown flexe.nosp@m.r@cu.nosp@m.tephp.nosp@m..com (source: http://www.php.net/rmdir)
Deprecated:
in favour of Filesystem::deleteDir() located at the filesystem service.
See also
\ILIAS\Filesystem\Filesystem::deleteDir()

Definition at line 2270 of file class.ilUtil.php.

2271 {
2272 if (!is_dir($a_dir) || is_int(strpos($a_dir, ".."))) {
2273 return;
2274 }
2275
2276 $current_dir = opendir($a_dir);
2277
2278 $files = array();
2279
2280 // this extra loop has been necessary because of a strange bug
2281 // at least on MacOS X. A looped readdir() didn't work
2282 // correctly with larger directories
2283 // when an unlink happened inside the loop. Getting all files
2284 // into the memory first solved the problem.
2285 while ($entryname = readdir($current_dir)) {
2286 $files[] = $entryname;
2287 }
2288
2289 foreach ($files as $file) {
2290 if (is_dir($a_dir . "/" . $file) and ($file != "." and $file != "..")) {
2291 ilUtil::delDir($a_dir . "/" . $file);
2292 } elseif ($file != "." and $file != "..") {
2293 unlink($a_dir . "/" . $file);
2294 }
2295 }
2296
2297 closedir($current_dir);
2298 if (!$a_clean_only) {
2299 @rmdir($a_dir);
2300 }
2301 }
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

References delDir().

Referenced by ilFileDataMail\__deleteAttachmentDirectory(), ilObjTest\_createImportDirectory(), assMatchingQuestion\afterSyncWithOriginal(), assSingleChoice\afterSyncWithOriginal(), ilScorm2004DataSet\afterXmlRecordWriting(), ilUserDataSet\afterXmlRecordWriting(), ILIAS\Wiki\Export\WikiHtmlExport\buildExportFile(), ilScorm2004Export\buildExportFileHTML(), ilScorm2004Export\buildExportFileHTMLOne(), ilScorm2004Export\buildExportFileISO(), ilScorm2004Export\buildExportFilePDF(), ilScorm2004Export\buildExportFileSCORM(), ilContObjectExport\buildExportFileSCORM(), ilSurveyExport\buildExportFileXML(), ilObjStyleSheet\cleanExportDirectory(), assOrderingQuestion\cleanImagefiles(), ilMathJax\clearCache(), ilObjFileImplementationLegacy\clearDataDirectory(), assLongMenu\clearFolder(), ilExAssignment\clearMultiFeedbackDirectory(), ilMobMultiSrtUpload\clearMultiSrtDirectory(), ilObjMediaObject\clearMultiSrtDirectory(), ilTestExportGUI\createTestArchiveExport(), ilUpdateUtils\delDir(), delDir(), ilCertificateUtilHelper\delDir(), SurveyQuestion\delete(), assQuestion\delete(), ilFileDataForumDrafts\delete(), ilObjFileBasedLM\delete(), ilObjContentObject\delete(), ilObjSAHSLearningModule\delete(), ilObjSurvey\delete(), ilBadgeImageTemplate\delete(), ilExportGUI\delete(), ilFileSystemStorage\delete(), ilObjMediaObject\delete(), ilFileSystemStorage5069\delete(), ilObjSurveyQuestionPool\deleteAllData(), ilFileDataCourse\deleteDirectory(), ilFileSystemStorage\deleteDirectory(), ilFileSystemStorage5069\deleteDirectory(), ilObjSurveyQuestionPoolGUI\deleteExportFileObject(), ilFileSystemGUI\deleteFile(), ilObjMediaObjectGUI\deleteFileObject(), ilExAssignment\deleteGlobalFeedbackFile(), ilObjFileDAV\deleteObjOrVersion(), ilObjQuestionPool\deleteQuestionpool(), ilBadge\deleteStaticFiles(), assQuestion\deleteSuggestedSolutions(), ilObjSurvey\deleteSurveyRecord(), ilObjTest\deleteTest(), ilObjFileImplementationLegacy\deleteVersions(), ilFileDataForum\deliverZipFile(), ilFileDataForumDrafts\deliverZipFile(), ilObjCmiXapi\doDelete(), ilExSubmission\downloadAllAssignmentFiles(), ilExSubmission\downloadMultipleFiles(), ilExport\exportEntity(), ilObjFileBasedLMGUI\exportHTML(), ilExport\exportObject(), ilExportContainer\exportObject(), ilObjUser\exportPersonalData(), ilCloudPluginUploadGUI\handleFileUpload(), ilExAssignment\handleGlobalFeedbackFileUpload(), ilExcCriteriaFile\importFromPeerReviewForm(), ilObjContentObject\importFromZipFile(), ilImport\importObject(), ilObjSurvey\importObject(), ilObjSurveyQuestionPool\importObject(), ilObjTestGUI\importVerifiedFileObject(), ilObjQuestionPoolGUI\importVerifiedFileObject(), ILIAS\Blog\Export\BlogHtmlExport\initDirectories(), ILIAS\Glossary\Export\GlossaryHtmlExport\initDirectories(), ILIAS\LearningModule\Export\LMHtmlExport\initDirectories(), ILIAS\Portfolio\Export\PortfolioHtmlExport\initDirectories(), ilExSubmission\processUploadedZipFile(), ilFileUtils\processZipFile(), assKprimChoice\removeAnswerImage(), ilAssFileUploadUploadsExporter\removeFileUploadCollection(), ilObjTest\removeTestResultsByActiveIds(), rRenameSuffix(), ilSubmissionsZipJob\run(), ilZipJob\run(), ilCalendarZipJob\run(), ilOrgUnitExporter\sendAndCreateSimpleExportFile(), assMultipleChoice\syncImages(), assSingleChoice\syncImages(), assQuestion\syncSuggestedSolutionFiles(), ilFileDataImportMail\unlinkLast(), unzip(), ilObjHelpSettings\uploadHelpModule(), ilExAssignment\uploadMultiFeedbackFile(), ilMobMultiSrtUpload\uploadMultipleSubtitleFile(), ilObjMediaObject\uploadMultipleSubtitleFile(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjTestGUI\uploadTstObject(), ilUserCertificateZip\zipCertificatesInArchiveDirectory(), ILIAS\Blog\Export\BlogHtmlExport\zipPackage(), ILIAS\Glossary\Export\GlossaryHtmlExport\zipPackage(), ILIAS\LearningModule\Export\LMHtmlExport\zipPackage(), and ILIAS\Portfolio\Export\PortfolioHtmlExport\zipPackage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deliverData()

static ilUtil::deliverData (   $a_data,
  $a_filename,
  $mime = "application/octet-stream",
  $charset = "" 
)
static

deliver data for download via browser.

We need to set the following headers to make downloads work using IE in HTTPS mode.

Definition at line 1921 of file class.ilUtil.php.

1922 {
1923 $disposition = "attachment"; // "inline" to view file in browser or "attachment" to download to hard disk
1924 // $mime = "application/octet-stream"; // or whatever the mime type is
1925
1926 include_once './Services/Http/classes/class.ilHTTPS.php';
1927
1928 //if($_SERVER['HTTPS'])
1929 if (ilHTTPS::getInstance()->isDetected()) {
1930
1931 // Added different handling for IE and HTTPS => send pragma after content informations
1935 #header("Pragma: ");
1936 #header("Cache-Control: ");
1937 #header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
1938 #header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
1939 #header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
1940 #header("Cache-Control: post-check=0, pre-check=0", false);
1941 } elseif ($disposition == "attachment") {
1942 header("Cache-control: private");
1943 } else {
1944 header("Cache-Control: no-cache, must-revalidate");
1945 header("Pragma: no-cache");
1946 }
1947
1949
1950 if (strlen($charset)) {
1951 $charset = "; charset=$charset";
1952 }
1953 header("Content-Type: $mime$charset");
1954 header("Content-Disposition:$disposition; filename=\"" . $ascii_filename . "\"");
1955 header("Content-Description: " . $ascii_filename);
1956 header("Content-Length: " . (string) (strlen($a_data)));
1957
1958 //if($_SERVER['HTTPS'])
1959 if (ilHTTPS::getInstance()->isDetected()) {
1960 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
1961 header('Pragma: public');
1962 }
1963
1964 header("Connection: close");
1965 echo $a_data;
1966 exit;
1967 }
static getInstance()
Get https instance.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
exit
Definition: login.php:29
$ascii_filename
Definition: metadata.php:361

References $ascii_filename, exit, getASCIIFilename(), and ilHTTPS\getInstance().

Referenced by ilTestExport\aggregatedResultsToCSV(), ilMemberExportGUI\deliverData(), ilCertificateUtilHelper\deliverData(), ilObjSurvey\deliverPDFfromFO(), ilObjTest\deliverPDFfromFO(), ilPublicUserProfileGUI\deliverVCard(), ilObjLanguageFolderGUI\downloadDeprecatedObject(), ilMemberExportGUI\downloadExportFile(), ilObjLanguageExtGUI\downloadObject(), ilSurveyParticipantsGUI\exportAllCodesObject(), ilRegistrationSettingsGUI\exportCodes(), ilAccountCodesGUI\exportCodes(), ilSurveyParticipantsGUI\exportCodesObject(), ilSessionOverviewGUI\exportCSV(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilSurveyEvaluationGUI\exportEvaluationUser(), ilForumExportGUI\exportHTML(), ilObjLinkResourceGUI\exportHTML(), ilECSSettingsGUI\exportImported(), ilObjAssessmentFolderGUI\exportLogObject(), ilNoteGUI\exportNotesHTML(), ilECSSettingsGUI\exportReleased(), ilDidacticTemplateSettingsGUI\exportTemplate(), ilTestExport\exportToCSV(), ilCalendarRemoteAccessHandler\handleRequest(), ilPageObject\send_paragraph(), and ilObjSCORMLearningModule\sendExportFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deliverFile()

static ilUtil::deliverFile (   $a_file,
  $a_filename,
  $a_mime = '',
  $isInline = false,
  $removeAfterDelivery = false,
  $a_exit_after = true 
)
static

deliver file for download via browser.

Parameters
$mimeMime of the file
$isInlineSet this to true, if the file shall be shown in browser

Definition at line 1976 of file class.ilUtil.php.

1983 {
1984 global $DIC;
1985 // should we fail silently?
1986 if (!file_exists($a_file)) {
1987 return false;
1988 }
1989 $delivery = new ilFileDelivery($a_file);
1990
1991 if ($isInline) {
1992 $delivery->setDisposition(ilFileDelivery::DISP_INLINE);
1993 } else {
1994 $delivery->setDisposition(ilFileDelivery::DISP_ATTACHMENT);
1995 }
1996
1997 if (strlen($a_mime)) {
1998 $delivery->setMimeType($a_mime);
1999 }
2000
2001 $delivery->setDownloadFileName($a_filename);
2002 $delivery->setConvertFileNameToAsci((bool) !$DIC->clientIni()->readVariable('file_access', 'disable_ascii'));
2003 $delivery->setDeleteFile($removeAfterDelivery);
2004 $delivery->deliver();
2005 }
Class ilFileDelivery.

References $DIC, ilFileDelivery\DISP_ATTACHMENT, and ilFileDelivery\DISP_INLINE.

Referenced by ilObjCmiXapiVerificationGUI\deliver(), ilObjCourseVerificationGUI\deliver(), ilObjExerciseVerificationGUI\deliver(), ilObjLTIConsumerVerificationGUI\deliver(), ilObjSCORMVerificationGUI\deliver(), ilObjTestVerificationGUI\deliver(), ilMailFolderGUI\deliverAttachments(), ilFileDataForum\deliverFile(), ilFileDataForumDrafts\deliverFile(), ilWikiUserHTMLExport\deliverFile(), ilMailFolderGUI\deliverFile(), ilCertificateUtilHelper\deliverFile(), assFileUpload\deliverFileUploadZIPFile(), ilBookingObjectGUI\deliverInfo(), ilNewsItem\deliverMobFile(), ilHtmlToPdfTransformerFactory\deliverPDF(), ilBookingProcessGUI\deliverPostFile(), ilFileDataForum\deliverZipFile(), ilFileDataForumDrafts\deliverZipFile(), ilExportGUI\download(), ilBlogExerciseGUI\downloadExcAssFile(), ilPortfolioExerciseGUI\downloadExcAssFile(), ilBlogExerciseGUI\downloadExcSubFile(), ilPortfolioExerciseGUI\downloadExcSubFile(), ilWikiPageGUI\downloadExcSubFile(), ilGlossaryPresentationGUI\downloadExportFile(), ilLMPresentationGUI\downloadExportFile(), ilObjSurveyQuestionPoolGUI\downloadExportFileObject(), ilObjUserFolderGUI\downloadExportFileObject(), ilExSubmissionGUI\downloadFeedbackFileObject(), ilFileSystemGUI\downloadFile(), ilIndividualAssessmentMemberGUI\downloadFile(), ilAdvancedMDSettingsGUI\downloadFile(), ilExSubmissionGUI\downloadFileObject(), ilObjIndividualAssessmentGUI\downloadFileObject(), ilExAssignmentEditorGUI\downloadGlobalFeedbackFileObject(), ilExSubmissionGUI\downloadGlobalFeedbackFileObject(), ilExSubmission\downloadMultipleFiles(), ilObjContentObjectGUI\downloadPDFFile(), ilExPeerReviewGUI\downloadPeerReviewObject(), ilSCORM2004ScoGUI\downloadResource(), ilExSubmission\downloadSingleFile(), ilSAHSEditGUI\executeCommand(), ilObjBlogGUI\export(), ilObjPortfolioBaseGUI\export(), ilPageLayoutAdministrationGUI\exportLayout(), ilObjQuestionPoolGUI\exportQuestionObject(), ilObjStyleSheetGUI\exportStyleObject(), ilOrgUnitExporter\sendAndCreateSimpleExportFile(), ilDclRecordListGUI\sendFile(), ilObjCourseGUI\sendFileObject(), ilObjSessionGUI\sendFileObject(), ilExAssignment\sendMultiFeedbackStructureFile(), ilObjUser\sendPersonalDataFile(), ilObjUserFolderGUI\usrExportCsvObject(), ilObjUserFolderGUI\usrExportX86Object(), ilObjUserFolderGUI\usrExportXmlObject(), and ilUserCertificateZip\zipCertificatesInArchiveDirectory().

+ Here is the caller graph for this function:

◆ dirsize()

static ilUtil::dirsize (   $directory)
static

get size of a directory or a file.

Parameters
stringpath to a directory or a file
Returns
integer. Returns -1, if the directory does not exist.

Definition at line 4629 of file class.ilUtil.php.

4630 {
4631 $size = 0;
4632 if (!is_dir($directory)) {
4633 // dirsize of non-existing directory
4634 $size = @filesize($directory);
4635 return ($size === false) ? -1 : $size;
4636 }
4637 if ($DIR = opendir($directory)) {
4638 while (($dirfile = readdir($DIR)) !== false) {
4639 if (is_link($directory . DIRECTORY_SEPARATOR . $dirfile) || $dirfile == '.' || $dirfile == '..') {
4640 continue;
4641 }
4642 if (is_file($directory . DIRECTORY_SEPARATOR . $dirfile)) {
4643 $size += filesize($directory . DIRECTORY_SEPARATOR . $dirfile);
4644 } elseif (is_dir($directory . DIRECTORY_SEPARATOR . $dirfile)) {
4645 $dirSize = ilUtil::dirsize($directory . DIRECTORY_SEPARATOR . $dirfile);
4646 if ($dirSize >= 0) {
4647 $size += $dirSize;
4648 } else {
4649 return -1;
4650 }
4651 }
4652 }
4653 closedir($DIR);
4654 }
4655 return $size;
4656 }
$size
Definition: RandomTest.php:84
static dirsize($directory)
get size of a directory or a file.

References $size, and dirsize().

Referenced by ilObjFileAccess\_lookupDiskUsage(), ilObjFileBasedLMAccess\_lookupDiskUsage(), ilObjMediaCastAccess\_lookupDiskUsage(), ilObjSAHSLearningModuleAccess\_lookupDiskUsage(), ilFileDataMail\_lookupDiskUsageOfUser(), dirsize(), ilExSubmission\downloadAllAssignmentFiles(), and ilMathJax\getCacheSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dumpString()

static ilUtil::dumpString (   $a_str)
static

dumps ord values of every character of string $a_str

Definition at line 2953 of file class.ilUtil.php.

2954 {
2955 $ret = $a_str . ": ";
2956 for ($i = 0; $i < strlen($a_str); $i++) {
2957 $ret .= ord(substr($a_str, $i, 1)) . " ";
2958 }
2959 return $ret;
2960 }
$i
Definition: metadata.php:24
$ret
Definition: parser.php:6

References $i, and $ret.

◆ dumpVar()

static ilUtil::dumpVar (   $mixed = null)
static

Dump var.

Parameters
null$mixed

Definition at line 5081 of file class.ilUtil.php.

5082 {
5083 echo '<pre>';
5084 var_dump($mixed);
5085 echo '</pre>';
5086 }

◆ escapeShellArg()

◆ escapeShellCmd()

static ilUtil::escapeShellCmd (   $a_arg)
static

escape shell cmd

@access public

Parameters

return

Definition at line 3416 of file class.ilUtil.php.

3417 {
3418 if (ini_get('safe_mode') == 1) {
3419 return $a_arg;
3420 }
3421 setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8"); // fix for PHP escapeshellcmd bug. See: http://bugs.php.net/bug.php?id=45132
3422 return escapeshellcmd($a_arg);
3423 }

Referenced by ilImagemapPreview\createPreview(), execConvert(), ilVirusScannerAntiVir\scanFile(), ilVirusScannerClamAV\scanFile(), ilVirusScannerICapClient\scanFile(), ilVirusScannerSophos\scanFile(), ilObjPoll\uploadImage(), and ilWkhtmlToPdfConfigFormGUI\validateForm().

+ Here is the caller graph for this function:

◆ excelTime()

static ilUtil::excelTime (   $year = "",
  $month = "",
  $day = "",
  $hour = "",
  $minute = "",
  $second = "" 
)
static

Calculates a Microsoft Excel date/time value.

Calculates a Microsoft Excel date/time value (nr of days after 1900/1/1 0:00) for a given date and time. The function only accepts dates after 1970/1/1, because the unix timestamp functions used in the function are starting with that date. If you don't enter parameters the date/time value for the actual date/time will be calculated.

static function

Parameters
integer$yearYear
integer$monthMonth
integer$dayDay
integer$hourHour
integer$minuteMinute
integer$secondSecond
Returns
float The Microsoft Excel date/time value @access public

Definition at line 3486 of file class.ilUtil.php.

3487 {
3488 $starting_time = mktime(0, 0, 0, 1, 2, 1970);
3489 if (strcmp("$year$month$day$hour$minute$second", "") == 0) {
3490 $target_time = time();
3491 } else {
3492 if ($year < 1970) {
3493 return 0;
3494 }
3495 }
3496 $target_time = mktime($hour, $minute, $second, $month, $day, $year);
3497 $difference = $target_time - $starting_time;
3498 $days = (($difference - ($difference % 86400)) / 86400);
3499 $difference = $difference - ($days * 86400) + 3600;
3500
3501 // #15343 - using a global locale leads to , instead of . for (implicit) floats
3502 return str_replace(",", ".", ($days + 25570 + ($difference / 86400)));
3503 }

◆ execConvert()

static ilUtil::execConvert (   $args)
static

execute convert command

Parameters
string$args

Definition at line 1788 of file class.ilUtil.php.

1789 {
1790 $args = self::escapeShellCmd($args);
1791 ilUtil::execQuoted(PATH_TO_CONVERT, $args);
1792 }
static escapeShellCmd($a_arg)
escape shell cmd

References escapeShellCmd(), and execQuoted().

Referenced by ilObjUser\_uploadPersonalPicture(), ilLTIConsumeProviderIcon\convert(), convertImage(), resizeImage(), ilObjBlog\uploadImage(), ilObjPortfolioBase\uploadImage(), ilPersonalProfileGUI\uploadUserPicture(), and ilObjUserGUI\uploadUserPictureObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execQuoted()

static ilUtil::execQuoted (   $cmd,
  $args = null 
)
static

exec command and fix spaces on windows

Parameters
string$cmd
string$args
Returns
array

Definition at line 3434 of file class.ilUtil.php.

3435 {
3436 global $DIC;
3437
3438 if (ilUtil::isWindows() && strpos($cmd, " ") !== false && substr($cmd, 0, 1) !== '"') {
3439 // cmd won't work without quotes
3440 $cmd = '"' . $cmd . '"';
3441 if ($args) {
3442 // args are also quoted, workaround is to quote the whole command AGAIN
3443 // was fixed in php 5.2 (see php bug #25361)
3444 if (version_compare(phpversion(), "5.2", "<") && strpos($args, '"') !== false) {
3445 $cmd = '"' . $cmd . " " . $args . '"';
3446 }
3447 // args are not quoted or php is fixed, just append
3448 else {
3449 $cmd .= " " . $args;
3450 }
3451 }
3452 }
3453 // nothing todo, just append args
3454 elseif ($args) {
3455 $cmd .= " " . $args;
3456 }
3457 exec($cmd, $arr);
3458
3459 $DIC->logger()->root()->debug("ilUtil::execQuoted: " . $cmd . ".");
3460
3461 return $arr;
3462 }
static isWindows()
check wether the current client system is a windows system

References $DIC, and isWindows().

Referenced by CreateIsoFromFolder(), ilImagemapPreview\createPreview(), ilPreviewRenderer\createPreviewImage(), ilGitInformation\detect(), ilFFmpeg\exec(), execConvert(), isConvertVersionAtLeast(), ilCountPDFPagesPreProcessors\process(), ilGhostscriptRenderer\renderImages(), ilWkhtmlToPdfRenderer\runCommandLine(), ilVirusScannerAntiVir\scanFile(), ilVirusScannerClamAV\scanFile(), ilVirusScannerICapClient\scanFile(), unzip(), ilObjPoll\uploadImage(), and zip().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extractParameterString()

static ilUtil::extractParameterString (   $a_parstr)
static

extracts parameter value pairs from a string into an array

Parameters
string$a_parstrparameter string (format: par1="value1", par2="value2", ...)
Returns
array array of parameter value pairs

Definition at line 2886 of file class.ilUtil.php.

2887 {
2888 // parse parameters in array
2889 $par = array();
2890 $ok = true;
2891 while (($spos = strpos($a_parstr, "=")) && $ok) {
2892 // extract parameter
2893 $cpar = substr($a_parstr, 0, $spos);
2894 $a_parstr = substr($a_parstr, $spos, strlen($a_parstr) - $spos);
2895 while (substr($cpar, 0, 1) == "," || substr($cpar, 0, 1) == " " || substr($cpar, 0, 1) == chr(13) || substr($cpar, 0, 1) == chr(10)) {
2896 $cpar = substr($cpar, 1, strlen($cpar) - 1);
2897 }
2898 while (substr($cpar, strlen($cpar) - 1, 1) == " " || substr($cpar, strlen($cpar) - 1, 1) == chr(13) || substr($cpar, strlen($cpar) - 1, 1) == chr(10)) {
2899 $cpar = substr($cpar, 0, strlen($cpar) - 1);
2900 }
2901
2902 // parameter name should only
2903 $cpar_old = "";
2904 while ($cpar != $cpar_old) {
2905 $cpar_old = $cpar;
2906 $cpar = preg_replace("/[^a-zA-Z0-9_]/i", "", $cpar);
2907 }
2908
2909 // extract value
2910 if ($cpar != "") {
2911 if ($spos = strpos($a_parstr, "\"")) {
2912 $a_parstr = substr($a_parstr, $spos + 1, strlen($a_parstr) - $spos);
2913 $spos = strpos($a_parstr, "\"");
2914 if (is_int($spos)) {
2915 $cval = substr($a_parstr, 0, $spos);
2916 $par[$cpar] = $cval;
2917 $a_parstr = substr($a_parstr, $spos + 1, strlen($a_parstr) - $spos - 1);
2918 } else {
2919 $ok = false;
2920 }
2921 } else {
2922 $ok = false;
2923 }
2924 }
2925 }
2926
2927 if ($ok) {
2928 return $par;
2929 } else {
2930 return false;
2931 }
2932 }

References $ok.

Referenced by ilPCMediaObjectGUI\saveAliasProperties(), and ilMediaItem\setParameters().

+ Here is the caller graph for this function:

◆ fmtFloat()

static ilUtil::fmtFloat (   $a_float,
  $a_decimals = 0,
  $a_dec_point = null,
  $a_thousands_sep = null,
  $a_suppress_dot_zero = false 
)
staticprotected

format a float

this functions takes php's number_format function and formats the given value with appropriate thousand and decimal separator. @access public

Parameters
floatthe float to format
integercount of decimals
integerdisplay thousands separator
booleanwhether .0 should be suppressed
Returns
string formatted number

Definition at line 4947 of file class.ilUtil.php.

4948 {
4949 global $DIC;
4950
4951 $lng = $DIC->language();
4952
4953 if ($a_dec_point == null) {
4954 {
4955 $a_dec_point = ".";
4956 }
4957 }
4958 if ($a_dec_point == '-lang_sep_decimal-') {
4959 $a_dec_point = ".";
4960 }
4961
4962 if ($a_thousands_sep == null) {
4963 $a_thousands_sep = $lng->txt('lang_sep_thousand');
4964 }
4965 if ($a_thousands_sep == '-lang_sep_thousand-') {
4966 $a_thousands_sep = ",";
4967 }
4968
4969 $txt = number_format($a_float, $a_decimals, $a_dec_point, $a_thousands_sep);
4970
4971 // remove trailing ".0"
4972 if (($a_suppress_dot_zero == 0 || $a_decimals == 0)
4973 && substr($txt, -2) == $a_dec_point . '0'
4974 ) {
4975 $txt = substr($txt, 0, strlen($txt) - 2);
4976 }
4977 if ($a_float == 0 and $txt == "") {
4978 $txt = "0";
4979 }
4980
4981 return $txt;
4982 }
$txt
Definition: error.php:13
$lng

References $DIC, $lng, and $txt.

Referenced by formatSize().

+ Here is the caller graph for this function:

◆ formatBytes()

static ilUtil::formatBytes (   $size,
  $decimals = 0 
)
static

Definition at line 4317 of file class.ilUtil.php.

4318 {
4319 $unit = array('', 'K', 'M', 'G', 'T', 'P');
4320
4321 for ($i = 0, $maxUnits = count($unit); $size >= 1024 && $i <= $maxUnits; $i++) {
4322 $size /= 1024;
4323 }
4324
4325 return round($size, $decimals) . $unit[$i];
4326 }

References $i, and $size.

Referenced by getFileSizeInfo().

+ Here is the caller graph for this function:

◆ formatSize()

static ilUtil::formatSize (   $size,
  $a_mode = 'short',
  $a_lng = null 
)
static

Returns the specified file size value in a human friendly form.

By default, the oder of magnitude 1024 is used. Thus the value returned by this function is the same value that Windows and Mac OS X return for a file. The value is a GibiBig, MebiBit, KibiBit or byte unit.

For more information about these units see: http://en.wikipedia.org/wiki/Megabyte

Parameters
integersize in bytes
stringmode: "short" is useful for display in the repository "long" is useful for display on the info page of an object
ilLanguageThe language object, or null if you want to use the system language.

Definition at line 5000 of file class.ilUtil.php.

5001 {
5002 global $DIC;
5003
5004 $lng = $DIC->language();
5005 if ($a_lng == null) {
5006 $a_lng = $lng;
5007 }
5008
5009 $mag = self::_getSizeMagnitude();
5010
5011 if ($size >= $mag * $mag * $mag) {
5012 $scaled_size = $size / $mag / $mag / $mag;
5013 $scaled_unit = 'lang_size_gb';
5014 } else {
5015 if ($size >= $mag * $mag) {
5016 $scaled_size = $size / $mag / $mag;
5017 $scaled_unit = 'lang_size_mb';
5018 } else {
5019 if ($size >= $mag) {
5020 $scaled_size = $size / $mag;
5021 $scaled_unit = 'lang_size_kb';
5022 } else {
5023 $scaled_size = $size;
5024 $scaled_unit = 'lang_size_bytes';
5025 }
5026 }
5027 }
5028
5029 $result = self::fmtFloat($scaled_size, ($scaled_unit
5030 == 'lang_size_bytes') ? 0 : 1, $a_lng->txt('lang_sep_decimal'), $a_lng->txt('lang_sep_thousand'), true)
5031 . ' ' . $a_lng->txt($scaled_unit);
5032 if ($a_mode == 'long' && $size > $mag) {
5033 $result .= ' (' . self::fmtFloat($size, 0, $a_lng->txt('lang_sep_decimal'), $a_lng->txt('lang_sep_thousand')) . ' '
5034 . $a_lng->txt('lang_size_bytes') . ')';
5035 }
5036
5037 return $result;
5038 }
$result
static _getSizeMagnitude()
Returns the magnitude used for size units.
static fmtFloat($a_float, $a_decimals=0, $a_dec_point=null, $a_thousands_sep=null, $a_suppress_dot_zero=false)
format a float

References $DIC, $lng, $result, $size, _getSizeMagnitude(), and fmtFloat().

Referenced by ilDclExportTableGUI\fillRow(), ilFileVersionsTableGUI\fillRow(), ilLMDownloadTableGUI\fillRow(), ilExportTableGUI\fillRow(), ilFileSystemTableGUI\fillRow(), ilMemberExportFileTableGUI\fillRow(), ilMailAttachmentTableGUI\formatValue(), ilObjFileListGUI\getProperties(), ilObjFileGUI\infoScreenForward(), ilMailAttachmentGUI\saveAttachments(), ilMailFormGUI\showForm(), and ilMailAttachmentGUI\uploadFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formCheckbox()

static ilUtil::formCheckbox (   $checked,
  $varname,
  $value,
  $disabled = false 
)
static

??? @access public

Parameters
string
string
string
booleandisabled checked checkboxes (default: false)
Returns
string

Definition at line 439 of file class.ilUtil.php.

440 {
441 $str = "<input type=\"checkbox\" name=\"" . $varname . "\"";
442
443 if ($checked == 1) {
444 $str .= " checked=\"checked\"";
445 }
446
447 if ($disabled) {
448 $str .= " disabled=\"disabled\"";
449 }
450
451 $array_var = false;
452
453 if (substr($varname, -2) == "[]") {
454 $array_var = true;
455 }
456
457 // if varname ends with [], use varname[-2] + _ + value as id tag (e.g. "user_id[]" => "user_id_15")
458 if ($array_var) {
459 $varname_id = substr($varname, 0, -2) . "_" . $value;
460 } else {
461 $varname_id = $varname;
462 }
463
464 // dirty removal of other "[]" in string
465 $varname_id = str_replace("[", "_", $varname_id);
466 $varname_id = str_replace("]", "", $varname_id);
467
468 $str .= " value=\"" . $value . "\" id=\"" . $varname_id . "\" />\n";
469
470 return $str;
471 }

Referenced by ilObjCategoryGUI\_importCategoriesForm(), ilLocalUserGUI\assignRoles(), ilObjCategoryGUI\assignRolesObject(), ilPasteIntoMultipleItemsExplorer\buildFormItem(), ilWorkspaceExplorer\buildFormItem(), ilECSNodeMappingCmsExplorer\buildFormItem(), ilECSNodeMappingLocalExplorer\buildFormItem(), ilStartUpGUI\confirmWithdrawal(), ilQuestionPoolImportVerificationTableGUI\fillRow(), ilWebResourceEditableLinkTableGUI\fillRow(), ilBuddySystemRelationsTableGUI\fillRow(), ilMailAttachmentTableGUI\fillRow(), ilForumDraftsTableGUI\fillRow(), ilMarkSchemaTableGUI\fillRow(), ilTestPersonalDefaultSettingsTableGUI\fillRow(), ilForumTopicTableGUI\fillRow(), ilForumSettingsGUI\getUserNotificationTableData(), ilObjRoleGUI\listUsersRoleObject(), ilNestedListInputGUI\render(), ilMailingListsGUI\showMailingLists(), and ilMailingListsGUI\showMembersList().

+ Here is the caller graph for this function:

◆ formDisabledRadioButton()

static ilUtil::formDisabledRadioButton (   $checked,
  $varname,
  $value,
  $disabled 
)
static

??? @accesspublic @paramstring @paramstring @paramstring

Parameters
string@returnstring

Definition at line 484 of file class.ilUtil.php.

485 {
486 if ($disabled) {
487 $str = "<input disabled type=\"radio\" name=\"" . $varname . "\"";
488 } else {
489 $str = "<input type=\"radio\" name=\"" . $varname . "\"";
490 }
491 if ($checked == 1) {
492 $str .= " checked=\"checked\"";
493 }
494
495 $str .= " value=\"" . $value . "\"";
496 $str .= " id=\"" . $value . "\" />\n";
497
498 return $str;
499 }

◆ formInput()

static ilUtil::formInput (   $varname,
  $value,
  $disabled = false 
)
static

create html input area

Parameters
string$varnamename of form variable
string$valuevalue and id of input
boolean$disabledif true, input appears disabled
Returns
string string

Definition at line 546 of file class.ilUtil.php.

547 {
548 $str = "<input type=\"input\" name=\"" . $varname . "\"";
549 if ($disabled) {
550 $str .= " disabled";
551 }
552
553 $str .= " value=\"" . $value . "\"";
554
555 $str .= " id=\"" . $value . "\" />\n";
556
557 return $str;
558 }

Referenced by ilChatroomSmiliesTableGUI\fillRow().

+ Here is the caller graph for this function:

◆ formRadioButton()

static ilUtil::formRadioButton (   $checked,
  $varname,
  $value,
  $onclick = null,
  $disabled = false 
)
static

??? @access public

Parameters
string
string
string
Returns
string

Definition at line 512 of file class.ilUtil.php.

513 {
514 $str = '<input ';
515
516 if ($onclick) {
517 $str .= ('onclick="' . $onclick . '"');
518 }
519
520 $str .= (" type=\"radio\" name=\"" . $varname . "\"");
521 if ($checked == 1) {
522 $str .= " checked=\"checked\"";
523 }
524
525 if ($disabled) {
526 $str .= " disabled=\"disabled\"";
527 }
528
529 $str .= " value=\"" . $value . "\"";
530
531 $str .= " id=\"" . $value . "\" />\n";
532
533 return $str;
534 }

Referenced by ilPasteIntoMultipleItemsExplorer\buildFormItem(), ilWorkspaceExplorer\buildFormItem(), ilECSNodeMappingCmsExplorer\buildFormItem(), ilECSNodeMappingLocalExplorer\buildFormItem(), and ilForumTopicTableGUI\fillRow().

+ Here is the caller graph for this function:

◆ formSelect()

static ilUtil::formSelect (   $selected,
  $varname,
  $options,
  $multiple = false,
  $direct_text = false,
  $size = "0",
  $style_class = "",
  $attribs = "",
  $disabled = false 
)
static

Builds a select form field with options and shows the selected option first.

@access public

Parameters
string/arrayvalue to be selected
stringvariable name in formular
arrayarray with $options (key = lang_key, value = long name)
booleanmultiple selection list true/false
booleanif true, the option values are displayed directly, otherwise they are handled as language variable keys and the corresponding language variable is displayed
intsize
stringstyle class
arrayadditional attributes (key = attribute name, value = attribute value)
booleandisabled

Definition at line 335 of file class.ilUtil.php.

345 {
346 global $DIC;
347
348 $lng = $DIC->language();
349
350 if ($multiple == true) {
351 $multiple = " multiple=\"multiple\"";
352 } else {
353 $multiple = "";
354 $size = 0;
355 }
356
357 $class = " class=\" form-control " . $style_class . "\"";
358
359 // use form-inline!
360 // this is workaround the whole function should be set deprecated
361 // $attributes = " style='display:inline-block;' ";
362
363 if (is_array($attribs)) {
364 foreach ($attribs as $key => $val) {
365 $attributes .= " " . $key . "=\"" . $val . "\"";
366 }
367 }
368 if ($disabled) {
369 $disabled = ' disabled=\"disabled\"';
370 }
371
372 $size_str = "";
373 if ($size > 0) {
374 $size_str = ' size="' . $size . '" ';
375 }
376 $str = "<select name=\"" . $varname . "\"" . $multiple . " $class " . $size_str . " $attributes $disabled>\n";
377
378 foreach ((array) $options as $key => $val) {
379 $style = "";
380 if (is_array($val)) {
381 $style = $val["style"];
382 $val = $val["text"]; // mus be last line, since we overwrite
383 }
384
385 $sty = ($style != "")
386 ? ' style="' . $style . '" '
387 : "";
388
389 if ($direct_text) {
390 $str .= " <option $sty value=\"" . $key . "\"";
391 } else {
392 $str .= " <option $sty value=\"" . $val . "\"";
393 }
394 if (is_array($selected)) {
395 if (in_array($key, $selected)) {
396 $str .= " selected=\"selected\"";
397 }
398 } elseif ($selected == $key) {
399 $str .= " selected=\"selected\"";
400 }
401
402 if ($direct_text) {
403 $str .= ">" . $val . "</option>\n";
404 } else {
405 $str .= ">" . $lng->txt($val) . "</option>\n";
406 }
407 }
408
409 $str .= "</select>\n";
410
411 return $str;
412 }
$attributes
Definition: metadata.php:231

References $attributes, $DIC, $lng, and $size.

Referenced by ilMDEditorGUI\__buildDaysSelect(), ilTypicalLearningTimeInputGUI\__buildDaysSelect(), ilObjUserGUI\__buildFilterSelect(), ilMDEditorGUI\__buildMonthsSelect(), ilTypicalLearningTimeInputGUI\__buildMonthsSelect(), ilObjUserFolderGUI\__buildUserFilterSelect(), ilMDEditorGUI\__fillSubelements(), ilObjUserGUI\__getDateSelect(), ilAdvancedSearchGUI\__getFilterSelect(), ilObjUserGUI\__showUserDefinedFields(), ilPersonalProfileGUI\__showUserDefinedFields(), ilMDUtilSelect\_getBrowserSelect(), ilMDUtilSelect\_getContextSelect(), ilMDUtilSelect\_getCopyrightAndOtherRestrictionsSelect(), ilMDUtilSelect\_getCostsSelect(), ilMDUtilSelect\_getDifficultySelect(), ilMDUtilSelect\_getDurationSelect(), ilMDUtilSelect\_getFormatSelect(), ilMDUtilSelect\_getIntendedEndUserRoleSelect(), ilMDUtilSelect\_getInteractivityLevelSelect(), ilMDUtilSelect\_getInteractivityTypeSelect(), ilMDUtilSelect\_getLanguageSelect(), ilMDUtilSelect\_getLearningResourceTypeSelect(), ilMDUtilSelect\_getLocationTypeSelect(), ilMDUtilSelect\_getOperatingSystemSelect(), ilMDUtilSelect\_getPurposeSelect(), ilMDUtilSelect\_getRoleSelect(), ilMDUtilSelect\_getSemanticDensitySelect(), ilMDUtilSelect\_getStatusSelect(), ilMDUtilSelect\_getStructureSelect(), ilMDUtilSelect\_getTypicalAgeRangeSelect(), ilMDUtilSelect\_getTypicalLearningTimeSelect(), ilLMChapterImportForm\addNode(), ilRecurrenceInputGUI\buildMonthlyByDaySelection(), ilRecurrenceInputGUI\buildMonthlyByMonthDaySelection(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilRecurrenceInputGUI\buildYearlyByMonthDaySelection(), ilObjSystemFolderGUI\checkObject(), ilPCParagraphGUI\edit(), ilObjTypeDefinitionGUI\editObject(), ilTable2GUI\fillActionRow(), ilWebResourceEditableLinkTableGUI\fillRow(), ilImportantPagesTableGUI\fillRow(), ilAdvancedMDRecordTableGUI\fillRow(), ilPCFileListTableGUI\fillRow(), ilPCGridCellTableGUI\fillRow(), ilPCIIMTriggerTableGUI\fillRow(), ilPCImageMapTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilImageMapTableGUI\fillRow(), ilMultilingualismTableGUI\fillRow(), ilObjectTranslation2TableGUI\fillRow(), ilObjectTranslationTableGUI\fillRow(), ilModulesTableGUI\fillRow(), ilLPCollectionSettingsTableGUI\fillRow(), ilECSCommunityTableGUI\fillRow(), ilTable2GUI\getLinkbar(), ilObjSCORM2004LearningModuleGUI\initPropertiesEditableForm(), ilObjGlossaryGUI\initStylePropertiesForm(), ilObjSCORM2004LearningModuleGUI\initStylePropertiesForm(), ilObjWikiGUI\initStylePropertiesForm(), ilContainerGUI\initStylePropertiesForm(), ilRecurrenceInputGUI\insert(), ilLocationInputGUI\insert(), ilLDAPSettingsGUI\prepareMappingSelect(), ilLDAPSettingsGUI\prepareRoleSelect(), ilDurationInputGUI\render(), ilPortfolioPageGUI\renderMyCourses(), ilObjContentObjectGUI\showEntrySelector(), ilInfoScreenGUI\showLearningProgress(), ilInternalLinkGUI\showLinkHelp(), ilPageObjectGUI\showPage(), ilObjRoleFolderGUI\showPossibleSubObjects(), ilObjectGUI\showPossibleSubObjects(), ilObjUserFolderGUI\showPossibleSubObjects(), and ilStructureObjectGUI\subchap().

+ Here is the caller graph for this function:

◆ generatePasswords()

static ilUtil::generatePasswords (   $a_number)
static

Generate a number of passwords.

Definition at line 3676 of file class.ilUtil.php.

3677 {
3678 $ret = array();
3679 srand((double) microtime() * 1000000);
3680
3681 include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
3683
3684 for ($i = 1; $i <= $a_number; $i++) {
3685 $min = ($security->getPasswordMinLength() > 0)
3686 ? $security->getPasswordMinLength()
3687 : 6;
3688 $max = ($security->getPasswordMaxLength() > 0)
3689 ? $security->getPasswordMaxLength()
3690 : 10;
3691 if ($min > $max) {
3692 $max = $min + 1;
3693 }
3694 $random = new \ilRandom();
3695 $length = $random->int($min, $max);
3696 $next = $random->int(1, 2);
3697 $vowels = "aeiou";
3698 $vowels_uc = strtoupper($vowels);
3699 $consonants = "bcdfghjklmnpqrstvwxyz";
3700 $consonants_uc = strtoupper($consonants);
3701 $numbers = "1234567890";
3702 $special = "_.+?#-*@!$%~";
3703 $pw = "";
3704
3705 if ($security->getPasswordNumberOfUppercaseChars() > 0) {
3706 for ($j = 0; $j < $security->getPasswordNumberOfUppercaseChars(); $j++) {
3707 switch ($next) {
3708 case 1:
3709 $pw .= $consonants_uc[$random->int(0, strlen($consonants_uc) - 1)];
3710 $next = 2;
3711 break;
3712
3713 case 2:
3714 $pw .= $vowels_uc[$random->int(0, strlen($vowels_uc) - 1)];
3715 $next = 1;
3716 break;
3717 }
3718 }
3719 }
3720
3721 if ($security->isPasswordCharsAndNumbersEnabled()) {
3722 $pw .= $numbers[$random->int(0, strlen($numbers) - 1)];
3723 }
3724
3725 if ($security->isPasswordSpecialCharsEnabled()) {
3726 $pw .= $special[$random->int(0, strlen($special) - 1)];
3727 }
3728
3729 $num_lcase_chars = max($security->getPasswordNumberOfLowercaseChars(), $length - strlen($pw));
3730 for ($j = 0; $j < $num_lcase_chars; $j++) {
3731 switch ($next) {
3732 case 1:
3733 $pw .= $consonants[$random->int(0, strlen($consonants) - 1)];
3734 $next = 2;
3735 break;
3736
3737 case 2:
3738 $pw .= $vowels[$random->int(0, strlen($vowels) - 1)];
3739 $next = 1;
3740 break;
3741 }
3742 }
3743
3744 $pw = str_shuffle($pw);
3745
3746 $ret[] = $pw;
3747 }
3748 return $ret;
3749 }
static _getInstance()
Get instance of ilSecuritySettings.

References $i, $ret, and ilSecuritySettings\_getInstance().

Referenced by shibUser\createFields(), and ilAuthProviderSoap\handleSoapAuth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getASCIIFilename()

static ilUtil::getASCIIFilename (   $a_filename)
static

convert utf8 to ascii filename

Parameters
string$a_filenameutf8 filename

Implementation note: The proper way to convert charsets is mb_convert_encoding. Unfortunately Multibyte String functions are not an installation requirement for ILIAS 3. Codelines behind three slashes '///' show how we would do it using mb_convert_encoding. Note that mb_convert_encoding has the bad habit of substituting unconvertable characters with HTML entitities. Thats why we need a regular expression which replaces HTML entities with their first character. e.g. ä => a

$ascii_filename = mb_convert_encoding($a_filename,'US-ASCII','UTF-8'); $ascii_filename = preg_replace('/&(.)[^;]*;/','\1', $ascii_filename);

Definition at line 2039 of file class.ilUtil.php.

2040 {
2041 // The filename must be converted to ASCII, as of RFC 2183,
2042 // section 2.3.
2043
2055
2058
2059 // #15914 - try to fix german umlauts
2060 $umlauts = [
2061 "Ä" => "Ae",
2062 "Ö" => "Oe",
2063 "Ü" => "Ue",
2064 "ä" => "ae",
2065 "ö" => "oe",
2066 "ü" => "ue",
2067 "é" => "e",
2068 "è" => "e",
2069 "é" => "e",
2070 "ê" => "e",
2071 "ß" => "ss"
2072 ];
2073 foreach ($umlauts as $src => $tgt) {
2074 $a_filename = str_replace($src, $tgt, $a_filename);
2075 }
2076
2077 $ascii_filename = htmlentities($a_filename, ENT_NOQUOTES, 'UTF-8');
2078 $ascii_filename = preg_replace('/\&(.)[^;]*;/', '\\1', $ascii_filename);
2079 $ascii_filename = preg_replace('/[\x7f-\xff]/', '_', $ascii_filename);
2080
2081 // OS do not allow the following characters in filenames: \/:*?"<>|
2082 $ascii_filename = preg_replace('/[:\x5c\/\*\?\"<>\|]/', '_', $ascii_filename);
2083 return $ascii_filename;
2084 }

References $ascii_filename.

Referenced by ilTestExport\aggregatedResultsToCSV(), ilTestExport\aggregatedResultsToExcel(), ILIAS\Wiki\Export\WikiHtmlExport\buildExportFile(), ilExerciseManagementCollectFilesJob\collectAssignmentData(), ilDownloadFilesBackgroundTask\collectFiles(), ilFileDataMail\deliverAttachmentsAsZip(), deliverData(), ilObjSurvey\deliverPDFfromFO(), ilObjTest\deliverPDFfromFO(), ilExSubmission\downloadAllAssignmentFiles(), ilExSubmission\downloadMultipleFiles(), ilSurveyParticipantsGUI\exportAllCodesObject(), ilTestEvaluationGUI\exportCertificate(), ilSurveyParticipantsGUI\exportCodesObject(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilSurveyEvaluationGUI\exportEvaluationUser(), ilObjExercise\exportGradesExcel(), ilCOPageHTMLExport\exportHTMLFileDirect(), ilTestExport\exportToCSV(), ilTestExport\exportToExcel(), ilObjMediaObject\fixFilename(), ilExSubmission\getDirectoryNameFromUserData(), ilAssFileUploadUploadsExporter\getDispoZipFileName(), ilCollectFilesJob\getFileDirs(), ilCollectWorkspaceFilesJob\getFileDirs(), ilTestParticipantData\getFileSystemCompliantFullnameByActiveId(), ilVerificationObject\getOfflineFilename(), ilObjTest\getTitleFilenameCompliant(), assQuestion\getTitleFilenameCompliant(), ilAssFileUploadUploadsExporter\initFilenames(), ilDclMobRecordFieldModel\parseValue(), ilCollectFilesJob\recurseFolder(), ilCollectWorkspaceFilesJob\recurseFolder(), ilDownloadSubmissionsBackgroundTask\run(), ilDownloadWorkspaceFolderBackgroundTask\run(), ilDownloadFilesBackgroundTask\run(), ilDownloadContainerFilesBackgroundTask\run(), ilQtiMatImageSecurity\sanitizeLabel(), ilExAssignment\sendMultiFeedbackStructureFile(), ilObjMediaCastGUI\updateMediaItem(), and ilMediaCreationGUI\uploadFile().

+ Here is the caller graph for this function:

◆ getClientIdByString()

static ilUtil::getClientIdByString ( string  $clientId)
static
Parameters
string$clientId
Returns
\ILIAS\Data\ClientId

Definition at line 2369 of file class.ilUtil.php.

2370 {
2371 $df = new \ILIAS\Data\Factory;
2372
2373 return $df->clientId($clientId);
2374 }

Referenced by ilInitialisation\determineClient().

+ Here is the caller graph for this function:

◆ getConvertCmd()

static ilUtil::getConvertCmd ( )
static

get convert command

Deprecated:
See also
ilUtil::execConvert()

Definition at line 1776 of file class.ilUtil.php.

1777 {
1778 return PATH_TO_CONVERT;
1779 }

◆ getDataDir()

static ilUtil::getDataDir ( )
static

get data directory (outside webspace)

Deprecated:
in favour of the filesystem service which should be used to operate on the storage directory.
See also
\ILIAS\DI\Container::filesystem()
\ILIAS\Filesystem\Filesystems::storage()

Definition at line 1530 of file class.ilUtil.php.

1531 {
1532 return CLIENT_DATA_DIR;
1533 }
const CLIENT_DATA_DIR
Definition: constants.php:44

References CLIENT_DATA_DIR.

Referenced by ilAdvancedMDRecordExportFiles\__construct(), ilAdvancedMDRecordImportFiles\__construct(), ilExternalFeed\_createCacheDirectory(), ilObjTest\_createImportDirectory(), ilObjQuestionPool\_createImportDirectory(), ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), ilExport\_getExportDirectory(), ilObjCategoryGUI\_getImportDir(), ilFileDataMail\_lookupDiskUsageOfUser(), assLongMenu\buildFolderName(), ilObjStyleSheet\cleanExportDirectory(), ilDclPropertyFormGUI\cleanupTempFiles(), ilSimpleSAMLphpConfigTemplateHandler\copy(), ilChatroomConfigFileHandler\createDataDirIfNotExists(), ilObjContentObject\createExportDirectory(), ilScorm2004Export\createExportDirectory(), ilObjSurvey\createExportDirectory(), ilObjSurveyQuestionPool\createExportDirectory(), ilObjTest\createExportDirectory(), ilObjQuestionPool\createExportDirectory(), ilObjStyleSheet\createExportDirectory(), ilObjUserFolder\createExportDirectory(), ilObjGlossary\createImportDirectory(), ilObjContentObject\createImportDirectory(), ilObjSurvey\createImportDirectory(), ilObjSurveyQuestionPool\createImportDirectory(), ilObjStyleSheet\createImportDirectory(), ilMediaItem\createWorkDirectory(), ilObjSurveyQuestionPool\deleteAllData(), ilObjQuestionPool\deleteQuestionpool(), ilObjSurvey\deleteSurveyRecord(), ilObjTest\deleteTest(), ilImportDirectory\getAbsolutePath(), ilExportImportDirectory\getAbsolutePathForHash(), ilSamlAuthFactory\getConfigDirectory(), ilObjContentObject\getDataDirectory(), ilObjContentObject\getExportDirectory(), ilObjQuestionPool\getExportDirectory(), ilObjSurvey\getExportDirectory(), ilObjSurveyQuestionPool\getExportDirectory(), ilObjTest\getExportDirectory(), ilObjUserFolder\getExportDirectory(), ilScorm2004Export\getExportDirectoryForType(), ilMediaImageUtil\getImageSize(), ilObjGlossary\getImportDirectory(), ilObjContentObject\getImportDirectory(), ilObjSurvey\getImportDirectory(), ilObjSurveyQuestionPool\getImportDirectory(), ilUserPasswordManager\getInstance(), ilFSStorageMail\getRelativePathExMailDirectory(), ilDclPropertyFormGUI\getTempFilename(), ilLMMultiSrt\getUploadDir(), ilMepMultiSrt\getUploadDir(), ilMediaItem\getWorkDirectory(), ilObjUserFolderGUI\handleUploadedFiles(), ilTempnam(), ilBibliographicDataSet\importLibraryFile(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilObjUserFolderGUI\importUsersObject(), ilFileSystemStorage\init(), ilFileSystemStorage5069\init(), ilTestQuestionPoolExporter\lookupExportDirectory(), ilXmlExporter\lookupExportDirectory(), ilDclPropertyFormGUI\rebuildTempFileByHash(), ilPropertyFormGUI\rebuildUploadedFiles(), and ilObjSAHSLearningModule\zipLmForOfflineMode().

+ Here is the caller graph for this function:

◆ getDir()

static ilUtil::getDir (   $a_dir,
  $a_rec = false,
  $a_sub_dir = "" 
)
static

get directory

Parameters
$a_dir
bool$a_rec
string$a_sub_dir
Returns
array
Deprecated:
in favour of Filesystem::listContents() located at the filesystem service.
See also
\ILIAS\Filesystem\Filesystem::listContents()

Definition at line 2319 of file class.ilUtil.php.

2320 {
2321 $current_dir = opendir($a_dir . $a_sub_dir);
2322
2323 $dirs = array();
2324 $files = array();
2325 $subitems = array();
2326 while ($entry = readdir($current_dir)) {
2327 if (is_dir($a_dir . "/" . $entry)) {
2328 $dirs[$entry] = array("type" => "dir", "entry" => $entry,
2329 "subdir" => $a_sub_dir);
2330 if ($a_rec && $entry != "." && $entry != "..") {
2331 $si = ilUtil::getDir($a_dir, true, $a_sub_dir . "/" . $entry);
2332 $subitems = array_merge($subitems, $si);
2333 }
2334 } else {
2335 if ($entry != "." && $entry != "..") {
2336 $size = filesize($a_dir . $a_sub_dir . "/" . $entry);
2337 $files[$entry] = array("type" => "file", "entry" => $entry,
2338 "size" => $size, "subdir" => $a_sub_dir);
2339 }
2340 }
2341 }
2342 ksort($dirs);
2343 ksort($files);
2344
2345 return array_merge($dirs, $files, $subitems);
2346 }
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory

References $si, $size, and getDir().

Referenced by assOrderingQuestion\cleanImagefiles(), ilSCORM13Package\dbImportSco(), ilObjMediaObjectGUI\editFilesObject(), ilFileDataMail\getAttachmentPathAndFilenameByMd5Hash(), getDir(), ilCertificateUtilHelper\getDir(), ilFileSystemTableGUI\getEntries(), ilFileDataForum\getFileDataByMD5Filename(), ilFileDataForumDrafts\getFileDataByMD5Filename(), ilFileSystemGUI\getFileList(), ilUploadDirFilesTableGUI\getFiles(), ilAdvancedMDRecordExportFiles\getFiles(), ilObjMediaObject\getFilesOfDirectory(), ilObjStyleSheet\getImages(), ilExAssignment\getMultiFeedbackFiles(), ilMobMultiSrtUpload\getMultiSrtFiles(), ilObjMediaObject\getMultiSrtFiles(), ilObjUser\getPersonalDataExportFile(), ilObjMediaObject\getSrtFiles(), ilFileDataForum\unlinkFilesByMD5Filenames(), ilFileDataForumDrafts\unlinkFilesByMD5Filenames(), ilFileSystemGUI\unzipFile(), ilObjHelpSettings\uploadHelpModule(), and ilExAssignment\uploadMultiFeedbackFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFileSizeInfo()

static ilUtil::getFileSizeInfo ( )
static

Definition at line 4295 of file class.ilUtil.php.

4296 {
4297 $max_filesize = self::formatBytes(
4298 self::getUploadSizeLimitBytes()
4299 );
4300
4301 global $DIC;
4302
4303 $lng = $DIC->language();
4304 /*
4305 // get the value for the maximal uploadable filesize from the php.ini (if available)
4306 $umf=get_cfg_var("upload_max_filesize");
4307 // get the value for the maximal post data from the php.ini (if available)
4308 $pms=get_cfg_var("post_max_size");
4309
4310 // use the smaller one as limit
4311 $max_filesize=min($umf, $pms);
4312 if (!$max_filesize) $max_filesize=max($umf, $pms);
4313 */
4314 return $lng->txt("file_notice") . " $max_filesize.";
4315 }
static formatBytes($size, $decimals=0)

References $DIC, $lng, and formatBytes().

Referenced by ilTinyMCE\addCustomRTESupport(), ilTinyMCE\addRTESupport(), ilImageWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilAssMultipleChoiceCorrectionsInputGUI\insert(), ilAssSingleChoiceCorrectionsInputGUI\insert(), and ilMultipleImagesInputGUI\render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGDSupportedImageType()

static ilUtil::getGDSupportedImageType (   $a_desired_type)
static

returns the best supported image type by this PHP build

Parameters
string$desired_typedesired image type ("jpg" | "gif" | "png")
Returns
string supported image type ("jpg" | "gif" | "png" | "")

Definition at line 3215 of file class.ilUtil.php.

3216 {
3217 $a_desired_type = strtolower($a_desired_type);
3218 // get supported Image Types
3219 $im_types = ImageTypes();
3220
3221 switch ($a_desired_type) {
3222 case "jpg":
3223 case "jpeg":
3224 if ($im_types & IMG_JPG) {
3225 return "jpg";
3226 }
3227 if ($im_types & IMG_GIF) {
3228 return "gif";
3229 }
3230 if ($im_types & IMG_PNG) {
3231 return "png";
3232 }
3233 break;
3234
3235 case "gif":
3236 if ($im_types & IMG_GIF) {
3237 return "gif";
3238 }
3239 if ($im_types & IMG_JPG) {
3240 return "jpg";
3241 }
3242 if ($im_types & IMG_PNG) {
3243 return "png";
3244 }
3245 break;
3246
3247 case "png":
3248 if ($im_types & IMG_PNG) {
3249 return "png";
3250 }
3251 if ($im_types & IMG_JPG) {
3252 return "jpg";
3253 }
3254 if ($im_types & IMG_GIF) {
3255 return "gif";
3256 }
3257 break;
3258
3259 case "svg":
3260 if ($im_types & IMG_PNG) {
3261 return "png";
3262 }
3263 if ($im_types & IMG_JPG) {
3264 return "jpg";
3265 }
3266 if ($im_types & IMG_GIF) {
3267 return "gif";
3268 }
3269 break;
3270 }
3271
3272 return "";
3273 }

Referenced by ilMediaItem\getMapWorkCopyType().

+ Here is the caller graph for this function:

◆ getHtmlPath()

static ilUtil::getHtmlPath (   $relative_path)
static

get url of path

Author
Brandon Blackmoor brand.nosp@m.on.b.nosp@m.lackm.nosp@m.oor@.nosp@m.jfcom.nosp@m..mil @access public
Parameters
$relative_pathstring complete path to file, relative to web root (e.g. /data/pfplms103/mobs/mm_732/athena_standing.jpg)

Definition at line 168 of file class.ilUtil.php.

169 {
170 if (substr($relative_path, 0, 2) == './') {
171 $relative_path = (substr($relative_path, 1));
172 }
173 if (substr($relative_path, 0, 1) != '/') {
174 $relative_path = '/' . $relative_path;
175 }
176 $htmlpath = ILIAS_HTTP_PATH . $relative_path;
177 return $htmlpath;
178 }

Referenced by ilObjMediaObject\_getURL(), ilPreview\getImages(), SurveyMatrixQuestionGUI\getPrintView(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyTextQuestionGUI\getPrintView(), assKprimChoiceGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), and ilAuthFrontendCredentialsApache\tryAuthenticationOnLoginPage().

+ Here is the caller graph for this function:

◆ getImagePath()

static ilUtil::getImagePath (   $img,
  $module_path = "",
  $mode = "output",
  $offline = false 
)
static

get image path (for images located in a template directory)

@access public

Parameters
stringfull image filename (e.g. myimage.png)
booleanshould be set to true, if the image is within a module template directory (e.g. content/templates/default/images/test.png)

Definition at line 96 of file class.ilUtil.php.

97 {
98 global $DIC;
99
100 $styleDefinition = null;
101 if (isset($DIC["styleDefinition"])) {
102 $styleDefinition = $DIC["styleDefinition"];
103 }
104
105 if (is_int(strpos($_SERVER["PHP_SELF"], "setup.php"))) {
106 $module_path = "..";
107 }
108 if ($module_path != "") {
109 $module_path = "/" . $module_path;
110 }
111
112 // default image
113 $default_img = "." . $module_path . "/templates/default/images/" . $img;
114
115 // use ilStyleDefinition instead of account to get the current skin and style
116 require_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
117 $current_skin = ilStyleDefinition::getCurrentSkin();
118 $current_style = ilStyleDefinition::getCurrentStyle();
119
120 if (is_object($styleDefinition)) {
121 $image_dir = $styleDefinition->getImageDirectory($current_style);
122 }
123 $skin_img = "";
124 if ($current_skin == "default") {
125 $user_img = "." . $module_path . "/templates/default/" . $image_dir . "/" . $img;
126 $skin_img = "." . $module_path . "/templates/default/images/" . $img;
127 } elseif (is_object($styleDefinition) && $current_skin != "default") {
128 $user_img = "./Customizing/global/skin/" .
129 $current_skin . $module_path . "/" . $image_dir . "/" . $img;
130 $skin_img = "./Customizing/global/skin/" .
131 $current_skin . $module_path . "/images/" . $img;
132 }
133
134 // temp svg patch
135 /*
136 $pi = pathinfo($img);
137 if ($pi["dirname"] != "") {
138 $pi["dirname"] = $pi["dirname"]."/";
139 }
140 $svg_img = ".".$module_path."/templates/default/images/".$pi["dirname"].$pi["filename"].".svg";
141 if (file_exists($svg_img))
142 {
143 return $svg_img;
144 }*/
145
146
147 if ($offline) {
148 return "./images/" . $img;
149 } elseif (@file_exists($user_img) && $image_dir != "") {
150 return $user_img; // found image for skin and style
151 } elseif (file_exists($skin_img)) {
152 return $skin_img; // found image in skin/images
153 }
154
155 return $default_img; // take image in default
156 }
static getCurrentSkin()
get the current skin
static getCurrentStyle()
get the current style or sub style
$img
Definition: imgupload.php:57

References $_SERVER, $DIC, $img, ilStyleDefinition\getCurrentSkin(), and ilStyleDefinition\getCurrentStyle().

Referenced by ilNoteGUI\__construct(), ilStudyProgrammeIndividualPlanTableGUI\__construct(), ilLPStatusIcons\__construct(), ilCourseContentGUI\__editAdvancedUserTimings(), ilCourseContentGUI\__editUserTimings(), ilCourseContentGUI\__renderUserItem(), ilObjRoleGUI\__setHeader(), ilLocalUserGUI\__showRolesTable(), ilPlugin\_getImagePath(), ilLearningProgressBaseGUI\_getImagePathForStatus(), ilPCTableGUI\_renderTable(), ilExAssignmentGUI\addFiles(), ilObjDataCollectionGUI\addHeaderAction(), ilWikiPageGUI\addHeaderAction(), ilContainerGUI\addHeaderRow(), ilContainerRenderer\addHeaderRow(), ilLMChapterImportForm\addNode(), ilSystemStyleDeleteGUI\addStyle(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\allCommand(), ilUserPrivacySettingsGUI\appendChatJsToTemplate(), ilConditionHandlerGUI\askDelete(), ilCourseObjectivesGUI\askDeleteObjective(), ilExSubmissionObjectGUI\askUnlinkPortfolioObject(), ilPersonalSkillsGUI\assignMaterials(), ilObjAuthSettingsGUI\authSettingsObject(), ilParticipantsTestResultsTableGUI\buildFailedIcon(), ilTestParticipantsTableGUI\buildOkIcon(), ilParticipantsTestResultsTableGUI\buildPassedIcon(), ilStudyProgrammeIndividualPlanProgressListGUI\buildProgressStatus(), ilObjContentObjectGUI\chapters(), ilContainerGUI\cloneWizardPageObject(), ilMembershipGUI\confirmAssignFromWaitingList(), ilMembershipGUI\confirmAssignSubscribers(), ilGlossaryTermGUI\confirmDefinitionDeletion(), ilPDExternalFeedBlockGUI\confirmDeleteFeedBlock(), ilSessionMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmDeleteParticipants(), ilObjRoleGUI\confirmDeleteRoleObject(), ilObjMediaCastGUI\confirmDeletionItemsObject(), ilMembershipGUI\confirmRefuseFromList(), ilMembershipGUI\confirmRefuseSubscribers(), ilCourseParticipantsGroupsGUI\confirmRemove(), ilOrgUnitStaffGUI\confirmRemoveUser(), assErrorText\createErrorTextOutput(), ilSCORM13PlayerGUI\debugGUI(), ilObjForumGUI\decorateWithAutosave(), ilObjSCORM2004LearningModuleGUI\deleteNodes(), ilObjSkillManagementGUI\deleteNodes(), ilParticipantsTestResultsGUI\deleteSingleUserResultsCmd(), ilPDNewsGUI\displayHeader(), ilPDNotesGUI\displayHeader(), ilPageObjectGUI\displayMedia(), ilPCDataTableGUI\editDataCl(), ilObjMediaObjectGUI\editFilesObject(), ilLMPageObjectGUI\editLayout(), ilObjTypeDefinitionGUI\editObject(), ilContainerGUI\editPageContentObject(), ilGlossaryTermGUI\editTerm(), ilCourseContentGUI\editTimings(), ilObjSessionGUI\eventsListObject(), ilBlogPostingGUI\executeCommand(), ilTermDefinitionEditorGUI\executeCommand(), ilLMPageObjectGUI\executeCommand(), ilPortfolioRepositoryGUI\executeCommand(), ilSCORM2004PageNodeGUI\executeCommand(), ilObjSAHSLearningModuleGUI\executeCommand(), ilPCInteractiveImageGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilAchievementsGUI\executeCommand(), ilObjContentObjectGUI\explorer(), ilSystemStyleHTMLExport\export(), ilCOPageHTMLExport\exportHTMLMOB(), ILIAS\Wiki\Export\WikiHtmlExport\exportPageHTML(), ilMailFolderTableGUI\fetchTableData(), ilTable2GUI\fillActionRow(), ilDataCollectionGlobalTemplate\fillAdminPanel(), ilCOPageGlobalTemplate\fillAdminPanel(), ilRTEGlobalTemplate\fillAdminPanel(), ilLuceneAdvancedSearchGUI\fillAdminPanel(), ilLuceneSearchGUI\fillAdminPanel(), ilGlobalTemplate\fillAdminPanel(), ILIAS\Services\UICore\MetaTemplate\PageContentGUI\fillAdminPanel(), ilCalendarSelectionBlockGUI\fillDataSection(), ilTable2GUI\fillHeader(), ilBlockGUI\fillHeaderCommands(), ilCopyWizardPage\fillMainBlock(), ilConditionHandlerTableGUI\fillRow(), ilCourseObjectiveQuestionsTableGUI\fillRow(), ilDclFieldListTableGUI\fillRow(), ilDclTableViewTableGUI\fillRow(), ilItemGroupItemsTableGUI\fillRow(), ilExportIDTableGUI\fillRow(), ilLMPagesTableGUI\fillRow(), ilMediaPoolTableGUI\fillRow(), ilPollUserTableGUI\fillRow(), ilObjectivesAlignmentTableGUI\fillRow(), ilSessionOverviewTableGUI\fillRow(), ilSurveyQuestionTableGUI\fillRow(), ilAccessPermissionsStatusTableGUI\fillRow(), ilAvailableRolesStatusTableGUI\fillRow(), ilAuthLoginPageEditorTableGUI\fillRow(), ilShibbolethRoleAssignmentTableGUI\fillRow(), ilCalendarCategoryTableGUI\fillRow(), ilCalendarChangedAppointmentsTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilCalendarManageTableGUI\fillRow(), ilCalendarSharedListTableGUI\fillRow(), ilClipboardTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilFileSystemTableGUI\fillRow(), ilHistoryTableGUI\fillRow(), ilLDAPRoleAssignmentTableGUI\fillRow(), ilLDAPServerTableGUI\fillRow(), ilSamlIdpTableGUI\fillRow(), ilSkillAssignMaterialsTableGUI\fillRow(), ilLPCollectionSettingsTableGUI\fillRow(), ilLPProgressTableGUI\fillRow(), ilTrMatrixTableGUI\fillRow(), ilSurveyQuestionsTableGUI\fillRow(), ilListOfQuestionsTableGUI\fillRow(), ilTestQuestionsTableGUI\fillRow(), ilQuestionBrowserTableGUI\fillRow(), ilTrObjectUsersPropsTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilPDMailBlockGUI\fillRow(), ilCourseReferenceDeleteConfirmationTableGUI\fillRow(), ilTimingsManageTableGUI\fillRow(), ilTimingsPersonalTableGUI\fillRow(), ilDidacticTemplateSettingsTableGUI\fillRow(), ilECSServerTableGUI\fillRow(), ilDataCollectionGlobalTemplate\fillSideIcons(), ilCOPageGlobalTemplate\fillSideIcons(), ilRTEGlobalTemplate\fillSideIcons(), ilGlobalTemplate\fillSideIcons(), ilSAHSPresentationGUI\finishSahs(), ilSCORMPresentationGUI\finishSahs(), assQuestion\fixUnavailableSkinImageSources(), ilGlossarySelectorGUI\formatHeader(), ilWorkspaceFolderExplorer\formatHeader(), ilContainerGUI\forwardToPageObject(), ilSecurImageUtil\getAudioScript(), ilUserAvatarResolver\getAvatar(), ilChapterHierarchyFormGUI\getChildIcon(), ilHierarchyFormGUI\getChildIcon(), ilChapterHierarchyFormGUI\getChildIconAlt(), ilQuestionBrowserTableGUI\getCommentsHtml(), ilHierarchyFormGUI\getContent(), ilAssNestedOrderingElementsInputGUI\getCorrectnessIconFilename(), ilCourseLearningHistoryProvider\getEntries(), ilBadgeLearningHistoryProvider\getEntries(), ilFirstLoginLearningHistoryProvider\getEntries(), ilSkillLearningHistoryProvider\getEntries(), ilLearningHistoryEntryCollector\getEntries(), ilAsyncPropertyFormGUI\getErrorMessageTemplate(), ilStudyProgrammeExpandableProgressListGUI\getExpandedImageURL(), ilCloudPluginItemCreationListGUI\getGroupedListItems(), ilLMPresentationGUI\getHeaderAction(), ilAdvancedSelectionListGUI\getHTML(), ilRatingGUI\getHTML(), ilDclBooleanRecordRepresentation\getHTML(), ilDclFileuploadRecordRepresentation\getHTML(), ilDclTreePickInputGUI\getHtml(), ilLMChapterImportForm\getHTML(), ilMainMenuSearchGUI\getHTML(), ilForumSettingsGUI\getIcon(), ILIAS\Administration\AdministrationMainBarProvider\getIconForGroup(), ilSkillTreeNode\getIconPath(), ilObjSCORMInitData\getIliasScormVars(), ilSurveySkillExplorer\getImage(), ilExplorer\getImage(), ilImageMapEditorGUI\getImageMapOutput(), ilCertificateUtilHelper\getImagePath(), ilSCORM13PlayerGUI\getInlineCSS(), ilCloudPluginFileTreeGUI\getItemHtml(), ilContainerStartObjectsContentTableGUI\getItems(), ilObjContentObjectGUI\getLayoutOption(), ilHierarchyFormGUI\getLevelHTML(), ilPDMailBlockGUI\getListItemForData(), ILIAS\GlobalScreen\Scope\Layout\Provider\PagePart\StandardPagePartProvider\getLogo(), ilLMHtmlExportViewLayoutProvider\getMainBarModification(), ilAwarenessGUI\getMainMenuHTML(), ILIAS\User\Provider\UserMetaBarProvider\getMetaBarItems(), ilMediaPlayerGUI\getMp3PlayerHtml(), ilLMEditorExplorerGUI\getNodeIcon(), ilPublicSectionExplorerGUI\getNodeIcon(), ilLMTOCExplorerGUI\getNodeIcon(), ilMediaPoolExplorerGUI\getNodeIcon(), ilSCORM2004EditorExplorerGUI\getNodeIcon(), ilWorkspaceExplorerGUI\getNodeIcon(), ilPersonalSkillExplorerGUI\getNodeIcon(), ilSkillTemplateTreeExplorerGUI\getNodeIcon(), ilSkillTreeExplorerGUI\getNodeIcon(), ilVirtualSkillTreeExplorerGUI\getNodeIcon(), ilTaxonomyExplorerGUI\getNodeIcon(), ilMailExplorer\getNodeIcon(), ilNoteGUI\getNoteListHTML(), ilStudyProgrammeExpandableProgressListGUI\getNotExpandedImageURL(), ilExplorer\getOutput(), ilSCORMExplorer\getOutputIcons(), ilPortfolioRepositoryGUI\getPortfolioList(), assKprimChoiceGUI\getPreview(), assMatchingQuestionGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assSingleChoiceGUI\getPreview(), SurveyMatrixQuestionGUI\getPrintView(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyTextQuestionGUI\getPrintView(), ilTestQuestionHeaderBlockBuilder\getQuestionInfoHTML(), ilTestQuestionNavigationGUI\getQuestionMarkIconSource(), ILIAS\GlobalScreen\Scope\Layout\Provider\PagePart\StandardPagePartProvider\getResponsiveLogo(), ilTestServiceGUI\getResultsSignature(), assLongMenuGUI\getSelectGapTemplate(), ilFileUploadGUI\getSharedHtml(), assClozeTestGUI\getSolutionOutput(), assFileUploadGUI\getSolutionOutput(), assFlashQuestionGUI\getSolutionOutput(), assJavaAppletGUI\getSolutionOutput(), assKprimChoiceGUI\getSolutionOutput(), assMatchingQuestionGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assNumericGUI\getSolutionOutput(), assOrderingHorizontalGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), assTextQuestionGUI\getSolutionOutput(), assTextSubsetGUI\getSolutionOutput(), ilSCORMOfflineMode\getSopManifestEntries(), ilDclBaseRecordModel\getStandardFieldHTML(), ILIAS\Membership\GlobalScreen\MembershipMainBarProvider\getStaticSubItems(), ILIAS\MyStaff\Provider\StaffMainBarProvider\getStaticSubItems(), ILIAS\Repository\Provider\RepositoryMainBarProvider\getStaticSubItems(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getStaticTopItems(), ilObjGlossaryGUI\getTemplate(), assMultipleChoiceGUI\getTestOutput(), assKprimChoiceGUI\getTestOutput(), assSingleChoiceGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutput(), assLongMenuGUI\getTextGapTemplate(), ilObjectListGUI\getTileImagePath(), ilPageObjectGUI\getTinyMenu(), ilLMGSToolProvider\getTocTool(), ilLMEditGSToolProvider\getToolsForContextStack(), ilLMGSToolProvider\getToolsForContextStack(), ilMediaPoolGSToolProvider\getToolsForContextStack(), ilCOPageEditGSToolProvider\getToolsForContextStack(), ilSkillGSToolProvider\getToolsForContextStack(), ilTaxonomyGSToolProvider\getToolsForContextStack(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getTopActions(), ilUserAvatarFile\getUrl(), ilLMPresentationGUI\ilMedia(), ilSCORM2004ScoGUI\import(), ilCloudPluginDeleteGUI\initDeleteItem(), ilLMPageObjectGUI\initEditLayoutForm(), ilObjGroupGUI\initForm(), ilForumThreadFormGUI\initForm(), ilConditionHandlerGUI\initFormCondition(), ilObjBookingPoolGUI\initHeaderAction(), ilObjCmiXapiGUI\initHeaderAction(), ilObjCourseGUI\initHeaderAction(), ilObjForumGUI\initHeaderAction(), ilObjGroupGUI\initHeaderAction(), ilObjLTIConsumerGUI\initHeaderAction(), ilObjStudyProgrammeGUI\initHeaderAction(), ilObjBlogGUI\initHeaderAction(), ilOnScreenChatGUI\initializeFrontend(), SurveyConstraintsTableGUI\initItems(), ilAwarenessGUI\initJS(), ilObjFileGUI\initMultiUploadForm(), ilObjUserFolderGUI\initNewAccountMailForm(), ilObjPortfolioGUI\initPDFSelectionForm(), ilWikiPageGUI\initPrintViewSelectionForm(), ilLMPresentationGUI\initScreenHead(), ilObjWikiGUI\initSettingsForm(), ilCloudPluginUploadGUI\initUploadForm(), ilCategoryWizardInputGUI\insert(), ilMatrixRowWizardInputGUI\insert(), ilColorPickerInputGUI\insert(), ilTRBLColorPickerInputGUI\insert(), ilObjLTIConsumerListGUI\insertIconsAndCheckboxes(), ilObjectListGUI\insertIconsAndCheckboxes(), ilObjOrgUnitListGUI\insertInfoScreenCommand(), ilObjectListGUI\insertInfoScreenCommand(), ilPropertyFormGUI\insertItem(), ilCourseObjectiveListGUI\insertProgressInfo(), ilObjectListGUI\insertTitle(), ilSAHSPresentationGUI\launchSahs(), ilSCORMPresentationGUI\launchSahs(), ilUserCertificateGUI\listCertificates(), ilGlossaryPresentationGUI\listDefinitions(), ilGlossaryTermGUI\listDefinitions(), ilGlossaryTermGUI\listUsages(), ilMStListCertificatesGUI\listUsers(), ilMStListCompetencesSkillsGUI\listUsers(), ilMStListCoursesGUI\listUsers(), ilMStListUsersGUI\listUsers(), ilPDSelectedItemsBlockGUI\manageObject(), ilGlossaryPresentationGUI\media(), ilObjMediaPoolSubItemListGUI\parseImage(), ilObjWorkflowEngineGUI\prepareAdminOutput(), ilDashboardGUI\prepareContentView(), ilGlossaryPresentationGUI\prepareOutput(), ilCalendarPresentationGUI\prepareOutput(), ilObjPortfolioGUI\printView(), ilGlossaryPresentationGUI\printViewSelection(), ilLMNavigationRendererGUI\render(), ilTable2GUI\render(), ilTableGUI\render(), ilProgressBar\render(), ilHierarchyFormGUI\renderChild(), ilRatingGUI\renderDetails(), ilCalendarSelectionBlockGUI\renderItem(), ilTestQuestionSideListGUI\renderList(), ilSCORM2004Asset\renderNavigation(), ilSurveyPageGUI\renderPage(), ilImagePathResolver\resolveImagePath(), ilPersonalSkillsGUI\selfEvaluation(), ilBadgeHandler\sendNotification(), ilLMPresentationGUI\setHeader(), ilImageLinkButton\setImage(), ilSAHSPresentationGUI\setInfoTabs(), ilSCORM2004NodeGUI\setLocator(), ilSkillTreeNodeGUI\setLocator(), ilSCORMOfflineModeGUI\setOfflineModeTabs(), ilObjTaxonomyGUI\setTabs(), ilPageLayoutGUI\setTabs(), ilObjFileBasedLMGUI\setTabs(), ilStructureObjectGUI\setTabs(), ilSCORM2004AssetGUI\setTabs(), ilSCORM2004ChapterGUI\setTabs(), ilSCORM2004PageNodeGUI\setTabs(), ilSCORM2004ScoGUI\setTabs(), ilSCORM2004SeqChapterGUI\setTabs(), ilObjSAHSLearningModuleGUI\setTabs(), ilObjMediaObjectGUI\setTabs(), ilSkillTemplateGUI\setTabs(), ilMainMenuGUI\setTemplateVars(), ilObjPortfolioGUI\setTitleAndDescription(), ilObjWorkspaceRootFolderGUI\setTitleAndDescription(), ilObjLanguageExtGUI\setTitleAndDescription(), ilObjUserGUI\setTitleAndDescription(), ilNewsTimelineGUI\show(), ilDerivedTasksGUI\show(), ilObjGlossaryGUI\showActions(), ilLMObjectGUI\showActions(), ilObjContentObjectGUI\showActions(), ilContentStyleSettingsGUI\showActions(), ilObjUserFolderGUI\showActions(), ilObjWorkspaceFolderGUI\showAdministrationPanel(), ilContainerGUI\showAdministrationPanel(), ilPasswordAssistanceGUI\showAssignPasswordForm(), ilPasswordAssistanceGUI\showAssistanceForm(), ilStartUpGUI\showCASLoginForm(), ilGlossaryPresentationGUI\showDownloadList(), ilLTIConsumerContentGUI\showEmbedded(), ilCalendarMonthGUI\showEvents(), ilCalendarDayGUI\showFulldayAppointment(), ilCalendarWeekGUI\showFulldayAppointment(), ilObjMediaCastGUI\showGallery(), ilMailGUI\showHeader(), ilStructureObjectGUI\showHierarchy(), ilInternalLinkGUI\showLinkHelp(), ilObjMediaPoolGUI\showMedia(), ilPasswordAssistanceGUI\showMessageForm(), ilObjSCORM2004LearningModuleGUI\showOrganization(), ilSCORM2004NodeGUI\showOrganization(), ilPageObjectGUI\showPage(), ilContainerGUI\showPasteTreeObject(), ilLMPresentationGUI\showPrintView(), ilLMPresentationGUI\showPrintViewSelection(), ilMailSearchGUI\showResults(), ilChatroomViewGUI\showRoom(), ilAssQuestionSkillAssignmentsGUI\showSkillSelectionCmd(), ilCourseContentGUI\showStartObjects(), ilContactGUI\showSubTabs(), ilObjectCopyGUI\showTargetSelectionTree(), ilObjSCORM2004LearningModuleGUI\showTree(), ilMailFolderGUI\showUser(), ilPasswordAssistanceGUI\showUsernameAssistanceForm(), ilCourseContentGUI\showUserTimings(), ilStructureObjectGUI\subchap(), assFormulaQuestion\substituteVariables(), and ilObjTestGUI\uploadTstObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getImageTagByType()

static ilUtil::getImageTagByType (   $a_type,
  $a_path,
  $a_big = false 
)
static

Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Code to your template file @access public.

Parameters
stringobject type
stringtpl path

Definition at line 52 of file class.ilUtil.php.

53 {
54 global $DIC;
55
56 $lng = $DIC->language();
57
58 $size = ($a_big)
59 ? "big"
60 : "small";
61
62 include_once("./Services/Object/classes/class.ilObject.php");
63 $filename = ilObject::_getIcon("", $size, $a_type);
64
65 return "<img src=\"" . $filename . "\" alt=\"" . $lng->txt("obj_" . $a_type) . "\" title=\"" . $lng->txt("obj_" . $a_type) . "\" border=\"0\" vspace=\"0\"/>";
66 }
$filename
Definition: buildRTE.php:89
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.

References $DIC, $filename, $lng, $size, and ilObject\_getIcon().

Referenced by ilObjMediaPoolGUI\confirmRemove(), ilObjContentObjectGUI\delete(), ilObjStyleSheetGUI\deleteObject(), ilPageLayoutAdministrationGUI\deletePgl(), ilContentStyleSettingsGUI\deleteStyle(), ilObjSCORMLearningModuleGUI\deleteTrackingForUser(), ilObjTypeDefinitionGUI\displayList(), ilObjTypeDefinitionGUI\editObject(), and ilObjSCORMLearningModuleGUI\stopUserOfflineMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJavaPath()

static ilUtil::getJavaPath ( )
static

get full java path (dir + java command)

Definition at line 2120 of file class.ilUtil.php.

2121 {
2122 return PATH_TO_JAVA;
2123 //global $ilias;
2124
2125 //return $ilias->getSetting("java_path");
2126 }

◆ getJSLocation()

static ilUtil::getJSLocation (   $a_js_name,
  $a_js_location = "",
  $add_version = false 
)
static

get full javascript file name (path inclusive) of current user

Parameters
$a_js_namestring The name of the js file
$a_js_locationstring The location of the js file e.g. a module path
$add_versionboolean Add version information to the filename @access public

Definition at line 238 of file class.ilUtil.php.

239 {
240 global $DIC;
241
242 $ilSetting = $DIC->settings();
243
244 // add version as parameter to force reload for new releases
245 $js_name = $a_js_name;
246 if (strlen($a_js_location) && (strcmp(substr($a_js_location, -1), "/") != 0)) {
247 $a_js_location = $a_js_location . "/";
248 }
249
250 $filename = "";
251 // use ilStyleDefinition instead of account to get the current skin
252 require_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
253 if (ilStyleDefinition::getCurrentSkin() != "default") {
254 $filename = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . $a_js_location . $js_name;
255 }
256 if (strlen($filename) == 0 || !file_exists($filename)) {
257 $filename = "./" . $a_js_location . "templates/default/" . $js_name;
258 }
259 return $filename;
260 }

References $DIC, $filename, $ilSetting, and ilStyleDefinition\getCurrentSkin().

+ Here is the call graph for this function:

◆ getMemString()

static ilUtil::getMemString ( )
static

get current memory usage as string

Definition at line 3379 of file class.ilUtil.php.

3380 {
3381 $my_pid = getmypid();
3382 return ("MEMORY USAGE (% KB PID ): " . `ps -eo%mem,rss,pid | grep $my_pid`);
3383 }

◆ getMySQLTimestamp()

static ilUtil::getMySQLTimestamp (   $a_ts)
static

Get MySQL timestamp in 4.1.x or higher format (yyyy-mm-dd hh:mm:ss) This function converts a timestamp, if MySQL 4.0 is used.

Parameters
stringMySQL timestamp string
Returns
string MySQL 4.1.x timestamp string

Definition at line 4457 of file class.ilUtil.php.

4458 {
4459 global $DIC;
4460
4461 $ilDB = $DIC->database();
4462
4463 return $a_ts;
4464 }

References $DIC, and $ilDB.

Referenced by ilExSubmission\getLastOpeningHTMLView(), and ilExSubmission\getLastSubmission().

+ Here is the caller graph for this function:

◆ getNewContentStyleSheetLocation()

static ilUtil::getNewContentStyleSheetLocation (   $mode = "output")
static

get full style sheet file name (path inclusive) of current user

@access public

Definition at line 294 of file class.ilUtil.php.

295 {
296 global $DIC;
297
298 $ilSetting = $DIC->settings();
299
300 // use ilStyleDefinition instead of account to get the current skin and style
301 require_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
302 if (ilStyleDefinition::getCurrentSkin() == "default") {
303 $in_style = "./templates/" . ilStyleDefinition::getCurrentSkin() . "/"
304 . ilStyleDefinition::getCurrentStyle() . "_cont.css";
305 } else {
306 $in_style = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/"
307 . ilStyleDefinition::getCurrentStyle() . "_cont.css";
308 }
309
310 if (is_file("./" . $in_style)) {
311 return $in_style;
312 } else {
313 return "templates/default/delos_cont.css";
314 }
315 }

References $DIC, $ilSetting, ilStyleDefinition\getCurrentSkin(), and ilStyleDefinition\getCurrentStyle().

Referenced by ilTinyMCE\addCustomRTESupport(), ilTinyMCE\addRTESupport(), ilTinyMCE\addUserTextEditor(), ilDataCollectionGlobalTemplate\fillNewContentStyle(), ilCOPageGlobalTemplate\fillNewContentStyle(), ilRTEGlobalTemplate\fillNewContentStyle(), ilGlobalTemplate\fillNewContentStyle(), and ilGlobalPageTemplate\prepareBasicCSS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getP3PLocation()

static ilUtil::getP3PLocation ( )
static

Get p3p file path.

(Not in use yet, see class.ilTemplate.php->show())

@access public

Definition at line 269 of file class.ilUtil.php.

270 {
271 if (defined("ILIAS_MODULE")) {
272 $base = '';
273 for ($i = 0;$i < count(explode('/', ILIAS_MODULE));$i++) {
274 $base .= "../Services/Privacy/";
275 }
276 } else {
277 $base = "./Services/Privacy/";
278 }
279
280 if (is_file($base . "w3c/p3p.xml")) {
281 return ILIAS_HTTP_PATH . "w3c/p3p.xml";
282 } else {
283 return ILIAS_HTTP_PATH . "/w3c/p3p_template.xml";
284 }
285 }
$base
Definition: index.php:4
const ILIAS_MODULE
Definition: server.php:14

References $base, $i, and ILIAS_MODULE.

◆ getPasswordRequirementsInfo()

static ilUtil::getPasswordRequirementsInfo ( )
static

infotext for ilPasswordInputGUI setInfo()

@global <type> $lng

Returns
<string> info about allowed chars for password

Definition at line 1264 of file class.ilUtil.php.

1265 {
1266 global $DIC;
1267
1268 $lng = $DIC->language();
1269
1270 include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1272
1273 $infos = array(sprintf($lng->txt('password_allow_chars'), self::getPasswordValidChars(false)));
1274
1275 // check if password to short
1276 if ($security->getPasswordMinLength() > 0) {
1277 $infos[] = sprintf($lng->txt('password_to_short'), $security->getPasswordMinLength());
1278 }
1279
1280 // check if password not to long
1281 if ($security->getPasswordMaxLength() > 0) {
1282 $infos[] = sprintf($lng->txt('password_to_long'), $security->getPasswordMaxLength());
1283 }
1284
1285 // if password must contains Chars and Numbers
1286 if ($security->isPasswordCharsAndNumbersEnabled()) {
1287 $infos[] = $lng->txt('password_must_chars_and_numbers');
1288 }
1289
1290 // if password must contains Special-Chars
1291 if ($security->isPasswordSpecialCharsEnabled()) {
1292 $infos[] = $lng->txt('password_must_special_chars');
1293 }
1294
1295 if ($security->getPasswordNumberOfUppercaseChars() > 0) {
1296 $infos[] = sprintf($lng->txt('password_must_contain_ucase_chars'), $security->getPasswordNumberOfUppercaseChars());
1297 }
1298
1299 if ($security->getPasswordNumberOfLowercaseChars() > 0) {
1300 $infos[] = sprintf($lng->txt('password_must_contain_lcase_chars'), $security->getPasswordNumberOfLowercaseChars());
1301 }
1302
1303 return implode('<br />', $infos);
1304 }

References $DIC, $lng, and ilSecuritySettings\_getInstance().

Referenced by ilUserProfile\addStandardFieldsToForm(), ilPasswordAssistanceGUI\getAssignPasswordForm(), ilPersonalSettingsGUI\initPasswordForm(), and ilPDNewsBlockGUI\initPrivateSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPasswordValidChars()

static ilUtil::getPasswordValidChars (   $a_as_regex = true,
  $a_only_special_chars = false 
)
static

All valid chars for password.

Parameters
bool$a_as_regex
bool$a_only_special_chars
Returns
string

Definition at line 1244 of file class.ilUtil.php.

1245 {
1246 if ($a_as_regex) {
1247 if ($a_only_special_chars) {
1248 return '/[_\.\+\?\#\-\*\@!\$\%\~\/\:\;]+/';
1249 } else {
1250 return '/^[A-Za-z0-9_\.\+\?\#\-\*\@!\$\%\~\/\:\;]+$/';
1251 }
1252 } else {
1253 return 'A-Z a-z 0-9 _.+?#-*@!$%~/:;';
1254 }
1255 }

◆ getSafeFilename()

static ilUtil::getSafeFilename (   $a_initial_filename)
static
Parameters
string$a_initial_filename
Returns
mixed|string

Definition at line 3528 of file class.ilUtil.php.

3529 {
3530 $file_peaces = explode('.', $a_initial_filename);
3531
3532 $file_extension = array_pop($file_peaces);
3533
3534 if (SUFFIX_REPL_ADDITIONAL) {
3535 $string_extensions = SUFFIX_REPL_DEFAULT . "," . SUFFIX_REPL_ADDITIONAL;
3536 } else {
3537 $string_extensions = SUFFIX_REPL_DEFAULT;
3538 }
3539
3540 $sufixes = explode(",", $string_extensions);
3541
3542 if (in_array($file_extension, $sufixes)) {
3543 $file_extension = "sec";
3544 }
3545
3546 array_push($file_peaces, $file_extension);
3547
3548 $safe_filename = "";
3549 foreach ($file_peaces as $piece) {
3550 $safe_filename .= "$piece";
3551 if ($piece != end($file_peaces)) {
3552 $safe_filename .= ".";
3553 }
3554 }
3555
3556 return $safe_filename;
3557 }

Referenced by ilExAssignment\instructionFileInsertOrder().

+ Here is the caller graph for this function:

◆ getSecureTags()

static ilUtil::getSecureTags ( )
static

Definition at line 2486 of file class.ilUtil.php.

2487 {
2488 return array("strong", "em", "u", "strike", "ol", "li", "ul", "p", "div",
2489 "i", "b", "code", "sup", "sub", "pre", "gap", "a", "img", "bdo");
2490 }

Referenced by ilAssSelfAssessmentQuestionFormatter\getSelfAssessmentTags(), and secureString().

+ Here is the caller graph for this function:

◆ getSelectName()

static ilUtil::getSelectName (   $selected,
  $values 
)
static

???

@access public

Parameters
string
string

Definition at line 423 of file class.ilUtil.php.

424 {
425 return($values[$selected]);
426 }

◆ getStyleSheetLocation()

static ilUtil::getStyleSheetLocation (   $mode = "output",
  $a_css_name = "",
  $a_css_location = "" 
)
static

get full style sheet file name (path inclusive) of current user

Parameters
$modestring Output mode of the style sheet ("output" or "filesystem"). !"filesystem" generates the ILIAS version number as attribute to force the reload of the style sheet in a different ILIAS version
$a_css_namestring The name of the style sheet. If empty, the default style name will be chosen
$a_css_locationstring The location of the style sheet e.g. a module path. This parameter only makes sense when $a_css_name is used @access public

Definition at line 192 of file class.ilUtil.php.

193 {
194 global $DIC;
195
196 $ilSetting = $DIC->settings();
197
198 // add version as parameter to force reload for new releases
199 // use ilStyleDefinition instead of account to get the current style
200 require_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
201 $stylesheet_name = (strlen($a_css_name))
202 ? $a_css_name
204 if (strlen($a_css_location) && (strcmp(substr($a_css_location, -1), "/") != 0)) {
205 $a_css_location = $a_css_location . "/";
206 }
207
208 $filename = "";
209 // use ilStyleDefinition instead of account to get the current skin
210 require_once("./Services/Style/System/classes/class.ilStyleDefinition.php");
211 if (ilStyleDefinition::getCurrentSkin() != "default") {
212 $filename = "./Customizing/global/skin/" . ilStyleDefinition::getCurrentSkin() . "/" . $a_css_location . $stylesheet_name;
213 }
214 if (strlen($filename) == 0 || !file_exists($filename)) {
215 $filename = "./" . $a_css_location . "templates/default/" . $stylesheet_name;
216 }
217 $skin_version_appendix = "";
218 if ($mode !== "filesystem") {
219 // use version from template xml to force reload on changes
221 $skin_version = $skin->getVersion();
222 $skin_version_appendix .= ($skin_version !== '' ? str_replace(".", "-", $skin_version) : '0');
223 $skin_version_appendix = "?skin_version=" . $skin_version_appendix;
224 }
225 return $filename . $skin_version_appendix;
226 }

References $DIC, $filename, $ilSetting, ilStyleDefinition\getCurrentSkin(), ilStyleDefinition\getCurrentStyle(), and ilStyleDefinition\getSkins().

Referenced by ilExport\_generateIndexFile(), ilTinyMCE\addRTESupport(), ilCharSelectorGUI\addToPage(), ilTinyMCE\addUserTextEditor(), ilSCORMPresentationGUI\contentSelect(), ilObjTest\deliverPDFfromHTML(), ilTestEvaluationGUI\detailedEvaluation(), ilPageObjectGUI\displayMedia(), ilSCORMOfflineModeGUI\executeCommand(), ilObjSurveyGUI\executeCommand(), ilObjSurveyQuestionPoolGUI\executeCommand(), ilObjQuestionPoolGUI\executeCommand(), ilSAHSPresentationGUI\explorer(), ilSCORMPresentationGUI\explorer(), ilObjContentObjectGUI\explorer(), ilSystemStyleHTMLExport\export(), ilForumExportGUI\exportHTML(), ilSAHSPresentationGUI\finishSahs(), ilSCORMPresentationGUI\finishSahs(), ILIAS\COPage\Editor\Components\Page\PageQueryActionHandler\getConfig(), ILIAS\Blog\Export\BlogHtmlExport\getInitialisedTemplate(), ILIAS\Portfolio\Export\PortfolioHtmlExport\getInitialisedTemplate(), ilExplorer\getOutput(), ilSCORM13PlayerGUI\getPlayer(), ilCOPageHTMLExport\getPreparedMainTemplate(), assMatchingQuestionGUI\getPreview(), ilSCORMOfflineMode\getSopManifestEntries(), ilPlugin\getStyleSheetLocation(), assMatchingQuestionGUI\getTestOutput(), ilFileUploadGUI\initFileUpload(), ilCOPageHTMLExport\initResourceTemplate(), ILIAS\LearningModule\Export\LMHtmlExport\initScreen(), ILIAS\Glossary\Export\GlossaryHtmlExport\initScreen(), ilLMPresentationGUI\layout(), ilGlossaryPresentationGUI\media(), ilTestPlayerAbstractGUI\outCorrectSolution(), ilTestServiceGUI\outCorrectSolution(), ilTestEvaluationGUI\outEvaluation(), ilTestEvaluationGUI\outParticipantsPassDetails(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilTestEvaluationGUI\outUserListOfAnswerPasses(), ilTestEvaluationGUI\outUserPassDetails(), ilTestEvaluationGUI\outUserResultsOverview(), ilLMPresentationGUI\page(), ilGlobalPageTemplate\prepareBasicCSS(), ilObjTestGUI\printobject(), ilForumExportGUI\printPost(), ilForumExportGUI\printThread(), ilObjPortfolioGUI\printView(), ilPortfolioPageGUI\renderConsultationHours(), ilObjTestGUI\reviewobject(), ilSCORM2004ScoGUI\sco_preview(), ilLMPresentationGUI\setSystemStyle(), ilMainMenuGUI\setTemplateVars(), ilFramesetGUI\show(), ilContainerLinkListGUI\show(), ilInternalLinkGUI\showLinkHelp(), ilContainerGUI\showLinkListObject(), ilTestPlayerAbstractGUI\showListOfAnswers(), ilObjMediaPoolGUI\showMedia(), ilPageObjectGUI\showMediaFullscreen(), ilObjMediaPoolGUI\showPage(), ilObjSCORM2004LearningModuleGUI\showTree(), ilRepositoryGUI\showTree(), ilParticipantsTestResultsGUI\showUserResults(), ilSCORM13PlayerGUI\specialPage(), ilSAHSPresentationGUI\unloadSahs(), ilSCORMPresentationGUI\unloadSahs(), ilSAHSPresentationGUI\view(), and ilSCORMPresentationGUI\view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSystemMessageHTML()

static ilUtil::getSystemMessageHTML (   $a_txt,
  $a_type = "info" 
)
static

Get HTML for a system message.

ATTENTION: This method is deprecated. Use MessageBox from the UI-framework instead.

Definition at line 4496 of file class.ilUtil.php.

4497 {
4498 global $DIC;
4499
4500 $lng = $DIC->language();
4501 $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
4502 $mtpl->setCurrentBlock($a_type . "_message");
4503 $mtpl->setVariable("TEXT", $a_txt);
4504 $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type . "_message"));
4505 $mtpl->parseCurrentBlock();
4506
4507 return $mtpl->get();
4508 }
special template class to simplify handling of ITX/PEAR

References $DIC, and $lng.

Referenced by ilGroupAddToGroupActionGUI\addUser(), ilCloudPluginCreateFolderGUI\asyncCreateFolder(), ilCloudPluginDeleteGUI\asyncDeleteItem(), ilObjCloudGUI\asyncGetBlock(), ilTestPasswordProtectionGUI\buildPasswordMsg(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilGroupAddToGroupActionGUI\confirmCreateGroupAndAddUser(), ilObjStudyProgrammeTreeGUI\create(), ilCloudPluginCreateFolderGUI\createFolder(), ilGroupAddToGroupActionGUI\createGroup(), ilGroupAddToGroupActionGUI\createGroupAndAddUser(), ilCloudPluginDeleteGUI\deleteItem(), ilDataCollectionGlobalTemplate\fillMessage(), ilCOPageGlobalTemplate\fillMessage(), ilRTEGlobalTemplate\fillMessage(), ilGlobalTemplate\fillMessage(), ILIAS\Services\UICore\MetaTemplate\PageContentGUI\fillMessage(), ilClassificationBlockGUI\filterContainer(), ilNewsTimelineGUI\getDeleteModal(), ilCalendarAgendaListGUI\getHTML(), ilTaggingGUI\getHTML(), ilNoteGUI\getNoteListHTML(), ilNoteGUI\getNotesHTML(), ilObjTestSettingsGeneralGUI\getSettingsTemplateMessageHTML(), ilInternalLinkGUI\getUserSearchResult(), ilAsyncNotifications\initJs(), ilTestPlayerDynamicQuestionSetGUI\outCurrentlyFinishedPage(), ilObjSurveyGUI\propertiesObject(), ilDclRecordEditGUI\save(), ilGroupAddToGroupActionGUI\selectParent(), ilDclRecordEditGUI\sendFailure(), and ilGroupAddToGroupActionGUI\show().

+ Here is the caller graph for this function:

◆ getTypeIconPath()

static ilUtil::getTypeIconPath (   $a_type,
  $a_obj_id,
  $a_size = 'small' 
)
static

Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Deprecated, use ilObject::_getIcon instead.

Parameters
string$a_typeobj_type
int$a_obj_idobj_id
string$a_sizesize 'tiny','small' or 'big'
Returns
string path
Deprecated:

Definition at line 80 of file class.ilUtil.php.

81 {
82 include_once("./Services/Object/classes/class.ilObject.php");
83 return ilObject::_getIcon($a_obj_id, $a_size, $a_type);
84 }

References ilObject\_getIcon().

Referenced by ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilAdministrationCommandGUI\delete(), ilSCTreeDuplicatesTableGUI\fillObjectRow(), ilECSImportedContentTableGUI\fillRow(), ilObjectCopyProgressTableGUI\fillRow(), ilObjectTableGUI\fillRow(), ilPathGUI\getHTML(), ilLPObjectStatisticsTypesTableGUI\getItems(), ilTrMatrixTableGUI\getSelectableColumns(), ilLPListOfSettingsGUI\handleLPUsageInfo(), ilCourseObjectivesGUI\initFormLimits(), ilPortfolioPageGUI\renderMyCourses(), and ilTestLearningObjectivesStatusGUI\renderStatus().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUploadSizeLimitBytes()

static ilUtil::getUploadSizeLimitBytes ( )
static

Definition at line 4328 of file class.ilUtil.php.

4329 {
4330 $uploadSizeLimitBytes = min(
4331 self::convertPhpIniSizeValueToBytes(ini_get('post_max_size')),
4332 self::convertPhpIniSizeValueToBytes(ini_get('upload_max_filesize'))
4333 );
4334
4335 return $uploadSizeLimitBytes;
4336 }

Referenced by ilObjContainerDAV\createFile(), and ilObjFileDAV\handleFileUpload().

+ Here is the caller graph for this function:

◆ getUsersOnline()

static ilUtil::getUsersOnline (   $a_user_id = 0)
static

reads all active sessions from db and returns users that are online OR returns only one active user if a user_id is given

Parameters
integeruser_id (optional)
Returns
array

Definition at line 1544 of file class.ilUtil.php.

1545 {
1546 include_once("./Services/User/classes/class.ilObjUser.php");
1547 return ilObjUser::_getUsersOnline($a_user_id);
1548 }

◆ getWebspaceDir()

static ilUtil::getWebspaceDir (   $mode = "filesystem")
static

get webspace directory

Parameters
string$modeuse "filesystem" for filesystem operations and "output" for output operations, e.g. images
Returns
string
Deprecated:
in favour of the filesystem service which should be used for operations on the web dir.
See also
\ILIAS\DI\Container::filesystem()
Filesystems::web()

Definition at line 1507 of file class.ilUtil.php.

1508 {
1509 if ($mode == "filesystem") {
1510 return "./" . ILIAS_WEB_DIR . "/" . CLIENT_ID;
1511 } else {
1512 if (defined("ILIAS_MODULE")) {
1513 return "../" . ILIAS_WEB_DIR . "/" . CLIENT_ID;
1514 } else {
1515 return "./" . ILIAS_WEB_DIR . "/" . CLIENT_ID;
1516 }
1517 }
1518 }
const CLIENT_ID
Definition: constants.php:39
const ILIAS_WEB_DIR
Definition: constants.php:43

References CLIENT_ID, and ILIAS_WEB_DIR.

Referenced by ilMathJax\__construct(), ilObjStyleSheet\_createImagesDirectory(), ilObjMediaObject\_createThumbnailDirectory(), ilObjFileBasedLMAccess\_determineStartUrl(), ilContainer\_getContainerDirectory(), ilObjMediaObject\_getDirectory(), ilObjStyleSheet\_getImagesDirectory(), ilChatroomAdminSmileyGUI\_getSmileyDir(), ilChatroomSmilies\_getSmileyDir(), ilObjMediaObject\_getThumbnailDirectory(), ilObjMediaObject\_getURL(), ilObjFileBasedLMAccess\_lookupDiskUsage(), ilObjSAHSLearningModuleAccess\_lookupDiskUsage(), ilPCTableGUI\_renderTable(), ilObjUser\_uploadPersonalPicture(), ilTestPlayerAbstractGUI\archiveParticipantSubmission(), ilObjMediaObjectGUI\assignFullscreenObject(), ilObjMediaObjectGUI\assignStandardObject(), ilCmiXapiLaunchGUI\buildLaunchLink(), ilTestSubmissionReviewGUI\buildPdfFilename(), ilContObjParser\copyMobFiles(), ilQuestionPageParser\copyMobFiles(), ilObjUser\copyProfilePicturesToDirectory(), ilContainer\createContainerDirectory(), ilObjSAHSLearningModule\createDataDirectory(), ilObjMediaObjectGUI\createDirectoryObject(), ilObjectCustomIconImpl\createFromImportDir(), ilObjectTileImage\createFromImportDir(), ilObjStyleSheet\delete(), ilObjMediaObjectGUI\deleteFileObject(), ilPublicUserProfileGUI\deliverVCard(), ilPageObjectGUI\displayMedia(), ilObjCmiXapi\doCloneObject(), ilObjCmiXapi\doDelete(), ilObjMediaObjectGUI\editFilesObject(), ilObjMediaObjectGUI\executeCommand(), ilObjMediaObject\exportFiles(), ilCOPageHTMLExport\exportHTMLMOB(), ilCOPageHTMLExport\exportQuestionFiles(), ilStudyProgrammeTypeCustomIconsFormGUI\fillForm(), ilStudyProgrammeTypeTableGUI\fillRow(), ilLTIConsumeProviderIcon\getAbsoluteFilePath(), ilCmiXapiContentUploadImporter\getAbsoluteObjectDirectory(), ilDidacticTemplateIconHandler\getAbsolutePath(), ilBadgeHandler\getBasePath(), ilObjStyleSheet\getContentStylePath(), ilObjFileBasedLM\getDataDirectory(), ilObjSAHSLearningModule\getDataDirectory(), ilObjMediaObject\getDataDirectory(), ilPublicUserProfileGUI\getEmbeddable(), ilObjectTileImage\getFullPath(), ilObjectCustomIconImpl\getFullPath(), ilOrgUnitType\getIconPath(), ilOpenIdConnectSettings\getImageFilePath(), ilImageMapEditorGUI\getImageMapOutput(), ilSCORMOfflineMode\getLmManifestEntries(), ilFileDataCourse\getOnlineLink(), ilFSStorageCourse\getOnlineLink(), ilUserXMLWriter\getPictureValue(), ilFSStorageMail\getRelativePathExMailDirectory(), ilLMPresentationGUI\ilMedia(), ilFileSystemStorage\init(), ilFileSystemStorage5069\init(), ilUserAvatarResolver\init(), ilUserCertificateGUI\listCertificates(), ilGlossaryPresentationGUI\media(), ilObjUser\removeUserPicture(), ilObjUserGUI\removeUserPictureObject(), ilCmiXapiContentUploadImporter\sanitizeObjectDirectory(), ilObjMediaPoolGUI\showMedia(), ilPageObjectGUI\showMediaFullscreen(), ilPageObjectGUI\showPage(), ilLMPresentationGUI\showPrintView(), ilObjMediaObjectGUI\uploadFileObject(), ilPersonalProfileGUI\uploadUserPicture(), ilObjUserGUI\uploadUserPictureObject(), ilObjStyleSheet\writeCSSFile(), and ilObjSAHSLearningModule\zipLmForOfflineMode().

+ Here is the caller graph for this function:

◆ groupNameExists()

static ilUtil::groupNameExists (   $a_group_name,
  $a_id = 0 
)
static

checks if group name already exists.

Groupnames must be unique for mailing purposes static function @access public

Parameters
stringgroupname
integerobj_id of group to exclude from the check.
Returns
boolean true if exists

Definition at line 3341 of file class.ilUtil.php.

3342 {
3343 global $DIC;
3344
3345 $ilDB = $DIC->database();
3346
3347 $ilErr = null;
3348 if (isset($DIC["ilErr"])) {
3349 $ilErr = $DIC["ilErr"];
3350 }
3351
3352 if (empty($a_group_name)) {
3353 $message = __METHOD__ . ": No groupname given!";
3354 $ilErr->raiseError($message, $ilErr->WARNING);
3355 }
3356
3357 $clause = ($a_id) ? " AND obj_id != " . $ilDB->quote($a_id) . " " : "";
3358
3359 $q = "SELECT obj_id FROM object_data " .
3360 "WHERE title = " . $ilDB->quote($a_group_name, "text") . " " .
3361 "AND type = " . $ilDB->quote("grp", "text") .
3362 $clause;
3363
3364 $r = $ilDB->query($q);
3365
3366 if ($r->numRows()) {
3367 return true;
3368 } else {
3369 return false;
3370 }
3371 }
$ilErr
Definition: raiseError.php:18
$message
Definition: xapiexit.php:14

References $DIC, $ilDB, $ilErr, and $message.

Referenced by ilGroupNameAsMailValidator\__construct(), ilMailAddressTypeHelperImpl\doesGroupNameExists(), and ilSoapGroupAdministration\groupExists().

+ Here is the caller graph for this function:

◆ htmlencodePlainString()

static ilUtil::htmlencodePlainString (   $a_str,
  $a_make_links_clickable,
  $a_detect_goto_links = false 
)
static

Encodes a plain text string into HTML for display in a browser.

This function encodes HTML special characters: < > & with < > & and converts newlines into

If $a_make_links_clickable is set to true, URLs in the plain string which are considered to be safe, are made clickable.

Parameters
stringthe plain text string
booleanset this to true, to make links in the plain string clickable.
booleanset this to true, to detect goto links

Definition at line 2585 of file class.ilUtil.php.

2586 {
2587 $encoded = "";
2588
2589 if ($a_make_links_clickable) {
2590 // Find text sequences in the plain text string which match
2591 // the URI syntax rules, and pass them to ilUtil::makeClickable.
2592 // Encode all other text sequences in the plain text string using
2593 // htmlspecialchars and nl2br.
2594 // The following expressions matches URI's as specified in RFC 2396.
2595 //
2596 // The expression matches URI's, which start with some well known
2597 // schemes, like "http:", or with "www.". This must be followed
2598 // by at least one of the following RFC 2396 expressions:
2599 // - alphanum: [a-zA-Z0-9]
2600 // - reserved: [;\/?:|&=+$,]
2601 // - mark: [\\-_.!~*\'()]
2602 // - escaped: %[0-9a-fA-F]{2}
2603 // - fragment delimiter: #
2604 // - uric_no_slash: [;?:@&=+$,]
2605 $matches = array();
2606 $numberOfMatches = preg_match_all('/(?:(?:http|https|ftp|ftps|mailto):|www\.)(?:[a-zA-Z0-9]|[;\/?:|&=+$,]|[\\-_.!~*\'()]|%[0-9a-fA-F]{2}|#|[;?:@&=+$,])+/', $a_str, $matches, PREG_OFFSET_CAPTURE);
2607 $pos1 = 0;
2608 $encoded = "";
2609
2610 foreach ($matches[0] as $match) {
2611 $matched_text = $match[0];
2612 $pos2 = $match[1];
2613
2614 // encode plain text
2615 $encoded .= nl2br(htmlspecialchars(substr($a_str, $pos1, $pos2 - $pos1)));
2616
2617 // encode URI
2618 $encoded .= ilUtil::makeClickable($matched_text, $a_detect_goto_links);
2619
2620
2621 $pos1 = $pos2 + strlen($matched_text);
2622 }
2623 if ($pos1 < strlen($a_str)) {
2624 $encoded .= nl2br(htmlspecialchars(substr($a_str, $pos1)));
2625 }
2626 } else {
2627 $encoded = nl2br(htmlspecialchars($a_str));
2628 }
2629 return $encoded;
2630 }
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen

References makeClickable().

Referenced by ilMailFolderTableGUI\fetchTableData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ htmlentitiesOutsideHTMLTags()

static ilUtil::htmlentitiesOutsideHTMLTags (   $htmlText)
static

Encodes HTML entities outside of HTML tags.

Definition at line 2092 of file class.ilUtil.php.

2093 {
2094 $matches = array();
2095 $sep = '###HTMLTAG###';
2096
2097 preg_match_all("@<[^>]*>@", $htmlText, $matches);
2098 $tmp = preg_replace("@(<[^>]*>)@", $sep, $htmlText);
2099 $tmp = explode($sep, $tmp);
2100
2101 for ($i = 0; $i < count($tmp); $i++) {
2102 $tmp[$i] = htmlentities($tmp[$i], ENT_COMPAT, "UTF-8");
2103 }
2104
2105 $tmp = join($sep, $tmp);
2106
2107 for ($i = 0; $i < count($matches[0]); $i++) {
2108 $tmp = preg_replace("@$sep@", $matches[0][$i], $tmp, 1);
2109 }
2110
2111 return $tmp;
2112 }

References $i.

◆ ilTempnam()

static ilUtil::ilTempnam (   $a_temp_path = null)
static

Returns a unique and non existing Path for e temporary file or directory.

Parameters
string$a_temp_path
Returns
string

Definition at line 1558 of file class.ilUtil.php.

1559 {
1560 if ($a_temp_path === null) {
1561 $temp_path = ilUtil::getDataDir() . "/temp";
1562 } else {
1563 $temp_path = $a_temp_path;
1564 }
1565
1566 if (!is_dir($temp_path)) {
1567 ilUtil::createDirectory($temp_path);
1568 }
1569 $temp_name = $temp_path . "/" . uniqid("tmp");
1570
1571 return $temp_name;
1572 }
static getDataDir()
get data directory (outside webspace)
static createDirectory($a_dir, $a_mod=0755)
create directory

References createDirectory(), and getDataDir().

Referenced by ilImagemapPreview\__construct(), ilTestExport\aggregatedResultsToExcel(), ilObjUserFolder\buildExportFile(), ilTestArchiveService\buildOverviewFilename(), ilVirusScanner\createBufferFile(), ilRestFileStorage\createFile(), ilAdvancedMDParser\createLocalRecord(), ilTestExportGUI\createTestArchiveExport(), ilExerciseManagementCollectFilesJob\createUniqueTempDirectory(), ilCopyWorkspaceFilesToTempDirectoryJob\createUniqueTempDirectory(), ilCopyFilesToTempDirectoryJob\createUniqueTempDirectory(), ilCalendarCopyFilesToTempDirectoryJob\createUniqueTempDirectory(), ilFileDataMail\deliverAttachmentsAsZip(), ilObjSurvey\deliverPDFfromFO(), ilObjTest\deliverPDFfromFO(), ilExSubmission\downloadMultipleFiles(), ilPageLayoutAdministrationGUI\exportLayout(), ilTestExport\exportToExcel(), ilHtmlToPdfTransformerFactory\generateTempPath(), ilAbstractHtmlToPdfTransformer\getTempFileName(), ilWkhtmlToPdfRenderer\getTempFileName(), ilScorm2004DataSet\getXmlRecord(), ilUserDataSet\getXmlRecord(), ilCloudPluginUploadGUI\handleFileUpload(), ilFileXMLParser\handlerBeginTag(), ilFileXMLParser\handlerEndTag(), assOrderingQuestionImport\handleUploadedFile(), ilImport\importObject(), ilDidacticTemplateSettingsGUI\importTemplate(), ilAssFileUploadUploadsExporter\initFilenames(), ilExSubmission\processUploadedZipFile(), ilGhostscriptRenderer\renderImages(), ilUserImportParser\saveTempImage(), ilExAssignment\sendMultiFeedbackStructureFile(), ilExcel\sendToClient(), ilRestFileStorage\storeFileForRest(), unzip(), ilECSConnector\updateResource(), ilCalendarCategoryGUI\uploadAppointments(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjLanguageExtGUI\uploadObject(), and ilExcel\writeToTmpFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ img()

static ilUtil::img (   $a_src,
  $a_alt = null,
  $a_width = "",
  $a_height = "",
  $a_border = 0,
  $a_id = "",
  $a_class = "" 
)
static

Build img tag.

Deprecated:

Definition at line 1892 of file class.ilUtil.php.

1893 {
1894 $img = '<img src="' . $a_src . '"';
1895 if (!is_null($a_alt)) {
1896 $img .= ' alt="' . htmlspecialchars($a_alt) . '"';
1897 }
1898 if ($a_width != "") {
1899 $img .= ' width="' . htmlspecialchars($a_width) . '"';
1900 }
1901 if ($a_height != "") {
1902 $img .= ' height="' . htmlspecialchars($a_height) . '"';
1903 }
1904 if ($a_class != "") {
1905 $img .= ' class="' . $a_class . '"';
1906 }
1907 if ($a_id != "") {
1908 $img .= ' id="' . $a_id . '"';
1909 }
1910 $img .= ' />';
1911
1912 return $img;
1913 }

References $img.

Referenced by ilLMChapterImportForm\addNode(), ilChatroomAdminSmileyGUI\deleteMultipleObject(), ilTable2GUI\fillHeader(), ilItemGroupItemsTableGUI\fillRow(), ilExportIDTableGUI\fillRow(), ilLMPagesTableGUI\fillRow(), ilMediaPoolTableGUI\fillRow(), ilClipboardTableGUI\fillRow(), ilPCIIMOverlaysTableGUI\fillRow(), ilObjClipboardTableGUI\fillRow(), ilAdminSubItemsTableGUI\fillRow(), ilSearchResultTableGUI\fillRow(), ilSkillAssignedObjectsTableGUI\fillRow(), ilSkillAssignMaterialsTableGUI\fillRow(), ilSkillCatTableGUI\fillRow(), ilSkillLevelResourcesTableGUI\fillRow(), ilSkillLevelTableGUI\fillRow(), ilListOfQuestionsTableGUI\fillRow(), ilCloudPluginItemCreationListGUI\getGroupedListItems(), ilObjectListGUI\getHeaderAction(), ILIAS\Repository\Provider\RepositoryMainBarProvider\getHomeItem(), ilDclMobRecordRepresentation\getHTML(), ilLMChapterImportForm\getHTML(), ilObjectAddNewItemGUI\getHTML(), ilMainMenuSearchGUI\getHTML(), ilObjContentObjectGUI\getLayoutOption(), ilNoteGUI\getNoteListHTML(), ilLMPageObjectGUI\initEditLayoutForm(), ilOnScreenChatGUI\initializeFrontend(), ilPCResourcesGUI\insertResourcesIntoPageContent(), ilObjMediaPoolSubItemListGUI\parseImage(), ilSCORM2004TrackingItemsTableGUI\parseValue(), ilSCORMTrackingItemsTableGUI\parseValue(), ilNestedListInputGUI\render(), ilExplorerBaseGUI\renderNode(), ilMainMenuGUI\setTemplateVars(), ilChatroomAdminSmileyGUI\showDeleteSmileyFormObject(), and ilObjMediaCastGUI\showGallery().

+ Here is the caller graph for this function:

◆ includeMathjax()

ilUtil::includeMathjax (   $a_tpl = null)

Include Mathjax.

Deprecated:

Definition at line 4148 of file class.ilUtil.php.

4149 {
4150 include_once './Services/MathJax/classes/class.ilMathJax.php';
4151 ilMathJax::getInstance()->includeMathJax($a_tpl);
4152 }

References ilMathJax\getInstance().

+ Here is the call graph for this function:

◆ infoPanel()

static ilUtil::infoPanel (   $a_keep = true)
static

Definition at line 4575 of file class.ilUtil.php.

4576 {
4577 global $DIC;
4578
4579 $tpl = $DIC["tpl"];
4580 $lng = $DIC->language();
4581 $ilUser = $DIC->user();
4582
4583 if (!empty($_SESSION["infopanel"]) and is_array($_SESSION["infopanel"])) {
4584 $tpl->addBlockFile(
4585 "INFOPANEL",
4586 "infopanel",
4587 "tpl.infopanel.html",
4588 "Services/Utilities"
4589 );
4590 $tpl->setCurrentBlock("infopanel");
4591
4592 if (!empty($_SESSION["infopanel"]["text"])) {
4593 $link = "<a href=\"" . $_SESSION["infopanel"]["link"] . "\" target=\"" .
4594 ilFrameTargetInfo::_getFrame("MainContent") .
4595 "\">";
4596 $link .= $lng->txt($_SESSION["infopanel"]["text"]);
4597 $link .= "</a>";
4598 }
4599
4600 // deactivated
4601 if (!empty($_SESSION["infopanel"]["img"])) {
4602 $link .= "<td><a href=\"" . $_SESSION["infopanel"]["link"] . "\" target=\"" .
4603 ilFrameTargetInfo::_getFrame("MainContent") .
4604 "\">";
4605 $link .= "<img src=\"" . "./templates/" . $ilUser->prefs["skin"] . "/images/" .
4606 $_SESSION["infopanel"]["img"] . "\" border=\"0\" vspace=\"0\"/>";
4607 $link .= "</a></td>";
4608 }
4609
4610 $tpl->setVariable("INFO_ICONS", $link);
4611 $tpl->parseCurrentBlock();
4612 }
4613
4614 //if (!$a_keep)
4615 //{
4616 ilSession::clear("infopanel");
4617 //}
4618 }
$_SESSION["AccountId"]
static _getFrame($a_class, $a_type='')
Get content frame name.
static clear($a_var)
Unset a value.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

References $_SESSION, $DIC, $ilUser, $lng, $tpl, ilFrameTargetInfo\_getFrame(), and ilSession\clear().

Referenced by ilLearningProgressBaseGUI\__buildHeader(), ilObjLinkResourceGUI\__prepareOutput(), ilObjRoleGUI\__prepareOutput(), ilPDNewsGUI\displayHeader(), ilPDNotesGUI\displayHeader(), ilDashboardGUI\prepareContentView(), ilObjectGUI\prepareOutput(), ilSearchBaseGUI\prepareOutput(), ilObjTestGUI\prepareSubGuiOutput(), and ilMailGUI\showHeader().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertInstIntoID()

static ilUtil::insertInstIntoID (   $a_value)
static

inserts installation id into ILIAS id

e.g. "il__pg_3" -> "il_43_pg_3"

Definition at line 3322 of file class.ilUtil.php.

3323 {
3324 if (substr($a_value, 0, 4) == "il__") {
3325 $a_value = "il_" . IL_INST_ID . "_" . substr($a_value, 4, strlen($a_value) - 4);
3326 }
3327
3328 return $a_value;
3329 }
const IL_INST_ID
Definition: constants.php:38

References IL_INST_ID.

Referenced by ilObjTest\modifyExportIdentifier(), ilObjQuestionPool\modifyExportIdentifier(), ilObjMediaObject\modifyExportIdentifier(), and ilMediaObjectDataSet\readData().

+ Here is the caller graph for this function:

◆ insertLatexImages()

static ilUtil::insertLatexImages (   $a_text,
  $a_start = '[tex]',
  $a_end = '[/tex]' 
)
static

replace [tex]...[/tex] tags with formula image code

Deprecated:

Definition at line 4158 of file class.ilUtil.php.

4159 {
4160 include_once './Services/MathJax/classes/class.ilMathJax.php';
4161 return ilMathJax::getInstance()->insertLatexImages($a_text, $a_start, $a_end);
4162 }

References ilMathJax\getInstance().

+ Here is the call graph for this function:

◆ is_email()

static ilUtil::is_email (   $a_email,
ilMailRfc822AddressParserFactory  $mailAddressParserFactory = null 
)
static

This preg-based function checks whether an e-mail address is formally valid.

It works with all top level domains including the new ones (.biz, .info, .museum etc.) and the special ones (.arpa, .int etc.) as well as with e-mail addresses based on IPs (e.g. webma.nosp@m.ster.nosp@m.@123..nosp@m.45.1.nosp@m.23.45) Valid top level domains: http://data.iana.org/TLD/tlds-alpha-by-domain.txt

Author
Unknown mail@.nosp@m.phil.nosp@m.ipp-l.nosp@m.ouis.nosp@m..de (source: http://www.php.net/preg_match) @access public
Parameters
stringemail address
ilMailRfc822AddressParserFactory | null$mailAddressParserFactory
Returns
bool true if valid

Definition at line 1082 of file class.ilUtil.php.

1083 {
1084 if (null === $a_email || !is_string($a_email)) {
1085 return false;
1086 }
1087
1088 if ($mailAddressParserFactory === null) {
1089 $mailAddressParserFactory = new ilMailRfc822AddressParserFactory();
1090 }
1091
1092 try {
1093 $parser = $mailAddressParserFactory->getParser((string) $a_email);
1094 $addresses = $parser->parse();
1095 return count($addresses) == 1 && $addresses[0]->getHost() != ilMail::ILIAS_HOST;
1096 } catch (ilException $e) {
1097 return false;
1098 }
1099 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilMailRfc822AddressParserFactory.
const ILIAS_HOST

References Vendor\Package\$e, and ilMail\ILIAS_HOST.

Referenced by ilMailAutoCompleteProviderEmailFilter\accept(), ilEMailInputGUI\checkInput(), ilCmiXapiUser\getIdent(), ilSurveyExecutionGUI\mailUserResults(), ilObjSurveyGUI\mailUserResultsObject(), ilPersonalProfileGUI\saveProfile(), ilObjSurvey\updateCode(), ilCalendarUserNotification\validate(), and ilObjCourse\validateInfoSettings().

+ Here is the caller graph for this function:

◆ isAPICall()

static ilUtil::isAPICall ( )
static

Definition at line 3647 of file class.ilUtil.php.

3648 {
3649 return strpos($_SERVER["SCRIPT_FILENAME"], "api") !== false ||
3650 strpos($_SERVER["SCRIPT_FILENAME"], "dummy") !== false;
3651 }

References $_SERVER.

Referenced by ilAdministrationGUI\__construct(), and ilRepositoryGUI\__construct().

+ Here is the caller graph for this function:

◆ isConvertVersionAtLeast()

static ilUtil::isConvertVersionAtLeast (   $a_version)
static

Compare convert version numbers.

Parameters
string$a_versionw.x.y-z
Returns
bool

Definition at line 1800 of file class.ilUtil.php.

1801 {
1802 $current_version = ilUtil::execQuoted(PATH_TO_CONVERT, "--version");
1803 $current_version = self::processConvertVersion($current_version[0]);
1804 $version = self::processConvertVersion($a_version);
1805 if ($current_version >= $version) {
1806 return true;
1807 }
1808 return false;
1809 }
static processConvertVersion($a_version)
Parse convert version string, e.g.

References execQuoted(), and processConvertVersion().

Referenced by ilObjUser\_uploadPersonalPicture(), ilPersonalProfileGUI\uploadUserPicture(), and ilObjUserGUI\uploadUserPictureObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isDN()

static ilUtil::isDN (   $a_str)
static

Definition at line 3973 of file class.ilUtil.php.

3974 {
3975 return(preg_match("/^[a-z]+([a-z0-9-]*[a-z0-9]+)?(\.([a-z]+([a-z0-9-]*[a-z0-9]+)?)+)*$/", $a_str));
3976 }

Referenced by ilRadiusSettings\validateServers().

+ Here is the caller graph for this function:

◆ isHTML()

static ilUtil::isHTML (   $a_text)
static

Checks if a given string contains HTML or not.

Parameters
string$a_textText which should be checked
Returns
boolean @access public

Definition at line 4234 of file class.ilUtil.php.

4235 {
4236 if (strlen(strip_tags($a_text)) < strlen($a_text)) {
4237 return true;
4238 }
4239
4240 return false;
4241 }

Referenced by assTextQuestion\getSolutionSubmit(), ilAssSelfAssessmentQuestionFormatter\handleLineBreaks(), assQuestion\isHTML(), and prepareTextareaOutput().

+ Here is the caller graph for this function:

◆ isIPv4()

static ilUtil::isIPv4 (   $a_str)
static

Definition at line 3979 of file class.ilUtil.php.

3980 {
3981 return(preg_match("/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\." .
3982 "(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/", $a_str));
3983 }

Referenced by ilRadiusSettings\validateServers().

+ Here is the caller graph for this function:

◆ isLogin()

static ilUtil::isLogin (   $a_login)
static

Definition at line 1312 of file class.ilUtil.php.

1313 {
1314 if (empty($a_login)) {
1315 return false;
1316 }
1317
1318 if (strlen($a_login) < 3) {
1319 return false;
1320 }
1321
1322 // FIXME - If ILIAS is configured to use RFC 822
1323 // compliant mail addresses we should not
1324 // allow the @ character.
1325 if (!preg_match("/^[A-Za-z0-9_\.\+\*\@!\$\%\~\-]+$/", $a_login)) {
1326 return false;
1327 }
1328
1329 return true;
1330 }

Referenced by ilUserLoginInputGUI\checkInput(), ilAuthProviderApache\doAuthentication(), ilAccountRegistrationGUI\saveForm(), and ilPersonalProfileGUI\updateLoginOrSetErrorMessages().

+ Here is the caller graph for this function:

◆ isPassword()

static ilUtil::isPassword (   $a_passwd,
$customError = null 
)
static

validates a password @access public

Parameters
stringpassword
Returns
boolean true if valid

Definition at line 1109 of file class.ilUtil.php.

1110 {
1111 global $DIC;
1112
1113 $lng = $DIC->language();
1114
1115 include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1117
1118 // check if password is empty
1119 if (empty($a_passwd)) {
1120 $customError = $lng->txt('password_empty');
1121 return false;
1122 }
1123
1124 $isPassword = true;
1125 $errors = array();
1126
1127 // check if password to short
1128 if ($security->getPasswordMinLength() > 0 && strlen($a_passwd) < $security->getPasswordMinLength()) {
1129 $errors[] = sprintf($lng->txt('password_to_short'), $security->getPasswordMinLength());
1130 $isPassword = false;
1131 }
1132
1133 // check if password not to long
1134 // Hmmmmm, maybe we should discuss this limitation. In my opinion it is stupid to limit the password length ;-). There should only be a technical limitation (field size in database).
1135 if ($security->getPasswordMaxLength() > 0 && strlen($a_passwd) > $security->getPasswordMaxLength()) {
1136 $errors[] = sprintf($lng->txt('password_to_long'), $security->getPasswordMaxLength());
1137 $isPassword = false;
1138 }
1139
1140 // if password must contains Chars and Numbers
1141 if ($security->isPasswordCharsAndNumbersEnabled()) {
1142 $hasCharsAndNumbers = true;
1143
1144 // check password for existing chars
1145 if (!preg_match('/[A-Za-z]+/', $a_passwd)) {
1146 $hasCharsAndNumbers = false;
1147 }
1148
1149 // check password for existing numbers
1150 if (!preg_match('/[0-9]+/', $a_passwd)) {
1151 $hasCharsAndNumbers = false;
1152 }
1153
1154 if (!$hasCharsAndNumbers) {
1155 $errors[] = $lng->txt('password_must_chars_and_numbers');
1156 $isPassword = false;
1157 }
1158 }
1159
1160 require_once 'Services/Utilities/classes/class.ilStr.php';
1161 if ($security->getPasswordNumberOfUppercaseChars() > 0) {
1162 if (ilStr::strLen($a_passwd) - ilStr::strLen(preg_replace('/[A-Z]/', '', $a_passwd)) < $security->getPasswordNumberOfUppercaseChars()) {
1163 $errors[] = sprintf($lng->txt('password_must_contain_ucase_chars'), $security->getPasswordNumberOfUppercaseChars());
1164 $isPassword = false;
1165 }
1166 }
1167
1168 if ($security->getPasswordNumberOfLowercaseChars() > 0) {
1169 if (ilStr::strLen($a_passwd) - ilStr::strLen(preg_replace('/[a-z]/', '', $a_passwd)) < $security->getPasswordNumberOfLowercaseChars()) {
1170 $errors[] = sprintf($lng->txt('password_must_contain_lcase_chars'), $security->getPasswordNumberOfLowercaseChars());
1171 $isPassword = false;
1172 }
1173 }
1174
1175 // if password must contains Special-Chars
1176 if ($security->isPasswordSpecialCharsEnabled()) {
1177 // check password for existing special-chars
1178 if (!preg_match(self::getPasswordValidChars(true, true), $a_passwd)) {
1179 $errors[] = $lng->txt('password_must_special_chars');
1180 $isPassword = false;
1181 }
1182 }
1183
1184 // ensure password matches the positive list of chars/special-chars
1185 if (!preg_match(self::getPasswordValidChars(), $a_passwd)) {
1186 $errors[] = $lng->txt('password_contains_invalid_chars');
1187 $isPassword = false;
1188 }
1189
1190 // build custom error message
1191 if (count($errors) == 1) {
1192 $customError = $errors[0];
1193 } elseif (count($errors) > 1) {
1194 $customError = $lng->txt('password_multiple_errors');
1195 $customError .= '<br />' . implode('<br />', $errors);
1196 }
1197
1198 return $isPassword;
1199 }
static strLen($a_string)
Definition: class.ilStr.php:78
$errors
Definition: imgupload.php:49

References $DIC, $errors, $lng, ilSecuritySettings\_getInstance(), and ilStr\strLen().

Referenced by ilPasswordInputGUI\checkInput(), and ilPersonalSettingsGUI\savePassword().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPasswordValidForUserContext()

static ilUtil::isPasswordValidForUserContext (   $clear_text_password,
  $user,
$error_language_variable = null 
)
static
Parameters
string$clear_text_passwordThe validated clear text password
ilObjUser | string | array$userCould be an instance of ilObjUser, the users' loginname as string, or an array containing the users' loginname and id
null | string$error_language_variable
Returns
bool

Definition at line 1207 of file class.ilUtil.php.

1208 {
1209 include_once 'Services/PrivacySecurity/classes/class.ilSecuritySettings.php';
1211
1212 $login = null;
1213
1214 if (is_string($user)) {
1215 $login = $user;
1216 } elseif (is_array($user)) {
1217 // Try to get loginname and user_id from array
1218 $login = $user['login'];
1219 $userId = $user['id'];
1220 } elseif ($user instanceof ilObjUser) {
1221 $login = $user->getLogin();
1222 $userId = $user->getId();
1223 }
1224
1225 // The user context (user instance or id) can be used for further validation (e.g. compare a password with the users' password history, etc.) in future releases.
1226
1227 if ($login && (int) $security->getPasswordMustNotContainLoginnameStatus() &&
1228 strpos(strtolower($clear_text_password), strtolower($login)) !== false
1229 ) {
1230 $error_language_variable = 'password_contains_parts_of_login_err';
1231 return false;
1232 }
1233
1234 return true;
1235 }
$login
Definition: cron.php:13

References $login, and ilSecuritySettings\_getInstance().

Referenced by ilAccountRegistrationGUI\saveForm(), ilPersonalSettingsGUI\savePassword(), and ilPasswordAssistanceGUI\submitAssignPasswordForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isWindows()

static ilUtil::isWindows ( )
static

check wether the current client system is a windows system

Definition at line 3391 of file class.ilUtil.php.

3392 {
3393 if (strtolower(substr(php_uname(), 0, 3)) == "win") {
3394 return true;
3395 }
3396 return false;
3397 }

Referenced by ilPreviewRenderer\createPreviewImage(), ilGitInformation\detect(), and execQuoted().

+ Here is the caller graph for this function:

◆ KT_replaceParam()

static ilUtil::KT_replaceParam (   $qstring,
  $paramName,
  $paramValue 
)
static

Definition at line 3653 of file class.ilUtil.php.

3654 {
3655 if (preg_match("/&" . $paramName . "=/", $qstring)) {
3656 return preg_replace("/&" . $paramName . "=[^&]+/", "&" . $paramName . "=" . urlencode($paramValue), $qstring);
3657 } else {
3658 return $qstring . "&" . $paramName . "=" . urlencode($paramValue);
3659 }
3660 }

Referenced by replaceUrlParameterString().

+ Here is the caller graph for this function:

◆ Linkbar()

static ilUtil::Linkbar (   $AScript,
  $AHits,
  $ALimit,
  $AOffset,
  $AParams = array(),
  $ALayout = array(),
  $prefix = '' 
)
static

Linkbar Diese Funktion erzeugt einen typischen Navigationsbalken mit "Previous"- und "Next"-Links und den entsprechenden Seitenzahlen.

die komplette LinkBar wird zur?ckgegeben der Variablenname f?r den offset ist "offset"

Author
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

@access public

Parameters
integerName der Skriptdatei (z.B. test.php)
integerAnzahl der Elemente insgesamt
integerAnzahl der Elemente pro Seite
integerDas aktuelle erste Element in der Liste
arrayDie zu ?bergebenen Parameter in der Form $AParams["Varname"] = "Varwert" (optional)
arraylayout options (all optional) link => css name for -tag prev => value for 'previous page' (default: '<<') next => value for 'next page' (default: '>>')
Returns
array linkbar or false on error

Definition at line 659 of file class.ilUtil.php.

660 {
661 $LinkBar = "";
662
663 $layout_link = "";
664 $layout_prev = "&lt;&lt;";
665 $layout_next = "&gt;&gt;";
666
667 // layout options
668 if ((is_array($ALayout) && (count($ALayout) > 0))) {
669 if ($ALayout["link"]) {
670 $layout_link = " class=\"" . $ALayout["link"] . "\"";
671 }
672
673 if ($ALayout["prev"]) {
674 $layout_prev = $ALayout["prev"];
675 }
676
677 if ($ALayout["next"]) {
678 $layout_next = $ALayout["next"];
679 }
680 }
681
682 // show links, if hits greater limit
683 // or offset > 0 (can be > 0 due to former setting)
684 if ($AHits > $ALimit || $AOffset > 0) {
685 if (!empty($AParams)) {
686 foreach ($AParams as $key => $value) {
687 $params .= $key . "=" . $value . "&";
688 }
689 }
690 // if ($params) $params = substr($params,0,-1);
691 if (strpos($AScript, '&')) {
692 $link = $AScript . "&" . $params . $prefix . "offset=";
693 } else {
694 $link = $AScript . "?" . $params . $prefix . "offset=";
695 }
696
697 // ?bergehe "zurck"-link, wenn offset 0 ist.
698 if ($AOffset >= 1) {
699 $prevoffset = $AOffset - $ALimit;
700 if ($prevoffset < 0) {
701 $prevoffset = 0;
702 }
703 $LinkBar .= "<a" . $layout_link . " href=\"" . $link . $prevoffset . "\">" . $layout_prev . "&nbsp;</a>";
704 }
705
706 // Ben?tigte Seitenzahl kalkulieren
707 $pages = intval($AHits / $ALimit);
708
709 // Wenn ein Rest bleibt, addiere eine Seite
710 if (($AHits % $ALimit)) {
711 $pages++;
712 }
713
714 // Bei Offset = 0 keine Seitenzahlen anzeigen : DEAKTIVIERT
715 // if ($AOffset != 0) {
716
717 // ansonsten zeige Links zu den anderen Seiten an
718 for ($i = 1 ;$i <= $pages ; $i++) {
719 $newoffset = $ALimit * ($i - 1);
720
721 if ($newoffset == $AOffset) {
722 $LinkBar .= "[" . $i . "] ";
723 } else {
724 $LinkBar .= '<a ' . $layout_link . ' href="' .
725 $link . $newoffset . '">[' . $i . ']</a> ';
726 }
727 }
728 // }
729
730 // Checken, ob letze Seite erreicht ist
731 // Wenn nicht, gebe einen "Weiter"-Link aus
732 if (!(($AOffset / $ALimit) == ($pages - 1)) && ($pages != 1)) {
733 $newoffset = $AOffset + $ALimit;
734 $LinkBar .= "<a" . $layout_link . " href=\"" . $link . $newoffset . "\">&nbsp;" . $layout_next . "</a>";
735 }
736
737 return $LinkBar;
738 } else {
739 return false;
740 }
741 }

References $i.

Referenced by ilTableGUI\render().

+ Here is the caller graph for this function:

◆ makeClickable()

static ilUtil::makeClickable (   $a_text,
  $detectGotoLinks = false 
)
static

makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen

@access public

Parameters
string$text,Der Text
boolean$detectGotoLinksif true, internal goto-links will be retargeted to _self and text is replaced by title
Returns
string clickable link

Definition at line 754 of file class.ilUtil.php.

755 {
756 // New code, uses MediaWiki Sanitizer
757 $ret = $a_text;
758 // www-URL ohne ://-Angabe
759 $ret = preg_replace(
760 "/(^|[\s]+)(www\.)([A-Za-z0-9#&=?.\/\-]+)/i",
761 "$1http://$2$3",
762 $ret
763 );
764
765 // ftp-URL ohne ://-Angabe
766 $ret = preg_replace(
767 "/(^|[\s]+)(ftp\.)([A-Za-z0-9#&=?.\/\-]+)/i",
768 "$1ftp://$2$3",
769 $ret
770 );
771
772 // E-Mail (this does not work as expected, users must add mailto: manually)
773 //$ret = preg_replace("/(([a-z0-9_]|\-|\.)+@([^[\s]*)([A-Za-z0-9\-]))/i",
774 // "mailto:$1", $ret);
775
776 // mask existing image tags
777 $ret = str_replace('src="http://', '"***masked_im_start***', $ret);
778
779 include_once("./Services/Utilities/classes/class.ilMWParserAdapter.php");
780 $global_wgContLang = $GLOBALS["wgContLang"];
781 $GLOBALS["wgContLang"] = new ilMWFakery();
782 $parser = new ilMWParserAdapter();
783 $ret = $parser->replaceFreeExternalLinks($ret);
784
785 // unmask existing image tags
786 $ret = str_replace('"***masked_im_start***', 'src="http://', $ret);
787
788 // Should be Safe
789
790 if ($detectGotoLinks) {
791 // replace target blank with self and text with object title.
792 $regExp = "<a[^>]*href=\"(" . str_replace("/", "\/", ILIAS_HTTP_PATH) . "\/goto.php\?target=\w+_(\d+)[^\"]*)\"[^>]*>[^<]*<\/a>";
793 // echo htmlentities($regExp);
794 $ret = preg_replace_callback(
795 "/" . $regExp . "/i",
796 array("ilUtil", "replaceLinkProperties"),
797 $ret
798 );
799
800 // Static links
801 $regExp = "<a[^>]*href=\"(" . str_replace("/", "\/", ILIAS_HTTP_PATH) . "\/goto_.*[a-z0-9]+_([0-9]+)\.html)\"[^>]*>[^<]*<\/a>";
802 // echo htmlentities($regExp);
803 $ret = preg_replace_callback(
804 "/" . $regExp . "/i",
805 array("ilUtil", "replaceLinkProperties"),
806 $ret
807 );
808 }
809 $GLOBALS["wgContLang"] = $global_wgContLang;
810 return($ret);
811 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

References $GLOBALS, and $ret.

Referenced by ilAppointmentPresentationGUI\addEventDescription(), ilMimeMail\buildBodyMultiParts(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilCourseRegistrationGUI\fillInformations(), ilGroupRegistrationGUI\fillInformations(), ilPDNewsTableGUI\fillRow(), ilCalendarAppointmentPanelGUI\getHTML(), ilADTExternalLinkPresentationBridge\getHTML(), ilExAssignment\getInstructionPresentation(), htmlencodePlainString(), ilObjCourseGUI\infoScreen(), ilObjGroupGUI\infoScreen(), ilObjSessionGUI\infoScreen(), ilNewsDefaultRendererGUI\makeClickable(), ilNewsForContextBlockGUI\makeClickable(), and ilPDNewsTableGUI\makeClickable().

+ Here is the caller graph for this function:

◆ makeDateSelect()

static ilUtil::makeDateSelect (   $prefix,
  $year = "",
  $month = "",
  $day = "",
  $startyear = "",
  $a_long_month = true,
  $a_further_options = array(),
  $emptyoption = false 
)
static

Creates a combination of HTML selects for date inputs.

Creates a combination of HTML selects for date inputs The select names are $prefix[y] for years, $prefix[m] for months and $prefix[d] for days.

@access public

Parameters
string$prefixPrefix of the select name
integer$yearDefault value for year select
integer$monthDefault value for month select
integer$dayDefault value for day select
Returns
string HTML select boxes
Author
Aresch Yavari ay@da.nosp@m.taba.nosp@m.y.de
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.tzi.d.nosp@m.e

Definition at line 859 of file class.ilUtil.php.

860 {
861 global $DIC;
862
863 $lng = $DIC->language();
864
865 $disabled = '';
866 if (isset($a_further_options['disabled']) and $a_further_options['disabled']) {
867 $disabled = 'disabled="disabled" ';
868 }
869
870 $now = getdate();
871 if (!$emptyoption) {
872 if (!strlen($year)) {
873 $year = $now["year"];
874 }
875 if (!strlen($month)) {
876 $month = $now["mon"];
877 }
878 if (!strlen($day)) {
879 $day = $now["mday"];
880 }
881 }
882
883 $year = (int) $year;
884 $month = (int) $month;
885 $day = (int) $day;
886
887 // build day select
888
889 $sel_day .= '<select class="form-control" ';
890 if (isset($a_further_options['select_attributes'])) {
891 foreach ($a_further_options['select_attributes'] as $name => $value) {
892 $sel_day .= ($name . '="' . $value . '" ');
893 }
894 }
895
896 $sel_day .= $disabled . "name=\"" . $prefix . "[d]\" id=\"" . $prefix . "_d\">\n";
897
898 if ($emptyoption) {
899 $sel_day .= "<option value=\"0\">--</option>\n";
900 }
901 for ($i = 1; $i <= 31; $i++) {
902 $sel_day .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
903 }
904 $sel_day .= "</select>\n";
905 $sel_day = preg_replace("/(value\=\"$day\")/", "$1 selected=\"selected\"", $sel_day);
906
907 // build month select
908 $sel_month = '<select class="form-control" ';
909 if (isset($a_further_options['select_attributes'])) {
910 foreach ($a_further_options['select_attributes'] as $name => $value) {
911 $sel_month .= ($name . '="' . $value . '" ');
912 }
913 }
914 $sel_month .= $disabled . "name=\"" . $prefix . "[m]\" id=\"" . $prefix . "_m\">\n";
915
916 if ($emptyoption) {
917 $sel_month .= "<option value=\"0\">--</option>\n";
918 }
919 for ($i = 1; $i <= 12; $i++) {
920 if ($a_long_month) {
921 $sel_month .= "<option value=\"$i\">" . $lng->txt("month_" . sprintf("%02d", $i) . "_long") . "</option>\n";
922 } else {
923 $sel_month .= "<option value=\"$i\">" . $i . "</option>\n";
924 }
925 }
926 $sel_month .= "</select>\n";
927 $sel_month = preg_replace("/(value\=\"$month\")/", "$1 selected=\"selected\"", $sel_month);
928
929 // build year select
930 $sel_year = '<select class="form-control" ';
931 if (isset($a_further_options['select_attributes'])) {
932 foreach ($a_further_options['select_attributes'] as $name => $value) {
933 $sel_year .= ($name . '="' . $value . '" ');
934 }
935 }
936 $sel_year .= $disabled . "name=\"" . $prefix . "[y]\" id=\"" . $prefix . "_y\">\n";
937 if ((strlen($startyear) == 0) || ($startyear > $year)) {
938 if (!$emptyoption || $year != 0) {
939 $startyear = $year - 5;
940 }
941 }
942
943 if (($year + 5) < (date('Y', time()) + 5)) {
944 $end_year = date('Y', time()) + 5;
945 } else {
946 $end_year = $year + 5;
947 }
948
949 if ($emptyoption) {
950 $sel_year .= "<option value=\"0\">----</option>\n";
951 }
952 for ($i = $startyear; $i <= $end_year; $i++) {
953 $sel_year .= "<option value=\"$i\">" . sprintf("%04d", $i) . "</option>\n";
954 }
955 $sel_year .= "</select>\n";
956 $sel_year = preg_replace("/(value\=\"$year\")/", "$1 selected=\"selected\"", $sel_year);
957
958 //$dateformat = $lng->text["lang_dateformat"];
959 $dateformat = "d-m-Y";
960 $dateformat = strtolower(preg_replace("/\W/", "", $dateformat));
961 $dateformat = strtolower(preg_replace("/(\w)/", "%%$1", $dateformat));
962 $dateformat = preg_replace("/%%d/", $sel_day, $dateformat);
963 $dateformat = preg_replace("/%%m/", $sel_month, $dateformat);
964 $dateformat = preg_replace("/%%y/", $sel_year, $dateformat);
965 return $dateformat;
966 }

References $DIC, $i, $lng, and $name.

Referenced by ilCourseContentGUI\__renderItem(), and ilCourseContentGUI\editTimings().

+ Here is the caller graph for this function:

◆ makeDir()

static ilUtil::makeDir (   $a_dir)
static

creates a new directory and inherits all filesystem permissions of the parent directory You may pass only the name of your new directory or with the entire path or relative path information.

examples: a_dir = /tmp/test/your_dir a_dir = ../test/your_dir a_dir = your_dir (--> creates your_dir in current directory)

@access public

Parameters
string[path] + directory name
Returns
boolean
Deprecated:
in favour of Filesystem::createDir() located at the filesystem service.
See also
\ILIAS\Filesystem\Filesystem::createDir()

Definition at line 2166 of file class.ilUtil.php.

2167 {
2168 $a_dir = trim($a_dir);
2169
2170 // remove trailing slash (bugfix for php 4.2.x)
2171 if (substr($a_dir, -1) == "/") {
2172 $a_dir = substr($a_dir, 0, -1);
2173 }
2174
2175 // check if a_dir comes with a path
2176 if (!($path = substr($a_dir, 0, strrpos($a_dir, "/") - strlen($a_dir)))) {
2177 $path = ".";
2178 }
2179
2180 // create directory with file permissions of parent directory
2181 umask(0000);
2182 return @mkdir($a_dir, fileperms($path));
2183 }

Referenced by ilFileDataCourse\__checkImportPath(), ilFileDataCourse\__checkPath(), ilFileDataCourse\__initDirectory(), ilExternalFeed\_createCacheDirectory(), ilStyleMigration\_createImagesDirectory(), ilObjStyleSheet\_createImagesDirectory(), ilObjTest\_createImportDirectory(), ilObjQuestionPool\_createImportDirectory(), ilFileDataImport\_initDirectory(), ilFileDataImportMail\_initDirectory(), ilFileDataCourse\addDirectory(), ILIAS\Wiki\Export\WikiHtmlExport\buildExportFile(), ilScorm2004Export\buildExportFileHTML(), ilScorm2004Export\buildExportFileHTMLOne(), ilScorm2004Export\buildExportFileISO(), ilScorm2004Export\buildExportFilePDF(), ilScorm2004Export\buildExportFileSCORM(), ilContObjectExport\buildExportFileSCORM(), ilContObjectExport\buildExportFileXML(), ilSurveyQuestionpoolExport\buildExportFileXML(), ilGlossaryExport\buildExportFileXML(), ilSurveyExport\buildExportFileXML(), ilTestExport\buildExportFileXML(), ilQuestionpoolExport\buildExportFileXML(), ilTestExport\buildExportResultFile(), ilContObjParser\copyFileItems(), ilContObjParser\copyMobFiles(), ilQuestionPageParser\copyMobFiles(), ilFSStorageCourse\createArchiveOnlineVersion(), ilContainer\createContainerDirectory(), ilObjFileBasedLM\createDataDirectory(), ilObjSAHSLearningModule\createDataDirectory(), ilChatroomConfigFileHandler\createDataDirIfNotExists(), ilCOPageHTMLExport\createDirectories(), createDirectory(), ilFileSystemGUI\createDirectory(), ilObjMediaObjectGUI\createDirectoryObject(), ilObjContentObject\createExportDirectory(), ilScorm2004Export\createExportDirectory(), ilObjSurvey\createExportDirectory(), ilObjSurveyQuestionPool\createExportDirectory(), ilObjTest\createExportDirectory(), ilObjQuestionPool\createExportDirectory(), ilObjStyleSheet\createExportDirectory(), ilObjUserFolder\createExportDirectory(), ilObjStyleSheet\createExportSubDirectory(), ilObjGlossary\createImportDirectory(), ilObjContentObject\createImportDirectory(), ilObjSurvey\createImportDirectory(), ilObjSurveyQuestionPool\createImportDirectory(), ilObjStyleSheet\createImportDirectory(), ilFileDataCourse\createImportFile(), ilFileDataCourse\createOnlineVersion(), ilExSubmission\downloadAllAssignmentFiles(), ilExSubmission\downloadMultipleFiles(), ilObjFileImplementationLegacy\export(), ilScormExportUtil\exportContentCSS(), ilObjTest\exportFileItems(), ilObjQuestionPool\exportFileItems(), ilObjMediaObject\exportFiles(), ilObjFileBasedLMGUI\exportHTML(), ilObjSCORM2004LearningModule\exportHTML4PDF(), ilSCORM2004Asset\exportHTML4PDF(), ilCOPageHTMLExport\exportHTMLFile(), ilCOPageHTMLExport\exportHTMLFileDirect(), ilCOPageHTMLExport\exportHTMLMOB(), ilObjSCORM2004LearningModule\exportHTMLScoObjects(), ilPageLayoutAdministrationGUI\exportLayout(), ilObjMediaObject\exportMediaFullscreen(), ilObjSCORM2004LearningModule\exportPDF(), ilObjSCORM2004LearningModule\exportScorm(), ilObjSCORM2004LearningModule\exportXMLScoObjects(), ilObjLanguageExt\getDataPath(), ilScorm2004DataSet\getXmlRecord(), ilUserDataSet\getXmlRecord(), ilCloudPluginUploadGUI\handleFileUpload(), ilImport\importObject(), ILIAS\Blog\Export\BlogHtmlExport\initDirectories(), ILIAS\Glossary\Export\GlossaryHtmlExport\initDirectories(), ILIAS\LearningModule\Export\LMHtmlExport\initDirectories(), ILIAS\Portfolio\Export\PortfolioHtmlExport\initDirectories(), ilSCORM13PlayerGUI\logDirectory(), ilObjSCORM2004LearningModule\prepareHTMLExporter(), ilExSubmission\processUploadedZipFile(), ilExAssignment\sendMultiFeedbackStructureFile(), ilForumXMLWriter\start(), ilObjFile\storeUnzipedFile(), unzip(), ilFSStorageExercise\uploadFile(), ilFSStorageExercise5069\uploadFile(), ilObjSAHSLearningModuleGUI\uploadObject(), and ILIAS\LearningModule\Export\LMHtmlExport\zipPackage().

+ Here is the caller graph for this function:

◆ makeDirParents()

static ilUtil::makeDirParents (   $a_dir)
static

Create a new directory and all parent directories.

Creates a new directory and inherits all filesystem permissions of the parent directory If the parent directories doesn't exist, they will be created recursively. The directory name NEEDS TO BE an absolute path, because it seems that relative paths are not working with PHP's file_exists function.

Author
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.tzi.d.nosp@m.e
Parameters
string$a_dirThe directory name to be created @access public
Returns
bool
Deprecated:
in favour of Filesystem::createDir() located at the filesystem service.
See also
\ILIAS\Filesystem\Filesystem::createDir()

Definition at line 2205 of file class.ilUtil.php.

2206 {
2207 $dirs = array($a_dir);
2208 $a_dir = dirname($a_dir);
2209 $last_dirname = '';
2210
2211 while ($last_dirname != $a_dir) {
2212 array_unshift($dirs, $a_dir);
2213 $last_dirname = $a_dir;
2214 $a_dir = dirname($a_dir);
2215 }
2216
2217 // find the first existing dir
2218 $reverse_paths = array_reverse($dirs, true);
2219 $found_index = -1;
2220 foreach ($reverse_paths as $key => $value) {
2221 if ($found_index == -1) {
2222 if (is_dir($value)) {
2223 $found_index = $key;
2224 }
2225 }
2226 }
2227
2228 umask(0000);
2229 foreach ($dirs as $dirindex => $dir) {
2230 // starting with the longest existing path
2231 if ($dirindex >= $found_index) {
2232 if (!file_exists($dir)) {
2233 if (strcmp(substr($dir, strlen($dir) - 1, 1), "/") == 0) {
2234 // on some systems there is an error when there is a slash
2235 // at the end of a directory in mkdir, see Mantis #2554
2236 $dir = substr($dir, 0, strlen($dir) - 1);
2237 }
2238 if (!mkdir($dir, $umask)) {
2239 error_log("Can't make directory: $dir");
2240 return false;
2241 }
2242 } elseif (!is_dir($dir)) {
2243 error_log("$dir is not a directory");
2244 return false;
2245 } else {
2246 // get umask of the last existing parent directory
2247 $umask = fileperms($dir);
2248 }
2249 }
2250 }
2251 return true;
2252 }

Referenced by ilFileDataForumDrafts\__initDirectory(), ilChatroomAdminSmileyGUI\_checkSetup(), ilExport\_createExportDirectory(), ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), ilFSStorageCourse\addArchiveSubDirectory(), ilDataSet\addRecordsXml(), ilExportContainer\addSubitems(), assMatchingQuestion\afterSyncWithOriginal(), assSingleChoice\afterSyncWithOriginal(), ilTestPlayerAbstractGUI\archiveParticipantSubmission(), assLongMenu\assertDirExists(), ilQuestionpoolExport\buildExportFileXML(), ilTestSubmissionReviewGUI\buildPdfFilename(), ilAssFileUploadUploadsExporter\collectUploadedFiles(), assFlashQuestion\copyApplet(), assJavaApplet\copyApplet(), ilCalendarCopyFilesToTempDirectoryJob\copyFiles(), ilCopyFilesToTempDirectoryJob\copyFiles(), ilCopyWorkspaceFilesToTempDirectoryJob\copyFiles(), ilExerciseManagementCollectFilesJob\copyFileToSubDirectory(), assImagemapQuestion\copyImage(), assMatchingQuestion\copyImages(), assMultipleChoice\copyImages(), assOrderingQuestion\copyImages(), assQuestion\copySuggestedSolutionFiles(), ilFSStorageExercise\create(), ilIndividualAssessmentFileStorage\create(), ilTestProcessLockFileStorage\create(), ilAssQuestionProcessLockFileStorage\create(), ilFileSystemStorage\create(), ilFileSystemStorage5069\create(), ilFSStorageExercise5069\create(), ilUserCertificateZip\createArchiveDirectory(), ilTestArchiver\createArchiveForTest(), ilFSStorageCourse\createArchiveOnlineVersion(), ilLoggingErrorFileStorage\createDir(), ilSystemStyleHTMLExport\createDirectories(), ilObjFileImplementationLegacy\createDirectory(), ilFSStorageSession\createDirectory(), ilObjMediaObject\createDirectory(), ilFSStorageEvent\createDirectory(), ilObjContentObject\createExportDirectory(), ilExplorerBaseGUI\createHTMLExportDirs(), ilCopyWorkspaceFilesToTempDirectoryJob\createTargetDirectory(), ilCopyFilesToTempDirectoryJob\createTargetDirectory(), ilCalendarCopyFilesToTempDirectoryJob\createTargetDirectory(), ilExerciseManagementCollectFilesJob\createTargetDirectory(), ilTestExportGUI\createTestArchiveExport(), ilExerciseManagementCollectFilesJob\createUniqueTempDirectory(), ilCopyWorkspaceFilesToTempDirectoryJob\createUniqueTempDirectory(), ilCopyFilesToTempDirectoryJob\createUniqueTempDirectory(), ilCalendarCopyFilesToTempDirectoryJob\createUniqueTempDirectory(), ilFileDataForum\createZipFile(), ilFileDataForumDrafts\createZipFile(), assFlashQuestion\duplicateApplet(), assJavaApplet\duplicateApplet(), assImagemapQuestion\duplicateImage(), assMatchingQuestion\duplicateImages(), assSingleChoice\duplicateImages(), assOrderingQuestion\duplicateImages(), SurveyQuestion\duplicateMaterials(), assQuestion\duplicateSuggestedSolutionFiles(), assOrderingQuestion\ensureImagePathExists(), assOrderingQuestionImport\ensureImagePathExists(), ilDclContentExporter\export(), ilExport\exportEntity(), ilExport\exportObject(), ilExportContainer\exportObject(), ilCOPageHTMLExport\exportQuestionFiles(), ilCOPageHTMLExport\exportResourceFile(), ILIAS\Services\Export\HTML\Util\exportResourceFile(), ilCOPageHTMLExport\exportStyles(), ILIAS\User\Export\UserHtmlExport\exportUserImages(), assFlashQuestionImport\fromXML(), assImagemapQuestionImport\fromXML(), assJavaAppletImport\fromXML(), assKprimChoiceImport\fromXML(), assMultipleChoiceImport\fromXML(), assSingleChoiceImport\fromXML(), ilHtmlToPdfTransformerFactory\generateTempPath(), ilBadgeHandler\getBadgePath(), ilFSStorageExercise\getFeedbackPath(), ilFSStorageExercise5069\getFeedbackPath(), ilFSStorageExercise\getGlobalFeedbackPath(), ilFSStorageExercise5069\getGlobalFeedbackPath(), ilMediaImageUtil\getImageSize(), ilObjSurvey\getImportDirectory(), ilBadgeHandler\getInstancePath(), ilBadgeHandler\getIssuerStaticUrl(), ilFSStorageExercise\getMultiFeedbackUploadPath(), ilFSStorageExercise5069\getMultiFeedbackUploadPath(), ilFSStorageExercise\getPeerReviewUploadPath(), ilFSStorageExercise5069\getPeerReviewUploadPath(), ilBibliographicExporter\getXmlRepresentation(), ilContentPageExporter\getXmlRepresentation(), ilDataCollectionExporter\getXmlRepresentation(), ilFileExporter\getXmlRepresentation(), ilForumExporter\getXmlRepresentation(), ilindividualAssessmentExporter\getXmlRepresentation(), ilSurveyExporter\getXmlRepresentation(), ilMediaObjectsExporter\getXmlRepresentation(), ilStyleExporter\getXmlRepresentation(), ilLMPresentationGUI\handleCodeParagraph(), assKprimChoice\handleFileUpload(), ilStyleImporter\importXmlRepresentation(), ilAdvancedMDRecordExportFiles\init(), ilAdvancedMDRecordImportFiles\init(), ilFSStorageCourse\initArchiveDirectory(), ilFSStorageCourse\initInfoDirectory(), ilFSStorageCourse\initMemberExportDirectory(), ilFSStorageGroup\initMemberExportDirectory(), assFlashQuestion\moveAppletIfExists(), assFlashQuestion\moveUploadedFile(), ilObjSurveyQuestionPool\pasteFromClipboard(), ilObjQuestionPool\pasteFromClipboard(), ilOrgUnitType\processAndStoreIconFile(), ilExport\processExporter(), assMatchingQuestionImport\saveImage(), assFileUpload\savePreviewData(), assFileUpload\saveWorkingData(), ilOrgUnitExporter\sendAndCreateSimpleExportFile(), assMultipleChoice\setImageFile(), assSingleChoice\setImageFile(), assMatchingQuestion\setImageFile(), assImagemapQuestion\setImageFilename(), assJavaApplet\setJavaAppletFilename(), SurveyQuestion\setMaterialsfile(), assQuestionGUI\suggestedsolution(), assMultipleChoice\syncImages(), assSingleChoice\syncImages(), assQuestion\syncSuggestedSolutionFiles(), ilObjMediaObject\uploadAdditionalFile(), ilObjCertificateSettings\uploadBackgroundImage(), ilCertificateBackgroundImageUpload\uploadBackgroundImage(), ilMobMultiSrtUpload\uploadMultipleSubtitleFile(), ilObjMediaObject\uploadMultipleSubtitleFile(), and ilObjStyleSheet\writeCSSFile().

+ Here is the caller graph for this function:

◆ makeTimeSelect()

static ilUtil::makeTimeSelect (   $prefix,
  $short = true,
  $hour = "",
  $minute = "",
  $second = "",
  $a_use_default = true,
  $a_further_options = array() 
)
static

Creates a combination of HTML selects for time inputs.

Creates a combination of HTML selects for time inputs. The select names are $prefix[h] for hours, $prefix[m] for minutes and $prefix[s] for seconds.

@access public

Parameters
string$prefixPrefix of the select name
boolean$shortSet TRUE for a short time input (only hours and minutes). Default is TRUE
integer$hourDefault hour value
integer$minuteDefault minute value
integer$secondDefault second value
Returns
string HTML select boxes
Author
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.tzi.d.nosp@m.e

Definition at line 986 of file class.ilUtil.php.

987 {
988 global $DIC;
989
990 $lng = $DIC->language();
991 $ilUser = $DIC->user();
992
993 $minute_steps = 1;
994 $disabled = '';
995 if (count($a_further_options)) {
996 if (isset($a_further_options['minute_steps'])) {
997 $minute_steps = $a_further_options['minute_steps'];
998 }
999 if (isset($a_further_options['disabled']) and $a_further_options['disabled']) {
1000 $disabled = 'disabled="disabled" ';
1001 }
1002 }
1003
1004 if ($a_use_default and !strlen("$hour$minute$second")) {
1005 $now = localtime();
1006 $hour = $now[2];
1007 $minute = $now[1];
1008 $second = $now[0];
1009 } else {
1010 $hour = (int) $hour;
1011 $minute = (int) $minute;
1012 $second = (int) $second;
1013 }
1014 // build hour select
1015 $sel_hour = '<select ';
1016 if (isset($a_further_options['select_attributes'])) {
1017 foreach ($a_further_options['select_attributes'] as $name => $value) {
1018 $sel_hour .= $name . '=' . $value . ' ';
1019 }
1020 }
1021 $sel_hour .= " " . $disabled . "name=\"" . $prefix . "[h]\" id=\"" . $prefix . "_h\" class=\"form-control\">\n";
1022
1023 $format = $ilUser->getTimeFormat();
1024 for ($i = 0; $i <= 23; $i++) {
1026 $sel_hour .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
1027 } else {
1028 $sel_hour .= "<option value=\"$i\">" . date("ga", mktime($i, 0, 0)) . "</option>\n";
1029 }
1030 }
1031 $sel_hour .= "</select>\n";
1032 $sel_hour = preg_replace("/(value\=\"$hour\")/", "$1 selected=\"selected\"", $sel_hour);
1033
1034 // build minutes select
1035 $sel_minute .= "<select " . $disabled . "name=\"" . $prefix . "[m]\" id=\"" . $prefix . "_m\" class=\"form-control\">\n";
1036
1037 for ($i = 0; $i <= 59; $i = $i + $minute_steps) {
1038 $sel_minute .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
1039 }
1040 $sel_minute .= "</select>\n";
1041 $sel_minute = preg_replace("/(value\=\"$minute\")/", "$1 selected=\"selected\"", $sel_minute);
1042
1043 if (!$short) {
1044 // build seconds select
1045 $sel_second .= "<select " . $disabled . "name=\"" . $prefix . "[s]\" id=\"" . $prefix . "_s\" class=\"form-control\">\n";
1046
1047 for ($i = 0; $i <= 59; $i++) {
1048 $sel_second .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
1049 }
1050 $sel_second .= "</select>\n";
1051 $sel_second = preg_replace("/(value\=\"$second\")/", "$1 selected=\"selected\"", $sel_second);
1052 }
1053 $timeformat = $lng->text["lang_timeformat"];
1054 if (strlen($timeformat) == 0) {
1055 $timeformat = "H:i:s";
1056 }
1057 $timeformat = strtolower(preg_replace("/\W/", "", $timeformat));
1058 $timeformat = preg_replace("/(\w)/", "%%$1", $timeformat);
1059 $timeformat = preg_replace("/%%h/", $sel_hour, $timeformat);
1060 $timeformat = preg_replace("/%%i/", $sel_minute, $timeformat);
1061 if ($short) {
1062 $timeformat = preg_replace("/%%s/", "", $timeformat);
1063 } else {
1064 $timeformat = preg_replace("/%%s/", $sel_second, $timeformat);
1065 }
1066 return $timeformat;
1067 }
$format
Definition: metadata.php:218

References $DIC, $format, $i, $ilUser, $lng, $name, and ilCalendarSettings\TIME_FORMAT_24.

Referenced by ilLPCollectionSettingsTableGUI\fillRow(), ilTypicalLearningTimeInputGUI\insert(), ilMDEditorGUI\listEducational(), and ilMDEditorGUI\listQuickEdit_scorm().

+ Here is the caller graph for this function:

◆ maskAttributeTag()

static ilUtil::maskAttributeTag (   $a_str,
  $tag,
  $tag_att 
)
static

Definition at line 2633 of file class.ilUtil.php.

2634 {
2635 global $DIC;
2636
2637 $ilLog = $DIC["ilLog"];
2638
2639 $ws = "[\s]*";
2640 $att = $ws . "[^>]*" . $ws;
2641
2642 while (preg_match(
2643 '/<(' . $tag . $att . '(' . $tag_att . $ws . '="' . $ws . '(([$@!*()~;,_0-9A-z\/:=%.&#?+\-])*)")' . $att . ')>/i',
2644 $a_str,
2645 $found
2646 )) {
2647 $old_str = $a_str;
2648 $a_str = preg_replace(
2649 "/<" . preg_quote($found[1], "/") . ">/i",
2650 '&lt;' . $tag . ' ' . $tag_att . $tag_att . '="' . $found[3] . '"&gt;',
2651 $a_str
2652 );
2653 if ($old_str == $a_str) {
2654 $ilLog->write("ilUtil::maskA-" . htmlentities($old_str) . " == " .
2655 htmlentities($a_str));
2656 return $a_str;
2657 }
2658 }
2659 $a_str = str_ireplace(
2660 "</$tag>",
2661 "&lt;/$tag&gt;",
2662 $a_str
2663 );
2664 return $a_str;
2665 }

References $DIC.

Referenced by maskSecureTags().

+ Here is the caller graph for this function:

◆ maskSecureTags()

static ilUtil::maskSecureTags (   $a_str,
  $allow_array 
)
static

Definition at line 2492 of file class.ilUtil.php.

2493 {
2494 foreach ($allow_array as $t) {
2495 switch ($t) {
2496 case "a":
2497 $a_str = ilUtil::maskAttributeTag($a_str, "a", "href");
2498 break;
2499
2500 case "img":
2501 $a_str = ilUtil::maskAttributeTag($a_str, "img", "src");
2502 break;
2503
2504 case "p":
2505 case "div":
2506 $a_str = ilUtil::maskTag($a_str, $t, array(
2507 array("param" => "align", "value" => "left"),
2508 array("param" => "align", "value" => "center"),
2509 array("param" => "align", "value" => "justify"),
2510 array("param" => "align", "value" => "right")
2511 ));
2512 break;
2513
2514 default:
2515 $a_str = ilUtil::maskTag($a_str, $t);
2516 break;
2517 }
2518 }
2519
2520 return $a_str;
2521 }
static maskAttributeTag($a_str, $tag, $tag_att)
static maskTag($a_str, $t, $fix_param="")

References maskAttributeTag(), and maskTag().

Referenced by secureString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maskTag()

static ilUtil::maskTag (   $a_str,
  $t,
  $fix_param = "" 
)
static

Definition at line 2694 of file class.ilUtil.php.

2695 {
2696 $a_str = str_replace(
2697 array("<$t>", "<" . strtoupper($t) . ">"),
2698 "&lt;" . $t . "&gt;",
2699 $a_str
2700 );
2701 $a_str = str_replace(
2702 array("</$t>", "</" . strtoupper($t) . ">"),
2703 "&lt;/" . $t . "&gt;",
2704 $a_str
2705 );
2706
2707 if (is_array($fix_param)) {
2708 foreach ($fix_param as $p) {
2709 $k = $p["param"];
2710 $v = $p["value"];
2711 $a_str = str_replace(
2712 "<$t $k=\"$v\">",
2713 "&lt;" . "$t $k=\"$v\"" . "&gt;",
2714 $a_str
2715 );
2716 }
2717 }
2718
2719 return $a_str;
2720 }

Referenced by maskSecureTags().

+ Here is the caller graph for this function:

◆ MB2Bytes()

static ilUtil::MB2Bytes (   $a_value)
static

Definition at line 5045 of file class.ilUtil.php.

5046 {
5047 return ((int) $a_value) * pow(self::_getSizeMagnitude(), 2);
5048 }

◆ mergesort()

static ilUtil::mergesort ( $array,
  $cmp_function = 'strcmp' 
)
static

Definition at line 3135 of file class.ilUtil.php.

3136 {
3137 // Arrays of size < 2 require no action.
3138 if (count($array) < 2) {
3139 return;
3140 }
3141
3142 // Split the array in half
3143 $halfway = count($array) / 2;
3144 $array1 = array_slice($array, 0, $halfway);
3145 $array2 = array_slice($array, $halfway);
3146
3147 // Recurse to sort the two halves
3148 ilUtil::mergesort($array1, $cmp_function);
3149 ilUtil::mergesort($array2, $cmp_function);
3150
3151 // If all of $array1 is <= all of $array2, just append them.
3152 if (call_user_func($cmp_function, end($array1), $array2[0]) < 1) {
3153 $array = array_merge($array1, $array2);
3154 return;
3155 }
3156
3157 // Merge the two sorted arrays into a single sorted array
3158 $array = array();
3159 $ptr1 = $ptr2 = 0;
3160 while ($ptr1 < count($array1) && $ptr2 < count($array2)) {
3161 if (call_user_func($cmp_function, $array1[$ptr1], $array2[$ptr2]) < 1) {
3162 $array[] = $array1[$ptr1++];
3163 } else {
3164 $array[] = $array2[$ptr2++];
3165 }
3166 }
3167
3168 // Merge the remainder
3169 while ($ptr1 < count($array1)) {
3170 $array[] = $array1[$ptr1++];
3171 }
3172 while ($ptr2 < count($array2)) {
3173 $array[] = $array2[$ptr2++];
3174 }
3175
3176 return;
3177 }
static mergesort(&$array, $cmp_function='strcmp')

References mergesort().

Referenced by mergesort(), and stableSortArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveUploadedFile()

static ilUtil::moveUploadedFile (   $a_file,
  $a_name,
  $a_target,
  $a_raise_errors = true,
  $a_mode = "move_uploaded" 
)
static

move uploaded file

Parameters
string$a_file
string$a_name
string$a_target
bool$a_raise_errors
string$a_mode
Returns
bool
Exceptions
ilExceptionThrown if no uploaded files are found and raise error is set to true.
Deprecated:
in favour of the FileUpload service.
See also
\ILIAS\DI\Container::upload()

Definition at line 3848 of file class.ilUtil.php.

3849 {
3850 global $DIC;
3851 $target_filename = basename($a_target);
3852
3853 include_once("./Services/Utilities/classes/class.ilFileUtils.php");
3854 $target_filename = ilFileUtils::getValidFilename($target_filename);
3855
3856 // Make sure the target is in a valid subfolder. (e.g. no uploads to ilias/setup/....)
3857 list($target_filesystem, $target_dir) = self::sanitateTargetPath($a_target);
3858
3859 $upload = $DIC->upload();
3860
3861 // If the upload has not yet been processed make sure he gets processed now.
3862 if (!$upload->hasBeenProcessed()) {
3863 $upload->process();
3864 }
3865
3866 try {
3867 if (!$upload->hasUploads()) {
3868 throw new ilException($DIC->language()->txt("upload_error_file_not_found"));
3869 }
3870 $upload_result = $upload->getResults()[$a_file] ?? null;
3871 if ($upload_result instanceof UploadResult) {
3872 $processing_status = $upload_result->getStatus();
3873 if ($processing_status->getCode() === ProcessingStatus::REJECTED
3874 || $processing_status->getCode() === ProcessingStatus::DENIED) {
3875 throw new ilException($processing_status->getMessage());
3876 }
3877 } else {
3878 return false;
3879 }
3880 } catch (ilException $e) {
3881 if (!$a_raise_errors) {
3882 ilUtil::sendFailure($e->getMessage(), true);
3883 } else {
3884 throw $e;
3885 }
3886
3887 return false;
3888 }
3889
3890 $upload->moveOneFileTo($upload_result, $target_dir, $target_filesystem, $target_filename, true);
3891
3892 return true;
3893 }
static getValidFilename($a_filename)
Get valid filename.
static sanitateTargetPath($a_target)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $DIC, Vendor\Package\$e, ilFileUtils\getValidFilename(), sanitateTargetPath(), and sendFailure().

Referenced by ilObjCategoryGUI\_importCategories(), ilObjMediaObject\_saveTempFileAsMediaObject(), ilObjUserFolder\_updateAccountMailAttachment(), ilCourseFile\create(), ilSessionFile\create(), ilPCInteractiveImageGUI\create(), ilFileDataCourse\createImportFile(), assKprimChoice\handleFileUpload(), ilExAssignment\handleGlobalFeedbackFileUpload(), ilObjStyleSheet\import(), ilObjSurveyQuestionPoolGUI\importFileObject(), ilExcCriteriaFile\importFromPeerReviewForm(), ilObjContentObject\importFromZipFile(), ilImport\importObject(), ilObjSurvey\importObject(), ilSCORM2004ScoGUI\importSave(), ilDidacticTemplateSettingsGUI\importTemplate(), ilPropertyFormGUI\moveFileUpload(), ilAdvancedMDRecordImportFiles\moveUploadedFile(), assFlashQuestion\moveUploadedFile(), ilCertificateUtilHelper\moveUploadedFile(), assQuestion\moveUploadedMediaFile(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilDclMobRecordFieldModel\parseValue(), ilOrgUnitType\processAndStoreIconFile(), ilFileUtils\processZipFile(), assFileUpload\savePreviewData(), ilObjMediaObjectGUI\savePropertiesObject(), assFileUpload\saveWorkingData(), assMultipleChoice\setImageFile(), assSingleChoice\setImageFile(), assMatchingQuestion\setImageFile(), assImagemapQuestion\setImageFilename(), assJavaApplet\setJavaAppletFilename(), SurveyQuestion\setMaterialsfile(), ilObjMediaObjectGUI\setObjectPerCreationForm(), assOrderingQuestion\storeImageFile(), ilFileDataImportMail\storeUploadedFile(), ilFileDataMail\storeUploadedFile(), ilFileDataForum\storeUploadedFile(), ilFileDataForumDrafts\storeUploadedFile(), assQuestionGUI\suggestedsolution(), ilPCInteractiveImageGUI\update(), ilObjMediaCastGUI\updateMediaItem(), ilObjMediaObject\uploadAdditionalFile(), ilCalendarCategoryGUI\uploadAppointments(), ilFSStorageExercise\uploadAssignmentFiles(), ilFSWebStorageExercise\uploadAssignmentFiles(), ilFSStorageExercise5069\uploadAssignmentFiles(), ilObjCertificateSettings\uploadBackgroundImage(), ilCertificateBackgroundImageUpload\uploadBackgroundImage(), ilFSStorageExercise\uploadFile(), ilFSStorageExercise5069\uploadFile(), ilFileSystemGUI\uploadFile(), ilMediaCreationGUI\uploadFile(), ilBookingObject\uploadFile(), ilIndividualAssessmentFileStorage\uploadFile(), ilObjMediaObjectGUI\uploadFileObject(), ilObjStyleSheet\uploadImage(), ilObjBlog\uploadImage(), ilObjPortfolioBase\uploadImage(), ilObjPoll\uploadImage(), ilBadge\uploadImage(), ilBadgeImageTemplate\uploadImage(), ilExAssignment\uploadMultiFeedbackFile(), ilMobMultiSrtUpload\uploadMultipleSubtitleFile(), ilObjMediaObject\uploadMultipleSubtitleFile(), ilObjSAHSLearningModuleGUI\uploadObject(), ilBookingObject\uploadPostFile(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjSurveyQuestionPoolGUI\uploadQuestionsObject(), ilObjTestGUI\uploadTstObject(), and ilObjUserGUI\uploadUserPictureObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ now()

static ilUtil::now ( )
static

Return current timestamp in Y-m-d H:i:s format.

Definition at line 3916 of file class.ilUtil.php.

3917 {
3918 return date("Y-m-d H:i:s");
3919 }

Referenced by ilChangeEvent\_catchupWriteEvents(), ilHistory\_copyEntriesForObject(), ilHistory\_createEntry(), ilLMPageObject\_getPresentationTitle(), ilObjSCORMTracking\_insertTrackData(), ilLMTracker\_isNodeVisible(), ilPageObject\_lookupActive(), ilObjUser\_setUserInactive(), ilObjUser\_toggleActiveStatusOfUsers(), ilWikiContributor\_writeStatus(), ilLikeData\addExpression(), ilBasicSkillLevelDBRepository\addLevel(), ilDBUpdateNewObjectType\addNewType(), ilDBUpdateNewObjectType\addRBACTemplate(), ilExSubmission\addResourceObject(), ilRepositoryObjectPlugin\beforeActivation(), ilBlogPosting\create(), ilNote\create(), ilNewsItem\create(), ilStudyProgrammeAssignmentDBRepository\createFor(), ilPageObject\createFromXML(), ilStudyProgrammeTypeDBRepository\createType(), ilPageActivationDBRepository\getData(), ilCalendarHeaderNavigationGUI\getHTML(), ilNewsItem\getLastNewsIdForContext(), ilLMNavigationStatus\getPredecessorPageId(), ilWikiUserHTMLExport\getProcess(), ilLMContentRendererGUI\getSuccessorPage(), ilLMPresentationGUI\getSuccessorPage(), ilLMNavigationStatus\getSuccessorPageId(), ilBasicSkillUserLevelDBRepository\hasRecentSelfEvaluation(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSCORMLearningModule\importSuccess(), ilPreviewRenderer\render(), ilLMContentRendererGUI\renderDeactivatedPageMessage(), ilBasicSkillUserLevelDBRepository\resetUserSkillLevelStatus(), ilObjForum\saveData(), ilUserProfilePromptDataGateway\saveLastUserPrompt(), ilExAssignmentMemberStatus\setFeedback(), ilExAssignmentMemberStatus\setMark(), ilExAssignmentMemberStatus\setSent(), ilExAssignmentMemberStatus\setStatus(), ilUserProfileStartUpStep\shouldInterceptRequest(), ilObjSCORMTracking\store(), ilObjSCORMTracking\storeJsApiCmi(), ilLMTracker\trackLastPageAccess(), ilBlogPosting\unpublish(), ilNewsItem\update(), ilPageObject\update(), ilNote\update(), ilPageObject\updateFromXML(), ilExPeerReview\updatePeerReview(), ilExPeerReview\updatePeerReviewTimestamp(), ilExSubmission\updateTextSubmission(), ilExSubmission\updateTutorDownloadTime(), ilExcSubmissionRepository\updateWebDirAccessTime(), ilExSubmission\uploadFile(), ilPageObject\writeRenderedContent(), and ilBasicSkillUserLevelDBRepository\writeUserSkillLevelStatus().

+ Here is the caller graph for this function:

◆ parseImportId()

static ilUtil::parseImportId (   $a_import_id)
static

Parse an ilias import id Typically of type il_[IL_INST_ID]_[OBJ_TYPE]_[OBJ_ID] returns array( 'orig' => 'il_4800_rolt_123' 'prefix' => 'il' 'inst_id => '4800' 'type' => 'rolt' 'id' => '123'.

Parameters
stringil_id

Definition at line 4765 of file class.ilUtil.php.

4766 {
4767 $exploded = explode('_', $a_import_id);
4768
4769 $parsed['orig'] = $a_import_id;
4770 if ($exploded[0] == 'il') {
4771 $parsed['prefix'] = $exploded[0];
4772 }
4773 if (is_numeric($exploded[1])) {
4774 $parsed['inst_id'] = (int) $exploded[1];
4775 }
4776 $parsed['type'] = $exploded[2];
4777
4778 if (is_numeric($exploded[3])) {
4779 $parsed['id'] = (int) $exploded[3];
4780 }
4781 return $parsed;
4782 }

Referenced by ilECSEnrolmentStatusCommandQueueHandler\handleCreate(), ilContObjParser\handlerBeginTag(), ilAdvancedMDRecordParser\handlerBeginTag(), ilContObjParser\handlerEndTag(), ilQuestionPageParser\handlerEndTag(), and ilAdvancedMDFieldDefinitionInternalLink\importValueFromXML().

+ Here is the caller graph for this function:

◆ period2String()

static ilUtil::period2String ( ilDateTime  $a_from,
  $a_to = null 
)
static

Return a string of time period.

Parameters
ilDateTime$a_from
ilDateTime$a_to
Returns
string

Definition at line 4252 of file class.ilUtil.php.

4253 {
4254 global $DIC;
4255
4256 $lng = $DIC->language();
4257
4258 if (!$a_to) {
4259 $a_to = new ilDateTime(time(), IL_CAL_UNIX);
4260 }
4261
4262 $from = new DateTime($a_from->get(IL_CAL_DATETIME));
4263 $to = new DateTime($a_to->get(IL_CAL_DATETIME));
4264 $diff = $to->diff($from);
4265
4266 $periods = array();
4267 $periods["years"] = $diff->format("%y");
4268 $periods["months"] = $diff->format("%m");
4269 $periods["days"] = $diff->format("%d");
4270 $periods["hours"] = $diff->format("%h");
4271 $periods["minutes"] = $diff->format("%i");
4272 $periods["seconds"] = $diff->format("%s");
4273
4274 if (!array_sum($periods)) {
4275 return;
4276 }
4277
4278 foreach ($periods as $key => $value) {
4279 if ($value) {
4280 $segment_name = ($value > 1)
4281 ? $key
4282 : substr($key, 0, -1);
4283 $array[] = $value . ' ' . $lng->txt($segment_name);
4284 }
4285 }
4286
4287 $len = sizeof($array);
4288 if ($len > 3) {
4289 $array = array_slice($array, 0, (3 - $len));
4290 }
4291
4292 return implode(', ', $array);
4293 }
const IL_CAL_UNIX
const IL_CAL_DATETIME
@classDescription Date and time handling
get($a_format, $a_format_str='', $a_tz='')
get formatted date

References $DIC, $lng, ilDateTime\get(), IL_CAL_DATETIME, and IL_CAL_UNIX.

Referenced by ilObjExerciseAccess\_lookupRemainingWorkingTimeString(), ilExcAssMemberState\getRemainingTimePresentation(), and ilExAssignmentGUI\getTimeString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareDBString()

◆ prepareFormOutput()

static ilUtil::prepareFormOutput (   $a_str,
  $a_strip = false 
)
static

prepares string output for html forms @access public

Parameters
string
booleantrue: strip slashes, if magic_quotes is enabled use this if $a_str comes from $_GET or $_POST var, use false, if $a_str comes from database
Returns
string

Definition at line 2820 of file class.ilUtil.php.

2821 {
2822 if ($a_strip) {
2823 $a_str = ilUtil::stripSlashes($a_str);
2824 }
2825 $a_str = htmlspecialchars($a_str);
2826 // Added replacement of curly brackets to prevent
2827 // problems with PEAR templates, because {xyz} will
2828 // be removed as unused template variable
2829 $a_str = str_replace("{", "&#123;", $a_str);
2830 $a_str = str_replace("}", "&#125;", $a_str);
2831 // needed for LaTeX conversion \\ in LaTeX is a line break
2832 // but without this replacement, php changes \\ to \
2833 $a_str = str_replace("\\", "&#92;", $a_str);
2834 return $a_str;
2835 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References stripSlashes().

Referenced by ilCmiXapiPlaceholderDescription\__construct(), ilLTIConsumerPlaceholderDescription\__construct(), ilExercisePlaceholderDescription\__construct(), ilTestPlaceholderDescription\__construct(), ilScormPlaceholderDescription\__construct(), ilCoursePlaceholderDescription\__construct(), ilObjUserGUI\__showUserDefinedFields(), ilPersonalProfileGUI\__showUserDefinedFields(), assClozeTestGUI\addBasicQuestionFormProperties(), assQuestionGUI\addBasicQuestionFormProperties(), ilInfoScreenGUI\addPropertyTextinput(), assFileUploadFileTableGUI\buildFileItemContent(), ilObjSystemFolderGUI\changeHeaderTitleObject(), ilStartUpGUI\confirmWithdrawal(), assErrorText\createErrorTextExport(), ilObjStyleSheetGUI\deleteColorConfirmationObject(), ilTable2GUI\deleteTemplate(), ilObjTest\deliverPDFfromHTML(), ilContainerGUI\editPageContentObject(), ilExportIDTableGUI\fillRow(), ilHelpMappingTableGUI\fillRow(), ilHelpTooltipTableGUI\fillRow(), ilLMEditShortTitlesTableGUI\fillRow(), ilPortfolioPageTableGUI\fillRow(), ilPortfolioTableGUI\fillRow(), ilWebResourceEditableLinkTableGUI\fillRow(), ilWikiContributorsTableGUI\fillRow(), ilAccessKeyTableGUI\fillRow(), ilPCGridCellTableGUI\fillRow(), ilPCIIMPopupTableGUI\fillRow(), ilPCTabsTableGUI\fillRow(), ilLDAPRoleMappingTableGUI\fillRow(), ilImageMapTableGUI\fillRow(), ilMultiSrtConfirmationTable2GUI\fillRow(), ilMultilingualismTableGUI\fillRow(), ilObjectTranslation2TableGUI\fillRow(), ilObjectTranslationTableGUI\fillRow(), ilModulesTableGUI\fillRow(), ilStyleColorTableGUI\fillRow(), ilTaxonomyTableGUI\fillRow(), ilExGradesTableGUI\fillRow(), ilSCORM2004ExportTableGUI\fillRow(), ilSurveyQuestionblockbrowserTableGUI\fillRow(), ilSurveyQuestionbrowserTableGUI\fillRow(), ilSurveyQuestionPoolExportTableGUI\fillRow(), ilAssessmentFolderLogAdministrationTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilListOfQuestionsTableGUI\fillRow(), ilTestHistoryTableGUI\fillRow(), ilAnswerFrequencyStatisticTableGUI\fillRow(), ilKprimChoiceAnswerFreqStatTableGUI\fillRow(), ilQuestionPoolPrintViewTableGUI\fillRow(), ilLanguageExtTableGUI\fillRow(), ilMDCopyrightSelectionGUI\fillTemplate(), ilAwarenessGUI\getAwarenessList(), assClozeTestGUI\getBestSolutionText(), assErrorText\getErrorTokenHtml(), ilAccessibilitySupportContactsGUI\getFooterLink(), ilSystemSupportContactsGUI\getFooterLink(), ilObjAssessmentFolder\getFullPath(), ilFormPropertyGUI\getHiddenTag(), ilAdvancedSelectionListGUI\getHTML(), ilUserFilterGUI\getHTML(), ilTaggingGUI\getHTML(), ilAssNestedOrderingElementsInputGUI\getItemHtml(), ilRepositoryObjectSearchBlockGUI\getLegacyContent(), ilObjAssessmentFolderGUI\getLogDataOutputForm(), SurveyQuestionGUI\getMaterialOutput(), ilMailExplorer\getNodeIconAlt(), ilTestServiceGUI\getPassListOfAnswersWithScoring(), ilStudyProgrammePlaceholderValues\getPlaceholderValues(), ilCoursePlaceholderValues\getPlaceholderValuesForPreview(), ilStudyProgrammePlaceholderValues\getPlaceholderValuesForPreview(), assClozeTestGUI\getPreview(), assImagemapQuestionGUI\getPreview(), assKprimChoiceGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assOrderingHorizontalGUI\getPreview(), assSingleChoiceGUI\getPreview(), assTextQuestionGUI\getPreview(), SurveyMatrixQuestionGUI\getPrintView(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyQuestionGUI\getPrintViewQuestionTitle(), assClozeTestGUI\getSolutionOutput(), assKprimChoiceGUI\getSolutionOutput(), assMatchingQuestionGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assOrderingHorizontalGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), assQuestion\getSuggestedSolutionOutput(), ilTaggingGUI\getTaggingInputHTML(), assClozeTestGUI\getTestOutput(), assMultipleChoiceGUI\getTestOutput(), assKprimChoiceGUI\getTestOutput(), assImagemapQuestionGUI\getTestOutput(), assOrderingHorizontalGUI\getTestOutput(), assSingleChoiceGUI\getTestOutput(), ilObjTest\getTestResult(), ilHiddenInputGUI\getToolbarHTML(), SurveyMatrixQuestionGUI\getWorkingForm(), SurveyMultipleChoiceQuestionGUI\getWorkingForm(), SurveySingleChoiceQuestionGUI\getWorkingForm(), SurveyTextQuestionGUI\getWorkingForm(), ilRepositoryObjectSearchResultTableGUI\init(), ilNoteGUI\initNoteForm(), ilPreviewGUI\initPreview(), ilMailSearchGUI\initSearchForm(), ilCategoryWizardInputGUI\insert(), ilMatrixRowWizardInputGUI\insert(), ilAnswerWizardInputGUI\insert(), ilErrorTextWizardInputGUI\insert(), ilEssayKeywordWizardInputGUI\insert(), ilImageWizardInputGUI\insert(), ilKVPWizardInputGUI\insert(), ilMatchingPairWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilAssAnswerCorrectionsInputGUI\insert(), ilAssErrorTextCorrectionsInputGUI\insert(), ilAssMultipleChoiceCorrectionsInputGUI\insert(), ilAssSingleChoiceCorrectionsInputGUI\insert(), ilColorPickerInputGUI\insert(), ilCSSRectInputGUI\insert(), ilFileWizardInputGUI\insert(), ilFlashFileInputGUI\insert(), ilHiddenInputGUI\insert(), ilSelectBuilderInputGUI\insert(), ilTextAreaInputGUI\insert(), ilUserLoginInputGUI\insert(), ilRandomTestROInputGUI\insert(), ilCopyrightInputGUI\insert(), ilBackgroundImageInputGUI\insert(), ilEMailInputGUI\insert(), ilMDEditorGUI\listAnnotation(), ilMDEditorGUI\listClassification(), ilMDEditorGUI\listEducational(), ilMDEditorGUI\listGeneral(), ilMDEditorGUI\listLifecycle(), ilMDEditorGUI\listMetaMetaData(), ilMDEditorGUI\listQuickEdit_scorm(), ilMDEditorGUI\listRelation(), ilMDEditorGUI\listRights(), ilMDEditorGUI\listTechnical(), SurveyQuestionGUI\material(), assQuestionGUI\outPageSelector(), ilExerciseSubmissionTableGUI\parseRow(), assClozeTestGUI\populateNumericGapCorrectionFormProperty(), assClozeTestGUI\populateNumericGapFormPart(), ilObjForumGUI\prepareFormOutput(), ilCertificateUtilHelper\prepareFormOutput(), ilObjTestGUI\printobject(), ilDclMultiTextInputGUI\render(), ilMultipleImagesInputGUI\render(), ilMultipleTextsInputGUI\render(), ilSelectInputGUI\render(), ilTagInputGUI\render(), ilTextWizardInputGUI\render(), ilMailQuickFilterInputGUI\render(), ilRepositorySelectorInputGUI\render(), ilCheckboxInputGUI\render(), ilOrgUnitGenericMultiInputGUI\render(), ilOrgUnitMultiLineInputGUI\render(), ilGloAdvColSortInputGUI\render(), ilDateDurationInputGUI\render(), ilDateTimeInputGUI\render(), ilMultiSelectInputGUI\render(), ilNonEditableValueGUI\render(), ilNumberInputGUI\render(), ilPasswordInputGUI\render(), ilHierarchyFormGUI\renderChild(), ilObjForumGUI\renderDraftContent(), ilTestQuestionSideListGUI\renderList(), ilObjForumGUI\renderPostContent(), ilObjTestGUI\reviewobject(), ilAccountRegistrationGUI\saveForm(), ilTable2GUI\saveTemplate(), ilHelpGUI\search(), ilMailFormGUI\searchUsers(), ilStartUpGUI\showAccountMigration(), ilPasswordAssistanceGUI\showAssistanceForm(), ilAccessibilityControlConceptGUI\showControlConcept(), ilSCORM2004ScoGUI\showExportList(), ilHelpGUI\showPage(), ilSearchGUI\showSearch(), ilLuceneSearchGUI\showSearchForm(), ilLuceneUserSearchGUI\showSearchForm(), ilObjSCORM2004LearningModuleGUI\showSequencing(), ilStartUpGUI\showTermsOfService(), ilPersonalProfileGUI\showUserAgreement(), ilPasswordAssistanceGUI\showUsernameAssistanceForm(), assFormulaQuestion\substituteVariables(), assQuestionGUI\suggestedsolution(), and assErrorText\toJSON().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareTextareaOutput()

static ilUtil::prepareTextareaOutput (   $txt_output,
  $prepare_for_latex_output = false,
  $omitNl2BrWhenTextArea = false 
)
static

Prepares a string for a text area output where latex code may be in it If the text is HTML-free, CHR(13) will be converted to a line break.

Parameters
string$txt_outputString which should be prepared for output @access public

Definition at line 4182 of file class.ilUtil.php.

4183 {
4184 $result = $txt_output;
4185 $is_html = self::isHTML($result);
4186
4187 // removed: did not work with magic_quotes_gpc = On
4188 if (!$is_html) {
4189 if (!$omitNl2BrWhenTextArea) {
4190 // if the string does not contain HTML code, replace the newlines with HTML line breaks
4191 $result = preg_replace("/[\n]/", "<br />", $result);
4192 }
4193 } else {
4194 // patch for problems with the <pre> tags in tinyMCE
4195 if (preg_match_all("/(<pre>.*?<\/pre>)/ims", $result, $matches)) {
4196 foreach ($matches[0] as $found) {
4197 $replacement = "";
4198 if (strpos("\n", $found) === false) {
4199 $replacement = "\n";
4200 }
4201 $removed = preg_replace("/<br\s*?\/>/ims", $replacement, $found);
4202 $result = str_replace($found, $removed, $result);
4203 }
4204 }
4205 }
4206
4207 // since server side mathjax rendering does include svg-xml structures that indeed have linebreaks,
4208 // do latex conversion AFTER replacing linebreaks with <br>. <svg> tag MUST NOT contain any <br> tags.
4209 if ($prepare_for_latex_output) {
4210 include_once './Services/MathJax/classes/class.ilMathJax.php';
4211 $result = ilMathJax::getInstance()->insertLatexImages($result, "<span class\=\"latex\">", "<\/span>");
4212 $result = ilMathJax::getInstance()->insertLatexImages($result, "\[tex\]", "\[\/tex\]");
4213 }
4214
4215 if ($prepare_for_latex_output) {
4216 // replace special characters to prevent problems with the ILIAS template system
4217 // eg. if someone uses {1} as an answer, nothing will be shown without the replacement
4218 $result = str_replace("{", "&#123;", $result);
4219 $result = str_replace("}", "&#125;", $result);
4220 $result = str_replace("\\", "&#92;", $result);
4221 }
4222
4223 return $result;
4224 }
static isHTML($a_text)
Checks if a given string contains HTML or not.

References $result, ilMathJax\getInstance(), and isHTML().

Referenced by ilAssQuestionHintsTableGUI\fillRow(), ilObjSurvey\prepareTextareaOutput(), SurveyQuestion\prepareTextareaOutput(), ilObjTest\prepareTextareaOutput(), assQuestion\prepareTextareaOutput(), ilAssQuestionHintRequestGUI\showHintCmd(), and ilAssQuestionHintsGUI\showHintCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printBacktrace()

static ilUtil::printBacktrace (   $a_limit = 0)
static

printBacktrace

Parameters
int$a_limitlimit nr of lines

Definition at line 4738 of file class.ilUtil.php.

4739 {
4740 $bt = debug_backtrace();
4741 $cnt = 0;
4742 foreach ($bt as $t) {
4743 if ($cnt != 0 && ($a_limit == 0 || $cnt <= $a_limit)) {
4744 echo "<br>" . $t["file"] . ", " . $t["function"] . " [" . $t["line"] . "]";
4745 }
4746 $cnt++;
4747 }
4748 echo "<br>";
4749 }

◆ processConvertVersion()

static ilUtil::processConvertVersion (   $a_version)
staticprotected

Parse convert version string, e.g.

6.3.8-3, into integer

Parameters
string$a_versionw.x.y-z
Returns
int

Definition at line 1817 of file class.ilUtil.php.

1818 {
1819 if (preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)([\.|\-]([0-9]+))?/", $a_version, $match)) {
1820 $version = str_pad($match[1], 2, 0, STR_PAD_LEFT) .
1821 str_pad($match[2], 2, 0, STR_PAD_LEFT) .
1822 str_pad($match[3], 2, 0, STR_PAD_LEFT) .
1823 str_pad($match[5], 2, 0, STR_PAD_LEFT);
1824 return (int) $version;
1825 }
1826 }

Referenced by isConvertVersionAtLeast().

+ Here is the caller graph for this function:

◆ processCSVRow()

static & ilUtil::processCSVRow ( $row,
  $quoteAll = false,
  $separator = ";",
  $outUTF8 = false,
  $compatibleWithMSExcel = true 
)
static

Convertes an array for CSV usage.

Processes an array as a CSV row and converts the array values to correct CSV values. The "converted" array is returned

Author
Helmut Schottmüller hscho.nosp@m.ttm@.nosp@m.gmx.d.nosp@m.e
Parameters
array$rowThe array containing the values for a CSV row
string$quoteAllIndicates to quote every value (=TRUE) or only values containing quotes and separators (=FALSE, default)
string$separatorThe value separator in the CSV row (used for quoting) (; = default)
Returns
array The converted array ready for CSV use @access public

Definition at line 3936 of file class.ilUtil.php.

3937 {
3938 $resultarray = array();
3939 foreach ($row as $rowindex => $entry) {
3940 $surround = false;
3941 if ($quoteAll) {
3942 $surround = true;
3943 }
3944 if (strpos($entry, "\"") !== false) {
3945 $entry = str_replace("\"", "\"\"", $entry);
3946 $surround = true;
3947 }
3948 if (strpos($entry, $separator) !== false) {
3949 $surround = true;
3950 }
3951 if ($compatibleWithMSExcel) {
3952 // replace all CR LF with LF (for Excel for Windows compatibility
3953 $entry = str_replace(chr(13) . chr(10), chr(10), $entry);
3954 }
3955 if ($surround) {
3956 if ($outUTF8) {
3957 $resultarray[$rowindex] = "\"" . $entry . "\"";
3958 } else {
3959 $resultarray[$rowindex] = utf8_decode("\"" . $entry . "\"");
3960 }
3961 } else {
3962 if ($outUTF8) {
3963 $resultarray[$rowindex] = $entry;
3964 } else {
3965 $resultarray[$rowindex] = utf8_decode($entry);
3966 }
3967 }
3968 }
3969 return $resultarray;
3970 }

Referenced by ilObjUserFolder\createCSVExport(), and ilObjAssessmentFolderGUI\exportLogObject().

+ Here is the caller graph for this function:

◆ quoteArray()

static ilUtil::quoteArray (   $a_array)
static

Quotes all members of an array for usage in DB query statement.

Definition at line 4472 of file class.ilUtil.php.

4473 {
4474 global $DIC;
4475
4476 $ilDB = $DIC->database();
4477
4478
4479 if (!is_array($a_array) or !count($a_array)) {
4480 return array("''");
4481 }
4482
4483 foreach ($a_array as $k => $item) {
4484 $a_array[$k] = $ilDB->quote($item);
4485 }
4486
4487 return $a_array;
4488 }

References $DIC, and $ilDB.

Referenced by ilNestedSetXML\_deleteAllChildMetaData(), ilObjGroup\_isMember(), _sortIds(), ilCourseObjectiveResult\_updateObjectiveStatus(), ilTree\getChildsByTypeFilter(), ilObjGroup\getGroupMemberData(), ilLearningSequenceRoles\getLearningSequenceMemberData(), and ilMDConvert().

+ Here is the caller graph for this function:

◆ randomhash()

static ilUtil::randomhash ( )
static

Definition at line 4658 of file class.ilUtil.php.

4659 {
4660 $random = new \ilRandom();
4661 return md5($random->int(1, 9999999) + str_replace(" ", "", (string) microtime()));
4662 }

◆ rangeDownload()

ilUtil::rangeDownload (   $file)

Send a file via range request, see http://mobiforge.com/design-development/content-delivery-mobile-devices alternatives could be.

Definition at line 4821 of file class.ilUtil.php.

4822 {
4823 $fp = @fopen($file, 'rb');
4824
4825 $size = filesize($file); // File size
4826 $length = $size; // Content length
4827 $start = 0; // Start byte
4828 $end = $size - 1; // End byte
4829 // Now that we've gotten so far without errors we send the accept range header
4830 /* At the moment we only support single ranges.
4831 * Multiple ranges requires some more work to ensure it works correctly
4832 * and comply with the spesifications: http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
4833 *
4834 * Multirange support annouces itself with:
4835 * header('Accept-Ranges: bytes');
4836 *
4837 * Multirange content must be sent with multipart/byteranges mediatype,
4838 * (mediatype = mimetype)
4839 * as well as a boundry header to indicate the various chunks of data.
4840 */
4841 header("Accept-Ranges: 0-$length");
4842 // header('Accept-Ranges: bytes');
4843 // multipart/byteranges
4844 // http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.2
4845 if (isset($_SERVER['HTTP_RANGE'])) {
4846 $c_start = $start;
4847 $c_end = $end;
4848 // Extract the range string
4849 list(, $range) = explode('=', $_SERVER['HTTP_RANGE'], 2);
4850 // Make sure the client hasn't sent us a multibyte range
4851 if (strpos($range, ',') !== false) {
4852
4853 // (?) Shoud this be issued here, or should the first
4854 // range be used? Or should the header be ignored and
4855 // we output the whole content?
4856 header('HTTP/1.1 416 Requested Range Not Satisfiable');
4857 header("Content-Range: bytes $start-$end/$size");
4858 // (?) Echo some info to the client?
4859 exit;
4860 }
4861 // If the range starts with an '-' we start from the beginning
4862 // If not, we forward the file pointer
4863 // And make sure to get the end byte if spesified
4864 if ($range == '-') {
4865
4866 // The n-number of the last bytes is requested
4867 $c_start = $size - substr($range, 1);
4868 } else {
4869 $range = explode('-', $range);
4870 $c_start = $range[0];
4871 $c_end = (isset($range[1]) && is_numeric($range[1])) ? $range[1] : $size;
4872 }
4873 /* Check the range and make sure it's treated according to the specs.
4874 * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
4875 */
4876 // End bytes can not be larger than $end.
4877 $c_end = ($c_end > $end) ? $end : $c_end;
4878 // Validate the requested range and return an error if it's not correct.
4879 if ($c_start > $c_end || $c_start > $size - 1 || $c_end >= $size) {
4880 header('HTTP/1.1 416 Requested Range Not Satisfiable');
4881 header("Content-Range: bytes $start-$end/$size");
4882 // (?) Echo some info to the client?
4883 exit;
4884 }
4885 $start = $c_start;
4886 $end = $c_end;
4887 $length = $end - $start + 1; // Calculate new content length
4888 fseek($fp, $start);
4889 header('HTTP/1.1 206 Partial Content');
4890 }
4891 // Notify the client the byte range we'll be outputting
4892 header("Content-Range: bytes $start-$end/$size");
4893 header("Content-Length: $length");
4894
4895 // Start buffered download
4896 $buffer = 1024 * 8;
4897 while (!feof($fp) && ($p = ftell($fp)) <= $end) {
4898 if ($p + $buffer > $end) {
4899
4900 // In case we're only outputtin a chunk, make sure we don't
4901 // read past the length
4902 $buffer = $end - $p + 1;
4903 }
4904 set_time_limit(0); // Reset time limit for big files
4905 echo fread($fp, $buffer);
4906 flush(); // Free up memory. Otherwise large files will trigger PHP's memory limit.
4907 }
4908
4909 fclose($fp);
4910 }

References $_SERVER, $size, and exit.

◆ rCopy()

static ilUtil::rCopy (   $a_sdir,
  $a_tdir,
  $preserveTimeAttributes = false 
)
static

Copies content of a directory $a_sdir recursively to a directory $a_tdir.

Parameters
string$a_sdirsource directory
string$a_tdirtarget directory
boolean$preserveTimeAttributesif true, ctime will be kept.
Returns
boolean TRUE for sucess, FALSE otherwise
Exceptions

ILIAS\Filesystem\Exception\DirectoryNotFoundException

Exceptions

ILIAS\Filesystem\Exception\FileNotFoundException

Exceptions

ILIAS\Filesystem\Exception\IOException @access public

Deprecated:
in favour of Filesystem::copyDir() located at the filesystem service.
See also
Filesystem::copyDir()

Definition at line 1460 of file class.ilUtil.php.

1461 {
1462 $sourceFS = LegacyPathHelper::deriveFilesystemFrom($a_sdir);
1463 $targetFS = LegacyPathHelper::deriveFilesystemFrom($a_tdir);
1464
1465 $sourceDir = LegacyPathHelper::createRelativePath($a_sdir);
1466 $targetDir = LegacyPathHelper::createRelativePath($a_tdir);
1467
1468 // check if arguments are directories
1469 if (!$sourceFS->hasDir($sourceDir)) {
1470 return false;
1471 }
1472
1473 $sourceList = $sourceFS->listContents($sourceDir, true);
1474
1475 foreach ($sourceList as $item) {
1476 if ($item->isDir()) {
1477 continue;
1478 }
1479 try {
1480 $itemPath = $targetDir . '/' . substr($item->getPath(), strlen($sourceDir));
1481 $stream = $sourceFS->readStream($item->getPath());
1482 $targetFS->writeStream($itemPath, $stream);
1483 } catch (\ILIAS\Filesystem\Exception\FileAlreadyExistsException $e) {
1484 // Do nothing with that type of exception
1485 }
1486 }
1487
1488 return true;
1489 }
Class FlySystemFileAccessTest \Provider\FlySystem @runTestsInSeparateProcesses @preserveGlobalState d...
Class ChatMainBarProvider \MainMenu\Provider.

References Vendor\Package\$e.

Referenced by ilFileSystemStorage\_copyDirectory(), ilFileSystemStorage5069\_copyDirectory(), ilDataSet\addRecordsXml(), assMatchingQuestion\afterSyncWithOriginal(), assSingleChoice\afterSyncWithOriginal(), ilExAssignment\cloneAssignmentsOfExercise(), ilContObjParser\copyFileItems(), ilObjStyleSheet\copyImagesToDir(), ilContObjParser\copyMobFiles(), ilQuestionPageParser\copyMobFiles(), ilPlayerUtil\copyPlayerFilesToTargetDirectory(), ilPreview\copyPreviews(), ilObjStyleSheet\create(), ilFSStorageCourse\createArchiveOnlineVersion(), ilObjectCustomIconImpl\createFromImportDir(), ilObjectTileImage\createFromImportDir(), ilFileDataCourse\createOnlineVersion(), ilSCORM13Package\dbImportSco(), ilBookingObject\doClone(), ilObjCmiXapi\doCloneObject(), ilObjMediaObject\duplicate(), ilObjStyleSheet\export(), ilObjFileImplementationLegacy\export(), ilObjMediaObject\exportFiles(), ilObjFileBasedLMGUI\exportHTML(), ilCOPageHTMLExport\exportHTMLMOB(), ilCOPageHTMLExport\exportQuestionFiles(), ilObjSCORM2004LearningModule\exportScorm(), ilCOPageHTMLExport\exportStyles(), ilStyleExporter\getXmlRepresentation(), ilObjStyleSheet\import(), ilBlogDataSet\importRecord(), ilExerciseDataSet\importRecord(), ilHTMLLearningModuleDataSet\importRecord(), ilPollDataSet\importRecord(), ilPortfolioDataSet\importRecord(), ilMediaObjectDataSet\importRecord(), ilStyleDataSet\importRecord(), ilStyleImporter\importXmlRepresentation(), ilObjFileBasedLM\populateByDirectoy(), ilObjSAHSLearningModule\populateByDirectoy(), ilFileDataCourse\rCopy(), and unzip().

+ Here is the caller graph for this function:

◆ readFile()

static ilUtil::readFile (   $a_file)
static

there are some known problems with the original readfile method, which sometimes truncates delivered files regardless of php.ini setting (see http://de.php.net/manual/en/function.readfile.php) use this method to avoid these problems.

Definition at line 2017 of file class.ilUtil.php.

2018 {
2019 $chunksize = 1 * (1024 * 1024); // how many bytes per chunk
2020 $buffer = '';
2021 $handle = fopen($a_file, 'rb');
2022 if ($handle === false) {
2023 return false;
2024 }
2025 while (!feof($handle)) {
2026 $buffer = fread($handle, $chunksize);
2027 print $buffer;
2028 }
2029 return fclose($handle);
2030 }
if(! $in) print

References print.

◆ redirect()

static ilUtil::redirect (   $a_script)
static
Parameters
$a_script
Deprecated:
Use $DIC->ctrl()->redirectToURL() instead

Definition at line 3302 of file class.ilUtil.php.

3303 {
3304 global $DIC;
3305
3306 if (!isset($DIC['ilCtrl']) || !$DIC['ilCtrl'] instanceof ilCtrl) {
3307 $ctrl = new ilCtrl();
3308 } else {
3309 $ctrl = $DIC->ctrl();
3310 }
3311 $ctrl->redirectToURL($a_script);
3312 }
This class provides processing control methods.

References $DIC.

Referenced by ilLearningProgressGUI\__getNextClass(), ilStartUpGUI\_checkGoto(), ilObjExternalFeedGUI\_goto(), ilObjItemGroupGUI\_goto(), ilObjPollGUI\_goto(), ilObjMailGUI\_goto(), ilObjCourseGUI\_goto(), ilObjGroupGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjLearningSequence\_goto(), ilObjSystemFolderGUI\_goto(), ilCourseRegistrationGUI\add(), ilGroupRegistrationGUI\add(), ilObjCourseGUI\afterSave(), ilObjIndividualAssessmentGUI\afterSave(), ilObjContentObjectGUI\afterSave(), ilObjOrgUnitGUI\afterSave(), ilObjStudyProgrammeGUI\afterSave(), ilObjSurveyGUI\afterSave(), ilObjSurveyQuestionPoolGUI\afterSave(), ilObjQuestionPoolGUI\afterSave(), ilObjLinkResourceGUI\afterSave(), ilObjLearningSequenceGUI\afterSave(), ilObjMediaCastGUI\afterSave(), ilObjMediaPoolGUI\afterSave(), ilObjWikiGUI\afterSave(), ilTestPlayerAbstractGUI\afterTestPassFinishedCmd(), ilSurveyExecutionGUI\backToRepository(), ilObjTestGUI\backToRepositoryObject(), ilRemoteObjectBaseGUI\callObject(), ilLMPageObjectGUI\cancel(), SurveyQuestionGUI\cancel(), assQuestionGUI\cancel(), ilMailFormGUI\cancelMail(), ilSharedResourceGUI\cancelPassword(), assQuestionGUI\cancelSync(), ilSessionControl\checkCurrentSessionIsAllowed(), ilSessionControl\checkExpiredSession(), ilContainerStartObjectsGUI\checkPermission(), ilObjectGUI\cloneAllObject(), ilInternalLinkGUI\closeLinkHelp(), ilObjectCopyGUI\copyMultipleNonContainer(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilObjTestGUI\createQuestionObject(), ilErrorHandling\defaultHandler(), ilPersonalSettingsGUI\deleteOwnAccountLogout(), ilNewsItem\deliverMobFile(), ilImageMapEditorGUI\editImagemapForward(), ilErrorHandling\errorHandler(), ilUserProfileStartUpStep\execute(), ilObjMediaPoolGUI\executeCommand(), ilSCORMOfflineModeGUI\executeCommand(), ilSAHSEditGUI\executeCommand(), ilTestExpressPageObjectGUI\executeCommand(), ilCalendarPresentationGUI\executeCommand(), ilDashboardGUI\executeCommand(), ilObjTestGUI\executeCreateQuestionObject(), ilAdministrationGUI\forward(), ilLTIViewGUI\getContextId(), ilPublicUserProfileGUI\getHTML(), ilObjWikiGUI\gotoPageObject(), ilObjItemGroupGUI\gotoParent(), ilObjWikiGUI\gotoStartPageObject(), ilMembershipRegistrationCodeUtils\handleCode(), ilNavigationHistoryGUI\handleNavigationRequest(), ilTestExpressPageObjectGUI\handleToolbarCommand(), ilSharedResourceGUI\hasAccess(), ilObjContentObjectGUI\importFileObject(), ilObjSurveyQuestionPoolGUI\importFileObject(), ilObjSurveyGUI\importSurveyObject(), ilObjTestGUI\importVerifiedFileObject(), ilObjQuestionPoolGUI\importVerifiedFileObject(), ilEditClipboardGUI\insert(), ilDashboardGUI\jumpToComments(), ilDashboardGUI\jumpToNotes(), ilMailSearchCoursesGUI\mailCourses(), ilMailSearchGroupsGUI\mailGroups(), ilMailSearchCoursesGUI\mailMembers(), ilMailSearchGroupsGUI\mailMembers(), ilObjUserFolderGUI\mailObject(), ilMailingListsGUI\mailToList(), ilObjRoleGUI\mailToRoleObject(), ilContactGUI\mailToUsers(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilTestExpressPageObjectGUI\nextQuestion(), ilExerciseManagementGUI\openSubmissionViewObject(), ilAssQuestionHintRequestGUI\performRequestCmd(), ilObjLearningSequenceLearnerGUI\play(), ilObjSCORM2004LearningModuleGUI\preview(), ilTestExpressPageObjectGUI\prevQuestion(), ilObjTestGUI\questionsObject(), ilObjQuestionPoolGUI\questionsObject(), ilInitialisation\redirect(), ShibWAYF\redirect(), SurveyQuestionGUI\redirectAfterSaving(), ilExerciseManagementGUI\redirectFeedbackMailObject(), ilObjCourseGUI\redirectLocToTestConfirmedObject(), ilObjCourseGUI\redirectLocToTestObject(), ilObjLinkResourceGUI\redirectToLink(), ilStudyProgrammeChangeDeadlineGUI\redirectToParent(), ilStudyProgrammeChangeExpireDateGUI\redirectToParent(), ilStudyProgrammeMailMemberSearchGUI\redirectToParent(), ilTestExpressPageObjectGUI\redirectToQuestionPoolSelectionPage(), ilImprintGUI\renderFullscreen(), assQuestionGUI\save(), ilContentStyleSettingsGUI\saveActiveStyles(), ilMailFormGUI\saveDraft(), assQuestionGUI\saveEdit(), ilObjGlossaryGUI\saveObject(), ilPersonalSettingsGUI\savePassword(), ilPersonalProfileGUI\savePublicProfile(), ilContentStyleSettingsGUI\saveScope(), ilLPTableBaseGUI\sendMail(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilStudyProgrammeMailMemberSearchGUI\sendMailToSelectedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilMembershipMailGUI\sendMailToSelectedUsers(), ilObjAuthSettingsGUI\setAuthModeObject(), ilObjFileBasedLMGUI\showLearningModule(), ilRemoteObjectBaseGUI\showObject(), ilStartUpGUI\showTermsOfService(), ilTestOutputGUI\submitSolutionCmd(), ilTestPlayerDynamicQuestionSetGUI\submitSolutionCmd(), ilObjPollGUI\subscribe(), assQuestionGUI\sync(), ilContentStyleSettingsGUI\toggleGlobalDefault(), ilContentStyleSettingsGUI\toggleGlobalFixed(), ilObjPortfolioGUI\toRepository(), ilObjPollGUI\unsubscribe(), ilObjFileGUI\update(), ilObjComponentSettingsGUI\update(), ilObjSAHSLearningModuleGUI\uploadObject(), and ilObjPollGUI\vote().

+ Here is the caller graph for this function:

◆ removeTrailingPathSeparators()

◆ renameExecutables()

static ilUtil::renameExecutables (   $a_dir)
static

Rename uploaded executables for security reasons.

Definition at line 3511 of file class.ilUtil.php.

3512 {
3513 $def_arr = explode(",", SUFFIX_REPL_DEFAULT);
3514 foreach ($def_arr as $def) {
3515 ilUtil::rRenameSuffix($a_dir, trim($def), "sec");
3516 }
3517
3518 $def_arr = explode(",", SUFFIX_REPL_ADDITIONAL);
3519 foreach ($def_arr as $def) {
3520 ilUtil::rRenameSuffix($a_dir, trim($def), "sec");
3521 }
3522 }
static rRenameSuffix(string $a_dir, string $a_old_suffix, string $a_new_suffix)
Renames all files with certain suffix and gives them a new suffix.

References rRenameSuffix().

Referenced by ilPCInteractiveImageGUI\create(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilSCORM13Package\dbImportSco(), ilScorm2004DataSet\importRecord(), ilSCORM2004ScoGUI\importSave(), ilScormAiccImporter\importXmlRepresentation(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilDclMobRecordFieldModel\parseValue(), ilObjFileBasedLM\populateByDirectoy(), ilObjSAHSLearningModule\populateByDirectoy(), ilObjSCORM2004LearningModuleGUI\preview(), ilObjMediaObject\renameExecutables(), ilFileSystemGUI\renameFile(), ilCmiXapiContentUploadImporter\sanitizeObjectDirectory(), assQuestionGUI\suggestedsolution(), unzip(), ilFileSystemGUI\unzipFile(), ilObjMediaCastGUI\updateMediaItem(), ilFileSystemGUI\uploadFile(), ilMediaCreationGUI\uploadFile(), and ilObjSAHSLearningModuleGUI\uploadObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceLinkProperties()

static ilUtil::replaceLinkProperties (   $matches)
static

replaces target _blank with _self and the link text with the according object title.

Parameters
string$matches$matches[0] contains complete link $matches[1] contains href attribute $matches[2] contains id of goto link
Returns
link containg a _self target, same href and new text content

Definition at line 826 of file class.ilUtil.php.

827 {
828 $link = $matches[0];
829 $ref_id = $matches[2];
830
831 if ($ref_id > 0) {
832 $obj_id = ilObject::_lookupObjId($ref_id);
833 if ($obj_id > 0) {
834 $title = ilObject::_lookupTitle($obj_id);
835 $link = "<a href=" . $matches[1] . " target=\"_self\">" . $title . "</a>";
836 }
837 }
838 return $link;
839 }
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title

References ilObject\_lookupObjId(), and ilObject\_lookupTitle().

+ Here is the call graph for this function:

◆ replaceUrlParameterString()

static ilUtil::replaceUrlParameterString (   $url,
  $parametersArray 
)
static

Definition at line 3662 of file class.ilUtil.php.

3663 {
3664 foreach ($parametersArray as $paramName => $paramValue) {
3665 $url = ilUtil::KT_replaceParam($url, $paramName, $paramValue);
3666 }
3667 return $url;
3668 }
static KT_replaceParam($qstring, $paramName, $paramValue)

References $url, and KT_replaceParam().

+ Here is the call graph for this function:

◆ resizeImage()

static ilUtil::resizeImage (   $a_from,
  $a_to,
  $a_width,
  $a_height,
  $a_constrain_prop = false 
)
static

resize image

Parameters
string$a_fromsource file
string$a_totarget file
string$a_widthtarget width
string$a_heighttarget height

Definition at line 1874 of file class.ilUtil.php.

1875 {
1876 if ($a_constrain_prop) {
1877 $size = " -geometry " . $a_width . "x" . $a_height . " ";
1878 } else {
1879 $size = " -resize " . $a_width . "x" . $a_height . "! ";
1880 }
1881 $convert_cmd = ilUtil::escapeShellArg($a_from) . " " . $size . ilUtil::escapeShellArg($a_to);
1882
1883 ilUtil::execConvert($convert_cmd);
1884 }

References $size, escapeShellArg(), and execConvert().

Referenced by ilObjMediaObject\_resizeImage(), and ilObjStyleSheet\uploadImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rRenameSuffix()

static ilUtil::rRenameSuffix ( string  $a_dir,
string  $a_old_suffix,
string  $a_new_suffix 
)
static

Renames all files with certain suffix and gives them a new suffix.

This words recursively through a directory.

Parameters
string$a_dirdirectory
string$a_old_suffixold suffix
string$a_new_suffixnew suffix

@access public

Definition at line 3571 of file class.ilUtil.php.

3571 : bool
3572 {
3573 if ($a_dir === "/"
3574 || $a_dir === ""
3575 || strpos($a_dir, "..") !== false
3576 || trim($a_old_suffix) === "") {
3577 return false;
3578 }
3579
3580 // check if argument is directory
3581 if (!@is_dir($a_dir)) {
3582 return false;
3583 }
3584
3585 // read a_dir
3586 $dir = opendir($a_dir);
3587 if ($dir === false) {
3588 return false;
3589 }
3590
3591 $prohibited = [
3592 '...'
3593 ];
3594
3595 while ($file = readdir($dir)) {
3596 if (
3597 $file !== "."
3598 && $file !== ".."
3599 ) {
3600 // triple dot is not allowed in filenames
3601 if (in_array($file, $prohibited)) {
3602 unlink($a_dir . "/" . $file);
3603 continue;
3604 }
3605
3606 // directories
3607 if (@is_dir($a_dir . "/" . $file)) {
3608 self::rRenameSuffix($a_dir . "/" . $file, $a_old_suffix, $a_new_suffix);
3609 }
3610
3611 // files
3612 if (@is_file($a_dir . "/" . $file)) {
3613 // first check for files with trailing dot
3614 if (strrpos($file, '.') == (strlen($file) - 1)) {
3615 try {
3616 rename($a_dir . '/' . $file, substr($a_dir . '/' . $file, 0, -1));
3617 } catch (Throwable $t) {
3618 // to avoid exploits we do delete this file and continue renaming
3619 unlink($a_dir . '/' . $file);
3620 continue;
3621 }
3622
3623 $file = substr($file, 0, -1);
3624 }
3625
3626 $path_info = pathinfo($a_dir . "/" . $file);
3627
3628 if (strtolower($path_info["extension"]) === strtolower($a_old_suffix)) {
3629 $pos = strrpos($a_dir . "/" . $file, ".");
3630 $new_name = substr($a_dir . "/" . $file, 0, $pos) . "." . $a_new_suffix;
3631 // check if file exists
3632 if (file_exists($new_name)) {
3633 if (is_dir($new_name)) {
3634 ilUtil::delDir($new_name);
3635 } else {
3636 unlink($new_name);
3637 }
3638 }
3639 rename($a_dir . "/" . $file, $new_name);
3640 }
3641 }
3642 }
3643 }
3644 return true;
3645 }

References delDir(), and rRenameSuffix().

Referenced by ilObjMediaObject\renameExecutables(), renameExecutables(), and rRenameSuffix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sanitateTargetPath()

static ilUtil::sanitateTargetPath (   $a_target)
staticprotected
Parameters
$a_target

Definition at line 4116 of file class.ilUtil.php.

4117 {
4118 switch (true) {
4119 case strpos($a_target, ILIAS_WEB_DIR . '/' . CLIENT_ID) === 0:
4120 case strpos($a_target, './' . ILIAS_WEB_DIR . '/' . CLIENT_ID) === 0:
4121 case strpos($a_target, CLIENT_WEB_DIR) === 0:
4122 $targetFilesystem = \ILIAS\FileUpload\Location::WEB;
4123 break;
4124 case strpos($a_target, CLIENT_DATA_DIR . "/temp") === 0:
4125 $targetFilesystem = \ILIAS\FileUpload\Location::TEMPORARY;
4126 break;
4127 case strpos($a_target, CLIENT_DATA_DIR) === 0:
4128 $targetFilesystem = \ILIAS\FileUpload\Location::STORAGE;
4129 break;
4130 case strpos($a_target, ILIAS_ABSOLUTE_PATH . '/Customizing') === 0:
4131 $targetFilesystem = \ILIAS\FileUpload\Location::CUSTOMIZING;
4132 break;
4133 default:
4134 throw new InvalidArgumentException("Can not move files to \"$a_target\" because path can not be mapped to web, storage or customizing location.");
4135 }
4136
4137 $absTargetDir = dirname($a_target);
4138 $targetDir = LegacyPathHelper::createRelativePath($absTargetDir);
4139
4140 return array( $targetFilesystem, $targetDir );
4141 }
const CLIENT_WEB_DIR
Definition: constants.php:45
const TEMPORARY
The ILIAS temporary directory.
Definition: Location.php:38
const CUSTOMIZING
The filesystem within the web root where all the skins and plugins are saved.
Definition: Location.php:33
const WEB
The filesystem within the ilias web root.
Definition: Location.php:23
const STORAGE
The filesystem outside of the ilias web root.
Definition: Location.php:28

References CLIENT_DATA_DIR, CLIENT_ID, CLIENT_WEB_DIR, ILIAS\FileUpload\Location\CUSTOMIZING, ILIAS_WEB_DIR, ILIAS\FileUpload\Location\STORAGE, ILIAS\FileUpload\Location\TEMPORARY, and ILIAS\FileUpload\Location\WEB.

Referenced by moveUploadedFile().

+ Here is the caller graph for this function:

◆ secureLink()

static ilUtil::secureLink (   $a_str)
static

Definition at line 2741 of file class.ilUtil.php.

2742 {
2743 $a_str = str_ireplace("javascript", "jvscrpt", $a_str);
2744 $a_str = str_ireplace(array("%00", "%0a", "%0d", "%1a", "&#00;", "&#x00;",
2745 "&#0;", "&#x0;", "&#x0a;", "&#x0d;", "&#10;", "&#13;"), "-", $a_str);
2746 return $a_str;
2747 }

Referenced by ilPathGUI\getHTML(), ilObjMediaObjectGUI\savePropertiesObject(), ilExternalFeedItem\setMagpieItem(), ilObjMediaObjectGUI\setObjectPerCreationForm(), and unmaskAttributeTag().

+ Here is the caller graph for this function:

◆ securePlainString()

static ilUtil::securePlainString (   $a_str)
static

Remove unsecure characters from a plain text string.

This function currently returns the string without doing any changes.

Definition at line 2561 of file class.ilUtil.php.

2562 {
2563 if (ini_get("magic_quotes_gpc")) {
2564 return stripslashes($a_str);
2565 } else {
2566 return $a_str;
2567 }
2568 }

Referenced by ilMailFormGUI\editAttachments(), ilMailFormGUI\saveDraft(), ilMailFormGUI\saveMailBeforeSearch(), ilMailFormGUI\searchUsers(), ilMailFormGUI\sendMessage(), and ilMailFormGUI\showForm().

+ Here is the caller graph for this function:

◆ secureString()

static ilUtil::secureString (   $a_str,
  $a_strip_html = true,
  $a_allow = "" 
)
static

Remove unsecure tags.

Definition at line 2438 of file class.ilUtil.php.

2439 {
2440 // check whether all allowed tags can be made secure
2441 $only_secure = true;
2442 $allow_tags = explode(">", $a_allow);
2443 $sec_tags = ilUtil::getSecureTags();
2444 $allow_array = array();
2445 foreach ($allow_tags as $allow) {
2446 if ($allow != "") {
2447 $allow = str_replace("<", "", $allow);
2448
2449 if (!in_array($allow, $sec_tags)) {
2450 $only_secure = false;
2451 }
2452 $allow_array[] = $allow;
2453 }
2454 }
2455
2456 // default behaviour: allow only secure tags 1:1
2457 if (($only_secure || $a_allow == "") && $a_strip_html) {
2458 if ($a_allow == "") {
2459 $allow_array = array("b", "i", "strong", "em", "code", "cite",
2460 "gap", "sub", "sup", "pre", "strike", "bdo");
2461 }
2462
2463 // this currently removes parts of strings like "a <= b"
2464 // because "a <= b" is treated like "<spam onclick='hurt()'>ss</spam>"
2465 $a_str = ilUtil::maskSecureTags($a_str, $allow_array);
2466 $a_str = strip_tags($a_str); // strip all other tags
2467 $a_str = ilUtil::unmaskSecureTags($a_str, $allow_array);
2468
2469 // a possible solution could be something like:
2470 // $a_str = str_replace("<", "&lt;", $a_str);
2471 // $a_str = str_replace(">", "&gt;", $a_str);
2472 // $a_str = ilUtil::unmaskSecureTags($a_str, $allow_array);
2473 //
2474 // output would be ok then, but input fields would show
2475 // "a &lt;= b" for input "a <= b" if data is brought back to a form
2476 } else {
2477 // only for scripts, that need to allow more/other tags and parameters
2478 if ($a_strip_html) {
2479 $a_str = ilUtil::stripScriptHTML($a_str, $a_allow);
2480 }
2481 }
2482
2483 return $a_str;
2484 }
static unmaskSecureTags($a_str, $allow_array)
static maskSecureTags($a_str, $allow_array)
static getSecureTags()
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...

References getSecureTags(), maskSecureTags(), stripScriptHTML(), and unmaskSecureTags().

Referenced by ilOrgUnitExplorerGUI\getNodeContent(), assKprimChoiceGUI\handleAnswerTextsSubmit(), ilUserDataSet\importRecord(), ilTaggingSlateContentGUI\renderResourcesForTag(), ilExternalFeedItem\secureString(), ilAssSelfAssessmentQuestionFormatter\stripHtmlExceptSelfAssessmentTags(), stripSlashes(), assMultipleChoiceGUI\writeAnswerSpecificPostData(), assSingleChoiceGUI\writeAnswerSpecificPostData(), and assTextSubsetGUI\writeAnswerSpecificPostData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ secureUrl()

static ilUtil::secureUrl (   $url)
static

Prepare secure href attribute.

Parameters

return

Definition at line 2843 of file class.ilUtil.php.

2844 {
2845 // check if url is valid (absolute or relative)
2846 if (filter_var($url, FILTER_VALIDATE_URL) === false &&
2847 filter_var("http://" . $url, FILTER_VALIDATE_URL) === false &&
2848 filter_var("http:" . $url, FILTER_VALIDATE_URL) === false &&
2849 filter_var("http://de.de" . $url, FILTER_VALIDATE_URL) === false &&
2850 filter_var("http://de.de/" . $url, FILTER_VALIDATE_URL) === false) {
2851 return "";
2852 }
2853 if (trim(strtolower(parse_url($url, PHP_URL_SCHEME))) == "javascript") {
2854 return "";
2855 }
2856 $url = htmlspecialchars($url, ENT_QUOTES);
2857 return $url;
2858 }

References $url.

Referenced by ilTabsGUI\__getHTML(), ilDataCollectionGlobalTemplate\fillFooter(), ilCOPageGlobalTemplate\fillFooter(), ilRTEGlobalTemplate\fillFooter(), ilGlobalTemplate\fillFooter(), ilGroupedListGUI\getHTML(), ilObjMediaObject\getXML(), ilExternalFeedItem\secureString(), and ilExternalFeedItem\setMagpieItem().

+ Here is the caller graph for this function:

◆ sendFailure()

static ilUtil::sendFailure (   $a_info = "",
  $a_keep = false 
)
static

Send Failure Message to Screen.

Parameters
stringmessage
booleanif true message is kept in session

Definition at line 4534 of file class.ilUtil.php.

4535 {
4536 global $DIC;
4537
4538 if (isset($DIC["tpl"])) {
4539 $tpl = $DIC["tpl"];
4540 $tpl->setOnScreenMessage("failure", $a_info, $a_keep);
4541 }
4542 }

References $DIC, and $tpl.

Referenced by ilLocalUserGUI\__checkGlobalRoles(), ilExtIdGUI\__construct(), ilLocalUserGUI\__construct(), ilOrgUnitSimpleImportGUI\__construct(), ilOrgUnitSimpleUserImportGUI\__construct(), ilSystemStyleIconsGUI\__construct(), ilOrgUnitPositionGUI\__construct(), ilOrgUnitGlobalSettingsGUI\__construct(), ilAssQuestionFeedbackPageObjectCommandForwarder\__construct(), ilAssQuestionHintPageObjectCommandForwarder\__construct(), ilDclFieldListGUI\__construct(), ilDclTableEditGUI\__construct(), ilDclTableViewGUI\__construct(), ilDclDetailedViewGUI\__construct(), ilDclTableListGUI\__construct(), ilLocalUserGUI\__showRolesTable(), ilLPListOfObjectsGUI\__showUsersList(), ilObjUserAccess\_checkGoto(), ilChatroomAdminSmileyGUI\_checkSetup(), ilUploadFiles\_copyUploadFile(), ilObjBookingPoolGUI\_goto(), ilObjCategoryGUI\_goto(), ilObjDataCollectionGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjFileBasedLMGUI\_goto(), ilObjItemGroupGUI\_goto(), ilLMPageObjectGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilObjSessionGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjWikiGUI\_goto(), ilObjMailGUI\_goto(), ilObjectPluginGUI\_goto(), ilRemoteObjectBaseGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjCourseGUI\_goto(), ilObjGroupGUI\_goto(), ilObjFileGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjExerciseGUI\_goto(), ilGlossaryTermGUI\_goto(), ilStructureObjectGUI\_goto(), ilObjUserFolderGUI\_goto(), ilObjLearningSequence\_goto(), ilObjSystemFolderGUI\_goto(), ilObjCategoryGUI\_importCategories(), ilLTIConsumerAdministrationGUI\acceptProviderAsGlobalMultiCmd(), ilCalendarCategoryGUI\acceptShared(), ilDclRecordEditGUI\accessDenied(), ilStructureObjectGUI\activatePages(), ilObjComponentSettingsGUI\activatePlugin(), ilDidacticTemplateSettingsGUI\activateTemplates(), ilCourseParticipantsGroupsGUI\add(), ilCourseRegistrationGUI\add(), ilObjCourseGroupingGUI\add(), ilConditionHandlerGUI\add(), ilSurveyEvaluationGUI\addApprSelectionToToolbar(), ilUnitConfigurationGUI\addCategory(), ilObjBlogGUI\addContributor(), ilObjGlossaryGUI\addDefinition(), ilIndividualAssessmentMembersGUI\addedUsers(), ilRepositorySearchGUI\addFromClipboard(), ilExerciseManagementGUI\addMembersObject(), ilForumModeratorsGUI\addModerator(), ilOrgUnitStaffGUI\addOtherRoles(), ilBookingParticipantGUI\addParticipantObject(), ilSurveyPageGUI\addQuestionToolbar(), ilSurveyParticipantsGUI\addRater(), ilLDAPSettingsGUI\addRoleAssignment(), ilAuthShibbolethSettingsGUI\addRoleAssignmentRule(), ilOrgUnitUserAssignmentGUI\addStaff(), ilOrgUnitStaffGUI\addStaff(), ilOrgUnitUserAssignmentGUI\addStaffFromSearch(), ilContainerStartObjectsGUI\addStarterObject(), ilExSubmissionTeamGUI\addTeamMemberActionObject(), ilObjGlossaryGUI\addTerm(), ilMembershipGUI\addToClipboard(), ilObjRoleGUI\addToClipboardObject(), ilObjUserFolderGUI\addToClipboardObject(), ilObjContentObjectGUI\addTooltip(), ilObjBlogGUI\addUserFromAutoComplete(), ilBookingParticipantGUI\addUserFromAutoCompleteObject(), ilExerciseManagementGUI\addUserFromAutoCompleteObject(), ilExSubmissionTeamGUI\addUserFromAutoCompleteObject(), ilObjRoleGUI\addUserObject(), ilSurveyParticipantsGUI\adminAppraiseesCloseObject(), ilObjRoleGUI\adoptPermSaveObject(), ilObjRoleTemplateGUI\adoptPermSaveObject(), ilObjCmiXapiGUI\afterSave(), ilObjCloudGUI\afterServiceAuth(), ilSCTreeTasksGUI\analyzeStructure(), ilCalendarAppointmentGUI\askDelete(), ilConditionHandlerGUI\askDelete(), ilCalendarCategoryGUI\askDeleteAppointments(), ilCustomUserFieldsGUI\askDeleteField(), ilObjCourseGroupingGUI\askDeleteGrouping(), ilCourseObjectivesGUI\askDeleteObjective(), ilContainerStartObjectsGUI\askDeleteStarterObject(), ilConditionHandlerGUI\assign(), ilLPListOfSettingsGUI\assign(), ilMembershipGUI\assignFromWaitingList(), ilGroupMembershipGUI\assignMembers(), ilCourseMembershipGUI\assignMembers(), ilLearningSequenceMembershipGUI\assignMembers(), ilLocalUserGUI\assignRoles(), ilObjCategoryGUI\assignRolesObject(), ilLocalUserGUI\assignSave(), ilObjCategoryGUI\assignSaveObject(), ilObjUserGUI\assignSaveObject(), ilMembershipGUI\assignSubscribers(), ilConsultationHoursGUI\assignUsersToAppointment(), ilObjCourseGUI\autoFillObject(), ilCalendarAppointmentGUI\bookconfirmed(), ilScorm2004Export\buildExportFilePDF(), ilRemoteObjectBaseGUI\callObject(), ilChatroomViewGUI\cancelJoin(), ilCertificateGUI\certificatePreview(), ilStudyProgrammeChangeDeadlineGUI\changeDeadline(), ilStudyProgrammeChangeExpireDateGUI\changeExpireDate(), ilPDNewsBlockGUI\changeFeedSettings(), ilPermission2GUI\changeOwner(), ilBookingReservationsGUI\changeStatusObject(), ilPageEditorGUI\characteristic(), ilOrgUnitTypeGUI\checkAccess(), ilStudyProgrammeTypeGUI\checkAccess(), ilMStListCertificatesGUI\checkAccessOrFail(), ilMStListCompetencesGUI\checkAccessOrFail(), ilMStListCompetencesSkillsGUI\checkAccessOrFail(), ilMStListCoursesGUI\checkAccessOrFail(), ilMStListUsersGUI\checkAccessOrFail(), ilMStShowUserGUI\checkAccessOrFail(), ilMStShowUserCompetencesGUI\checkAccessOrFail(), ilMStShowUserCoursesGUI\checkAccessOrFail(), ilSurveyExecutionGUI\checkAuth(), ilSurveyEvaluationGUI\checkEvaluationAccess(), ilPCMediaObjectGUI\checkFixSize(), ilObjMediaObjectGUI\checkFixSize(), ilAssQuestionHintsGUI\checkForExistingHintRelatingToCurrentQuestionAndRedirectOnFailure(), ilAssQuestionHintsGUI\checkForSingleHintIdAndRedirectOnFailure(), ilDclFieldEditGUI\checkInput(), ilDclTableEditGUI\checkInput(), ilPropertyFormGUI\checkInput(), ilObjWorkspaceFolderGUI\checkPassword(), ilSharedResourceGUI\checkPassword(), ilContainerStartObjectsGUI\checkPermission(), ilBookingProcessGUI\checkPermission(), ilSystemStyleMainGUI\checkPermission(), ilMembershipGUI\checkPermission(), ilLocalUserGUI\checkPermission(), ilRecommendedContentRoleConfigGUI\checkPushPermission(), ilMembershipGUI\checkRbacOrPermissionAccess(), assMatchingQuestion\checkSubmittedMatchings(), ilDclTableListGUI\checkTablesLeft(), assFileUpload\checkUpload(), ilChatroom\checkUserPermissions(), ilDclTableViewGUI\checkViewsLeft(), ilOrgUnitSimpleImportGUI\chooseImport(), ilContainerGUI\cloneAllObject(), ilObjectGUI\cloneAllObject(), ilContainerGUI\cloneWizardPageObject(), ilObjUserFolderGUI\confirmaccessRestrictObject(), ilSurveyParticipantsGUI\confirmAdminAppraiseesCloseObject(), ilMembershipGUI\confirmAssignFromWaitingList(), ilExAssignmentEditorGUI\confirmAssignmentsDeletionObject(), ilMembershipGUI\confirmAssignSubscribers(), ilCalendarCategoryGUI\confirmDelete(), ilConsultationHoursGUI\confirmDelete(), ilSurveyParticipantsGUI\confirmDeleteAppraiseesObject(), ilMailAttachmentGUI\confirmDeleteAttachments(), ilUnitConfigurationGUI\confirmDeleteCategories(), ilAssQuestionHintsGUI\confirmDeleteCmd(), ilLPObjectStatisticsGUI\confirmDeleteData(), ilExSubmissionFileGUI\confirmDeleteDeliveredObject(), ilMemberExportGUI\confirmDeleteExportFile(), ilAdvancedMDSettingsGUI\confirmDeleteFields(), ilObjectCustomUserFieldsGUI\confirmDeleteFields(), ilAdvancedMDSettingsGUI\confirmDeleteFiles(), ilObjSessionGUI\confirmDeleteFilesObject(), ilObjCourseGUI\confirmDeleteInfoFilesObject(), ilObjLinkResourceGUI\confirmDeleteLink(), ilObjRepositorySettingsGUI\confirmDeleteNewItemGroup(), ilObjRoleFolderGUI\confirmDeleteObject(), ilObjUserFolderGUI\confirmdeleteObject(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilSessionMembershipGUI\confirmDeleteParticipants(), ilMembershipGUI\confirmDeleteParticipants(), ilSurveyParticipantsGUI\confirmDeleteRatersObject(), ilAdvancedMDSettingsGUI\confirmDeleteRecords(), ilLDAPSettingsGUI\confirmDeleteRoleMapping(), ilAuthShibbolethSettingsGUI\confirmDeleteRules(), ilLDAPSettingsGUI\confirmDeleteRules(), ilLDAPSettingsGUI\confirmDeleteServerSettings(), ilContSkillAdminGUI\confirmDeleteSingleLocalProfile(), ilMailTemplateGUI\confirmDeleteTemplate(), ilLOEditorGUI\confirmDeleteTest(), ilLOEditorGUI\confirmDeleteTests(), ilPCIIMTriggerEditorGUI\confirmDeleteTrigger(), ilUnitConfigurationGUI\confirmDeleteUnits(), ilNewsItemGUI\confirmDeletionNewsItems(), ilBookingProcessGUI\confirmedBooking(), ilBookingProcessGUI\confirmedBookingNumbers(), ilCronManagerGUI\confirmedRun(), ilObjForumGUI\confirmMergeThreadsObject(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilMembershipGUI\confirmRefuseFromList(), ilMembershipGUI\confirmRefuseSubscribers(), ilObjMediaPoolGUI\confirmRemove(), ilObjBlogGUI\confirmRemoveContributor(), ilContainerGUI\confirmRemoveFromSystemObject(), ilRecommendedContentRoleConfigGUI\confirmRemoveItems(), ilPDSelectedItemsBlockGUI\confirmRemoveObject(), ilContSkillAdminGUI\confirmRemoveSingleGlobalProfile(), ilExSubmissionTeamGUI\confirmRemoveTeamMemberObject(), ilOrgUnitStaffGUI\confirmRemoveUser(), SurveyQuestionGUI\confirmSavePhrase(), ilObjGlossaryGUI\confirmTermDeletion(), ilSurveyConstraintsGUI\constraintsAddObject(), ilObjMediaCastGUI\convertFileObject(), ilObjWorkspaceFolderGUI\copy(), ilObjTestGUI\copyAndLinkQuestionsToPoolObject(), ilObjTestGUI\copyAndLinkToQuestionpoolObject(), ilObjStyleSheetGUI\copyCharacteristicsObject(), ilObjectCopyGUI\copyContainer(), ilObjSCORM2004LearningModuleGUI\copyItems(), ilSCORM2004NodeGUI\copyItems(), ilStructureObjectGUI\copyItems(), ilObjContentObjectGUI\copyItems(), ilObjectCopyGUI\copyMultipleNonContainer(), ilMediaItem\copyOriginal(), ilObjTestGUI\copyQuestionObject(), ilObjWorkspaceFolderGUI\copyShared(), ilObjectCopyGUI\copySingleObject(), ilDidacticTemplateSettingsGUI\copyTemplate(), ilGlossaryForeignTermCollectorGUI\copyTerms(), ilObjGlossaryGUI\copyTerms(), ilObjMediaPoolGUI\copyToClipboard(), ilStudyProgrammeTypeGUI\create(), ilPCInteractiveImageGUI\create(), ilPCVerificationGUI\create(), ilFileSystemGUI\createDirectory(), ilPCFileListGUI\createFileItem(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilConsultationHoursGUI\createNewBookingEntry(), ilObjBlogGUI\createPosting(), ilObjTestGUI\createQuestionPoolAndCopyObject(), ilLDAPSettingsGUI\createRoleMapping(), ilSurveyParticipantsGUI\createSurveyCodesObject(), ilExerciseManagementGUI\createTeamsFromGroupsObject(), ilECSMappingSettingsGUI\cSaveOverview(), ilECSMappingSettingsGUI\cUpdateSettings(), ilObjWorkspaceFolderGUI\cut(), ilObjContentObjectGUI\cutItems(), ilObjSCORM2004LearningModuleGUI\cutItems(), ilSCORM2004NodeGUI\cutItems(), ilStructureObjectGUI\cutItems(), ilObjLinkResourceGUI\deactivateLink(), ilObjComponentSettingsGUI\deactivatePlugin(), ilDidacticTemplateSettingsGUI\deactivateTemplates(), ilLPListOfSettingsGUI\deassign(), ilObjRoleGUI\deassignUserObject(), ilObjCmiXapiGUI\debug(), ilObjLTIConsumerGUI\debug(), ilCalendarCategoryGUI\declineShared(), ilErrorHandling\defaultHandler(), ilDclTableEditGUI\delete(), ilOrgUnitTypeGUI\delete(), ilObjStudyProgrammeAutoCategoriesGUI\delete(), ilObjStudyProgrammeAutoMembershipsGUI\delete(), ilStudyProgrammeTypeGUI\delete(), ilCalendarCategoryGUI\delete(), ilConsultationHoursGUI\delete(), ilConditionHandlerGUI\delete(), ilCalendarCategoryGUI\deleteAppointments(), ilPCImageMapEditorGUI\deleteAreas(), ilImageMapEditorGUI\deleteAreas(), ilSubStyleAssignmentGUI\deleteAssignments(), ilMailAttachmentGUI\deleteAttachments(), ilUnitConfigurationGUI\deleteCategories(), ilSurveyParticipantsGUI\deleteCodesConfirmObject(), ilObjWorkspaceFolderGUI\deleteConfirmation(), ilObject2GUI\deleteConfirmedObjects(), ilLPObjectStatisticsGUI\deleteData(), ilExSubmissionFileGUI\deleteDeliveredObject(), ilCalendarAppointmentGUI\deleteExclude(), ilCustomUserFieldsGUI\deleteField(), ilAdvancedMDSettingsGUI\deleteFields(), ilAdvancedMDSettingsGUI\deleteFiles(), ilObjSessionGUI\deleteFilesObject(), ilObjCourseGUI\deleteInfoFilesObject(), ilObjTaxonomyGUI\deleteItems(), ilMailFolderGUI\deleteMails(), ilMarkSchemaGUI\deleteMarkSteps(), SurveyQuestionGUI\deleteMaterial(), ilObjSkillManagementGUI\deleteNodes(), ilCourseObjectivesGUI\deleteObjectives(), ilRepUtilGUI\deleteObjects(), ilObjLinkResourceGUI\deleteParameter(), ilObjLinkResourceGUI\deleteParameterForm(), ilSessionMembershipGUI\deleteParticipants(), ilMembershipGUI\deleteParticipants(), ilCourseMembershipGUI\deleteParticipantsWithLinkedCourses(), ilPageLayoutAdministrationGUI\deletePgl(), ilAdvancedMDSettingsGUI\deleteRecords(), ilLDAPSettingsGUI\deleteRoleMapping(), ilAuthShibbolethSettingsGUI\deleteRules(), ilLDAPSettingsGUI\deleteRules(), ilSurveyParticipantsGUI\deleteSavedMessageObject(), ilLDAPSettingsGUI\deleteServerSettings(), ilContainerStartObjectsGUI\deleteStarterObject(), ilUserStartingPointGUI\deleteStartingPoint(), ilContentStyleSettingsGUI\deleteStyle(), ilMailTemplateGUI\deleteTemplate(), ilDidacticTemplateSettingsGUI\deleteTemplates(), ilTranslationGUI\deleteTranslations(), ilMultilingualismGUI\deleteTranslations(), ilObjectTranslationGUI\deleteTranslations(), ilUnitConfigurationGUI\deleteUnits(), ilLocalUserGUI\deleteUsers(), ilObjCategoryGUI\deleteUsersObject(), ilFileVersionsGUI\deleteVersions(), ilMailFolderGUI\deliverAttachments(), ilCmiXapiSettingsGUI\deliverCertificateCmd(), ilLTIConsumerSettingsGUI\deliverCertificateCmd(), ilObjCourseGUI\deliverCertificateObject(), ilObjStudyProgrammeGUI\deliverCertificateObject(), ilFileDataForum\deliverFile(), ilFileDataForumDrafts\deliverFile(), ilMailFolderGUI\deliverFile(), ilNewsItem\deliverMobFile(), ilFileDataForum\deliverZipFile(), ilFileDataForumDrafts\deliverZipFile(), ilObjStudyProgrammeGUI\denyAccessIfNotAnyOf(), ilForumModeratorsGUI\detachModeratorRole(), ilCalendarCategoryGUI\details(), ilObjMediaCastGUI\determinePlaytimeObject(), ilExSubmissionObjectGUI\directSubmitObject(), ilOrgUnitSimpleImportGUI\displayImportResults(), ilOrgUnitSimpleUserImportGUI\displayImportResults(), ilPageContentGUI\displayValidationError(), ilECSMappingSettingsGUI\dMap(), ilStartUpGUI\doApacheAuthentication(), ilStartUpGUI\doCasAuthentication(), ilDclStandardField\doCreate(), ilPermissionGUI\doImportRole(), ilStartUpGUI\doLTIAuthentication(), ilStartUpGUI\doMigration(), ilStartUpGUI\doMigrationNewAccount(), ilStartUpGUI\doOpenIdConnectAuthentication(), ilDclStandardField\doRead(), ilRepUtilGUI\doRestoreToNewLocation(), ilStartUpGUI\doSamlAuthentication(), ilStartUpGUI\doShibbolethAuthentication(), ilStartUpGUI\doStandardAuthentication(), ilUserCertificateGUI\download(), ilExSubmissionGUI\downloadFeedbackFileObject(), ilAdvancedMDSettingsGUI\downloadFile(), ilExSubmissionGUI\downloadFileObject(), ilAppointmentPresentationGUI\downloadFiles(), ilExSubmissionFileGUI\downloadObject(), ilECSMappingSettingsGUI\dSynchronizeTrees(), ilECSMappingSettingsGUI\dUpdateSettings(), ilECSMappingSettingsGUI\dUpdateTreeSettings(), ilCourseObjectivesGUI\edit(), ilConsultationHoursGUI\edit(), ilConditionHandlerGUI\edit(), ilCalendarCategoryGUI\edit(), ilObjOrgUnitGUI\editAdvancedSettings(), ilObjStudyProgrammeGUI\editAdvancedSettings(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilSurveyParticipantsGUI\editCodesObject(), ilObjLinkResourceGUI\editLink(), ilMembershipGUI\editParticipants(), ilExPeerReviewGUI\editPeerReviewObject(), ilSurveyPhrasesGUI\editPhrase(), assMatchingQuestionGUI\editQuestion(), assNumericGUI\editQuestion(), ilLDAPSettingsGUI\editRoleAssignment(), ilCloudPluginSettingsGUI\editSettings(), ilObjOrgUnitGUI\editSettings(), ilDidacticTemplateSettingsGUI\editTemplate(), ilLPListOfObjectsGUI\editUser(), ilMarkSchemaGUI\ensureEctsGradesCanBeEdited(), ilMarkSchemaGUI\ensureMarkSchemaCanBeEdited(), ilSurveyEvaluationGUI\evaluation(), ilSurveyEvaluationGUI\evaluationuser(), ilObjBlogGUI\executeCommand(), ilObjCloudGUI\executeCommand(), ilDclRecordListGUI\executeCommand(), ilDclDetailedViewGUI\executeCommand(), ilFileVersionsGUI\executeCommand(), ilObjOrgUnitGUI\executeCommand(), ilOrgUnitUserAssignmentGUI\executeCommand(), ilSurveyPageGUI\executeCommand(), ilObjTestGUI\executeCommand(), ilTestExpressPageObjectGUI\executeCommand(), ilTestRandomQuestionSetConfigGUI\executeCommand(), ilTestScoringGUI\executeCommand(), ilTestToplistGUI\executeCommand(), ilObjQuestionPoolGUI\executeCommand(), ilWikiPageGUI\executeCommand(), ilAdministrationGUI\executeCommand(), ilAuthShibbolethSettingsGUI\executeCommand(), ilCalendarPresentationGUI\executeCommand(), ilPageObjectGUI\executeCommand(), ilDashboardGUI\executeCommand(), ilLDAPSettingsGUI\executeCommand(), ilLTIRouterGUI\executeCommand(), ilMemberExportGUI\executeCommand(), ilObjectActivationGUI\executeCommand(), ilSamlSettingsGUI\executeCommand(), ilRepositoryObjectSearchGUI\executeCommand(), ilLPTableBaseGUI\executeCommand(), ilUIPluginRouterGUI\executeCommand(), ilSurveyEditorGUI\executeCreateQuestionObject(), ilSystemStyleOverviewGUI\export(), ilRegistrationSettingsGUI\exportCodes(), ilAccountCodesGUI\exportCodes(), ilSurveyParticipantsGUI\exportCodesObject(), ilAdvancedMDSettingsGUI\exportRecords(), ilDidacticTemplateSettingsGUI\exportTemplate(), ilFileSystemGUI\extCommand(), ilObjMediaCastGUI\extractPreviewImageObject(), ilTestScoringGUI\fetchActiveIdParameter(), ilCourseRegistrationGUI\fillMaxMembers(), ilGroupRegistrationGUI\fillMaxMembers(), ilOrgUnitTypeAdvancedMetaDataFormGUI\fillObject(), ilOrgUnitTypeFormGUI\fillObject(), ilStudyProgrammeTypeAdvancedMetaDataFormGUI\fillObject(), ilCourseRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationPeriod(), ilCourseRegistrationGUI\fillRegistrationType(), ilGroupRegistrationGUI\fillRegistrationType(), ilIndividualAssessmentMemberGUI\finalize(), ilCourseObjectivesGUI\finalSeparatedTestAssignment(), ilCourseObjectivesGUI\finalTestAssignment(), ilCourseObjectivesGUI\finalTestLimits(), ilSCTreeTasksGUI\findMissing(), ilSCTreeTasksGUI\findMissingTreeEntries(), ilTestEvaluationGUI\finishAllUserPasses(), ilAssQuestionPageCommandForwarder\forward(), ilOrgUnitStaffGUI\fromEmployeeToSuperior(), ilOrgUnitStaffGUI\fromSuperiorToEmployee(), ilUnitConfigurationGUI\getCategoryById(), ilLTIViewGUI\getContextId(), ilStyleDefinition\getCurrentSkin(), ilStyleDefinition\getCurrentStyle(), ilObjCloudGUI\getFile(), ilExerciseManagementGUI\getMultiActionUserIds(), ilBadgeProfileGUI\getMultiSelection(), assFormulaQuestionVariable\getRandomValue(), ilMailTemplateGUI\getTemplateForm(), ilObjectPermissionStatusGUI\getUser(), ilObjWikiGUI\gotoPageObject(), ilLPListOfSettingsGUI\groupMaterials(), ilObjCmiXapiGUI\handleAvailablityMessage(), ilObjLTIConsumerGUI\handleAvailablityMessage(), ilMembershipRegistrationCodeUtils\handleCode(), ilObjBibliographicGUI\handleNonAccess(), ilECSObjectSettings\handleSettingsUpdate(), ilTestOutputGUI\handleTearsAndAngerNoObjectiveOrientedQuestion(), ilObjSystemCheckGUI\handleTrashAction(), ilDidacticTemplateSettingsGUI\handleUpdateFailure(), ilSurveyParticipantsGUI\importAccessCodesActionObject(), ilCalendarCategoryGUI\importAppointments(), ilSurveyParticipantsGUI\importExternalRecipientsFromFileObject(), ilSurveyParticipantsGUI\importExternalRecipientsFromTextObject(), ilObjContentObjectGUI\importFileObject(), ilObjectGUI\importFileObject(), ilAdvancedMDSettingsGUI\importRecord(), ilObjSurveyGUI\importSurveyObject(), ilDidacticTemplateSettingsGUI\importTemplate(), ilLMImportGUI\importTranslation(), ilMediaPoolImportGUI\importTranslation(), ilObjSurveyGUI\infoScreen(), ilObjBibliographicGUI\infoScreenForward(), ilObjUserFolderGUI\initAccessRestrictionForm(), ilObjSessionGUI\initContainer(), ilPageObjectGUI\initEditing(), ilPCAMDPageListGUI\initForm(), ilPCSkillsGUI\initForm(), ilCloudPluginInitGUI\initGUI(), ilSamlSettingsGUI\initIdp(), ilMediaCreationGUI\insertFromPool(), ilSurveyPageGUI\insertNewQuestion(), ilObjTestGUI\insertQuestionsAfterObject(), ilObjTestGUI\insertQuestionsBeforeObject(), ilSurveyParticipantsGUI\insertSavedMessageObject(), ilMailTemplateGUI\insertTemplate(), ilRegistrationGUI\join(), ilDashboardGUI\jumpToComments(), ilDashboardGUI\jumpToNotes(), ilObjCourseGUI\leaveObject(), ilObjGroupGUI\leaveObject(), SurveyQuestionGUI\linkChilds(), ilSCTreeTasksGUI\listTree(), ilRepositorySearchGUI\listUsers(), ilObjRoleGUI\listUsersRoleObject(), ilChatroomViewGUI\lostConnection(), ilObjUserFolderGUI\mailObject(), ilSurveyParticipantsGUI\mailRatersObject(), ilMailingListsGUI\mailToList(), ilObjLanguageExtGUI\maintainExecuteObject(), ilCourseObjectivesGUI\materialAssignment(), ilObjForumGUI\mergeThreadsObject(), ilMMTopItemGUI\move(), ilObjTaxonomyGUI\moveItems(), ilMailFolderGUI\moveMails(), ilObjTestGUI\moveQuestionsObject(), ilMailFolderGUI\moveSingleMail(), moveUploadedFile(), arGUI\multiAction(), ilPCFileItemGUI\newFileItem(), ilMailMemberSearchGUI\nextMailForm(), ilExerciseManagementGUI\openSubmissionViewObject(), ilObjExerciseGUI\outCertificateObject(), ilTestPlayerAbstractGUI\outQuestionSummaryCmd(), ilDclMobRecordFieldModel\parseValue(), ilObjSurveyQuestionPool\pasteFromClipboard(), ilObjTaxonomyGUI\pasteItems(), ilObjQuestionPoolGUI\pasteObject(), ilMailFolderGUI\performAddSubFolder(), ilBiblFieldFilterGUI\performCommand(), ilAssQuestionHintsGUI\performDeleteCmd(), ilMailFolderGUI\performDeleteSubFolder(), ilLocalUserGUI\performDeleteUsers(), ilObjForumGUI\performMergeThreadsObject(), ilObjForumGUI\performMoveThreadsObject(), ilObjWorkspaceFolderGUI\performPasteIntoMultipleObjects(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilMailFolderGUI\performRenameSubFolder(), ilRepositoryObjectSearchGUI\performSearch(), ilRepositorySearchGUI\performSearch(), ilObjWikiGUI\performSearchObject(), ilDclTableViewEditGUI\permissionDenied(), ilAdvancedMDFieldDefinitionSelect\prepareCustomDefinitionFormConfirmation(), ilSurveyEditorGUI\printViewObject(), ilExAssignmentEditorGUI\processForm(), ilExAssignmentEditorGUI\processPeerReviewForm(), ilExSubmission\processUploadedZipFile(), ilObjForumGUI\publishDraftObject(), ilObjContentObjectGUI\publishExportFile(), ilSurveyEditorGUI\questionsObject(), ilObjQuestionPoolGUI\questionsObject(), ilObjTestGUI\redirectAfterMissingWrite(), ilObjQuestionPoolGUI\redirectAfterMissingWrite(), ilGlossaryForeignTermCollectorGUI\referenceTerms(), ilObjGlossaryGUI\referenceTerms(), ilECSSettingsGUI\refreshParticipants(), ilMembershipGUI\refuseFromList(), ilMembershipGUI\refuseSubscribers(), ilLPListOfSettingsGUI\releaseMaterials(), ilCourseParticipantsGroupsGUI\remove(), ilObjBlogGUI\removeContributor(), ilRepositorySearchGUI\removeFromClipboard(), ilOrgUnitStaffGUI\removeFromEmployees(), ilOrgUnitStaffGUI\removeFromRole(), ilOrgUnitStaffGUI\removeFromSuperiors(), ilRepUtilGUI\removeObjectsFromSystem(), ilObjTestGUI\removeQuestionsObject(), ilExSubmissionTeamGUI\removeTeamMemberObject(), ilFileSystemGUI\renameFile(), ilWikiPageGUI\renamePage(), ilSystemStyleLessGUI\reset(), ilLTIConsumerAdministrationGUI\resetProviderToUserScopeMultiCmd(), ilRepUtilGUI\restoreObjects(), ilRepUtilGUI\restoreToNewLocation(), ilObjRoleFolderGUI\roleSearchFormObject(), ilObjRoleFolderGUI\roleSearchListObject(), ilBookingReservationsGUI\rsvCancel(), ilBookingReservationsGUI\rsvCancelUser(), ilBookingReservationsGUI\rsvConfirmDelete(), ilBookingReservationsGUI\rsvDelete(), ilCalendarAppointmentGUI\save(), SurveyQuestionGUI\save(), ilObjCmiXapiVerificationGUI\save(), ilObjCourseVerificationGUI\save(), ilObjExerciseVerificationGUI\save(), ilObjLTIConsumerVerificationGUI\save(), ilObjSCORMVerificationGUI\save(), ilObjStudyProgrammeAutoCategoriesGUI\save(), ilObjStudyProgrammeAutoMembershipsGUI\save(), ilObjTestVerificationGUI\save(), ilObjLinkResourceGUI\save(), ilAuthShibbolethSettingsGUI\save(), ilCalendarCategoryGUI\save(), ilCalendarUserSettingsGUI\save(), ilObjCalendarSettingsGUI\save(), ilCASSettingsGUI\save(), ilLDAPSettingsGUI\save(), ilMemberAgreementGUI\save(), ilRadiusSettingsGUI\save(), ilRegistrationSettingsGUI\save(), ilSystemStyleSettingsGUI\save(), ilObjPrivacySecurityGUI\save_privacy(), ilAccessibilityDocumentGUI\saveAddDocumentForm(), ilTermsOfServiceDocumentGUI\saveAddDocumentForm(), ilWebDAVMountInstructionsUploadGUI\saveAddDocumentForm(), ilAdvancedMDTranslationGUI\saveAdditionalTranslations(), ilObjLinkResourceGUI\saveAddLink(), ilObjSearchSettingsGUI\saveAdvancedLuceneSettingsObject(), ilSubStyleAssignmentGUI\saveAssignment(), ilAccessibilityDocumentGUI\saveAttachCriterionForm(), ilTermsOfServiceDocumentGUI\saveAttachCriterionForm(), ilMailAttachmentGUI\saveAttachments(), ilObjPortfolioAdministrationGUI\saveAuthorship(), ilExSubmissionObjectGUI\saveBlogObject(), ilObjMediaCastGUI\saveCastItemObject(), ilUnitConfigurationGUI\saveCategory(), ilAccessibilityDocumentGUI\saveChangeCriterionForm(), ilTermsOfServiceDocumentGUI\saveChangeCriterionForm(), ilCronDeleteNeverLoggedInUserAccounts\saveCustomSettings(), ilCronDeleteInactiveUserAccounts\saveCustomSettings(), ilAccessibilityDocumentGUI\saveEditDocumentForm(), ilTermsOfServiceDocumentGUI\saveEditDocumentForm(), ilWebDAVMountInstructionsUploadGUI\saveEditDocumentForm(), ilObjContentObjectGUI\saveExportIds(), ilAssQuestionFeedbackEditingGUI\saveFeedbackFormCmd(), ilExternalFeedBlockGUI\saveFeedBlock(), ilObjectCustomUserFieldsGUI\saveField(), ilAccountRegistrationGUI\saveForm(), ilObjTestSettingsGeneralGUI\saveFormCmd(), ilObjTestSettingsScoringResultsGUI\saveFormCmd(), ilObjTestDynamicQuestionSetConfigGUI\saveFormCmd(), ilAssQuestionHintGUI\saveFormCmd(), ilObjQuestionPoolSettingsGeneralGUI\saveFormCmd(), ilObjUserFolderGUI\saveGeneralSettingsObject(), ilObjUserFolderGUI\saveGlobalUserSettingsObject(), ilObjSCORM2004LearningModuleGUI\saveGlossary(), ilConsultationHoursGUI\saveGroup(), ilObjSystemFolderGUI\saveHeaderTitlesObject(), ilExportGUI\saveItemSelection(), ilBiblTranslationGUI\saveLanguages(), ilMMItemTranslationGUI\saveLanguages(), ilMultilingualismGUI\saveLanguages(), ilObjectTranslationGUI\saveLanguages(), SurveyMatrixQuestionGUI\saveLayout(), ilObjLinkResourceGUI\saveLinkList(), ilAssQuestionHintsGUI\saveListOrderCmd(), ilObjUserFolderGUI\saveLoginnameSettingsObject(), ilObjSearchSettingsGUI\saveLuceneSettingsObject(), ilTestScoringByQuestionsGUI\saveManScoringByQuestion(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilMarkSchemaGUI\saveMarks(), ilObjectCustomUserFieldsGUI\saveMember(), ilObjContentObjectGUI\saveMenuEntry(), ilBookingProcessGUI\saveMultipleBookings(), ilLOEditorGUI\saveMultiTestAssignment(), ilSystemStyleOverviewGUI\saveNewSubStyle(), ilSystemStyleOverviewGUI\saveNewSystemStyle(), ilObjSessionGUI\saveObject(), ilOrgUnitTypeCustomIconsFormGUI\saveObject(), ilOrgUnitTypeFormGUI\saveObject(), ilObjStudyProgrammeReferenceGUI\saveObject(), ilObjRoleGUI\saveObject(), ilContainerReferenceGUI\saveObject(), ilStudyProgrammeTypeCustomIconsFormGUI\saveObject(), ilConditionHandlerGUI\saveObligatoryList(), ilLPListOfSettingsGUI\saveObligatoryMaterials(), ilConditionHandlerGUI\saveObligatorySettings(), ilPersonalSettingsGUI\savePassword(), ilBookingPreferencesGUI\savePreferences(), ilOpenIdConnectSettingsGUI\saveProfile(), ilPersonalProfileGUI\saveProfile(), ilObjSurveyGUI\savePropertiesObject(), ilCourseObjectivesGUI\saveQuestionOverview(), ilCourseObjectivesGUI\saveRandom(), ilAdvancedMDSettingsGUI\saveRecord(), ilRegistrationSettingsGUI\saveRoleAccessLimitations(), ilOpenIdConnectSettingsGUI\saveRoles(), ilLDAPSettingsGUI\saveRoleSelection(), ilConsultationHoursGUI\saveSequence(), ilObjPDFGenerationGUI\saveSettings(), ilBookingGatewayGUI\saveSettings(), ilLOEditorGUI\saveSettings(), ilObjFileAccessSettingsGUI\saveSettings(), ilObjLinkResourceGUI\saveSettings(), ilObjDashboardSettingsGUI\saveSettings(), ilOpenIdConnectSettingsGUI\saveSettings(), ilObjTermsOfServiceGUI\saveSettings(), ilLPListOfSettingsGUI\saveSettings(), ilObjWebDAVGUI\saveSettings(), ilECSParticipantSettingsGUI\saveSettings(), ilSingleUserShareGUI\saveShare(), ilAssQuestionSkillAssignmentsGUI\saveSkillPointsCmd(), ilAssQuestionSkillAssignmentsGUI\saveSkillQuestionAssignmentPropertiesFormCmd(), ilObjectCopyGUI\saveSource(), ilObjectCopyGUI\saveSourceMembership(), ilUserStartingPointGUI\saveStartingPoint(), ilObjectCopyGUI\saveTarget(), ilLOEditorGUI\saveTest(), ilTranslationGUI\saveTranslations(), ilAdvancedMDRecordTranslationGUI\saveTranslations(), ilMultilingualismGUI\saveTranslations(), ilObjectTranslationGUI\saveTranslations(), ilObjRootFolderGUI\saveTranslationsObject(), ilSurveyExecutionGUI\saveUserInput(), ilUserStartingPointGUI\saveUserStartingPoint(), ilObjDashboardSettingsGUI\saveViewSettings(), ilObjUserFolderGUI\searchResultHandler(), ilObjectCopyGUI\searchSource(), ilConsultationHoursGUI\searchUsersForAppointments(), ilObjCourseGroupingGUI\selectCourse(), ilRepositorySearchGUI\selectObject(), ilCourseObjectivesGUI\selfAssessmentAssignment(), ilCourseObjectivesGUI\selfAssessmentLimits(), ilSurveyParticipantsGUI\sendCodesMailObject(), ilDclRecordEditGUI\sendFailure(), ilObjBibliographicGUI\sendFile(), ilMemberAgreementGUI\sendInfoMessage(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilStudyProgrammeMailMemberSearchGUI\sendMailToSelectedUsers(), ilMailMemberSearchGUI\sendMailToSelectedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilMembershipMailGUI\sendMailToSelectedUsers(), ilTestGradingMessageBuilder\sendMessage(), ilSystemStyleMessageStack\sendMessages(), ilTestInfoScreenToolbarGUI\sendMessages(), ilBadgeBackpack\sendRequest(), ilLDAPSettingsGUI\serverList(), ilObjCloudGUI\serviceAuth(), ilSetting\set(), ilMailTemplateGUI\setAsContextDefault(), ilObjAuthSettingsGUI\setAuthModeObject(), ilObjectTranslationGUI\setFallback(), ilGlossaryForeignTermCollectorGUI\setForeignGlossary(), ilExerciseManagementGUI\setIndividualDeadlineObject(), ilImageMapEditorGUI\setLink(), ilObjContentObjectGUI\setPageLayout(), ilStructureObjectGUI\setPageLayout(), ilExSubmissionObjectGUI\setSelectedPortfolioObject(), ilImageMapEditorGUI\setShape(), ilCalendarCategoryGUI\shareAssign(), ilCalendarCategoryGUI\shareAssignRoles(), ilCalendarCategoryGUI\shareDeassign(), ilCalendarCategoryGUI\sharePerformSearch(), ilCalendarCategoryGUI\shareSearch(), ilBookingGatewayGUI\show(), ilLPObjectStatisticsGUI\showAccessGraph(), ilStartUpGUI\showAccountMigration(), ilExSubmissionTextGUI\showAssignmentTextObject(), ilPasswordAssistanceGUI\showAssignPasswordForm(), ilCmiXapiScoringGUI\showCmd(), ilCmiXapiStatementsGUI\showCmd(), ilLTIConsumerScoringGUI\showCmd(), ilLTIConsumerXapiStatementsGUI\showCmd(), ilStartUpGUI\showCodeForm(), ilObjBibliographicGUI\showContent(), ilLPObjectStatisticsGUI\showDailyGraph(), ilRepUtilGUI\showDeleteConfirmation(), ilMailTemplateGUI\showEditTemplateForm(), ilMailFolderGUI\showFolder(), ilObjTestDynamicQuestionSetConfigGUI\showFormCmd(), ilAssQuestionHintGUI\showFormCmd(), ilTestRandomQuestionSetConfigGUI\showGeneralConfigFormCmd(), ilExPeerReviewGUI\showGivenPeerReviewObject(), ilObjectCopyGUI\showItemSelection(), ilLPObjectStatisticsGUI\showLearningProgressGraph(), ilStartUpGUI\showLoginPage(), ilOrgUnitStaffGUI\showOtherRoles(), ilParticipantsTestResultsGUI\showParticipantsCmd(), ilLMPresentationGUI\showPrintView(), ilExPeerReviewGUI\showReceivedPeerReviewObject(), ilChatroomViewGUI\showRoom(), ilTestRandomQuestionSetConfigGUI\showSourcePoolDefinitionListCmd(), ilOrgUnitStaffGUI\showStaff(), ilOrgUnitStaffGUI\showStaffRec(), ilMailFormGUI\showSubmissionErrors(), ilMailTemplateGUI\showTemplates(), ilLPObjectStatisticsGUI\showTypesGraph(), ilLPListOfObjectsGUI\showUserObjectMatrix(), ilCourseContentGUI\showUserTimings(), ilOrgUnitSimpleImportGUI\startImport(), ilOrgUnitSimpleUserImportGUI\startImport(), ilObjSCORMLearningModuleGUI\stopUserOfflineMode(), ilPasswordAssistanceGUI\submitAssignPasswordForm(), ilContactGUI\submitInvitation(), assFormulaQuestionResult\substituteFormula(), ilSurveyEvaluationGUI\sumscore(), SurveyQuestionGUI\syncCopies(), ilCalendarCategoryGUI\synchroniseCalendar(), ilAuthFrontendCredentialsSoap\tryAuthenticationOnLoginPage(), ilObjComponentSettingsGUI\uninstallPlugin(), ilMailTemplateGUI\unsetAsContextDefault(), ilCalendarCategoryGUI\unshare(), ilFileSystemGUI\unzipFile(), ilObjLearningSequenceSettingsGUI\update(), ilObjStudyProgrammeSettingsGUI\update(), ilStudyProgrammeTypeGUI\update(), ilCalendarAppointmentGUI\update(), ilCalendarCategoryGUI\update(), ilPCVerificationGUI\update(), ilObjectActivationGUI\update(), ilSystemStyleLessGUI\update(), ilObjComponentSettingsGUI\update(), ilADTBasedObjectGUI\updateAction(), ilObjOrgUnitGUI\updateAdvancedSettings(), ilObjStudyProgrammeGUI\updateAdvancedSettings(), ilExSubmissionTextGUI\updateAssignmentTextObject(), ilBadgeManagementGUI\updateBadge(), ilSurveyParticipantsGUI\updateCodesObject(), ilECSSettingsGUI\updateCommunities(), ilConditionHandlerGUI\updateCondition(), ilObjLoggingSettingsGUI\updateErrorSettings(), ilExternalFeedBlockGUI\updateFeedBlock(), ilObjectCustomUserFieldsGUI\updateField(), ilCustomUserFieldsGUI\updateFields(), ilAdvancedMDSettingsGUI\updateFields(), ilCourseObjectivesGUI\updateFinalTestAssignment(), ilCourseObjectivesGUI\updateFinalTestLimits(), ilMDEditorGUI\updateGeneral(), ilConsultationHoursGUI\updateGroup(), ilObjCourseGUI\updateInfoObject(), ilPCDataTableGUI\updateJS(), ilObjLinkResourceGUI\updateLink(), ilObjLinkResourceGUI\updateLinks(), ilCourseContentGUI\updateManagedTimings(), ilCourseObjectivesGUI\updateMaterialAssignment(), ilObjCourseGUI\updateObject(), ilObjGroupGUI\updateObject(), ilObjSessionGUI\updateObject(), ilObjRoleGUI\updateObject(), ilContainerReferenceGUI\updateObject(), ilObjUserGUI\updateObject(), ilMembershipGUI\updateParticipants(), ilExPeerReviewGUI\updatePeerReviewObject(), ilCourseContentGUI\updatePersonalTimings(), ilSCORM2004ScoGUI\updateProperties(), ilMDEditorGUI\updateQuickEdit(), ilAdvancedMDSettingsGUI\updateRecord(), ilLDAPSettingsGUI\updateRoleAssignment(), ilAuthShibbolethSettingsGUI\updateRoleAssignmentRule(), ilLDAPSettingsGUI\updateRoleMapping(), ilRegistrationSettingsGUI\updateRoles(), ilCourseObjectivesGUI\updateSelfAssessmentAssignment(), ilCourseObjectivesGUI\updateSelfAssessmentLimits(), ilCloudPluginSettingsGUI\updateSettings(), ilObjOrgUnitGUI\updateSettings(), ilConsultationHoursGUI\updateSettings(), ilObjLoggingSettingsGUI\updateSettings(), ilObjSearchSettingsGUI\updateSettingsObject(), ilMailTemplateGUI\updateTemplate(), ilCourseContentGUI\updateTimings(), ilECSSettingsGUI\updateTitle(), ilObjectServiceSettingsGUI\updateToolSettings(), ilLPListOfObjectsGUI\updateUser(), ilCourseContentGUI\updateUserTimings(), ilCalendarCategoryGUI\uploadAppointments(), assOrderingQuestionGUI\uploadElementImage(), ilFileSystemGUI\uploadFile(), ilMailAttachmentGUI\uploadFile(), ilExSubmissionFileGUI\uploadFileObject(), ilExerciseManagementGUI\uploadMultiFeedbackObject(), ilMobMultiSrtUploadGUI\uploadMultipleSubtitleFile(), ilObjMediaObjectGUI\uploadMultipleSubtitleFileObject(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjLanguageExtGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), ilPersonalProfileGUI\uploadUserPicture(), ilObjUserGUI\uploadUserPictureObject(), ilLPListOfObjectsGUI\userDetails(), ilObjUserFolderGUI\usrExportCsvObject(), ilObjUserFolderGUI\usrExportX86Object(), ilObjUserFolderGUI\usrExportXmlObject(), ilObjPollGUI\validateCustom(), ilSCTreeTasksGUI\validateDuplicates(), SurveyMultipleChoiceQuestionGUI\validateEditForm(), ilCustomUserFieldsGUI\validateForm(), ilWkhtmlToPdfConfigFormGUI\validateForm(), ilLTIConsumerAdministrationGUI\validateProviderDeletionSelection(), assClozeTest\validateSolutionSubmit(), assFormulaQuestion\validateSolutionSubmit(), assMultipleChoice\validateSolutionSubmit(), assNumeric\validateSolutionSubmit(), ilObjOrgUnitGUI\view(), ilObjLanguageExtGUI\viewObject(), assFormulaQuestionGUI\writePostData(), assLongMenuGUI\writePostData(), and assKprimChoiceGUI\writePostData().

+ Here is the caller graph for this function:

◆ sendInfo()

static ilUtil::sendInfo (   $a_info = "",
  $a_keep = false 
)
static

Send Info Message to Screen.

Parameters
stringmessage
booleanif true message is kept in session

Definition at line 4518 of file class.ilUtil.php.

4519 {
4520 global $DIC;
4521
4522 $tpl = $DIC["tpl"];
4523 $tpl->setOnScreenMessage("info", $a_info, $a_keep);
4524 }

References $DIC, and $tpl.

Referenced by ilSurveySkillThresholdsTableGUI\__construct(), ilWorkspaceShareTableGUI\__construct(), FormMailCodesGUI\__construct(), ilBookingAssignParticipantsTableGUI\__construct(), ilRepositorySearchGUI\__performCourseSearch(), ilRepositorySearchGUI\__performGroupSearch(), ilRepositorySearchGUI\__performRoleSearch(), ilRepositorySearchGUI\__performUserSearch(), ilObjLinkResourceGUI\__prepareOutput(), ilObjRoleGUI\__prepareOutput(), ilUserSearchFilter\__searchObjects(), ilChatroomAdminSmileyGUI\_checkSetup(), ilUploadFiles\_copyUploadFile(), ilObjCmiXapiGUI\_goto(), ilObjLTIConsumerGUI\_goto(), ilObjSAHSLearningModuleGUI\_goto(), ilObjTestGUI\_goto(), ilObjForumGUI\_goto(), ilObjChatroomGUI\_goto(), ilObjContentPageGUI\_goto(), ilObjLearningSequenceGUI\_goto(), ilPersonalSettingsGUI\abortDeleteOwnAccount(), ilObjTestGUI\accessViolationRedirect(), ilPageLayoutAdministrationGUI\activate(), ilObjectTranslationGUI\activateContentMultilinguality(), ilECSSettingsGUI\addCategoryMapping(), ilObjTestGUI\addDefaultsObject(), ilTestParticipantsGUI\addParticipants(), assTextQuestionGUI\addSuggestedSolution(), ilBadgeProfileGUI\addToBackpackMulti(), ilObjRoleGUI\addUserObject(), ilIndividualAssessmentMembersGUI\addUsersFromSearch(), ilObjTestGUI\applyDefaultsObject(), assImagemapQuestionGUI\areaEditor(), ilCalendarAppointmentGUI\askDelete(), ilExSubmissionObjectGUI\askDirectSubmissionObject(), ilSkillProfileGUI\assignLevel(), assImagemapQuestionGUI\back(), ilObjSCORMLearningModuleGUI\cancel(), ilObjStyleSheetGUI\cancelCharacteristicDeletionObject(), ilContentStyleSettingsGUI\cancelDelete(), ilPageLayoutAdministrationGUI\cancelDeletePg(), ilSurveyParticipantsGUI\cancelDeleteSelectedUserDataObject(), ilObjSCORMLearningModuleGUI\cancelDeleteTracking(), SurveyQuestionGUI\cancelExplorer(), ilObjSearchSettingsGUI\cancelObject(), ilObjStyleSheetGUI\cancelObject(), ilObjSCORMLearningModuleGUI\cancelStopUserOfflineMode(), SurveyQuestionGUI\cancelSync(), ilTestPlayerAbstractGUI\checkOnlineTestAccess(), ilChatroomAdminViewGUI\checkServerConnection(), ilTestPlayerAbstractGUI\checkTestExecutable(), ilContainerGUI\cloneAllObject(), ilSurveyParticipantsGUI\codesObject(), ilObjPDFGenerationGUI\configForm(), ilPCGridGUI\confirmCellDeletion(), ilObjLearningSequenceContentGUI\confirmDelete(), ilConsultationHoursGUI\confirmDelete(), ilMailingListsGUI\confirmDelete(), ilObjPollGUI\confirmDeleteAllVotes(), ilMailAttachmentGUI\confirmDeleteAttachments(), ilObjMDSettingsGUI\confirmDeleteEntries(), ilObjSCORM2004LearningModuleGUI\confirmDeleteExportFile(), ilSCORM2004ScoGUI\confirmDeleteExportFile(), ilObjSurveyQuestionPoolGUI\confirmDeleteExportFileObject(), ilMailFolderGUI\confirmDeleteMails(), ilMailingListsGUI\confirmDeleteMembers(), ilMembershipGUI\confirmDeleteParticipants(), ilSkillProfileGUI\confirmDeleteProfiles(), ilContSkillAdminGUI\confirmDeleteSelectedLocalProfiles(), ilObjForumGUI\confirmDeleteThreadDraftsObject(), ilObjForumGUI\confirmDeleteThreads(), ilExcCriteriaCatalogueGUI\confirmDeletion(), ilExcCriteriaGUI\confirmDeletion(), ilExportGUI\confirmDeletion(), ilObjSCORM2004LearningModuleGUI\confirmedDelete(), ilObjSkillManagementGUI\confirmedDelete(), ilObjTaxonomyGUI\confirmedDelete(), ilObjHelpSettingsGUI\confirmHelpModulesDeletion(), ilSkillProfileGUI\confirmLevelAssignmentRemoval(), ilBasicSkillGUI\confirmLevelDeletion(), ilBasicSkillGUI\confirmLevelResourcesRemoval(), ilObjForumGUI\confirmMergeThreadsObject(), ilPortfolioRepositoryGUI\confirmPortfolioDeletion(), ilObjPortfolioBaseGUI\confirmPortfolioPageDeletion(), ilConsultationHoursGUI\confirmRejectBooking(), ilObjWikiGUI\confirmRemoveImportantPagesObject(), ilMultilingualismGUI\confirmRemoveLanguages(), ilObjectTranslationGUI\confirmRemoveLanguages(), ilContSkillAdminGUI\confirmRemoveSelectedGlobalProfiles(), ilContSkillAdminGUI\confirmRemoveSelectedSkill(), ilSkillSelfEvaluationGUI\confirmSelfEvaluationDeletion(), ilSettingsTemplateGUI\confirmSettingsTemplateDeletion(), ilPersonalSkillsGUI\confirmSkillRemove(), ilObjMediaObjectGUI\confirmSrtDeletionObject(), ilPCTabsGUI\confirmTabsDeletion(), ilDidacticTemplateGUI\confirmTemplateSwitch(), ilSkillProfileGUI\confirmUserRemoval(), ilSurveyConstraintsGUI\constraintStep1Object(), ilObjBlogGUI\contributors(), ilObjMediaCastGUI\convertFileObject(), ilObjSCORM2004LearningModuleGUI\copyItems(), ilSCORM2004NodeGUI\copyItems(), ilStructureObjectGUI\copyItems(), ilObjContentObjectGUI\copyItems(), ilSkillTreeNodeGUI\copyItems(), ilObjSurveyQuestionPoolGUI\copyObject(), ilObjQuestionPoolGUI\copyObject(), ilContainerGUI\copyObject(), ilObjContentObjectGUI\copyPage(), ilObjPortfolioBaseGUI\copyPageForm(), ilObjTestGUI\copyQuestionObject(), ilSurveyEditorGUI\copyQuestionsToPoolObject(), ilObjGlossaryGUI\copyTerms(), ilPCVerificationGUI\create(), ilSurveyConstraintsGUI\createConstraintsObject(), ilExSubmissionObjectGUI\createPortfolioObject(), ilExSubmissionObjectGUI\createPortfolioTemplateObject(), ilSurveyEditorGUI\createQuestionblockObject(), ilTestExportGUI\createTestArchiveExport(), ilExAssTypeWikiTeamGUI\createWiki(), ilObjContentObjectGUI\cutItems(), ilObjSCORM2004LearningModuleGUI\cutItems(), ilSCORM2004NodeGUI\cutItems(), ilStructureObjectGUI\cutItems(), ilSkillTreeNodeGUI\cutItems(), ilContainerGUI\cutObject(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilObjCmiXapiGUI\debug(), ilObjFileImplementationStorage\debug(), ilObjLTIConsumerGUI\debug(), ilChatroomBanGUI\delete(), ilPageEditorGUI\delete(), ilObjPollGUI\deleteAllVotes(), ilECSSettingsGUI\deleteCategoryMappings(), ilObjStyleSheetGUI\deleteCharacteristicConfirmationObject(), ilSurveyParticipantsGUI\deleteCodesObject(), ilObjStyleSheetGUI\deleteColorConfirmationObject(), ilObjStudyProgrammeAutoCategoriesGUI\deleteConfirmation(), ilObjStudyProgrammeAutoMembershipsGUI\deleteConfirmation(), ilObjTestGUI\deleteDefaultsObject(), ilObjMDSettingsGUI\deleteEntries(), ilObjAssessmentFolderGUI\deleteLogObject(), ilPDMailBlockGUI\deleteMail(), ilMailFolderGUI\deleteMails(), ilObjStyleSheetGUI\deleteMediaQueryConfirmationObject(), ilChatroomAdminSmileyGUI\deleteMultipleObject(), ilPersonalSettingsGUI\deleteOwnAccount1(), ilSurveyPhrasesGUI\deletePhrase(), ilSkillProfileGUI\deleteProfiles(), ilObjSurveyQuestionPoolGUI\deleteQuestionsObject(), ilObjQuestionPoolGUI\deleteQuestionsObject(), ilParticipantsTestResultsGUI\deleteSingleUserResultsCmd(), ilSurveyParticipantsGUI\deleteSingleUserResultsObject(), ilObjStyleSheetGUI\deleteTemplateConfirmationObject(), ilObjForumGUI\deleteThreadDraftsObject(), ilBiblTranslationGUI\deleteTranslations(), ilMMItemTranslationGUI\deleteTranslations(), ilMailFolderGUI\deliverFile(), ilTestEvaluationGUI\detailedEvaluation(), ilExSubmissionObjectGUI\directSubmitObject(), ilForumSettingsGUI\disableAdminForceNoti(), ilObjForumGUI\disableForumNotificationObject(), ilForumSettingsGUI\disableHideUserToggleNoti(), ilOrgUnitSimpleImportGUI\displayImportResults(), ilOrgUnitSimpleUserImportGUI\displayImportResults(), ilDclDetailedViewGUI\doExtReplace(), ilObjSurveyQuestionPoolGUI\downloadExportFileObject(), ilExSubmissionFileGUI\downloadReturnedObject(), ilBasicSkillGUI\edit(), ilBasicSkillTemplateGUI\edit(), ilObjectActivationGUI\edit(), ilBadgeManagementGUI\editBadge(), ilECSSettingsGUI\editCategoryMapping(), ilAdvancedMDSettingsGUI\editFields(), ilObjWikiGUI\editImportantPagesObject(), ilBasicSkillGUI\editLevel(), ilImageMapEditorGUI\editMapArea(), ilExPeerReviewGUI\editPeerReviewObject(), ilSkillTreeNodeGUI\editProperties(), ilObjContentObjectGUI\editPublicSection(), ilObjBlogAdministrationGUI\editSettings(), ilObjHelpSettingsGUI\editSettings(), ilObjDataCollectionGUI\emptyInfo(), ilForumSettingsGUI\enableAdminForceNoti(), ilObjForumGUI\enableForumNotificationObject(), ilForumSettingsGUI\enableHideUserToggleNoti(), ilTestPlayerAbstractGUI\endingTimeReached(), ilObjBlogGUI\executeCommand(), ilDclTableListGUI\executeCommand(), ilExerciseManagementGUI\executeCommand(), ilTermDefinitionEditorGUI\executeCommand(), ilObjFileBasedLMGUI\executeCommand(), ilObjContentObjectGUI\executeCommand(), ilObjTestDynamicQuestionSetConfigGUI\executeCommand(), ilObjTestGUI\executeCommand(), ilObjTestSettingsGeneralGUI\executeCommand(), ilObjTestSettingsScoringResultsGUI\executeCommand(), ilObjQuestionPoolSettingsGeneralGUI\executeCommand(), ilQuestionEditGUI\executeCommand(), ilObjTestGUI\executeCreateQuestionObject(), ilDclContentExporter\export(), ilECSSettingsGUI\exportMappings(), ilSkillProfileGUI\exportProfiles(), ilObjSurveyQuestionPoolGUI\exportQuestionObject(), ilObjQuestionPoolGUI\exportQuestionObject(), ilObjSCORMLearningModuleGUI\exportSelectionUsers(), ilObjMediaCastGUI\extractPreviewImageObject(), ilExportIDTableGUI\fillRow(), ilTestEvaluationGUI\finishTestPassForSingleUser(), ilChatroomSettingsGUI\general(), ilExAssignmentEditorGUI\generateTeams(), ilObjStudyProgrammeMembersGUI\getAddableUsers(), ilNewItemGroupTableGUI\getGroups(), ilBookingObjectsTableGUI\getItems(), ilExcCriteriaCatalogueTableGUI\getItems(), ilImagemapPreview\getPreviewFilename(), assFormulaQuestionGUI\getTestOutput(), ilObjectPermissionStatusGUI\getUser(), ilAssQuestionSkillAssignmentsGUI\handleAssignmentConfigurationHintMessage(), ilObjSCORMLearningModuleGUI\import(), ilECSSettingsGUI\importMappings(), ilLocalUserGUI\index(), ilFileVersionsGUI\index(), ilObjSurveyGUI\infoScreen(), ilCustomUserFieldsGUI\initFieldDefinition(), ilCustomUserFieldsGUI\initForm(), ilFileVersionFormGUI\initForm(), ilAssQuestionHintsGUI\initHintOrderingClipboardNotification(), ilForumTopicTableGUI\initMergeThreadsTable(), ilPCInteractiveImageGUI\insert(), ilObjMediaPoolGUI\insertFromClipboard(), ilSurveyEditorGUI\insertQuestionblocksObject(), ilSurveyEditorGUI\insertQuestions(), ilTestExpressPageObjectGUI\insertQuestions(), ilTestQuestionBrowserTableGUI\insertQuestionsCmd(), ilSurveyEditorGUI\insertQuestionsObject(), ilObjTestGUI\insertQuestionsObject(), ilObjTestGUI\insertRandomSelectionObject(), ilContactGUI\inviteToChat(), ilContainerGUI\linkObject(), ilBadgeProfileGUI\listBackpackGroups(), ilBadgeManagementGUI\listBadges(), ilUserCertificateGUI\listCertificates(), ilConditionHandlerGUI\listConditions(), ilPCInteractiveImageGUI\listContentPopups(), ilRecommendedContentRoleConfigGUI\listItems(), ilSkillCategoryGUI\listItems(), ilSkillTemplateCategoryGUI\listItems(), ilSkillTemplateReferenceGUI\listItems(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilBookingPreferencesGUI\listPreferenceOptions(), ilLMEditShortTitlesGUI\listShortTitles(), ilSkillRootGUI\listSkills(), ilPersonalSkillsGUI\listSkillsForAdd(), ilObjTaxonomyGUI\listTaxonomies(), ilSkillRootGUI\listTemplates(), ilObjectTranslationGUI\listTranslations(), ilObjCategoryGUI\listUsersObject(), ilMailSearchCoursesGUI\mail(), ilMailSearchGroupsGUI\mail(), ilMailingListsGUI\mailToList(), ilContactGUI\mailToUsers(), ilObjForumGUI\markAllReadObject(), ilMailFolderGUI\markMailsRead(), ilMailFolderGUI\markMailsUnread(), ilExerciseManagementGUI\membersObject(), ilObjForumGUI\mergeThreadsObject(), ilPermissionGUI\modifyBlockRoles(), ilObjContentObjectGUI\moveChapter(), ilObjTaxonomyGUI\moveItems(), ilMailFolderGUI\moveMails(), ilObjSurveyQuestionPoolGUI\moveObject(), ilObjQuestionPoolGUI\moveObject(), ilObjContentObjectGUI\movePage(), ilObjTestGUI\movePageObject(), ilSurveyEditorGUI\moveQuestionsObject(), ilMailFolderGUI\moveSingleMail(), ilObjForumGUI\moveThreadsObject(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilDclDetailedViewGUI\offerAlternativeViews(), ilLMPageGUI\onFeedbackEditingForwarding(), ilObjLanguageFolderGUI\out(), ilTestServiceGUI\outCorrectSolution(), assQuestionGUI\outQuestionPage(), assQuestionGUI\outQuestionType(), assQuestionGUI\outSolutionExplorer(), ilTestEvaluationGUI\outUserListOfAnswerPasses(), ilObjSurveyQuestionPoolGUI\pasteObject(), ilObjQuestionPoolGUI\pasteObject(), ilAdvancedSearchGUI\performAdvMDSearch(), ilMailingListsGUI\performDelete(), ilMailingListsGUI\performDeleteMembers(), ilMailFolderGUI\performDeleteSubFolder(), ilObjForumGUI\performDeleteThreadsObject(), ilObjForumGUI\performMoveThreadsObject(), ilObjForumGUI\performPostActivationObject(), ilAdvancedSearchGUI\performSearch(), ilRepositorySearchGUI\performSearch(), ilSearchGUI\performSearch(), ilLuceneAdvancedSearchGUI\performSearch(), ilLuceneSearchGUI\performSearch(), ilObjForumGUI\performThreadsActionObject(), ilSurveyPhrasesGUI\phrases(), ilObjLearningSequenceLearnerGUI\play(), ilTestPlayerFixedQuestionSetGUI\populateQuestionOptionalMessage(), ilTestPlayerRandomQuestionSetGUI\populateQuestionOptionalMessage(), ilImprintGUI\postOutputProcessing(), ilObjBlogGUI\preview(), ilWikiPageGUI\preview(), ilSurveyEvaluationGUI\printEvaluation(), ilObjTestGUI\printobject(), ilContSkillAdminGUI\publishAssignments(), ilObjTestGUI\questionsObject(), ilECSSettingsGUI\readAll(), ilObjGlossaryGUI\referenceTerms(), ilObjSessionGUI\registerObject(), ilMultilingualismGUI\removeLanguages(), ilObjectTranslationGUI\removeLanguages(), ilTestParticipantsGUI\removeParticipantsCmd(), ilSurveyEditorGUI\removeQuestionsObject(), ilSessionStatisticsGUI\render(), ilObjPollGUI\render(), ilObjBlogGUI\render(), ilBookingScheduleGUI\render(), ilBookingPreferencesGUI\renderBookingInfo(), ilSurveyPageGUI\renderPage(), ilExSubmissionObjectGUI\renderResourceSelection(), ilAssQuestionPreviewGUI\resetCmd(), ilAssQuestionHintsGUI\resetOrderingClipboardCmd(), ilRepUtilGUI\restoreToNewLocation(), ilObjTestGUI\reviewobject(), ilObjRoleFolderGUI\roleSearchListObject(), ilObjRoleFolderGUI\roleSearchObject(), ilFileVersionsGUI\rollbackVersion(), ilDownloadFilesBackgroundTask\run(), ilDclFieldEditGUI\save(), ilECSSettingsGUI\save(), ilAccessibilityDocumentGUI\saveAddDocumentForm(), ilTermsOfServiceDocumentGUI\saveAddDocumentForm(), ilWebDAVMountInstructionsUploadGUI\saveAddDocumentForm(), ilObjSearchSettingsGUI\saveAdvancedLuceneSettingsObject(), ilMailingListsGUI\saveAssignmentForm(), ilObjPortfolioAdministrationGUI\saveAuthorship(), ilExSubmissionObjectGUI\saveBlogObject(), ilObjStyleSheetGUI\saveCharacteristicObject(), ilTestParticipantsGUI\saveClientIpCmd(), ilMailFormGUI\saveDraft(), ilAccessibilityDocumentGUI\saveEditDocumentForm(), ilTermsOfServiceDocumentGUI\saveEditDocumentForm(), ilWebDAVMountInstructionsUploadGUI\saveEditDocumentForm(), ilObjMDSettingsGUI\saveEntry(), ilECSSettingsGUI\saveExportMappings(), ilContainerFilterAdminGUI\saveFields(), ilAccountRegistrationGUI\saveForm(), ilObjTestSettingsGeneralGUI\saveFormCmd(), ilObjStyleSheetGUI\saveHideStatusObject(), ilECSSettingsGUI\saveImportMappings(), ilBiblTranslationGUI\saveLanguages(), ilMMItemTranslationGUI\saveLanguages(), ilMultilingualismGUI\saveLanguages(), ilObjectTranslationGUI\saveLanguages(), ilObjSearchSettingsGUI\saveLuceneSettingsObject(), ilTestScoringByQuestionsGUI\saveManScoringByQuestion(), ilObjExternalToolsSettingsGUI\saveMathJaxObject(), ilObjSessionGUI\saveObject(), ilObjSAHSLearningModuleGUI\saveObject(), ilObjUserGUI\saveObject(), ilLPListOfSettingsGUI\saveObligatoryMaterials(), ilObjTestGUI\saveOrderAndObligationsObject(), ilObjAdvancedEditingGUI\savePageEditorSettingsObject(), assFileUpload\savePreviewData(), ilObjSCORMLearningModuleGUI\saveProperties(), ilObjMediaObjectGUI\savePropertiesObject(), ilContSkillAdminGUI\saveSelectedProfile(), ilSkillSelfEvaluationGUI\saveSelfEvaluation(), ilLOEditorGUI\saveSettings(), ilObjLearningHistorySettingsGUI\saveSettings(), ilObjCommentsSettingsGUI\saveSettings(), ilObjNotesSettingsGUI\saveSettings(), ilLPListOfSettingsGUI\saveSettings(), ilObjSearchSettingsGUI\saveSettingsObject(), ilSingleUserShareGUI\saveShare(), ilObjAdvancedEditingGUI\saveTags(), ilBiblTranslationGUI\saveTranslations(), ilAdvancedMDRecordTranslationGUI\saveTranslations(), assFileUpload\saveWorkingData(), ilMailSearchGUI\search(), ilMailFormGUI\search(), ilLuceneAdvancedSearchGUI\search(), ilObjectCopyGUI\searchSource(), ilPCMediaObjectGUI\selectObjectReference(), ilConditionHandlerGUI\selector(), ilTestRandomQuestionSetConfigGUI\selectPoolDerivationTargetCmd(), ilConsultationHoursGUI\sendInfoAboutUnassignedUsers(), ilObjCmiXapiGUI\sendLastFetchInfo(), ilTestGradingMessageBuilder\sendMessage(), ilSystemStyleMessageStack\sendMessages(), ilTestInfoScreenToolbarGUI\sendMessages(), ilObjWikiGUI\setAsStartPageObject(), ilObjAuthSettingsGUI\setAuthModeObject(), ilObjectTranslationGUI\setFallback(), ilObjMediaObjectGUI\setObjectPerCreationForm(), ilExSubmissionObjectGUI\setSelectedBlogObject(), ilExSubmissionObjectGUI\setSelectedPortfolioObject(), ilExSubmissionObjectGUI\setSelectedPortfolioTemplateObject(), ilTermsOfServiceWithdrawalGUIHelper\setWithdrawalInfoForLoginScreen(), ilMailSearchCoursesGUI\share(), ilMailSearchGroupsGUI\share(), ilNewsTimelineGUI\show(), ilCalendarSubscriptionGUI\show(), ilObjectCustomUserFieldsGUI\show(), ilDerivedTasksGUI\show(), ilLPListOfSettingsGUI\show(), ilUserActionAdminGUI\show(), ilRegistrationGUI\show(), ilContainerGUI\showAdministrationPanel(), ilLPObjectStatisticsGUI\showAggregationInfo(), ilPermissionGUI\showConfirmBlockRole(), ilLPObjectStatisticsGUI\showCronJobInfo(), ilObjContentObjectGUI\showEntrySelector(), ilMailFormGUI\showForm(), ilObjTestDynamicQuestionSetConfigGUI\showFormCmd(), ilTestRandomQuestionSetConfigGUI\showGeneralConfigFormCmd(), ilGlossaryForeignTermCollectorGUI\showGlossarySelector(), ilObjStudyProgrammeMembersGUI\showInfoMessage(), ilObjectCopyGUI\showItemSelection(), ilObjSessionGUI\showJoinRequestButton(), ilTestScoringByQuestionsGUI\showManScoringByQuestionParticipantsTable(), ilMarkSchemaGUI\showMarkSchema(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGroupsGUI\showMembers(), ilPRGMessagePrinter\showMessages(), ilObjTermsOfServiceGUI\showMissingDocuments(), ilObjWorkspaceFolderGUI\showMoveIntoObjectTree(), ilExerciseManagementGUI\showMultiFeedbackObject(), ilTestResultsGUI\showNoResultsReportingMessage(), ilObjBookingPoolGUI\showNoScheduleMessage(), ilExerciseManagementGUI\showParticipantObject(), ilObjPollGUI\showParticipants(), ilParticipantsTestResultsGUI\showParticipantsCmd(), ilObjPollGUI\showParticipantVotes(), ilPersonalSettingsGUI\showPassword(), ilContainerGUI\showPasswordInstructionObject(), ilPersonalProfileGUI\showPersonalData(), ilObjFileAccessSettingsGUI\showPreviewRenderers(), ilObjPrivacySecurityGUI\showPrivacy(), ilRepositorySelectorInputGUI\showRepositorySelection(), ilMailSearchGUI\showResults(), ilLuceneAdvancedSearchGUI\showSavedResults(), ilLuceneSearchGUI\showSavedResults(), ilTestRandomQuestionSetConfigGUI\showSourcePoolDefinitionListCmd(), ilObjectCopyGUI\showSourceSelectionMembership(), ilObjectCopyGUI\showSourceSelectionTree(), ilObjForumGUI\showStatisticsObject(), ilObjectCopyGUI\showTargetSelectionTree(), ilObjWikiGUI\showTemplateSelectionObject(), ilLMImportGUI\showTranslationImportForm(), ilMediaPoolImportGUI\showTranslationImportForm(), ilRepUtilGUI\showTrashTable(), ilMDCopyrightUsageGUI\showUsageTable(), ilParticipantsTestResultsGUI\showUserResults(), ilObjSystemFolderGUI\showVcsInformationObject(), ilTestEvaluationGUI\singleResults(), ilUserStartingPointGUI\startingPoints(), ilSkillSelfEvaluationGUI\startSelfEvaluation(), ilExSubmissionFileGUI\submissionScreenObject(), ilExSubmissionTeamGUI\submissionScreenTeamObject(), ilContactGUI\submitInvitation(), assQuestionGUI\suggestedsolution(), assFlashQuestionGUI\suggestRange(), assFormulaQuestionGUI\suggestRange(), ilSurveyEvaluationGUI\sumscore(), ilOrgUnitSimpleUserImportGUI\testImport(), ilObjForumGUI\toggleThreadNotificationObject(), ilBuddySystemGUI\transitionCommand(), ilSurveyEditorGUI\unfoldQuestionblockObject(), ilObjSessionGUI\unregisterObject(), ilPCVerificationGUI\update(), ilPCLearningHistoryGUI\update(), ilSkillProfileGUI\update(), ilECSSettingsGUI\update(), ilECSSettingsGUI\updateCategoryMapping(), ilObjMDSettingsGUI\updateEntry(), ilAdvancedMDSettingsGUI\updateField(), ilObjStyleSheetGUI\updateObject(), ilSCORM2004ScoGUI\updateProperties(), ilPageLayoutGUI\updateProperties(), ilSkillSelfEvaluationGUI\updateSelfEvaluation(), ilObjSearchSettingsGUI\updateSettingsObject(), ilObjTaxonomyGUI\updateTaxNode(), ilExSubmissionFileGUI\uploadFileObject(), ilMobMultiSrtUploadGUI\uploadMultipleSubtitleFileForm(), ilObjMediaObjectGUI\uploadMultipleSubtitleFileFormObject(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjTestGUI\uploadTstObject(), ilExSubmissionFileGUI\uploadZipObject(), ilObjContentObject\validatePages(), ilObjStudyProgrammeMembersGUI\view(), ilPDNotesGUI\view(), ilObjStudyProgrammeAutoCategoriesGUI\view(), ilObjStudyProgrammeAutoMembershipsGUI\view(), ilObjLanguageExtGUI\viewObject(), ilObjWikiGUI\viewPageObject(), ilExerciseManagementGUI\waitingDownloadObject(), assMultipleChoiceGUI\writeQuestionSpecificPostData(), and assSingleChoiceGUI\writeQuestionSpecificPostData().

+ Here is the caller graph for this function:

◆ sendQuestion()

static ilUtil::sendQuestion (   $a_info = "",
  $a_keep = false 
)
static

◆ setCookie()

static ilUtil::setCookie (   $a_cookie_name,
  $a_cookie_value = '',
  $a_also_set_super_global = true,
  $a_set_cookie_invalid = false 
)
static

Definition at line 4664 of file class.ilUtil.php.

4665 {
4666 /*
4667 if(!(bool)$a_set_cookie_invalid) $expire = IL_COOKIE_EXPIRE;
4668 else $expire = time() - (365*24*60*60);
4669 */
4670 // Temporary fix for feed.php
4671 if (!(bool) $a_set_cookie_invalid) {
4672 $expire = 0;
4673 } else {
4674 $expire = time() - (365 * 24 * 60 * 60);
4675 }
4676 /* We MUST NOT set the global constant here, because this affects the session_set_cookie_params() call as well
4677 if(!defined('IL_COOKIE_SECURE'))
4678 {
4679 define('IL_COOKIE_SECURE', false);
4680 }
4681 */
4682 $secure = false;
4683 if (defined('IL_COOKIE_SECURE')) {
4684 $secure = IL_COOKIE_SECURE;
4685 }
4686
4687 $cookie_parameters = [
4688 'expires' => $expire,
4689 'path' => IL_COOKIE_PATH,
4690 'domain' => IL_COOKIE_DOMAIN,
4691 'secure' => $secure,
4692 'httponly' => IL_COOKIE_HTTPONLY,
4693 ];
4694
4695 if (
4696 $secure &&
4697 (!isset(session_get_cookie_params()['samesite']) || strtolower(session_get_cookie_params()['samesite']) !== 'strict')
4698 ) {
4699 $cookie_parameters['samesite'] = 'Lax';
4700 }
4701
4702 setcookie(
4703 $a_cookie_name,
4704 $a_cookie_value,
4705 $cookie_parameters
4706 );
4707
4708 if ((bool) $a_also_set_super_global) {
4709 $_COOKIE[$a_cookie_name] = $a_cookie_value;
4710 }
4711 }
const IL_COOKIE_PATH(isset($_GET["client_id"]))
Definition: metadata.php:47
$_COOKIE[session_name()]
Definition: xapitoken.php:37

References $_COOKIE, and IL_COOKIE_PATH.

Referenced by ilSession\_destroy(), ilStartUpGUI\doLogout(), ilLTIViewGUI\logout(), ilSessionControl\removeSessionCookie(), and ilInitialisation\setClientIdCookie().

+ Here is the caller graph for this function:

◆ setPathStr()

static ilUtil::setPathStr (   $a_path)
static

??? @access public

Parameters
string

Definition at line 579 of file class.ilUtil.php.

580 {
581 if ("" != $a_path && "/" != substr($a_path, -1)) {
582 $a_path .= "/";
583 //$a_path = substr($a_path,1);
584 }
585
586 //return getcwd().$a_path;
587 return $a_path;
588 }

◆ shortenText()

static ilUtil::shortenText (   $a_str,
  $a_len,
  $a_dots = false,
  $a_next_blank = false,
  $a_keep_extension = false 
)
static

shorten a string to given length.

Adds 3 dots at the end of string (optional) TODO: do not cut within words (->wordwrap function) @access public

Parameters
stringstring to be shortened
integerstring length in chars
booleanadding 3 dots (true) or not (false, default)
truncateat first blank after $a_len characters
Returns
string shortended string

Definition at line 1345 of file class.ilUtil.php.

1351 {
1352 include_once("./Services/Utilities/classes/class.ilStr.php");
1353 if (ilStr::strLen($a_str) > $a_len) {
1354 if ($a_next_blank) {
1355 $len = ilStr::strPos($a_str, " ", $a_len);
1356 } else {
1357 $len = $a_len;
1358 }
1359 // BEGIN WebDAV
1360 // - Shorten names in the middle, before the filename extension
1361 // Workaround for Windows WebDAV Client:
1362 // Use the unicode ellipsis symbol for shortening instead of
1363 // three full stop characters.
1364 if ($a_keep_extension) {
1365 $p = strrpos($a_str, '.'); // this messes up normal shortening, see bug #6190
1366 }
1367 if ($p === false || $p == 0 || strlen($a_str) - $p > $a_len) {
1368 $a_str = ilStr::subStr($a_str, 0, $len);
1369 if ($a_dots) {
1370 $a_str .= "\xe2\x80\xa6"; // UTF-8 encoding for Unicode ellipsis character.
1371 }
1372 } else {
1373 if ($a_dots) {
1374 $a_str = ilStr::subStr($a_str, 0, $len - (strlen($a_str) - $p + 1)) . "\xe2\x80\xa6" . substr($a_str, $p);
1375 } else {
1376 $a_str = ilStr::subStr($a_str, 0, $len - (strlen($a_str) - $p + 1)) . substr($a_str, $p);
1377 }
1378 }
1379 }
1380
1381 return $a_str;
1382 }
static strPos($a_haystack, $a_needle, $a_offset=null)
Definition: class.ilStr.php:30
static subStr($a_str, $a_start, $a_length=null)
Definition: class.ilStr.php:15

References ilStr\strLen(), ilStr\strPos(), and ilStr\subStr().

Referenced by ilObjSystemFolder\_getHeaderTitleDescription(), ilObject\_writeDescription(), ilExcel\addSheet(), ilObject\create(), ilObjWikiGUI\editImportantPagesObject(), ilTree\fetchNodeData(), ilLDAPRoleMappingTableGUI\fillRow(), ilNewsForContextTableGUI\fillRow(), ilAdminSubItemsTableGUI\fillRow(), ilAssignmentsTableGUI\fillRow(), ilTermListTableGUI\fillRow(), ilPresentationListTableGUI\fillRow(), ilPasteIntoMultipleItemsExplorer\formatObject(), ilWorkspaceExplorer\formatObject(), ilExplorer\formatObject(), ilECSNodeMappingCmsExplorer\formatObject(), ilECSNodeMappingLocalExplorer\formatObject(), SurveyMatrixQuestionEvaluation\getChart(), ilContainer\getCompleteDescriptions(), ilObjLinkResourceListGUI\getDescription(), ilPDSelectedItemsBlockSelectedItemsProvider\getItems(), ilPDSelectedItemsBlockMembershipsProvider\getObjectsByMembership(), ilMailNotification\getObjectTitle(), ilCalendarEntry\getPresentationTitle(), ilLMPresentationGUI\ilLocator(), ilObjWikiGUI\initSettingsForm(), ilSCORMExplorer\insertObject(), ilWikiPageTemplateGUI\listTemplates(), ilChartDataSpider\parseGlobalOptions(), ilMembershipCronNotifications\parseNewsItem(), ilLMNavigationRendererGUI\render(), ILIAS\Repository\Provider\RepositoryMainBarProvider\renderLastVisited(), ilBenchmark\save(), ilObject\setDescription(), ilObject\setTitle(), and ilGlossaryDefinition\shortenShortText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shortenWords()

static ilUtil::shortenWords (   $a_str,
  $a_len = 30,
  $a_dots = true 
)
static

Ensure that the maximum word lenght within a text is not longer than $a_len.

Parameters
string$a_strinput string
integer$a_lenmax. word length
boolean$a_dotsappend "..." to shortened words
Returns
string

Definition at line 1397 of file class.ilUtil.php.

1398 {
1399 include_once("./Services/Utilities/classes/class.ilStr.php");
1400 $str_arr = explode(" ", $a_str);
1401
1402 for ($i = 0; $i < count($str_arr); $i++) {
1403 if (ilStr::strLen($str_arr[$i]) > $a_len) {
1404 $str_arr[$i] = ilStr::subStr($str_arr[$i], 0, $a_len);
1405 if ($a_dots) {
1406 $str_arr[$i] .= "...";
1407 }
1408 }
1409 }
1410
1411 return implode(" ", $str_arr);
1412 }

References $i, ilStr\strLen(), and ilStr\subStr().

Referenced by ilNewsForContextBlockGUI\getInfoForData(), and ilCalendarEntry\getPresentationTitle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sort_func()

static ilUtil::sort_func (   $a,
  $b 
)
static

sub-function to sort an array

Parameters
array$a
array$b
Returns
boolean true on success / false on error

Definition at line 3003 of file class.ilUtil.php.

3004 {
3005 global $array_sortby,$array_sortorder;
3006
3007 if (!isset($array_sortby)) {
3008 // occured in: setup -> new client -> install languages -> sorting of languages
3009 $array_sortby = 0;
3010 }
3011
3012 // this comparison should give optimal results if
3013 // locale is provided and mb string functions are supported
3014 if ($array_sortorder == "asc") {
3015 return ilStr::strCmp($a[$array_sortby], $b[$array_sortby]);
3016 }
3017
3018 if ($array_sortorder == "desc") {
3019 return !ilStr::strCmp($a[$array_sortby], $b[$array_sortby]);
3020 return strcoll(ilStr::strToUpper($b[$array_sortby]), ilStr::strToUpper($a[$array_sortby]));
3021 }
3022 }
static strCmp($a, $b)
Compare two strings.
static strToUpper($a_string)
Definition: class.ilStr.php:96
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References Vendor\Package\$a, Vendor\Package\$b, ilStr\strCmp(), and ilStr\strToUpper().

+ Here is the call graph for this function:

◆ sort_func_numeric()

static ilUtil::sort_func_numeric (   $a,
  $b 
)
static

sub-function to sort an array

Parameters
array$a
array$b
Returns
boolean true on success / false on error

Definition at line 3034 of file class.ilUtil.php.

3035 {
3036 global $array_sortby,$array_sortorder;
3037
3038 if ($array_sortorder == "asc") {
3039 return $a["$array_sortby"] > $b["$array_sortby"];
3040 }
3041
3042 if ($array_sortorder == "desc") {
3043 return $a["$array_sortby"] < $b["$array_sortby"];
3044 }
3045 }

References Vendor\Package\$a, and Vendor\Package\$b.

◆ sortArray()

static ilUtil::sortArray (   $array,
  $a_array_sortby,
  $a_array_sortorder = 0,
  $a_numeric = false,
  $a_keep_keys = false 
)
static

sortArray

Parameters
arrayarray to sort
stringsort_column
stringsort_order (ASC or DESC)
boolsort numeric?
Returns
array sorted array

Definition at line 3058 of file class.ilUtil.php.

3064 {
3065 include_once("./Services/Utilities/classes/class.ilStr.php");
3066
3067 if (!$a_keep_keys) {
3068 return self::stableSortArray($array, $a_array_sortby, $a_array_sortorder, $a_numeric, $a_keep_keys);
3069 }
3070
3071 global $array_sortby,$array_sortorder;
3072 $array_sortby = $a_array_sortby;
3073
3074 if ($a_array_sortorder == "desc") {
3075 $array_sortorder = "desc";
3076 } else {
3077 $array_sortorder = "asc";
3078 }
3079 if ($a_numeric) {
3080 if ($a_keep_keys) {
3081 uasort($array, array("ilUtil", "sort_func_numeric"));
3082 } else {
3083 usort($array, array("ilUtil", "sort_func_numeric"));
3084 }
3085 } else {
3086 if ($a_keep_keys) {
3087 uasort($array, array("ilUtil", "sort_func"));
3088 } else {
3089 usort($array, array("ilUtil", "sort_func"));
3090 }
3091 }
3092 //usort($array,"ilUtil::sort_func");
3093
3094 return $array;
3095 }
static stableSortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false)
Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which ha...

References stableSortArray().

Referenced by ilSkillCatTableGUI\__construct(), ilTaxonomyTableGUI\__construct(), ilBenchmarkTableGUI\__construct(), ilUserDefinedFields\__read(), ilContainerSessionsContentGUI\__showMaterials(), ilCourseObjectiveMaterials\_getAssignableMaterials(), ilExport\_getLastExportFileDate(), ilExport\_getLastExportFileInformation(), ilNewsItem\_getNewsItemsOfUser(), ilInfoScreenGUI\addPreconditions(), ilCalendarSchedule\calculate(), ilColumnGUI\determineBlocks(), ilLMTracker\determineProgressStatus(), ilObjTypeDefinitionGUI\editObject(), ilTable2GUI\exportData(), ilObjExercise\exportGradesExcel(), ilDataCollectionGlobalTemplate\fillFooter(), ilCOPageGlobalTemplate\fillFooter(), ilRTEGlobalTemplate\fillFooter(), ilGlobalTemplate\fillFooter(), ilPollBlockGUI\fillRow(), ilClassificationBlockGUI\filterContainer(), ilTaxonomyNode\fixOrderNumbers(), ilExAssignmentTeam\getAdoptableTeamAssignments(), ilNewsItem\getAggregatedChildNewsData(), ilNewsItem\getAggregatedNewsData(), ilObjSurvey\getAllRelations(), ilItemGroupItems\getAssignableItems(), ilCalendarSelectionBlockGUI\getCalendars(), ilPersonalSkillExplorerGUI\getChildsOfNode(), ilModulesTableGUI\getComponents(), ilAwarenessData\getData(), ilBenchmarkTableGUI\getDataByFirstTable(), ilSessionMaterialsTableGUI\getDataFromDb(), ilLearningHistoryEntryCollector\getEntries(), ilLikeData\getExpressionEntries(), ilLikeData\getExpressionEntriesForObject(), ilFSStorageExercise\getFiles(), ilFSWebStorageExercise\getFiles(), ilFSStorageExercise5069\getFiles(), ilFSStorageExc5242\getFiles(), ilContainerFilterFieldData\getFilterSetForRefId(), ilObjectDefinition\getGroupedRepositoryObjectTypes(), ilExAssignmentTeam\getGroupMembersMap(), ilNewItemGroupTableGUI\getGroups(), ilDclNReferenceFieldGUI\getHTML(), ilCalendarAgendaListGUI\getHTML(), ilTable2GUI\getHTML(), ilTestManScoringParticipantsTableGUI\getInternalyOrderedDataValues(), ilClipboardTableGUI\getItems(), ilPCIIMTriggerTableGUI\getItems(), ilPCImageMapTableGUI\getItems(), ilUserRoleStartingPointTableGUI\getItems(), ilObjBlogGUI\getKeywords(), ilBookingInfoScreenAdapter\getList(), ilObjAssessmentFolderGUI\getLogDataOutputForm(), ilItemGroupItemsTableGUI\getMaterials(), ilAwarenessData\getOnlineUserData(), ilCourseMembershipGUI\getPrintMemberData(), ilPageObject\getRecentChanges(), ilObjMediaCast\getSortedItemsArray(), ilObjectDefinition\getSubObjects(), ilObjectDefinition\getSubObjectsRecursively(), ilTagging\getTagsForUser(), ilObjectActivation\getTimingsAdministrationItems(), ilObjUserTrackingGUI\initLPDefaultsForm(), ilPCQuestionGUI\insert(), ilObjectListGUI\insertPreconditions(), ilPCParagraph\linkTermsInDom(), ilBadgeProfileGUI\listBadges(), ilTimingsPersonalTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilGroupParticipantsTableGUI\parse(), ilLearningSequenceParticipantsTableGUI\parse(), ilSCORMTrackingUsersTableGUI\parse(), ilObjectAddNewItemGUI\parsePersonalWorkspace(), ilObjectAddNewItemGUI\parseRepository(), ilBookingReservationDBRepository\preloadByContextIds(), ilTreeExplorerGUI\preloadChilds(), ilContentStyleSettings\read(), ilPortfolioPageGUI\renderMyCourses(), ilContainerContentGUI\renderPageEmbeddedBlocks(), ilSkillTreeNode\saveChildsOrder(), ilObjStyleSheet\saveMediaQueryOrder(), ilObjWiki\saveOrderingAndIndentation(), ilWikiPageGUI\searchWikiLinkAC(), ilExerciseManagementGUI\showParticipantObject(), ilLMPresentationGUI\showPrintView(), ilRepositoryExplorerGUI\sortChilds(), ilTableGUI\sortData(), ilLinkResourceItems\sortItems(), ilContainerSorting\sortItems(), ilExplorer\sortNodes(), ilWorkspaceFolderSorting\sortNodes(), ilContainerSorting\sortOrderDefault(), ilCourseObjectiveQuestionAssignmentTableGUI\sortQuestions(), ilContainerSorting\sortSubItems(), ilAdvancedMDSettingsGUI\updateSubstitutions(), and ilObjTypeDefinitionGUI\viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stableSortArray()

static ilUtil::stableSortArray (   $array,
  $a_array_sortby,
  $a_array_sortorder = 0,
  $a_numeric = false 
)
static

Sort an aray using a stable sort algorithm, which preveserves the sequence of array elements which have the same sort value.

To sort an array by multiple sort keys, invoke this function for each sort key.

Parameters
arrayarray to sort
stringsort_column
stringsort_order (ASC or DESC)
boolsort numeric?
Returns
array sorted array

Definition at line 3111 of file class.ilUtil.php.

3112 {
3113 global $array_sortby,$array_sortorder;
3114
3115 $array_sortby = $a_array_sortby;
3116
3117 if ($a_array_sortorder == "desc") {
3118 $array_sortorder = "desc";
3119 } else {
3120 $array_sortorder = "asc";
3121 }
3122
3123 // Create a copy of the array values for sorting
3124 $sort_array = array_values($array);
3125
3126 if ($a_numeric) {
3127 ilUtil::mergesort($sort_array, array("ilUtil", "sort_func_numeric"));
3128 } else {
3129 ilUtil::mergesort($sort_array, array("ilUtil", "sort_func"));
3130 }
3131
3132 return $sort_array;
3133 }

References mergesort().

Referenced by ilSCORM2004TrackingItemsTableGUI\getItems(), ilSCORMTrackingItemsTableGUI\getItems(), ilLanguageTableGUI\getItems(), ilBookingInfoScreenAdapter\getList(), ilTrQuery\getUserDataForObject(), ilBookingReservationDBRepository\preloadByContextIds(), and sortArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stripOnlySlashes()

static ilUtil::stripOnlySlashes (   $a_str)
static

strip slashes if magic qoutes is enabled

Parameters
stringstring

Definition at line 2423 of file class.ilUtil.php.

2424 {
2425 if (ini_get("magic_quotes_gpc")) {
2426 $a_str = stripslashes($a_str);
2427 }
2428
2429 return $a_str;
2430 }

Referenced by ilTextAreaInputGUI\checkInput(), assFormulaQuestionGUI\writePostData(), and assQuestionGUI\writeQuestionGenericPostData().

+ Here is the caller graph for this function:

◆ stripScriptHTML()

static ilUtil::stripScriptHTML (   $a_str,
  $a_allow = "",
  $a_rm_js = true 
)
static

strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b are allowed todo: needs to be optimized-> not very efficient

Parameters
string$a_strinput string
string$a_allowallowed tags, if an empty string is passed a default set of tags is allowed
boolean$a_rm_jsremove javascript attributes (onclick...)

Definition at line 2762 of file class.ilUtil.php.

2763 {
2764 //$a_str = strip_tags($a_str, $a_allow);
2765
2766 $negativestr = "a,abbr,acronym,address,applet,area,base,basefont," .
2767 "big,blockquote,body,br,button,caption,center,cite,code,col," .
2768 "colgroup,dd,del,dfn,dir,div,dl,dt,em,fieldset,font,form,frame," .
2769 "frameset,h1,h2,h3,h4,h5,h6,head,hr,html,i,iframe,img,input,ins,isindex,kbd," .
2770 "label,legend,li,link,map,menu,meta,noframes,noscript,object,ol," .
2771 "optgroup,option,p,param,q,s,samp,script,select,small,span," .
2772 "strike,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead," .
2773 "title,tr,tt,u,ul,var";
2774 $a_allow = strtolower($a_allow);
2775 $negatives = explode(",", $negativestr);
2776 $outer_old_str = "";
2777 while ($outer_old_str != $a_str) {
2778 $outer_old_str = $a_str;
2779 foreach ($negatives as $item) {
2780 $pos = strpos($a_allow, "<$item>");
2781
2782 // remove complete tag, if not allowed
2783 if ($pos === false) {
2784 $old_str = "";
2785 while ($old_str != $a_str) {
2786 $old_str = $a_str;
2787 $a_str = preg_replace("/<\/?\s*$item(\/?)\s*>/i", "", $a_str);
2788 $a_str = preg_replace("/<\/?\s*$item(\/?)\s+([^>]*)>/i", "", $a_str);
2789 }
2790 }
2791 }
2792 }
2793
2794 if ($a_rm_js) {
2795 // remove all attributes if an "on..." attribute is given
2796 $a_str = preg_replace("/<\s*\w*(\/?)(\s+[^>]*)?(\s+on[^>]*)>/i", "", $a_str);
2797
2798 // remove all attributes if a "javascript" is within tag
2799 $a_str = preg_replace("/<\s*\w*(\/?)\s+[^>]*javascript[^>]*>/i", "", $a_str);
2800
2801 // remove all attributes if an "expression" is within tag
2802 // (IE allows something like <b style='width:expression(alert(1))'>test</b>)
2803 $a_str = preg_replace("/<\s*\w*(\/?)\s+[^>]*expression[^>]*>/i", "", $a_str);
2804 }
2805
2806 return $a_str;
2807 }

Referenced by ilDataCollectionGlobalTemplate\fillHeader(), ilCOPageGlobalTemplate\fillHeader(), ilRTEGlobalTemplate\fillHeader(), ilGlobalTemplate\fillHeader(), ILIAS\Services\UICore\MetaTemplate\PageContentGUI\fillHeader(), ilDataCollectionGlobalTemplate\fillWindowTitle(), ilCOPageGlobalTemplate\fillWindowTitle(), ilRTEGlobalTemplate\fillWindowTitle(), ilGlobalTemplate\fillWindowTitle(), secureString(), and ilFramesetGUI\show().

+ Here is the caller graph for this function:

◆ stripSlashes()

static ilUtil::stripSlashes (   $a_str,
  $a_strip_html = true,
  $a_allow = "" 
)
static

strip slashes if magic qoutes is enabled

Parameters
booleanstrip also html tags

Definition at line 2406 of file class.ilUtil.php.

2407 {
2408 if (ini_get("magic_quotes_gpc")) {
2409 $a_str = stripslashes($a_str);
2410 }
2411 //echo "<br><br>-".$a_strip_html."-".htmlentities($a_str);
2412 //echo "<br>-".htmlentities(ilUtil::secureString($a_str, $a_strip_html, $a_allow));
2413 return ilUtil::secureString($a_str, $a_strip_html, $a_allow);
2414 }
static secureString($a_str, $a_strip_html=true, $a_allow="")
Remove unsecure tags.

References secureString().

Referenced by ilObjBookingPoolGUI\__construct(), ilObjBlogGUI\__construct(), ilBlogExerciseGUI\__construct(), ilBlogPostingGUI\__construct(), ilBookingReservationsGUI\__construct(), ilBookingGatewayGUI\__construct(), ilUserSearchFilter\__parseQueryString(), ilRepositorySearchGUI\__parseQueryString(), ilSearchGUI\__parseQueryString(), ilAdvancedSearchGUI\__performContentSearch(), ilAdvancedSearchGUI\__performEntitySearch(), ilAdvancedSearchGUI\__performGeneralSearch(), ilAdvancedSearchGUI\__performKeywordSearch(), ilAdvancedSearchGUI\__performLifecycleSearch(), ilAdvancedSearchGUI\__performTaxonSearch(), ilAdvancedSearchGUI\__performTitleSearch(), ilPCParagraph\_input2xml(), ilObjFileAccess\_lookupVersion(), ilCourseRegistrationGUI\add(), ilGroupRegistrationGUI\add(), ilPageEditorGUI\addChangeComment(), ilObjGlossaryGUI\addDefinition(), ilInfoScreenGUI\addPreconditionSection(), ilObjGlossaryGUI\addTerm(), ilObjContentObjectGUI\addTooltip(), ilPCInteractiveImage\addTriggerArea(), ilTermsOfServiceAcceptanceHistoryGUI\addUserAutoComplete(), ilObjBlogGUI\addUserFromAutoComplete(), ilContainer\applyContainerUserFilter(), ilPageEditorGUI\assignCharacteristic(), ilObjRole\assignData(), ilSkillProfileGUI\assignUser(), ilCmiXapiStatementsGUI\asyncUserAutocompleteCmd(), ilLTIConsumerXapiStatementsGUI\asyncUserAutocompleteCmd(), ilObjForumGUI\autosaveDraftAsyncObject(), ilObjForumGUI\autosaveThreadDraftAsyncObject(), ilAssQuestionSkillAssignmentsTableGUI\buildSkillPointsInput(), ilObjRoleGUI\changeExistingObjectsObject(), ilObjSystemFolderGUI\changeHeaderTitleObject(), ilPDSelectedItemsBlockGUI\changePDItemPresentation(), ilPDSelectedItemsBlockGUI\changePDItemSorting(), ilChatroomAuthInputGUI\checkInput(), ilDclGenericMultiInputGUI\checkInput(), ilGloAdvColSortInputGUI\checkInput(), ilOrgUnitGenericMultiInputGUI\checkInput(), ilOrgUnitMultiLineInputGUI\checkInput(), ilSuggestedSolutionSelectorGUI\checkInput(), ilClozeGapInputBuilderGUI\checkInput(), ilCaptchaInputGUI\checkInput(), ilAdvSelectInputGUI\checkInput(), ilAlphabetInputGUI\checkInput(), ilCheckboxInputGUI\checkInput(), ilCSSRectInputGUI\checkInput(), ilCustomInputGUI\checkInput(), ilDurationInputGUI\checkInput(), ilEMailInputGUI\checkInput(), ilFeedUrlInputGUI\checkInput(), ilFileInputGUI\checkInput(), ilFormulaInputGUI\checkInput(), ilLinkInputGUI\checkInput(), ilLocationInputGUI\checkInput(), ilMultiSelectInputGUI\checkInput(), ilNonEditableValueGUI\checkInput(), ilNumberInputGUI\checkInput(), ilPasswordInputGUI\checkInput(), ilRadioGroupInputGUI\checkInput(), ilRegExpInputGUI\checkInput(), ilRepositorySelectorInputGUI\checkInput(), ilSelectBuilderInputGUI\checkInput(), ilSelectInputGUI\checkInput(), ilTagInputGUI\checkInput(), ilTextAreaInputGUI\checkInput(), ilTextWizardInputGUI\checkInput(), ilUriInputGUI\checkInput(), ilUserLoginInputGUI\checkInput(), ilMailQuickFilterInputGUI\checkInput(), ilWidthHeightInputGUI\checkInput(), ilCopyrightInputGUI\checkInput(), ilTypicalLearningTimeInputGUI\checkInput(), ilLuceneQueryInputGUI\checkInput(), ilBackgroundImageInputGUI\checkInput(), ilBackgroundPositionInputGUI\checkInput(), ilFontSizeInputGUI\checkInput(), ilNumericStyleValueInputGUI\checkInput(), ilTRBLBorderStyleInputGUI\checkInput(), ilTRBLBorderWidthInputGUI\checkInput(), ilTRBLColorPickerInputGUI\checkInput(), ilTRBLNumericStyleValueInputGUI\checkInput(), ilExplorerSelectInputGUI\checkInput(), ilObjLinkResourceGUI\checkLinkInput(), ilObjSurvey\cloneTextblocks(), ilPageObjectGUI\confirmPageTranslationCreation(), ilObjMediaCastGUI\convertFileObject(), ilChatroomPrivateRoomGUI\create(), ilPCFileListGUI\create(), ilPCQuestionOverviewGUI\create(), ilPCResourcesGUI\create(), ilPCSourceCodeGUI\create(), ilPCTableGUI\create(), ilFileSystemGUI\createDirectory(), ilExportGUI\createExportFile(), ilFileUtils\createFile(), ilObjFileBasedLMGUI\createFromDirectory(), ilPCParagraphGUI\createJS(), ilPageObjectGUI\createPageTranslation(), ilObjBlogGUI\createPosting(), ilObjForumGUI\createTopLevelPostObject(), ilSCORM13Package\dbImportSco(), ilObjForumGUI\decorateWithAutosave(), ilExAssignmentEditorGUI\deleteAssignmentsObject(), ilMailAttachmentGUI\deleteAttachments(), ilFileSystemGUI\deleteFile(), ilPCInteractiveImageGUI\deleteOverlays(), ilObjSurveyGUI\doAutoCompleteObject(), ilStartUpGUI\doSamlAuthentication(), ilObjLanguageExtGUI\downloadObject(), ilPCParagraphGUI\edit(), ilPCDataTableGUI\editDataCl(), ilObjAuthSettingsGUI\editSOAPObject(), ilObjForumGUI\ensureValidPageForCurrentPosting(), ilObjTestGUI\executeCommand(), ilTestExpressPageObjectGUI\executeCommand(), assQuestionGUI\executeCommand(), ilContactGUI\executeCommand(), ilCronManagerGUI\executeCommand(), ilMailGUI\executeCommand(), ilMDCopyrightUsageGUI\executeCommand(), ilUsersGalleryGUI\executeCommand(), ilObjContentObjectGUI\export(), ilObjMediaPoolGUI\export(), ilObjContentObjectGUI\exportHTML(), ilFileSystemGUI\extCommand(), ilExportIDTableGUI\fillRow(), ilMailSearchCoursesMembersTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilObjContentObjectGUI\filterHelpChapters(), ilObjContentObjectGUI\filterTooltips(), ilObjForumGUI\getActivationFormHTML(), ilMailTemplateGUI\getAjaxPlaceholdersById(), ilPCDataTableGUI\getCellContent(), ilObjForumGUI\getCensorshipFormHTML(), ilWkhtmlToPdfConfigFormGUI\getConfigFromForm(), ilSCORM13MDImporter\getDescription(), ilObjUser\getFullname(), ilLanguage\getGlobalInstance(), ilTrSummaryTableGUI\getItems(), ilLMQuestionListTableGUI\getItems(), ilSCORM2004TrackingItemsTableGUI\getItems(), ilSCORMTrackingItemsTableGUI\getItems(), ilAssignedUsersTableGUI\getItems(), ilRegistrationCodesTableGUI\getItems(), ilTrObjectUsersPropsTableGUI\getItems(), ilTrUserObjectsPropsTableGUI\getItems(), ilAccountCodesTableGUI\getItems(), ilUserLPTableGUI\getItems(), ilUserTableGUI\getItems(), ilRepositoryObjectSearchBlockGUI\getLegacyContent(), ilExplorerBaseGUI\getNodeAsync(), ilTaxonomyExplorerGUI\getNodeHref(), assAnswerCloze\getNumericValueFromText(), ilSCORMPackageParser\getPackageTitle(), ilNumberInputGUI\getPostValueForComparison(), assTextQuestion\getSolutionSubmit(), ilSCORM13MDImporter\getTitle(), ilUserTableGUI\getUserIdsForFilter(), ilClozeGapInputBuilderGUI\getValue(), ilClozeGapInputBuilderGUI\getValueCombination(), ilPCParagraph\handleAjaxContent(), ilObjSessionGUI\handleFileUpload(), ilObjForumGUI\handleFormInput(), ilSCORMPackageParser\handlerCharacterData(), ilChatroomXMLParser\handlerEndTag(), ilForumXMLParser\handlerEndTag(), ilSCORM13Package\il_import(), ilPCTable\importHtml(), ilContentPageDataSet\importRecord(), ilLMImportGUI\importTranslation(), ilMediaPoolImportGUI\importTranslation(), ilScormAiccImporter\importXmlRepresentation(), ilExerciseManagementGUI\initFilter(), ilAdvancedSearchGUI\initUserSearchCache(), ilSearchGUI\initUserSearchCache(), ilLuceneSearchGUI\initUserSearchCache(), ilLuceneUserSearchGUI\initUserSearchCache(), ILIAS\COPage\Editor\Components\Paragraph\ParagraphCommandActionHandler\insertParagraph(), ilMDEditorGUI\keywordAutocomplete(), ilGlossaryPresentationGUI\listTerms(), ilCalendarAppointmentGUI\load(), ilObjSessionGUI\load(), ilECSUser\loadFromGET(), ilLDAPRoleGroupMappingSettings\loadFromPost(), ilECSSettingsGUI\loadFromPost(), ilCalendarAppointmentGUI\loadNotificationRecipients(), ilAdvancedMDSettingsGUI\loadRecordFormData(), ilRecurrenceInputGUI\loadRecurrence(), ilCalendarAppointmentGUI\loadRecurrenceSettings(), ilObjSessionGUI\loadRecurrenceSettings(), ilLDAPSettingsGUI\loadRoleAssignmentRule(), ilMailSearchGUI\lookupRecipientAsync(), ilMailFormGUI\lookupRecipientAsync(), ilObjLanguageExtGUI\maintainExecuteObject(), ilCSVReader\open(), assQuestionGUI\outChapterSelector(), assQuestionGUI\outPageSelector(), ilSCORMTrackingUsersTableGUI\parse(), ilFileSystemGUI\parseCurrentDirectory(), ilObjStudyProgrammeAutoMembershipsGUI\parseQueryString(), ilObjMediaPoolGUI\performBulkUpload(), ilMailingListsGUI\performDelete(), ilRepositoryObjectSearchGUI\performSearch(), ilRepositorySearchGUI\performSearch(), ilObjWikiGUI\performSearchObject(), prepareFormOutput(), ilLMPageGUI\processAnswer(), ilPageObjectGUI\processAnswer(), ilICalParser\purgeString(), ilMailBodyPurifier\purify(), ilObjTestGUI\randomselectObject(), ilMDAnnotation\read(), ilMDClassification\read(), ilMDContribute\read(), ilMDDescription\read(), ilMDEducational\read(), ilMDEntity\read(), ilMDFormat\read(), ilMDGeneral\read(), ilMDIdentifier\read(), ilMDIdentifier_\read(), ilMDKeyword\read(), ilMDLifecycle\read(), ilMDLocation\read(), ilMDMetaMetadata\read(), ilMDRelation\read(), ilMDRequirement\read(), ilMDRights\read(), ilMDTaxon\read(), ilMDTaxonPath\read(), ilMDTechnical\read(), ilMDTypicalAgeRange\read(), ilInitialisation\redirect(), ilAdvancedSearchGUI\remoteSearch(), ilSearchGUI\remoteSearch(), ilLuceneAdvancedSearchGUI\remoteSearch(), ilLuceneSearchGUI\remoteSearch(), ilLuceneUserSearchGUI\remoteSearch(), ilExAssignmentFileSystemGUI\renameFile(), ilFileSystemGUI\renameFile(), ilFileSystemGUI\renameFileForm(), ilObjForumGUI\renderPostContent(), ilObjForumGUI\renderSplitButton(), ilObjPDFGenerationGUI\resetSettings(), ilTable2GUI\restoreTemplate(), ilTestScoringByQuestionsGUI\retrieveFeedback(), ilFileSystemGUI\sanitizeCurrentDirectory(), ilQtiMatImageSecurity\sanitizeLabel(), ilLMEditShortTitlesGUI\save(), ilLMPageObjectGUI\save(), ilStructureObjectGUI\save(), ilObjCalendarSettingsGUI\save(), ilRadiusSettingsGUI\save(), ilRegistrationSettingsGUI\save(), ilPersonalSkillsFilterGUI\save(), ilPCMediaObjectGUI\saveAliasProperties(), ilObjSkillManagementGUI\saveAllTemplateTitles(), ilObjSCORM2004LearningModuleGUI\saveAllTitles(), ilObjSkillManagementGUI\saveAllTitles(), ilPCIIMTriggerEditorGUI\saveArea(), ilPCImageMapEditorGUI\saveArea(), ilImageMapEditorGUI\saveArea(), ilRegistrationSettingsGUI\saveAssignment(), ilObjSystemFolderGUI\saveBenchSettingsObject(), ilExerciseManagementGUI\saveCommentForLearnersObject(), ilExerciseManagementGUI\saveCommentsObject(), ilCronDeleteInactiveUserAccounts\saveCustomSettings(), ilGlossaryTermGUI\saveDefinition(), ilObjMDSettingsGUI\saveEntry(), ilExerciseManagementGUI\saveEvaluationFromModalObject(), ilObjContentObjectGUI\saveExportIds(), ilLikeGUI\saveExpression(), ilObjUserFolderGUI\saveGlobalUserSettingsObject(), ilExerciseManagementGUI\saveGradesObject(), ilObjWikiGUI\saveGradingObject(), ilObjSystemFolderGUI\saveHeaderTitleObject(), ilObjSystemFolderGUI\saveHeaderTitlesObject(), ilSurveyEditorGUI\saveHeadingObject(), ilPageObjectGUI\saveInitialOpenedContent(), ilTaxAssignInputGUI\saveInput(), ilTaggingGUI\saveInput(), ilObjSystemFolderGUI\saveJavaServerObject(), ilPCParagraphGUI\saveJS(), ilTaggingGUI\saveJS(), ilTestScoringGUI\saveManScoringParticipantScreen(), ilLDAPSettingsGUI\saveMapping(), ilObjCourseGUI\saveMapSettingsObject(), ilObjGroupGUI\saveMapSettingsObject(), ilObjExternalToolsSettingsGUI\saveMapsObject(), ilMarkSchemaGUI\saveMarkSchemaFormData(), ilObjExternalToolsSettingsGUI\saveMathJaxObject(), ilPCParagraph\saveMetaKeywords(), ilObjUserFolderGUI\saveNewAccountMailObject(), ilObjSAHSLearningModuleGUI\saveObject(), ilObjLanguageExtGUI\saveObject(), ilObjStyleSheetGUI\saveObject(), ilContainerGUI\savePageContentObject(), ilObjContentObjectGUI\savePageLayout(), ilStructureObjectGUI\savePageLayout(), ilPersonalSettingsGUI\savePassword(), ilObjPortfolioBaseGUI\savePortfolioPagesOrdering(), ilPersonalProfileGUI\saveProfile(), ilObjSCORM2004LearningModuleGUI\saveProperties(), ilPCFileListGUI\saveProperties(), ilObjSurveyGUI\savePropertiesObject(), ilObjMediaObjectGUI\savePropertiesObject(), ilRatingGUI\saveRating(), ilObjSCORM2004LearningModuleGUI\saveSequencing(), ilObjFileAccessSettingsGUI\saveSettings(), ilObjLearningResourcesSettingsGUI\saveSettings(), ilObjTaggingSettingsGUI\saveSettings(), ilObjAssessmentFolderGUI\saveSettingsObject(), ilObjTaxonomyGUI\saveSorting(), ilExerciseManagementGUI\saveStatusAllObject(), ilExerciseManagementGUI\saveStatusParticipantObject(), ilObjContentPageGUI\saveStyleSettings(), ilObjGlossaryGUI\saveStyleSettings(), ilObjContentObjectGUI\saveStyleSettings(), ilObjPortfolioBaseGUI\saveStyleSettings(), ilObjSCORM2004LearningModuleGUI\saveStyleSettings(), ilObjWikiGUI\saveStyleSettingsObject(), ilContainerGUI\saveStyleSettingsObject(), ilLDAPSettingsGUI\saveSyncronizationSettings(), ilPortfolioRepositoryGUI\saveTitles(), ilObjContentObjectGUI\saveTooltips(), ilTranslationGUI\saveTranslations(), ilMultilingualismGUI\saveTranslations(), ilObjectTranslationGUI\saveTranslations(), ilObjRootFolderGUI\saveTranslationsObject(), ilObjStudyProgrammeTreeGUI\saveTreeOrder(), assLongMenu\saveWorkingData(), ilExerciseManagementGUI\selectAssignmentObject(), ilExerciseManagementGUI\selectParticipantObject(), ilPCTableGUI\setAlignment(), ilContentPagePageCommandForwarder\setBackLinkTab(), ilSCORM13MDImporter\setDescription(), ilImageMapEditorGUI\setHighlight(), ilObjHelpSettingsGUI\setMode(), ilObjMediaObjectGUI\setObjectPerCreationForm(), ilPCTableGUI\setProperties(), ilLDAPRoleGroupMappingSetting\setRoleByName(), ilPCTableGUI\setSpans(), ilPCTableGUI\setStyles(), ilSCORM13MDImporter\setTitle(), ilPCTableGUI\setWidths(), ilCalendarCategoryGUI\sharePerformSearch(), ilRegistrationGUI\showCustomFields(), ilStartUpGUI\showLoginPage(), ilStartUpGUI\showSamlLoginForm(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItems(), ilObjSCORM2004LearningModuleGUI\showTrackingItemsBySco(), ilObjSCORMLearningModuleGUI\showTrackingItemsBySco(), ilObjForumGUI\showUserObject(), ilObjTaggingSettingsGUI\showUsers(), ILIAS\COPage\Editor\Components\Paragraph\ParagraphCommandActionHandler\split(), ilCertificateUtilHelper\stripSlashes(), SurveyQuestion\stripSlashesAddSpaceFallback(), ilFormPropertyGUI\stripSlashesAddSpaceFallback(), stripSlashesArray(), stripSlashesRecursive(), ilDataSet\stripTags(), ilPasswordAssistanceGUI\submitAssignPasswordForm(), ilPageObjectGUI\switchToLanguage(), ilBuddySystemGUI\transitionAsyncCommand(), ilExerciseXMLParser\trimAndStrip(), ilContainerBaseXmlParser\trimAndStrip(), ilMDSaxParser\trimAndStrip(), ilStyleImportParser\trimAndStrip(), SurveyImportParser\trimAndStrip(), ilPCInteractiveImageGUI\update(), ilPCQuestionOverviewGUI\update(), ilPCResourcesGUI\update(), ilPCSourceCodeGUI\update(), ilMDEditorGUI\updateAnnotation(), ilPCImageMapEditorGUI\updateAreas(), ilImageMapEditorGUI\updateAreas(), ilMDEditorGUI\updateClassification(), ILIAS\COPage\Editor\Components\MediaObject\MediaObjectCommandActionHandler\updateCommand(), ILIAS\COPage\Editor\Components\Page\PageCommandActionHandler\updateCommand(), ilNestedSetXML\updateDomNode(), ilMDEditorGUI\updateEducational(), ilObjMDSettingsGUI\updateEntry(), ilMDEditorGUI\updateGeneral(), ilObjCourseGUI\updateInfoObject(), ilObjGroupGUI\updateInfoObject(), ilPCDataTableGUI\updateJS(), ilMD5295Keyword\updateKeywords(), ilMDKeyword\updateKeywords(), ilMDEditorGUI\updateLifecycle(), ilObjLinkResourceGUI\updateLinks(), ilExerciseXMLParser\updateMarking(), ilSessionMembershipGUI\updateMembers(), ilMDEditorGUI\updateMetaMetaData(), ilNoteGUI\updateNote(), ilObjGroupGUI\updateObject(), ILIAS\COPage\Editor\Components\Paragraph\ParagraphCommandActionHandler\updateParagraph(), ilSCORM2004ScoGUI\updateProperties(), ilMDEditorGUI\updateQuickEdit(), ilMDEditorGUI\updateQuickEdit_scorm(), ilMDEditorGUI\updateQuickEdit_scorm_propagate(), ilAdvancedMDSettingsGUI\updateRecords(), ilMDEditorGUI\updateRelation(), ilMDEditorGUI\updateRights(), ilRegistrationGUI\updateSubscriptionRequest(), ilMDEditorGUI\updateTechnical(), ilGlossaryTermGUI\updateTerm(), ilObjGlossaryGUI\updateTerm(), ilExAssignmentFileSystemGUI\uploadFile(), ilFileSystemGUI\uploadFile(), ilObjLanguageExtGUI\uploadObject(), ilObjMediaObjectGUI\uploadSubtitleFileObject(), ilCourseRegistrationGUI\validate(), ilGroupRegistrationGUI\validate(), ilWkhtmlToPdfConfigFormGUI\validateForm(), and assLongMenuGUI\verifyAnswerOptions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stripSlashesArray()

static ilUtil::stripSlashesArray (   $a_arr,
  $a_strip_html = true,
  $a_allow = "" 
)
static

◆ stripSlashesRecursive()

static ilUtil::stripSlashesRecursive (   $a_data,
  $a_strip_html = true,
  $a_allow = "" 
)
static

Strip slashes from array and sub-arrays.

Definition at line 2382 of file class.ilUtil.php.

2383 {
2384 if (is_array($a_data)) {
2385 foreach ($a_data as $k => $v) {
2386 if (is_array($v)) {
2387 $a_data[$k] = ilUtil::stripSlashesRecursive($v, $a_strip_html, $a_allow);
2388 } else {
2389 $a_data[$k] = ilUtil::stripSlashes($v, $a_strip_html, $a_allow);
2390 }
2391 }
2392 } else {
2393 $a_data = ilUtil::stripSlashes($a_data, $a_strip_html, $a_allow);
2394 }
2395
2396 return $a_data;
2397 }
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.

References stripSlashes(), and stripSlashesRecursive().

Referenced by ilCategoryWizardInputGUI\checkInput(), ilMatrixRowWizardInputGUI\checkInput(), ilErrorTextWizardInputGUI\checkInput(), ilEssayKeywordWizardInputGUI\checkInput(), ilImageWizardInputGUI\checkInput(), ilKprimChoiceWizardInputGUI\checkInput(), ilKVPWizardInputGUI\checkInput(), ilMatchingPairWizardInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), ilMultipleChoiceWizardInputGUI\checkInput(), ilSingleChoiceWizardInputGUI\checkInput(), ilClozeGapInputBuilderGUI\checkInput(), ilAssErrorTextCorrectionsInputGUI\checkInput(), ilAssMatchingPairCorrectionsInputGUI\checkInput(), ilAssMultipleChoiceCorrectionsInputGUI\checkInput(), ilAssSingleChoiceCorrectionsInputGUI\checkInput(), ilImagemapCorrectionsInputGUI\checkInput(), ilImagemapFileInputGUI\checkInput(), ilKprimChoiceCorrectionsInputGUI\checkInput(), ilObjBlogGUI\confirmRemoveContributor(), ilCtrl\getParameterArrayByClass(), assLongMenu\getSolutionSubmit(), ilMultiFilesSubmitRecursiveSlashesStripper\manipulateFileSubmitValues(), ilFormSubmitRecursiveSlashesStripper\manipulateFormSubmitValues(), ilObjBlogGUI\removeContributor(), ilAnswerWizardInputGUI\sanitizeSuperGlobalSubmitValue(), ilLogicalAnswerComparisonExpressionInputGUI\sanitizeSuperGlobalSubmitValue(), stripSlashesRecursive(), and assLongMenuGUI\writeQuestionSpecificPostData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchColor()

static ilUtil::switchColor (   $a_num,
  $a_css1,
  $a_css2 
)
static

switches style sheets for each even $a_num (used for changing colors of different result rows)

@access public

Parameters
integer$a_numthe counter
string$a_css1name of stylesheet 1
string$a_css2name of stylesheet 2
Returns
string $a_css1 or $a_css2

Definition at line 602 of file class.ilUtil.php.

603 {
604 if (!($a_num % 2)) {
605 return $a_css1;
606 } else {
607 return $a_css2;
608 }
609 }

Referenced by ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilObjCategoryGUI\_importCategoriesForm(), ilCourseObjectivesGUI\askDeleteObjective(), ilObjObjectFolderGUI\displayList(), ilObjTypeDefinitionGUI\displayList(), ilObjMediaObjectGUI\editFilesObject(), ilObjTypeDefinitionGUI\editObject(), ilCourseContentGUI\editTimings(), ilObjSessionGUI\eventsListObject(), ilCourseObjectiveQuestionsTableGUI\fillRow(), ilTableGUI\render(), ilObjForumGUI\renderPostContent(), ilForumExportGUI\renderPostHtml(), ilGlossaryPresentationGUI\showDownloadList(), and ilStructureObjectGUI\subchap().

+ Here is the caller graph for this function:

◆ tf2yn()

static ilUtil::tf2yn (   $a_tf)
static

convert true/false to "y"/"n"

Definition at line 2984 of file class.ilUtil.php.

2985 {
2986 if ($a_tf) {
2987 return "y";
2988 } else {
2989 return "n";
2990 }
2991 }

Referenced by ilObjContentObject\exportXMLProperties(), ilObjRoleGUI\permSaveObject(), ilUserPrivacySettingsGUI\savePrivacySettings(), ilObjSAHSLearningModule\setAutoReview(), ilObjGlossary\update(), ilObjSAHSLearningModule\update(), and ilObjContentObject\updateProperties().

+ Here is the caller graph for this function:

◆ unique_multi_array()

static ilUtil::unique_multi_array (   $array,
  $sub_key 
)
static

Make a multi-dimensional array to have only DISTINCT values for a certain "column".

It's like using the DISTINCT parameter on a SELECT sql statement.

Parameters
arrayyour multi-dimensional array
string'column' to filter
Returns
array filtered array
Author
Unknown tru@a.nosp@m.scri.nosp@m.bedat.nosp@m.a.co.nosp@m.m (found in PHP annotated manual)

Definition at line 3190 of file class.ilUtil.php.

3191 {
3192 $target = array();
3193 $existing_sub_key_values = array();
3194
3195 foreach ($array as $key => $sub_array) {
3196 if (!in_array($sub_array[$sub_key], $existing_sub_key_values)) {
3197 $existing_sub_key_values[] = $sub_array[$sub_key];
3198 $target[$key] = $sub_array;
3199 }
3200 }
3201
3202 return $target;
3203 }

◆ unmaskAttributeTag()

static ilUtil::unmaskAttributeTag (   $a_str,
  $tag,
  $tag_att 
)
static

Definition at line 2667 of file class.ilUtil.php.

2668 {
2669 global $DIC;
2670
2671 $ilLog = $DIC["ilLog"];
2672
2673 while (preg_match(
2674 '/&lt;(' . $tag . ' ' . $tag_att . $tag_att . '="(([$@!*()~;,_0-9A-z\/:=%.&#?+\-])*)")&gt;/i',
2675 $a_str,
2676 $found
2677 )) {
2678 $old_str = $a_str;
2679 $a_str = preg_replace(
2680 "/&lt;" . preg_quote($found[1], "/") . "&gt;/i",
2681 '<' . $tag . ' ' . $tag_att . '="' . ilUtil::secureLink($found[2]) . '">',
2682 $a_str
2683 );
2684 if ($old_str == $a_str) {
2685 $ilLog->write("ilUtil::unmaskA-" . htmlentities($old_str) . " == " .
2686 htmlentities($a_str));
2687 return $a_str;
2688 }
2689 }
2690 $a_str = str_replace('&lt;/' . $tag . '&gt;', '</' . $tag . '>', $a_str);
2691 return $a_str;
2692 }
static secureLink($a_str)

References $DIC, and secureLink().

Referenced by unmaskSecureTags().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unmaskSecureTags()

static ilUtil::unmaskSecureTags (   $a_str,
  $allow_array 
)
static

Definition at line 2523 of file class.ilUtil.php.

2524 {
2525 foreach ($allow_array as $t) {
2526 switch ($t) {
2527 case "a":
2528 $a_str = ilUtil::unmaskAttributeTag($a_str, "a", "href");
2529 break;
2530
2531 case "img":
2532 $a_str = ilUtil::unmaskAttributeTag($a_str, "img", "src");
2533 break;
2534
2535 case "p":
2536 case "div":
2537 $a_str = ilUtil::unmaskTag($a_str, $t, array(
2538 array("param" => "align", "value" => "left"),
2539 array("param" => "align", "value" => "center"),
2540 array("param" => "align", "value" => "justify"),
2541 array("param" => "align", "value" => "right")
2542 ));
2543 break;
2544
2545 default:
2546 $a_str = ilUtil::unmaskTag($a_str, $t);
2547 break;
2548 }
2549 }
2550
2551 return $a_str;
2552 }
static unmaskAttributeTag($a_str, $tag, $tag_att)
static unmaskTag($a_str, $t, $fix_param="")

References unmaskAttributeTag(), and unmaskTag().

Referenced by secureString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unmaskTag()

static ilUtil::unmaskTag (   $a_str,
  $t,
  $fix_param = "" 
)
static

Definition at line 2722 of file class.ilUtil.php.

2723 {
2724 $a_str = str_replace("&lt;" . $t . "&gt;", "<" . $t . ">", $a_str);
2725 $a_str = str_replace("&lt;/" . $t . "&gt;", "</" . $t . ">", $a_str);
2726
2727 if (is_array($fix_param)) {
2728 foreach ($fix_param as $p) {
2729 $k = $p["param"];
2730 $v = $p["value"];
2731 $a_str = str_replace(
2732 "&lt;$t $k=\"$v\"&gt;",
2733 "<" . "$t $k=\"$v\"" . ">",
2734 $a_str
2735 );
2736 }
2737 }
2738 return $a_str;
2739 }

Referenced by unmaskSecureTags().

+ Here is the caller graph for this function:

◆ unserializeSession()

static ilUtil::unserializeSession (   $data)
static

Returns the unserialized ILIAS session data.

Parameters
array$dataThe serialized ILIAS session data from database
Returns
array

Definition at line 4790 of file class.ilUtil.php.

4791 {
4792 $vars = preg_split(
4793 '/([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff^|]*)\|/',
4794 $data,
4795 -1,
4796 PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
4797 );
4798
4799 $result = array();
4800
4801 for ($i = 0; $vars[$i]; $i++) {
4802 $result[$vars[$i++]] = unserialize($vars[$i]);
4803 }
4804
4805 return $result;
4806 }

References $data, $i, and $result.

◆ unzip()

static ilUtil::unzip ( string  $path_to_zip_file,
bool  $overwrite_existing = false,
bool  $unpack_flat = false 
)
static

Definition at line 1594 of file class.ilUtil.php.

1598 {
1599 global $DIC;
1600
1601 $log = $DIC->logger()->root();
1602
1603 if (!is_file($path_to_zip_file)) {
1604 return;
1605 }
1606
1607 // we unpack the zip always in a temp directory
1608 $temporary_unzip_directory = ilUtil::ilTempnam();
1609 ilUtil::makeDir($temporary_unzip_directory);
1610 copy($path_to_zip_file, $temporary_unzip_directory . DIRECTORY_SEPARATOR . basename($path_to_zip_file));
1611 $original_path_to_zip_file = $path_to_zip_file;
1612 $path_to_zip_file = $temporary_unzip_directory . DIRECTORY_SEPARATOR . basename($path_to_zip_file);
1613 $original_zip_path_info = pathinfo($original_path_to_zip_file);
1614 $unzippable_zip_path_info = pathinfo($path_to_zip_file);
1615
1616 $unzippable_zip_directory = $unzippable_zip_path_info["dirname"];
1617 $unzippable_zip_filename = $unzippable_zip_path_info["basename"];
1618
1619 // unzip
1620 $current_directory = getcwd();
1621 chdir($unzippable_zip_directory);
1622 $unzip_command = PATH_TO_UNZIP;
1623
1624 // real unzip
1625 if (!$overwrite_existing) {
1626 $unzip_parameters = ilUtil::escapeShellArg($unzippable_zip_filename);
1627 } else {
1628 $unzip_parameters = "-o " . ilUtil::escapeShellArg($unzippable_zip_filename);
1629 }
1630 ilUtil::execQuoted($unzip_command, $unzip_parameters);
1631 // move back
1632 chdir($current_directory);
1633
1634 // remove all sym links
1635 clearstatcache(); // prevent is_link from using cache
1636
1637 // sanitize filenames
1638 $dir_realpath = realpath($unzippable_zip_directory);
1639 foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($unzippable_zip_directory)) as $name => $f) {
1640 if (is_link($name)) {
1641 $target = readlink($name);
1642 if (substr($target, 0, strlen($dir_realpath)) != $dir_realpath) {
1643 unlink($name);
1644 $log->info("Removed symlink " . $name);
1645 }
1646 }
1647 if (is_file($name) && $name !== ilFileUtils::getValidFilename($name)) {
1648 // rename file if it contains invalid suffix
1650 rename($name, $new_name);
1651 }
1652 }
1653
1654 // rename executables
1655 self::renameExecutables($unzippable_zip_directory);
1656
1657 // now we have to move the files to the original directory.
1658 // if $a_flat is true, we move the files only without directories, otherwise we move the whole directory.
1659 // since some provide a realtive path here, we have to get the absolute path first
1660 $target_dir_name = $original_zip_path_info["dirname"];
1661 $target_dir_name = realpath($target_dir_name);
1662 if ($unpack_flat) {
1663 $file_array = [];
1664 ilFileUtils::recursive_dirscan($temporary_unzip_directory, $file_array);
1665 if (is_array($file_array["file"])) {
1666 foreach ($file_array["file"] as $k => $f) {
1667 if (
1668 substr($f, 0, 1) !== "."
1669 && $f !== basename($original_path_to_zip_file)
1670 ) {
1671 copy(
1672 $file_array["path"][$k] . $f,
1673 $target_dir_name . DIRECTORY_SEPARATOR . $f
1674 );
1675 }
1676 }
1677 }
1678 } else {
1679 $target_directory = $target_dir_name;
1681 $temporary_unzip_directory,
1682 $target_directory
1683 );
1684 }
1685
1686 ilUtil::delDir($temporary_unzip_directory);
1687 }
static recursive_dirscan($dir, &$arr)
Recursively scans a given directory and writes path and filename into referenced array.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
$log
Definition: result.php:15

References $DIC, Vendor\Package\$f, $log, $name, delDir(), escapeShellArg(), execQuoted(), ilFileUtils\getValidFilename(), ilTempnam(), makeDir(), rCopy(), ilFileUtils\recursive_dirscan(), and renameExecutables().

Referenced by ilObjCategoryGUI\_importCategories(), ilExportContainer\addSubitems(), ilExSubmission\downloadAllAssignmentFiles(), ilSurveyExporter\getXmlRepresentation(), ilObjUserFolderGUI\handleUploadedFiles(), ilObjStyleSheet\import(), ilSystemStyleSkinContainer\import(), ilObjContentObject\importFromZipFile(), ilImport\importObject(), ilObjSurvey\importObject(), ilObjSurveyQuestionPool\importObject(), ilScorm2004DataSet\importRecord(), ilSCORM2004ScoGUI\importSave(), ilScormAiccImporter\importXmlRepresentation(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilExerciseManagementGUI\openSubmissionViewObject(), ilObjSCORM2004LearningModuleGUI\preview(), ilFileUtils\processZipFile(), ilFileDataCourse\unpackImportFile(), ilFileDataImportMail\unzip(), ilCertificateUtilHelper\unzip(), ilFileSystemGUI\unzipFile(), ilExAssignment\uploadMultiFeedbackFile(), ilMobMultiSrtUpload\uploadMultipleSubtitleFile(), ilObjMediaObject\uploadMultipleSubtitleFile(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), and ilObjTestGUI\uploadTstObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ virusHandling()

static ilUtil::virusHandling (   $a_file,
  $a_orig_name = "",
  $a_clean = true 
)
static

scan file for viruses and clean files if possible

Definition at line 3794 of file class.ilUtil.php.

3795 {
3796 global $DIC;
3797
3798 $lng = $DIC->language();
3799
3800 if ((defined('IL_VIRUS_SCANNER') && IL_VIRUS_SCANNER != "None") || (defined('IL_ICAP_HOST') && strlen(IL_ICAP_HOST) !== 0)) {
3801 require_once("./Services/VirusScanner/classes/class.ilVirusScannerFactory.php");
3803 if (($vs_txt = $vs->scanFile($a_file, $a_orig_name)) != "") {
3804 if ($a_clean && (IL_VIRUS_CLEAN_COMMAND != "")) {
3805 $clean_txt = $vs->cleanFile($a_file, $a_orig_name);
3806 if ($vs->fileCleaned()) {
3807 $vs_txt .= "<br />" . $lng->txt("cleaned_file") .
3808 "<br />" . $clean_txt;
3809 $vs_txt .= "<br />" . $lng->txt("repeat_scan");
3810 if (($vs2_txt = $vs->scanFile($a_file, $a_orig_name)) != "") {
3811 return array(false, nl2br($vs_txt) . "<br />" . $lng->txt("repeat_scan_failed") .
3812 "<br />" . nl2br($vs2_txt));
3813 } else {
3814 return array(true, nl2br($vs_txt) . "<br />" . $lng->txt("repeat_scan_succeded"));
3815 }
3816 } else {
3817 return array(false, nl2br($vs_txt) . "<br />" . $lng->txt("cleaning_failed"));
3818 }
3819 } else {
3820 return array(false, nl2br($vs_txt));
3821 }
3822 }
3823 }
3824
3825 return array(true,"");
3826 }

References $DIC, $lng, and ilVirusScannerFactory\_getInstance().

Referenced by ilUploadFiles\_copyUploadFile(), ilObjFileDAV\checkForVirus(), ilImageWizardInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), ilMultipleChoiceWizardInputGUI\checkInput(), ilSingleChoiceWizardInputGUI\checkInput(), ilImagemapFileInputGUI\checkInput(), ilFileInputGUI\checkInput(), ilFileWizardInputGUI\checkInput(), ilFlashFileInputGUI\checkInput(), assFileUpload\checkUpload(), ilKprimChoiceWizardInputGUI\checkUploads(), ilObjMediaPoolGUI\createMediaFromUploadDir(), ilMultipleImagesInputGUI\onCheckInput(), and ilFileUtils\processZipFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yn2tf()

static ilUtil::yn2tf (   $a_yn)
static

◆ zip()

static ilUtil::zip (   $a_dir,
  $a_file,
  $compress_content = false 
)
static

zips given directory/file into given zip.file

Definition at line 1695 of file class.ilUtil.php.

1696 {
1697 $cdir = getcwd();
1698
1699 if ($compress_content) {
1700 $a_dir .= "/*";
1701 $pathinfo = pathinfo($a_dir);
1702 chdir($pathinfo["dirname"]);
1703 }
1704
1705 $pathinfo = pathinfo($a_file);
1706 $dir = $pathinfo["dirname"];
1707 $file = $pathinfo["basename"];
1708
1709 if (!$compress_content) {
1710 chdir($dir);
1711 }
1712
1713 $zip = PATH_TO_ZIP;
1714
1715 if (!$zip) {
1716 chdir($cdir);
1717 return false;
1718 }
1719
1720 if (is_array($a_dir)) {
1721 $source = "";
1722 foreach ($a_dir as $dir) {
1723 $name = basename($dir);
1725 }
1726 } else {
1727 $name = basename($a_dir);
1728 if (trim($name) != "*") {
1730 } else {
1731 $source = $name;
1732 }
1733 }
1734
1735 $zipcmd = "-r " . ilUtil::escapeShellArg($a_file) . " " . $source;
1736 ilUtil::execQuoted($zip, $zipcmd);
1737 chdir($cdir);
1738 return true;
1739 }

References $name, $source, escapeShellArg(), and execQuoted().

Referenced by ILIAS\Wiki\Export\WikiHtmlExport\buildExportFile(), ilScorm2004Export\buildExportFileHTML(), ilScorm2004Export\buildExportFileHTMLOne(), ilScorm2004Export\buildExportFileSCORM(), ilContObjectExport\buildExportFileSCORM(), ilQuestionpoolExport\buildExportFileXLS(), ilContObjectExport\buildExportFileXML(), ilSurveyQuestionpoolExport\buildExportFileXML(), ilGlossaryExport\buildExportFileXML(), ilSurveyExport\buildExportFileXML(), ilTestExport\buildExportFileXML(), ilQuestionpoolExport\buildExportFileXML(), ilTestArchiver\compressTestArchive(), ilAssFileUploadUploadsExporter\createFileUploadCollectionZipFile(), ilSystemStyleSkinContainer\createTempZip(), ilFileDataForum\createZipFile(), ilFileDataForumDrafts\createZipFile(), ilFileDataMail\deliverAttachmentsAsZip(), ilObjStyleSheet\export(), ilExport\exportEntity(), ilObjFileBasedLMGUI\exportHTML(), ilExport\exportObject(), ilExportContainer\exportObject(), ilSubmissionsZipJob\run(), ilZipJob\run(), ilCalendarZipJob\run(), ilOrgUnitExporter\sendAndCreateSimpleExportFile(), ilExAssignment\sendMultiFeedbackStructureFile(), ilCertificateUtilHelper\zip(), ilFSStorageCourse\zipArchive(), ilUserCertificateZip\zipCertificatesInArchiveDirectory(), ilFileDataCourse\zipFile(), ilObjSAHSLearningModule\zipLmForOfflineMode(), ILIAS\Blog\Export\BlogHtmlExport\zipPackage(), ILIAS\Glossary\Export\GlossaryHtmlExport\zipPackage(), ILIAS\LearningModule\Export\LMHtmlExport\zipPackage(), and ILIAS\Portfolio\Export\PortfolioHtmlExport\zipPackage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $db_supports_distinct_umlauts

ilUtil::$db_supports_distinct_umlauts
staticprotected

Definition at line 40 of file class.ilUtil.php.

Referenced by dbSupportsDisctinctUmlauts().


The documentation for this class was generated from the following file: