ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilUtil Class Reference

util class various functions, usage as namespace More...

+ Collaboration diagram for ilUtil:

Public Member Functions

 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 public.
 getTypeIconPath ($a_type, $a_obj_id, $a_size= 'small')
 Get type icon path path Return image path for icon_xxx.gifs Or (if enabled) path to custom icon.
 getImagePath ($img, $module_path="", $mode="output", $offline=false)
 get image path (for images located in a template directory)
 getHtmlPath ($relative_path)
 get url of path
 getStyleSheetLocation ($mode="output", $a_css_name="", $a_css_location="")
 get full style sheet file name (path inclusive) of current user
 getJSLocation ($a_js_name, $a_js_location="", $add_version=FALSE)
 get full javascript file name (path inclusive) of current user
 getP3PLocation ()
 Get p3p file path.
 getNewContentStyleSheetLocation ($mode="output")
 get full style sheet file name (path inclusive) of current user
 getSelectName ($selected, $values)
 ???
 formDisabledRadioButton ($checked, $varname, $value, $disabled)
 ???
 formRadioButton ($checked, $varname, $value)
 ??? public
 formInput ($varname, $value, $disabled=false)
 create html input area
 checkInput ($vars)
 ???
 setPathStr ($a_path)
 ??? public
 switchColor ($a_num, $a_css1, $a_css2)
 switches style sheets for each even $a_num (used for changing colors of different result rows)
 showTabs ($a_hl, $a_o)
 show the tabs in admin section
 checkFormEmpty ($emptyFields)
 ??? public
 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.
 makeClickable ($a_text, $detectGotoLinks=false)
 makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
 StopWatch ($begin=-1)
 StopWatch benchmark scriptcode.
 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.
 makeTimeSelect ($prefix, $short=true, $hour="", $minute="", $second="", $a_use_default=true, $a_further_options=array())
 Creates a combination of HTML selects for time inputs.
 is_email ($a_email)
 isPassword ($a_passwd, &$custom_error=null)
 getPasswordRequirementsInfo ()
 infotext for ilPasswordInputGUI setInfo()
 isLogin ($a_login)
 shortenWords ($a_str, $a_len=30, $a_dots=true)
 Ensure that the maximum word lenght within a text is not longer than $a_len.
 attribsToArray ($a_str)
 converts a string of format var1 = "val1" var2 = "val2" ...
 rCopy ($a_sdir, $a_tdir, $preserveTimeAttributes=false)
 Copies content of a directory $a_sdir recursively to a directory $a_tdir.
 getWebspaceDir ($mode="filesystem")
 get webspace directory
 getDataDir ()
 get data directory (outside webspace)
 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
 getAssociatedUsersOnline ($a_user_id)
 
reads all active sessions from db and returns users that are online
and who have a local role in a group or a course for which the

the current user has also a local role.

 ilTempnam ()
 Create a temporary file in an ILIAS writable directory.
 createDirectory ($a_dir, $a_mod=0755)
 create directory
 unzip ($a_file, $overwrite=false)
 unzip file
 zip ($a_dir, $a_file, $compress_content=false)
 zips given directory/file into given zip.file
 CreateIsoFromFolder ($a_dir, $a_file)
 getConvertCmd ()
 get convert command
 convertImage ($a_from, $a_to, $a_target_format="", $a_geometry="", $a_background_color="")
 convert image
 resizeImage ($a_from, $a_to, $a_width, $a_height, $a_constrain_prop=false)
 resize image
 img ($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0)
 Build img tag.
 html2pdf ($html, $pdf_file)
 produce pdf out of html with htmldoc
 htmlfile2pdf ($html_file, $pdf_file)
 produce pdf out of html with htmldoc
 deliverFile ($a_file, $a_filename, $a_mime= '', $isInline=false, $removeAfterDelivery=false)
 deliver file for download via browser.
 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.
 getASCIIFilename ($a_filename)
 convert utf8 to ascii filename
 htmlentitiesOutsideHTMLTags ($htmlText)
 getJavaPath ()
 get full java path (dir + java command)
 appendUrlParameterString ($a_url, $a_par)
 append URL parameter string ("par1=value1&par2=value2...") to given URL string
 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.
 makeDirParents ($a_dir)
 Create a new directory and all parent directories.
 delDir ($a_dir, $a_clean_only=false)
 removes a dir and all its content (subdirs and files) recursively
 getDir ($a_dir)
 get directory
 stripOnlySlashes ($a_str)
 strip slashes if magic qoutes is enabled
 secureString ($a_str, $a_strip_html=true, $a_allow="")
 Remove unsecure tags.
 getSecureTags ()
 maskSecureTags ($a_str, $allow_array)
 unmaskSecureTags ($a_str, $allow_array)
 securePlainString ($a_str)
 Remove unsecure characters from a plain text string.
 htmlencodePlainString ($a_str, $a_make_links_clickable, $a_detect_goto_links=false)
 Encodes a plain text string into HTML for display in a browser.
 maskAttributeTag ($a_str, $tag, $tag_att)
 unmaskAttributeTag ($a_str, $tag, $tag_att)
 maskTag ($a_str, $t, $fix_param="")
 unmaskTag ($a_str, $t, $fix_param="")
 secureLink ($a_str)
 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
 addSlashes ($a_str)
 add slashes if magic qoutes is disabled don't use that for db inserts/updates! use prepareDBString instead
 prepareFormOutput ($a_str, $a_strip=false)
 prepares string output for html forms public
 prepareDBString ($a_str)
 prepare a string for db writing (insert/update)
 removeItemFromDesktops ($a_id)
 removes object from all user's desktops public
 extractParameterString ($a_parstr)
 extracts parameter value pairs from a string into an array
 assembleParameterString ($a_par_arr)
 dumpString ($a_str)
 dumps ord values of every character of string $a_str
 yn2tf ($a_yn)
 convert "y"/"n" to true/false
 tf2yn ($a_tf)
 convert true/false to "y"/"n"
 sort_func ($a, $b)
 sub-function to sort an array
 sort_func_numeric ($a, $b)
 sub-function to sort an array
 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.

 mergesort (&$array, $cmp_function= 'strcmp')
 unique_multi_array ($array, $sub_key)
 Make a multi-dimensional array to have only DISTINCT values for a certain "column".
 getGDSupportedImageType ($a_desired_type)
 returns the best supported image type by this PHP build
 deducibleSize ($a_mime)
 checks if mime type is provided by getimagesize()
 redirect ($a_script)
 http redirect to other script
 insertInstIntoID ($a_value)
 inserts installation id into ILIAS id
 groupNameExists ($a_group_name, $a_id=0)
 checks if group name already exists.
 searchGroups ($a_search_str)
 getMemString ()
 get current memory usage as string
 isWindows ()
 check wether the current client system is a windows system
 escapeShellArg ($a_arg)
 escapeShellCmd ($a_arg)
 escape shell cmd
 excelTime ($year="", $month="", $day="", $hour="", $minute="", $second="")
 renameExecutables ($a_dir)
 Rename uploaded executables for security reasons.
 rRenameSuffix ($a_dir, $a_old_suffix, $a_new_suffix)
 Renames all files with certain suffix and gives them a new suffix.
 isAPICall ()
 KT_replaceParam ($qstring, $paramName, $paramValue)
 replaceUrlParameterString ($url, $parametersArray)
 generatePasswords ($a_number)
 Generate a number of passwords.
 removeTrailingPathSeparators ($path)
 array_php2js ($data)
 convert php arrays to javascript arrays
 virusHandling ($a_file, $a_orig_name="", $a_clean=true)
 scan file for viruses and clean files if possible
 moveUploadedFile ($a_file, $a_name, $a_target, $a_raise_errors=true)
 move uploaded file
 date_mysql2time ($mysql_date_time)
 make time object from mysql_date_time
 now ()
 Return current timestamp in Y-m-d H:i:s format.
processCSVRow (&$row, $quoteAll=FALSE, $separator=";", $outUTF8=FALSE, $compatibleWithMSExcel=TRUE)
 Convertes an array for CSV usage.
 isDN ($a_str)
 isIPv4 ($a_str)
 _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.
 insertLatexImages ($a_text, $a_start="\[tex\]", $a_end="\[\/tex\]", $a_cgi=URL_TO_LATEX)
 replace [text]...[/tex] tags with formula image code
 __insertLatexImages ($a_text, $a_start="\[tex\]", $a_end="\[\/tex\]", $a_cgi=URL_TO_LATEX)
 replace [tex]...[/tex] tags with formula image code
 buildLatexImages ($a_text, $a_dir, $a_start="\[tex\]", $a_end="\[\/tex\]", $a_cgi=URL_TO_LATEX)
 replace [text]...[/tex] tags with formula image code //////// added additional parameters to make this method usable for other start and end tags as well
 prepareTextareaOutput ($txt_output, $prepare_for_latex_output=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.
 int2array ($seconds, $periods=null)
 Return an array of date segments.
 timearray2string ($duration)
 Return a string of time periods.
 getFileSizeInfo ()
 __extractRefId ($role_title)
 extract ref id from role title, e.g.
 __extractId ($ilias_id, $inst_id)
 extract ref id from role title, e.g.
 _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.
 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.
 quoteArray ($a_array)
 Quotes all members of an array for usage in DB query statement.
 infoPanel ($a_keep=true)
 dirsize ($directory)
 get size of a directory or a file.
 randomhash ()

Static Public Member Functions

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.
static formCheckbox ($checked, $varname, $value, $disabled=false)
 ??? public
static shortenText ($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
 shorten a string to given length.
static deliverData ($a_data, $a_filename, $mime="application/octet-stream", $charset="")
 deliver data for download via browser.
static stripSlashesArray ($a_arr, $a_strip_html=true, $a_allow="")
 Strip slashes from array.
static stripSlashesRecursive ($a_data, $a_strip_html=true, $a_allow="")
 Strip slashes from array and sub-arrays.
static stripSlashes ($a_str, $a_strip_html=true, $a_allow="")
 strip slashes if magic qoutes is enabled
static sortArray ($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
 sortArray
static execQuoted ($cmd, $args=NULL)
 exec command and fix spaces on windows
static sendInfo ($a_info="", $a_keep=false)
 Send Info Message to Screen.
static sendFailure ($a_info="", $a_keep=false)
 Send Failure Message to Screen.
static sendQuestion ($a_info="", $a_keep=false)
 Send Question to Screen.
static sendSuccess ($a_info="", $a_keep=false)
 Send Success Message to Screen.
static setCookie ($a_cookie_name, $a_cookie_value= '', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
static _sanitizeFilemame ($a_filename)

Private Member Functions

 replaceLinkProperties ($matches)
 replaces target _blank with _self and the link text with the according object title.

Detailed Description

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:
class.ilUtil.php 31987 2011-12-05 11:54:10Z bheyser

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

Member Function Documentation

ilUtil::__extractId (   $ilias_id,
  $inst_id 
)

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 4420 of file class.ilUtil.php.

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

{
$test_str = explode('_',$ilias_id);
if ($test_str[0] == 'il' && $test_str[1] == $inst_id && count($test_str) == 4)
{
$test2 = (int) $test_str[3];
return is_numeric ($test2) ? (int) $test2 : false;
}
return false;
}

+ Here is the caller graph for this function:

ilUtil::__extractRefId (   $role_title)

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 4398 of file class.ilUtil.php.

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

{
$test_str = explode('_',$role_title);
if ($test_str[0] == 'il')
{
$test2 = (int) $test_str[3];
return is_numeric ($test2) ? (int) $test2 : false;
}
return false;
}

+ Here is the caller graph for this function:

ilUtil::__insertLatexImages (   $a_text,
  $a_start = "\[tex\]",
  $a_end = "\[\/tex\]",
  $a_cgi = URL_TO_LATEX 
)

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

added additional parameters to make this method usable for other start and end tags as well

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

References $lng, and $tpl.

{
global $tpl, $lng, $ilUser;
//echo "<br><br>".htmlentities($a_text);
//echo "<br>-".htmlentities($a_start)."-".htmlentities($a_end)."-";
// - take care of html exports (-> see buildLatexImages)
include_once "./Services/Administration/classes/class.ilSetting.php";
$jsMathSetting = new ilSetting("jsMath");
if ($jsMathSetting->get("enable") && ($ilUser->getPref("js_math") || ($ilUser->getPref("js_math") === FALSE && ($jsMathSetting->get("makedefault")))))
{
$info = "";
if (!$tpl->out_jsmath_info)
{
include_once "./classes/class.ilTemplate.php";
$template = new ilTemplate("tpl.jsmath_warning.html", TRUE, TRUE);
$lng->loadLanguageModule("jsmath");
$template->setVariable("TEXT_JSMATH_NO_JAVASCRIPT", $lng->txt("jsmath_no_javascript"));
$info = $template->get();
$tpl->out_jsmath_info = TRUE;
}
$a_text = preg_replace("/\\\\([RZN])([^a-zA-Z]|<\/span>)/", "\\mathbb{"."$1"."}"."$2", $a_text);
$result_text = preg_replace('/' . $a_start . '(.*?)' . $a_end . '/ie',
"'<span class=\"math\">' . preg_replace('/[\\\\\\\\\\]{2}/', '\\cr', str_replace('<', '&lt;', str_replace('<br/>', '', str_replace('<br />', '', str_replace('<br>', '', '$1'))))) . '</span>[[info]]'", $a_text);
// added special handling for \\ -> \cr, < -> $lt; and removal of <br/> tags in jsMath expressions, H. Schottmüller, 2007-09-09
$result_text = str_replace("[[info]]", $info, $result_text);
$tpl->addJavaScript($jsMathSetting->get("path_to_jsmath") . "/easy/load.js");
}
else
{
$result_text = preg_replace('/' . $a_start . '(.*?)' . $a_end . '/ie',
"'<img alt=\"'.htmlentities('$1').'\" src=\"$a_cgi?'.rawurlencode(str_replace('&amp;', '&', str_replace('&gt;', '>', str_replace('&lt;', '<', '$1')))).'\" ".
" />'", $a_text);
}
return $result_text;
}
ilUtil::_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.

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.

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 3938 of file class.ilUtil.php.

References $ilDB, $query, $res, $row, ilRbacReview\_getOperationIdsByName(), and DB_FETCHMODE_OBJECT.

Referenced by ilLPFilter\__getAllObjects(), ilMainMenuGUI\_checkAdministrationPermission(), ilObjSurveyQuestionPool\_getAvailableQuestionpools(), ilObjQuestionPool\_getAvailableQuestionpools(), ilObjTest\_getAvailableTests(), ilDataLoader\assignUsersAsCourseMembers(), ilCronWebResourceCheck\check(), ilContainerReferenceGUI\createObject(), ilContainerReferenceGUI\editObject(), ilECSSettingsGUI\exportImported(), ilObjectGUI\fillCloneTemplate(), ilDataLoader\generateCalendarEntries(), ilDataLoader\generateFiles(), ilChatRoom\getAllRooms(), ilECSSettingsGUI\imported(), ilObjCourseGroupingGUI\selectCourse(), ilObjectCopyGUI\sourceExists(), ilRBACTest\testRbacUA(), ilObjectTest\testTreeTrash(), ilObjUserFolderGUI\viewObject(), ilDataLoader\writeCategoryCsv(), and ilDataLoader\writeCourseCsv().

{
global $ilDB,$rbacreview,$ilAccess,$ilUser,$ilias,$tree;
if(!is_array($a_obj_type))
{
$where = "WHERE type = ".$ilDB->quote($a_obj_type, "text")." ";
}
else
{
$where = "WHERE ".$ilDB->in("type", $a_obj_type, false, "text")." ";
}
// limit number of results default is search result limit
if(!$limit)
{
$limit = $ilias->getSetting('search_max_hits',100);
}
if($limit == -1)
{
$limit = 10000;
}
// default to logged in usr
$a_usr_id = $a_usr_id ? $a_usr_id : $ilUser->getId();
$a_roles = $rbacreview->assignedRoles($a_usr_id);
// Since no rbac_pa entries are available for the system role. This function returns !all! ref_ids in the case the user
// is assigned to the system role
if($rbacreview->isAssigned($a_usr_id,SYSTEM_ROLE_ID))
{
$query = "SELECT ref_id FROM object_reference obr LEFT JOIN object_data obd ON obr.obj_id = obd.obj_id ".
"LEFT JOIN tree ON obr.ref_id = tree.child ".
$where.
"AND tree = 1";
$res = $ilDB->query($query);
$counter = 0;
while($row = $ilDB->fetchObject($res))
{
// Filter recovery folder
if($tree->isGrandChild(RECOVERY_FOLDER_ID, $row->ref_id))
{
continue;
}
if($counter++ >= $limit)
{
break;
}
$ref_ids[] = $row->ref_id;
}
return $ref_ids ? $ref_ids : array();
} // End Administrators
// Check ownership if it is not asked for edit_permission or a create permission
if($a_operation == 'edit_permissions' or strpos($a_operation,'create') !== false)
{
$check_owner = ") ";
}
else
{
$check_owner = "OR owner = ".$ilDB->quote($a_usr_id, "integer").") ";
}
$ops_ids = ilRbacReview::_getOperationIdsByName(array($a_operation));
$ops_id = $ops_ids[0];
$and = "AND ((".$ilDB->in("rol_id", $a_roles, false, "integer")." ";
$query = "SELECT DISTINCT(obr.ref_id),obr.obj_id,type FROM object_reference obr ".
"JOIN object_data obd ON obd.obj_id = obr.obj_id ".
"JOIN rbac_pa ON obr.ref_id = rbac_pa.ref_id ".
$where.
$and.
"AND (".$ilDB->like("ops_id", "text","%i:".$ops_id."%"). " ".
"OR ".$ilDB->like("ops_id", "text", "%:\"".$ops_id."\";%").")) ".
$check_owner;
$res = $ilDB->query($query);
$counter = 0;
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if($counter >= $limit)
{
break;
}
// Filter objects in recovery folder
if($tree->isGrandChild(RECOVERY_FOLDER_ID, $row->ref_id))
{
continue;
}
// Check deleted, hierarchical access ...
if($ilAccess->checkAccessOfUser($a_usr_id,$a_operation,'',$row->ref_id,$row->type,$row->obj_id))
{
$counter++;
$ref_ids[] = $row->ref_id;
}
}
return $ref_ids ? $ref_ids : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilUtil::_sanitizeFilemame (   $a_filename)
static

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

Referenced by ilFileDataForum\storeUploadedFile(), and ilFileDataMail\storeUploadedFile().

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

+ Here is the caller graph for this function:

ilUtil::_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.

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

protected

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

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and quoteArray().

Referenced by ilObjSessionGUI\eventsListObject(), ilSessionOverviewGUI\exportCSV(), ilMemberExport\fetchUsers(), ilSessionOverviewGUI\listSessions(), ilObjRoleGUI\permObject(), ilLDAPSettingsGUI\prepareGlobalRoleSelection(), ilAuthShibbolethSettingsGUI\prepareRoleSelect(), ilECSSettingsGUI\prepareRoleSelect(), ilLDAPSettingsGUI\prepareRoleSelect(), ilRadiusSettingsGUI\prepareRoleSelection(), ilObjSessionGUI\printAttendanceListObject(), ilObjSessionGUI\printViewMembersObject(), ilObjCourseGroupingGUI\selectCourse(), and ilMailSearchCoursesGUI\showMembers().

{
global $ilDB;
if(!$a_ids)
{
return array();
}
// use database to sort user array
$where = "WHERE ".$a_id_name." IN (";
$where .= implode(",", ilUtil::quoteArray($a_ids));
$where .= ") ";
$query = "SELECT ".$a_id_name." FROM ".$a_table." ".
$where.
"ORDER BY ".$a_field;
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->$a_id_name;
}
return $ids ? $ids : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::addSlashes (   $a_str)

add slashes if magic qoutes is disabled don't use that for db inserts/updates! use prepareDBString instead

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

Referenced by ilObjUserTrackingGUI\getSearchTermsCondition().

{
if (ini_get("magic_quotes_gpc"))
{
return $a_str;
}
else
{
return addslashes($a_str);
}
}

+ Here is the caller graph for this function:

ilUtil::assembleParameterString (   $a_par_arr)

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

References $target_arr.

Referenced by ilMediaItem\getParameterString().

{
if (is_array($a_par_arr))
{
$target_arr = array();
foreach ($a_par_arr as $par => $val)
{
$target_arr[] = "$par=\"$val\"";
}
$target_str = implode(", ", $target_arr);
}
return $target_str;
}

+ Here is the caller graph for this function:

ilUtil::attribsToArray (   $a_str)

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 1459 of file class.ilUtil.php.

Referenced by ilPCParagraph\_input2xml(), and ilPCParagraph\xml2output().

{
$attribs = array();
while (is_int(strpos($a_str, "=")))
{
$eq_pos = strpos($a_str, "=");
$qu1_pos = strpos($a_str, "\"");
$qu2_pos = strpos(substr($a_str, $qu1_pos + 1), "\"") + $qu1_pos + 1;
if (is_int($eq_pos) && is_int($qu1_pos) && is_int($qu2_pos))
{
$var = trim(substr($a_str, 0, $eq_pos));
$val = trim(substr($a_str, $qu1_pos + 1, ($qu2_pos - $qu1_pos) - 1));
$attribs[$var] = $val;
$a_str = substr($a_str, $qu2_pos + 1);
}
else
{
$a_str = "";
}
}
return $attribs;
}

+ Here is the caller graph for this function:

ilUtil::buildLatexImages (   $a_text,
  $a_dir,
  $a_start = "\[tex\]",
  $a_end = "\[\/tex\]",
  $a_cgi = URL_TO_LATEX 
)

replace [text]...[/tex] tags with formula image code //////// added additional parameters to make this method usable for other start and end tags as well

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

References $GLOBALS.

Referenced by ilGlossaryPresentationGUI\listTermByGiven(), and ilPageObjectGUI\showPage().

{
$result_text = $a_text;
if ($a_cgi != "")
{
while (preg_match('/' . $a_start . '(.*?)' . $a_end . '/ie', $result_text, $found))
{
$cnt = (int) $GLOBALS["teximgcnt"]++;
// get image from cgi and write it to file
$fpr = @fopen($a_cgi."?".rawurlencode($found[1]), "r");
$lcnt = 0;
if ($fpr)
{
while(!feof($fpr))
{
$buf = fread($fpr, 1024);
if ($lcnt == 0)
{
if (is_int(strpos(strtoupper(substr($buf, 0, 5)), "GIF")))
{
$suffix = "gif";
}
else
{
$suffix = "png";
}
$fpw = fopen($a_dir."/teximg/img".$cnt.".".$suffix, "w");
}
$lcnt++;
fwrite($fpw, $buf);
}
fclose($fpw);
fclose($fpr);
}
// replace tex-tag
$img_str = "./teximg/img".$cnt.".".$suffix;
$result_text = str_replace($found[0],
'<img alt="'.$found[1].'" src="'.$img_str.'" />', $result_text);
}
}
return $result_text;
}

+ Here is the caller graph for this function:

ilUtil::checkFormEmpty (   $emptyFields)

??? public

Parameters
array
Returns
string

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

References $key.

{
$feedback = "";
foreach ($emptyFields as $key => $val)
{
if ($val == "") {
if ($feedback != "") $feedback .= ", ";
$feedback .= $key;
}
}
return $feedback;
}
ilUtil::checkInput (   $vars)

???

Parameters
string

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

{
// TO DO:
// Diese Funktion soll Formfeldeingaben berprfen (empty und required)
}
ilUtil::convertImage (   $a_from,
  $a_to,
  $a_target_format = "",
  $a_geometry = "",
  $a_background_color = "" 
)

convert image

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

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

References escapeShellArg(), and getConvertCmd().

Referenced by ilMediaItem\copyOriginal(), assOrderingQuestionImport\fromXML(), assMultipleChoice\generateThumbForFile(), assSingleChoice\generateThumbForFile(), assOrderingQuestion\generateThumbForFile(), assMatchingQuestion\generateThumbForFile(), ilMediaItem\getThumbnailTarget(), ilCertificate\importCertificate(), assOrderingQuestion\setImageFile(), assMatchingQuestion\setImageFile(), ilObjCertificateSettings\uploadBackgroundImage(), and ilCertificate\uploadBackgroundImage().

{
global $ilUser;
$format_str = ($a_target_format != "")
? strtoupper($a_target_format).":"
: "";
$geometry = ($a_geometry != "")
? " -geometry ".$a_geometry."x".$a_geometry." "
: "";
$bg_color = ($a_background_color != "")
? " -background color ".$a_background_color." "
: "";
$convert_cmd = ilUtil::getConvertCmd()." ".
ilUtil::escapeShellArg($a_from)." ".$bg_color.$geometry.ilUtil::escapeShellArg($format_str.$a_to);
system($convert_cmd);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

create directory

deprecated use makeDir() instead!

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

References makeDir().

Referenced by ilObjCategoryGUI\_importCategories(), ilObjExternalToolsSettingsGUI\createSocialBookmarkObject(), ilMediaItem\createWorkDirectory(), ilTempnam(), ilSCORM2004ScoGUI\importSave(), assQuestion\moveUploadedMediaFile(), unzip(), ilSetup\unzip(), and ilObjExternalToolsSettingsGUI\updateSocialBookmarkObject().

{
ilUtil::makeDir($a_dir);
//@mkdir($a_dir);
//@chmod($a_dir, $a_mod);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::CreateIsoFromFolder (   $a_dir,
  $a_file 
)

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

References $dir, $file, $name, and escapeShellArg().

Referenced by ilScorm2004Export\buildExportFileISO().

{
$cdir = getcwd();
$pathinfo = pathinfo($a_dir);
chdir($pathinfo["dirname"]);
$pathinfo = pathinfo($a_file);
$dir = $pathinfo["dirname"];
$file = $pathinfo["basename"];
$mkisofs = PATH_TO_MKISOFS;
if(!$mkisofs)
{
chdir($cdir);
return false;
}
$name = basename($a_dir);
$zipcmd = $mkisofs." -r -J -o ".$a_file." ".$source;
exec($zipcmd);
chdir($cdir);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::date_mysql2time (   $mysql_date_time)

make time object from mysql_date_time

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

Referenced by ilTestServiceGUI\getResultsUserdata(), and ilFileXMLWriter\start().

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

+ Here is the caller graph for this function:

ilUtil::deducibleSize (   $a_mime)

checks if mime type is provided by getimagesize()

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

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

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

{
if (($a_mime == "image/gif") || ($a_mime == "image/jpeg") ||
($a_mime == "image/png") || ($a_mime == "application/x-shockwave-flash") ||
($a_mime == "image/tiff") || ($a_mime == "image/x-ms-bmp") ||
($a_mime == "image/psd") || ($a_mime == "image/iff"))
{
return true;
}
else
{
return false;
}
}

+ Here is the caller graph for this function:

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

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

public

Parameters
stringdir to delete
Author
Unknown flexe.nosp@m.r@cu.nosp@m.tephp.nosp@m..com (source: http://www.php.net/rmdir)

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

References $file, $files, and elseif().

Referenced by ilFileDataChat\__construct(), ilFileDataMail\__deleteAttachmentDirectory(), ilFileDataChat\__deleteOld(), ilFileDataGroup\_deleteAll(), ilFileDataChat\_ilFileDataChat(), ilScorm2004Export\buildExportFileHTML(), ilScorm2004Export\buildExportFileISO(), ilScorm2004Export\buildExportFilePDF(), ilScorm2004Export\buildExportFileSCORM(), ilSurveyExport\buildExportFileXML(), ilObjStyleSheet\cleanExportDirectory(), assOrderingQuestion\cleanImagefiles(), ilObjFile\clearDataDirectory(), ilFileDataShop\deassignFileFromPaymentObject(), ilObjAICCLearningModule\delete(), ilObjMediaObject\delete(), ilFileDataExercise\delete(), ilFileSystemStorage\delete(), ilObjSurvey\delete(), ilObjFileBasedLM\delete(), ilObjContentObject\delete(), ilObjSAHSLearningModule\delete(), ilClient\delete(), ilObjFile\delete(), SurveyQuestion\delete(), assQuestion\delete(), ilObjSurveyQuestionPool\deleteAllData(), ilCertificate\deleteCertificate(), ilFileDataGroup\deleteDirectory(), ilFileDataCourse\deleteDirectory(), ilFileSystemStorage\deleteDirectory(), ilObjGlossaryGUI\deleteExportFile(), ilObjContentObjectGUI\deleteExportFile(), ilObjTestGUI\deleteExportFileObject(), ilObjSurveyQuestionPoolGUI\deleteExportFileObject(), ilObjQuestionPoolGUI\deleteExportFileObject(), ilObjSurveyGUI\deleteExportFileObject(), ilFileSystemGUI\deleteFile(), ilObjMediaObjectGUI\deleteFileObject(), ilObjQuestionPool\deleteQuestionpool(), assQuestion\deleteSuggestedSolutions(), ilObjSurvey\deleteSurveyRecord(), ilObjTest\deleteTest(), ilCertificate\deliverExportFileXML(), ilFileDataExercise\downloadAllDeliveredFiles(), ilObjFolder\downloadFolder(), ilExerciseMembers\downloadMultipleFiles(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilObjContentObject\exportSCORM(), assFileUpload\getFileUploadZIPFile(), ilObjUserFolderGUI\importCancelledObject(), ilCertificate\importCertificate(), ilObjGlossaryGUI\importFileObject(), ilObjContentObjectGUI\importFileObject(), ilObjSurvey\importObject(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilObjUserFolderGUI\importUsersObject(), ilObjQuestionPoolGUI\importVerifiedFileObject(), ilObjTestGUI\importVerifiedFileObject(), ilObjExercise\processUploadedFile(), ilObjTest\removeAllTestEditings(), ilObjTest\removeSelectedTestResults(), ilObjTest\removeTestResultsForUser(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), ilObjFileGUI\saveUnzipObject(), assMultipleChoice\syncImages(), assSingleChoice\syncImages(), assQuestion\syncSuggestedSolutionFiles(), ilFileDataImportMail\unlinkLast(), ilFileDataImportForum\unlinkLast(), ilFileDataImportGroup\unlinkLast(), ilSetup\updateNewClient(), ilObjQuestionPoolGUI\uploadQplObject(), and ilObjTestGUI\uploadTstObject().

{
if (!is_dir($a_dir) || is_int(strpos($a_dir, "..")))
{
return;
}
$current_dir = opendir($a_dir);
$files = array();
// this extra loop has been necessary because of a strange bug
// at least on MacOS X. A looped readdir() didn't work
// correctly with larger directories
// when an unlink happened inside the loop. Getting all files
// into the memory first solved the problem.
while($entryname = readdir($current_dir))
{
$files[] = $entryname;
}
foreach($files as $file)
{
if(is_dir($a_dir."/".$file) and ($file != "." and $file!=".."))
{
ilUtil::delDir(${a_dir}."/".${file});
}
elseif ($file != "." and $file != "..")
{
unlink(${a_dir}."/".${file});
}
}
closedir($current_dir);
if (!$a_clean_only)
{
@rmdir(${a_dir});
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 1927 of file class.ilUtil.php.

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

Referenced by ilPDFPresentation\__convert(), ilPDFPresentation\__toPDF(), ilTestExport\aggregatedResultsToCSV(), ilCertificate\createPreview(), ilObjSurvey\deliverPDFfromFO(), ilObjTest\deliverPDFfromFO(), ilPublicUserProfileGUI\deliverVCard(), ilObjSystemFolderGUI\downloadJavaServerIniObject(), ilObjLanguageExtGUI\downloadObject(), ilBookmarkAdministrationGUI\export(), ilObjSurveyGUI\exportAllCodesObject(), ilLMPresentationGUI\exportbibinfo(), ilPaymentCouponGUI\exportCodes(), ilObjSurveyGUI\exportCodesObject(), ilSessionOverviewGUI\exportCSV(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilForumExportGUI\exportHTML(), ilECSSettingsGUI\exportImported(), ilObjAssessmentFolderGUI\exportLogObject(), ilNoteGUI\exportNotesHTML(), ilObjChatGUI\exportObject(), ilObjChatGUI\exportRecordingObject(), ilECSSettingsGUI\exportReleased(), ilTestExport\exportToCSV(), ilSurveyEvaluationGUI\exportUserSpecificResults(), ilCertificate\outCertificate(), and ilPageObject\send_paragraph().

{
$disposition = "attachment"; // "inline" to view file in browser or "attachment" to download to hard disk
// $mime = "application/octet-stream"; // or whatever the mime type is
include_once './classes/class.ilHTTPS.php';
//if (isset($_SERVER["HTTPS"]))
if(ilHTTPS::getInstance()->isDetected())
{
// Added different handling for IE and HTTPS => send pragma after content informations
#header("Pragma: ");
#header("Cache-Control: ");
#header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
#header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
#header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
#header("Cache-Control: post-check=0, pre-check=0", false);
}
else if ($disposition == "attachment")
{
header("Cache-control: private");
}
else
{
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
}
$ascii_filename = ilUtil::getASCIIFilename($a_filename);
if (strlen($charset))
{
$charset = "; charset=$charset";
}
header("Content-Type: $mime$charset");
header("Content-Disposition:$disposition; filename=\"".$ascii_filename."\"");
header("Content-Description: ".$ascii_filename);
header("Content-Length: ".(string)(strlen($a_data)));
//if($_SERVER['HTTPS'])
if( ilHTTPS::getInstance()->isDetected() )
{
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
}
header("Connection: close");
echo $a_data;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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 1988 of file class.ilUtil.php.

References exit, getASCIIFilename(), ilHTTPS\getInstance(), and readFile().

Referenced by ilObjChatGUI\__exportRooms(), ilTestExport\aggregatedResultsToExcel(), ilCertificate\deliverExportFileXML(), ilCourseArchivesGUI\downloadArchives(), ilObjCourseGUI\downloadArchivesObject(), ilSCORM2004ScoGUI\downloadExportFile(), ilGlossaryPresentationGUI\downloadExportFile(), ilObjGlossaryGUI\downloadExportFile(), ilObjGroup\downloadExportFile(), ilObjSCORM2004LearningModuleGUI\downloadExportFile(), ilObjContentObjectGUI\downloadExportFile(), ilLMPresentationGUI\downloadExportFile(), ilObjTestGUI\downloadExportFileObject(), ilObjSurveyQuestionPoolGUI\downloadExportFileObject(), ilObjQuestionPoolGUI\downloadExportFileObject(), ilObjSurveyGUI\downloadExportFileObject(), ilObjUserFolderGUI\downloadExportFileObject(), ilAdvancedMDSettingsGUI\downloadFile(), ilFileSystemGUI\downloadFile(), ilObjExerciseGUI\downloadFileObject(), ilObjFolder\downloadFolder(), ilObjFolderGUI\downloadFolderObject(), ilObjMediaCastGUI\downloadItemObject(), ilExerciseMembers\downloadMultipleFiles(), ilObjContentObjectGUI\downloadPDFFile(), ilSCORM2004ScoGUI\downloadResource(), ilExerciseMembers\downloadSingleFile(), ilObjDlBook\export(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilObjQuestionPoolGUI\exportQuestionObject(), ilObjStyleSheetGUI\exportStyleObject(), ilTestExport\exportToExcel(), ilSurveyEvaluationGUI\exportUserSpecificResults(), assFileUpload\getFileUploadZIPFile(), ilLMPresentationGUI\offlineexport(), ilWebAccessChecker\sendFile(), ilObjFile\sendFile(), ilObjSessionGUI\sendFileObject(), ilObjCourseGUI\sendFileObject(), and ilObjForumGUI\viewThreadObject().

{
if ($isInline) {
$disposition = "inline"; // "inline" to view file in browser
} else {
$disposition = "attachment"; // "attachment" to download to hard disk
//$a_mime = "application/octet-stream"; // override mime type to ensure that no browser tries to show the file anyway.
}
// END WebDAV: Show file in browser or provide it as attachment
if(strlen($a_mime))
{
$mime = $a_mime;
}
else
{
$mime = "application/octet-stream"; // or whatever the mime type is
}
// BEGIN WebDAV: Removed broken HTTPS code.
// END WebDAV: Removed broken HTTPS code.
if ($disposition == "attachment")
{
header("Cache-control: private");
}
else
{
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
}
$ascii_filename = ilUtil::getASCIIFilename($a_filename);
header("Content-Type: $mime");
header("Content-Disposition:$disposition; filename=\"".$ascii_filename."\"");
header("Content-Description: ".$ascii_filename);
header("Content-Length: ".(string)(filesize($a_file)));
include_once './classes/class.ilHTTPS.php';
//if($_SERVER['HTTPS'])
if(ilHTTPS::getInstance()->isDetected())
{
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
}
header("Connection: close");
ilUtil::readFile( $a_file );
if ($removeAfterDelivery)
{
unlink ($a_file);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::dirsize (   $directory)

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 4600 of file class.ilUtil.php.

References $size.

Referenced by ilObjSAHSLearningModuleAccess\_lookupDiskUsage(), ilObjMediaCastAccess\_lookupDiskUsage(), ilObjFileBasedLMAccess\_lookupDiskUsage(), ilObjFileAccess\_lookupDiskUsage(), ilFileDataMail\_lookupDiskUsageOfUser(), and ilFileDataExercise\downloadAllDeliveredFiles().

{
$size = 0;
if (!is_dir($directory))
{
// BEGIN DiskQuota Suppress PHP warning when attempting to determine
// dirsize of non-existing directory
$size = @filesize($directory);
// END DiskQuota Suppress PHP warning.
return ($size === false) ? -1 : $size;
}
if ($DIR = opendir($directory))
{
while (($dirfile = readdir($DIR)) !== false)
{
if (is_link($directory . DIRECTORY_SEPARATOR . $dirfile) || $dirfile == '.' || $dirfile == '..')
continue;
if (is_file($directory . DIRECTORY_SEPARATOR . $dirfile))
$size += filesize($directory . DIRECTORY_SEPARATOR . $dirfile);
else if (is_dir($directory . DIRECTORY_SEPARATOR . $dirfile))
{
// BEGIN DiskQuota: dirsize is not a global function anymore
$dirSize = ilUtil::dirsize($directory . DIRECTORY_SEPARATOR . $dirfile);
// END DiskQuota: dirsize is not a global function anymore
if ($dirSize >= 0)
$size += $dirSize;
else return -1;
}
}
closedir($DIR);
}
return $size;
}

+ Here is the caller graph for this function:

ilUtil::dumpString (   $a_str)

dumps ord values of every character of string $a_str

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

References $ret.

{
$ret = $a_str.": ";
for($i=0; $i<strlen($a_str); $i++)
{
$ret.= ord(substr($a_str,$i,1))." ";
}
return $ret;
}
ilUtil::escapeShellArg (   $a_arg)

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

Referenced by convertImage(), CreateIsoFromFolder(), ilFileDataExercise\downloadAllDeliveredFiles(), ilExerciseMembers\downloadMultipleFiles(), ilObjFile\getXMLZip(), htmlfile2pdf(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), resizeImage(), ilContainer\saveIcons(), unzip(), ilSetup\unzip(), ilPersonalProfileGUI\uploadUserPicture(), ilObjUserGUI\uploadUserPictureObject(), ilObjSCORMValidator\validateXML(), and zip().

{
setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8"); // fix for PHP escapeshellcmd bug. See: http://bugs.php.net/bug.php?id=45132
// see also ilias bug 5630
return escapeshellarg($a_arg);
}

+ Here is the caller graph for this function:

ilUtil::escapeShellCmd (   $a_arg)

escape shell cmd

public

Parameters
@return

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

Referenced by ilImagemapPreview\createPreview().

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

+ Here is the caller graph for this function:

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

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

Referenced by ilObjUserFolder\createExcelExport(), ilTestExport\exportToCSV(), and ilTestExport\exportToExcel().

{
$starting_time = mktime(0, 0, 0, 1, 2, 1970);
if (strcmp("$year$month$day$hour$minute$second", "") == 0)
{
$target_time = time();
}
else
{
if ($year < 1970)
{
return 0;
}
}
$target_time = mktime($hour, $minute, $second, $month, $day, $year);
$difference = $target_time - $starting_time;
$days = (($difference - ($difference % 86400)) / 86400);
$difference = $difference - ($days * 86400) + 3600;
return ($days + 25570 + ($difference / 86400));
}

+ Here is the caller graph for this function:

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

exec command and fix spaces on windows

Parameters
string$cmd
string$args
Returns
array

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

References $cmd, and isWindows().

Referenced by unzip(), and zip().

{
if(ilUtil::isWindows() && strpos($cmd, " ") !== false && substr($cmd, 0, 1) !== '"')
{
// cmd won't work without quotes
$cmd = '"'.$cmd.'"';
if($args)
{
// args are also quoted, workaround is to quote the whole command AGAIN
// was fixed in php 5.2 (see php bug #25361)
if (version_compare(phpversion(), "5.2", "<") && strpos($args, '"') !== false)
{
$cmd = '"'.$cmd." ".$args.'"';
}
// args are not quoted or php is fixed, just append
else
{
$cmd .= " ".$args;
}
}
}
// nothing todo, just append args
else if($args)
{
$cmd .= " ".$args;
}
exec($cmd, $arr);
return $arr;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::extractParameterString (   $a_parstr)

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 2893 of file class.ilUtil.php.

References $ok.

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

{
// parse parameters in array
$par = array();
$ok=true;
while(($spos=strpos($a_parstr,"=")) && $ok)
{
// extract parameter
$cpar = substr($a_parstr,0,$spos);
$a_parstr = substr($a_parstr,$spos,strlen($a_parstr)-$spos);
while(substr($cpar,0,1)=="," ||substr($cpar,0,1)==" " || substr($cpar,0,1)==chr(13) || substr($cpar,0,1)==chr(10))
$cpar = substr($cpar,1,strlen($cpar)-1);
while(substr($cpar,strlen($cpar)-1,1)==" " || substr($cpar,strlen($cpar)-1,1)==chr(13) || substr($cpar,strlen($cpar)-1,1)==chr(10))
$cpar = substr($cpar,0,strlen($cpar)-1);
// parameter name should only
$cpar_old = "";
while($cpar != $cpar_old)
{
$cpar_old = $cpar;
$cpar = eregi_replace("[^a-zA-Z0-9_]", "", $cpar);
}
// extract value
if ($cpar != "")
{
if($spos=strpos($a_parstr,"\""))
{
$a_parstr = substr($a_parstr,$spos+1,strlen($a_parstr)-$spos);
$spos=strpos($a_parstr,"\"");
if(is_int($spos))
{
$cval = substr($a_parstr,0,$spos);
$par[$cpar]=$cval;
$a_parstr = substr($a_parstr,$spos+1,strlen($a_parstr)-$spos-1);
}
else
$ok=false;
}
else
$ok=false;
}
}
if($ok) return $par; else return false;
}

+ Here is the caller graph for this function:

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

??? public

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

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

Referenced by ilAdminUserSearchGUI\__fillGroupTable(), ilAdminUserSearchGUI\__fillRoleTable(), ilAdminUserSearchGUI\__fillUserTable(), ilLPListOfSettingsGUI\__showCollectionTable(), ilLPListOfObjectsGUI\__showEditUser(), ilLPListOfSettingsGUI\__showSCOTable(), ilObjUserFolderGUI\__showSelectTable(), ilObjCourseGUI\__showSubscribers(), ilObjUserFolderGUI\__showTextTable(), ilObjCourseGUI\__showWaitingList(), ilObjUserFolderGUI\__showWysiwygTable(), ilObjCategoryGUI\_importCategoriesForm(), ilCourseUserFieldsGUI\addSelectField(), ilCourseUserFieldsGUI\addTextField(), ilObjUserFolderGUI\appliedUsersObject(), ilObjCategoryGUI\assignRolesObject(), ilPasteIntoMultipleItemsExplorer\buildFormItem(), ilObjForumGUI\cloneWizardPageObject(), ilAccountRegistrationGUI\displayForm(), ilObjUserFolderGUI\editAppliedUsersObject(), ilRegistrationSettingsGUI\editEmailAssignments(), ilCourseUserFieldsGUI\editField(), ilObjUserGUI\editOldObject(), ilRegistrationSettingsGUI\editRoles(), ilObjExternalToolsSettingsGUI\editSocialBookmarksObject(), ilFeedbackGUI\fbList(), ilExerciseMemberTableGUI\fillRow(), ilWebResourceEditableLinkTableGUI\fillRow(), ilObjForumGUI\getContent(), ilObjContentObjectGUI\linkChecker(), ilObjLinkResourceGUI\linkCheckerObject(), ilConditionHandlerInterface\listConditions(), ilObjCourseGroupingGUI\listGroupings(), ilObjUserFolderGUI\listUserDefinedFieldsObject(), ilLMStatisticsGUI\listUsersGroup(), ilObjiLincCourseGUI\listUsersGroupObject(), ilObjRoleGUI\listUsersGroupObject(), ilObjCategoryGUI\listUsersObject(), ilLMStatisticsGUI\listUsersRole(), ilObjiLincCourseGUI\listUsersRoleObject(), ilObjRoleGUI\listUsersRoleObject(), ilObjiLincCourseGUI\mailMembersObject(), ilObjGroupGUI\mailMembersObject(), ilObjCourseGUI\mailMembersObject(), ilObjSessionGUI\materialsObject(), ilObjPaymentSettingsGUI\payMethodsObject(), ilPaymentTrusteeGUI\performSearch(), ilLDAPSettingsGUI\roleMapping(), ilLMStatisticsGUI\search(), ilObjiLincCourseGUI\searchObject(), ilObjRoleGUI\searchObject(), ilObjPaymentSettingsGUI\searchObject(), ilObjCourseGroupingGUI\selectCourse(), ilObjCourseGUI\selectStarterObject(), ilObjUserFolderGUI\settingsObject(), ilCourseUserFieldsGUI\show(), ilMemberExportGUI\show(), ilMailAddressbookGUI\showAddressbook(), ilCourseAgreementGUI\showAgreement(), ilPaymentCouponGUI\showCodes(), ilShopAdvancedSearchGUI\showForm(), ilMailingListsGUI\showMailingLists(), ilMailingListsGUI\showMembersList(), ilForumModeratorsGUI\showModerators(), ilPaymentCouponGUI\showObjects(), ilObjPrivacySecurityGUI\showPrivacy(), ilMailSearchGUI\showResults(), ilPaymentTrusteeGUI\showTrustees(), ilStartUpGUI\showUserAgreement(), ilLDAPSettingsGUI\userMapping(), ilObjPaymentSettingsGUI\vatsObject(), ilObjPaymentSettingsGUI\vendorsObject(), ilRegistrationSettingsGUI\view(), and ilCourseArchivesGUI\view().

{
$str = "<input type=\"checkbox\" name=\"".$varname."\"";
if ($checked == 1)
{
$str .= " checked=\"checked\"";
}
if ($disabled)
{
$str .= " disabled=\"disabled\"";
}
$array_var = false;
if (substr($varname,-2) == "[]")
{
$array_var = true;
}
// if varname ends with [], use varname[-2] + _ + value as id tag (e.g. "user_id[]" => "user_id_15")
if ($array_var)
{
$varname_id = substr($varname,0,-2)."_".$value;
}
else
{
$varname_id = $varname;
}
// dirty removal of other "[]" in string
$varname_id = ereg_replace("\[","_",$varname_id);
$varname_id = ereg_replace("\]","",$varname_id);
$str .= " value=\"".$value."\" id=\"".$varname_id."\" />\n";
return $str;
}

+ Here is the caller graph for this function:

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

???

Parameters
string

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

{
if ($disabled) {
$str = "<input disabled type=\"radio\" name=\"".$varname."\"";
}
else {
$str = "<input type=\"radio\" name=\"".$varname."\"";
}
if ($checked == 1)
{
$str .= " checked=\"checked\"";
}
$str .= " value=\"".$value."\"";
$str .= " id=\"".$value."\" />\n";
return $str;
}
ilUtil::formInput (   $varname,
  $value,
  $disabled = false 
)

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 526 of file class.ilUtil.php.

Referenced by ilPaymentObjectGUI\editPrices(), ilObjPaymentSettingsGUI\editPricesObject(), ilChatSmiliesTableGUI\fillRow(), ilShopPersonalSettingsTopicsTableGUI\fillRow(), and ilShopTopicsTableGUI\fillRow().

{
$str = "<input type=\"input\" name=\"".$varname."\"";
if ($disabled)
{
$str .= " disabled";
}
$str .= " value=\"".$value."\"";
$str .= " id=\"".$value."\" />\n";
return $str;
}

+ Here is the caller graph for this function:

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.

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 318 of file class.ilUtil.php.

References $key, $lng, and $size.

Referenced by ilMDEditorGUI\__fillSubelements(), ilAdminUserSearchGUI\__fillUserSearch(), ilAccountRegistrationGUI\__showRoleSelection(), ilObjCourseGUI\__showSubscribersTable(), ilObjUserGUI\__showUserDefinedFields(), ilPersonalProfileGUI\__showUserDefinedFields(), ilObjPaymentSettingsGUI\__showVendorsTable(), ilObjCourseGUI\__showWaitingListTable(), ilFeedbackGUI\addBarometer(), ilColumnGUI\addHiddenBlockSelector(), ilObjSystemFolderGUI\benchmarkObject(), ilRecurrenceInputGUI\buildMonthlyByDaySelection(), ilRecurrenceInputGUI\buildMonthlyByMonthDaySelection(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilRecurrenceInputGUI\buildYearlyByMonthDaySelection(), ilObjSystemFolderGUI\checkObject(), ilObjCourseGroupingGUI\create(), ilFeedbackGUI\edit(), ilObjCourseGroupingGUI\edit(), ilObjStyleSettingsGUI\editContentStylesObject(), ilObjPaymentSettingsGUI\editObjectObject(), ilPaymentStatisticGUI\editStatistic(), ilObjPaymentSettingsGUI\editStatisticObject(), ilTable2GUI\fillActionRow(), ilObjectTranslationTableGUI\fillRow(), ilPCFileListTableGUI\fillRow(), ilWebResourceEditableLinkTableGUI\fillRow(), ilLPFilterGUI\getHTML(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilRecurrenceInputGUI\insert(), ilLocationInputGUI\insert(), ilDurationInputGUI\insert(), ilObjAdvancedEditingGUI\repositorySettingsObject(), ilCourseArchivesGUI\selectArchiveLanguage(), ilCourseAgreementGUI\showCourseDefinedFields(), ilShopAdvancedSearchGUI\showForm(), ilObjSCORM2004LearningModuleGUI\showLearningObjectivesAlignment(), ilInfoScreenGUI\showLearningProgress(), ilInternalLinkGUI\showLinkHelp(), ilPageObjectGUI\showPage(), ilBookmarkAdministrationGUI\showPossibleSubObjects(), ilShopGUI\showShopContent(), ilAccountRegistrationGUI\showUserDefinedFields(), and ilObjLanguageExtGUI\viewObject().

{
global $lng;
if ($multiple == true)
{
$multiple = " multiple=\"multiple\"";
}
else
{
$multiple = "";
$size = 0;
}
if ($style_class != "")
{
$class = " class=\"".$style_class."\"";
}
else
{
$class = "";
}
if (is_array($attribs))
{
foreach ($attribs as $key => $val)
{
$attributes .= " ".$key."=\"".$val."\"";
}
}
if($disabled)
{
$disabled = ' disabled=\"disabled\"';
}
$str = "<select name=\"".$varname ."\"".$multiple." $class size=\"".$size."\" $attributes $disabled>\n";
foreach ($options as $key => $val)
{
if (is_array($val))
{
$style = $val["style"];
$val = $val["text"]; // mus be last line, since we overwrite
}
$sty = ($style != "")
? ' style="'.$style.'" '
: "";
if ($direct_text)
{
$str .= " <option $sty value=\"".$key."\"";
}
else
{
$str .= " <option $sty value=\"".$val."\"";
}
if (is_array($selected) )
{
if (in_array($key,$selected))
{
$str .= " selected=\"selected\"";
}
}
else if ($selected == $key)
{
$str .= " selected=\"selected\"";
}
if ($direct_text)
{
$str .= ">".$val."</option>\n";
}
else
{
$str .= ">".$lng->txt($val)."</option>\n";
}
}
$str .= "</select>\n";
return $str;
}

+ Here is the caller graph for this function:

ilUtil::generatePasswords (   $a_number)

Generate a number of passwords.

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

References $ret, and ilSecuritySettings\_getInstance().

Referenced by ilStartUpGUI\confirmRegistration(), ShibAuth\generateLogin(), ilPasswordInputGUI\insert(), ShibAuth\login(), ilAccountRegistrationGUI\saveForm(), and ilPersonalProfileGUI\showProfile().

{
$ret = array();
srand((double) microtime()*1000000);
include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
for ($i=1; $i<=$a_number; $i++)
{
$min = ($security->getPasswordMinLength() > 0)
? $security->getPasswordMinLength()
: 6;
$max = ($security->getPasswordMaxLength() > 0)
? $security->getPasswordMaxLength()
: 10;
if ($min > $max)
{
$max = $max + 1;
}
$length = rand($min,$max);
$next = rand(1,2);
$vowels = "aeiou";
$consonants = "bcdfghjklmnpqrstvwxyz";
$numbers = "1234567890";
$special = "_.+?#-*@!$%~";
$pw = "";
// position for number
if ($security->isPasswordCharsAndNumbersEnabled())
{
$num_pos = rand(0, $length - 1);
}
// position for special character
if ($security->isPasswordSpecialCharsEnabled())
{
$spec_pos = rand(0, $length - 1);
if ($security->isPasswordCharsAndNumbersEnabled())
{
if ($num_pos == $spec_pos) // not same position for number/special
{
if ($spec_pos > 0)
{
$spec_pos -= 1;
}
else
{
$spec_pos += 1;
}
}
}
}
for ($j=0; $j < $length; $j++)
{
if ($security->isPasswordCharsAndNumbersEnabled() && $num_pos == $j)
{
$pw.= $numbers[rand(0,strlen($numbers)-1)];
}
else if ($security->isPasswordSpecialCharsEnabled() && $spec_pos == $j)
{
$pw.= $special[rand(0,strlen($special)-1)];
}
else
{
switch ($next)
{
case 1:
$pw.= $consonants[rand(0,strlen($consonants)-1)];
$next = 2;
break;
case 2:
$pw.= $vowels[rand(0,strlen($vowels)-1)];
$next = 1;
break;
}
}
}
$ret[] = $pw;
}
return $ret;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::getASCIIFilename (   $a_filename)

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, 'ISO_8859-1','UTF-8'); $ascii_filename = preg_replace('/&(.)[^;]*;/","\1', $ascii_filename);

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

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

Referenced by ilTestExport\aggregatedResultsToCSV(), ilTestExport\aggregatedResultsToExcel(), deliverData(), deliverFile(), ilObjSurvey\deliverPDFfromFO(), ilObjTest\deliverPDFfromFO(), ilFileDataExercise\downloadAllDeliveredFiles(), ilObjFolderGUI\downloadFolderObject(), ilObjSurveyGUI\exportAllCodesObject(), ilTestEvaluationGUI\exportCertificate(), ilObjSurveyGUI\exportCodesObject(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilTestExport\exportToCSV(), ilTestExport\exportToExcel(), ilSurveyEvaluationGUI\exportUserSpecificResults(), assFileUpload\getFileUploadZIPFile(), and ilObjMediaCastGUI\updateMediaItem().

{
// The filename must be converted to ASCII, as of RFC 2183,
// section 2.3.
// Despite the RFC, Internet Explorer on Windows supports
// ISO 8895-1 encoding for the file name. We use this fact, to
// produce a better result, if the user uses IE.
$user_agent = strtolower($_SERVER["HTTP_USER_AGENT"]);
if ((is_integer(strpos($user_agent, "msie"))) && is_integer(strpos($user_agent, "win")))
{
$ascii_filename = utf8_decode($a_filename);
}
else
{
$ascii_filename = htmlentities($a_filename,ENT_NOQUOTES,'UTF-8');
$ascii_filename = preg_replace('/\&(.)[^;]*;/','\\1', $ascii_filename);
$ascii_filename = preg_replace('/[\x7f-\xff]/','_', $ascii_filename);
}
// OS do not allow the following characters in filenames:
// \/:*?"<>|
//if (is_integer(strpos($user_agent, "win")))
{
$ascii_filename = preg_replace('/[:\x5c\/\*\?\"<>\|]/','_', $ascii_filename);
}
return $ascii_filename;
}

+ Here is the caller graph for this function:

ilUtil::getAssociatedUsersOnline (   $a_user_id)

reads all active sessions from db and returns users that are online
and who have a local role in a group or a course for which the

the current user has also a local role.

Parameters
integeruser_id User ID of the current user.
Returns
array

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

References ilObjUser\_getAssociatedUsersOnline().

Referenced by ilUsersOnlineBlockGUI\getUsers().

{
include_once("./Services/User/classes/class.ilObjUser.php");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::getConvertCmd ( )

get convert command

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

Referenced by ilObjUser\_uploadPersonalPicture(), convertImage(), ilImagemapPreview\createPreview(), resizeImage(), ilContainer\saveIcons(), ilPersonalProfileGUI\uploadUserPicture(), and ilObjUserGUI\uploadUserPictureObject().

{
return PATH_TO_CONVERT;
//global $ilias;
//return $ilias->getSetting("convert_path");
}

+ Here is the caller graph for this function:

ilUtil::getDataDir ( )

get data directory (outside webspace)

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

Referenced by ilAdvancedMDRecordExportFiles\__construct(), ilAdvancedMDRecordImportFiles\__construct(), ilExport\_createExportDirectory(), ilObjQuestionPool\_createImportDirectory(), ilObjTest\_createImportDirectory(), ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), ilExport\_getExportDirectory(), ilObjCategoryGUI\_getImportDir(), ilObjQuestionPool\_getImportDirectory(), ilObjTest\_getImportDirectory(), ilObjForumAccess\_lookupDiskUsage(), ilFileDataMail\_lookupDiskUsageOfUser(), ilObjStyleSheet\cleanExportDirectory(), ilObjContentObject\createExportDirectory(), ilScorm2004Export\createExportDirectory(), ilObjSurveyQuestionPool\createExportDirectory(), ilObjQuestionPool\createExportDirectory(), ilObjUserFolder\createExportDirectory(), ilObjTest\createExportDirectory(), ilObjStyleSheet\createExportDirectory(), ilObjSurvey\createExportDirectory(), ilObjContentObject\createImportDirectory(), ilObjGlossary\createImportDirectory(), ilObjSurveyQuestionPool\createImportDirectory(), ilObjTest\createImportDirectory(), ilObjStyleSheet\createImportDirectory(), ilObjSurvey\createImportDirectory(), ilMediaItem\createWorkDirectory(), ilObjSurveyQuestionPool\deleteAllData(), ilObjQuestionPool\deleteQuestionpool(), ilObjSurvey\deleteSurveyRecord(), ilObjTest\deleteTest(), ilObjContentObject\getDataDirectory(), ilObjUserFolder\getExportDirectory(), ilObjContentObject\getExportDirectory(), ilObjSurveyQuestionPool\getExportDirectory(), ilObjQuestionPool\getExportDirectory(), ilObjTest\getExportDirectory(), ilObjSurvey\getExportDirectory(), ilScorm2004Export\getExportDirectoryForType(), ilObjUserFolderGUI\getImportDir(), ilObjContentObject\getImportDirectory(), ilObjGlossary\getImportDirectory(), ilObjSurveyQuestionPool\getImportDirectory(), ilObjQuestionPool\getImportDirectory(), ilObjTest\getImportDirectory(), ilObjSurvey\getImportDirectory(), ilFSStorageMail\getRelativePathExMailDirectory(), ilMediaItem\getWorkDirectory(), ilTempnam(), ilFileSystemStorage\init(), and ilChatServerConfig\writeConfigFile().

{
return CLIENT_DATA_DIR;
//global $ilias;
//return $ilias->ini->readVariable("server", "data_dir");
}

+ Here is the caller graph for this function:

ilUtil::getDir (   $a_dir)

get directory

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

References $dirs, $files, and $size.

Referenced by assOrderingQuestion\cleanImagefiles(), ilSCORM13Package\dbImportSco(), ilObjMediaObjectGUI\editFilesObject(), ilFileDataMail\getAttachmentPathByMD5Filename(), ilFileSystemTableGUI\getEntries(), ilFileDataForum\getFileDataByMD5Filename(), ilAdvancedMDRecordExportFiles\getFiles(), ilObjStyleSheet\getImages(), ilCertificate\importCertificate(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilFileSystemGUI\listFiles(), and ilFileDataForum\unlinkFilesByMD5Filenames().

{
$current_dir = opendir($a_dir);
$dirs = array();
$files = array();
while($entry = readdir($current_dir))
{
if(is_dir($a_dir."/".$entry))
{
$dirs[$entry] = array("type" => "dir", "entry" => $entry);
}
else
{
if ($entry != "." && $entry != "..")
{
$size = filesize($a_dir."/".$entry);
$files[$entry] = array("type" => "file", "entry" => $entry,
"size" => $size);
}
}
}
ksort($dirs);
ksort($files);
return array_merge($dirs, $files);
}

+ Here is the caller graph for this function:

ilUtil::getFileSizeInfo ( )

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

References $lng.

Referenced by ilMultipleChoiceWizardInputGUI\insert(), ilImageWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), and ilSingleChoiceWizardInputGUI\insert().

{
global $lng;
// get the value for the maximal uploadable filesize from the php.ini (if available)
$umf=get_cfg_var("upload_max_filesize");
// get the value for the maximal post data from the php.ini (if available)
$pms=get_cfg_var("post_max_size");
// use the smaller one as limit
$max_filesize=min($umf, $pms);
if (!$max_filesize) $max_filesize=max($umf, $pms);
return $lng->txt("file_notice")." $max_filesize.";
}

+ Here is the caller graph for this function:

ilUtil::getGDSupportedImageType (   $a_desired_type)

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 3221 of file class.ilUtil.php.

Referenced by ilMediaItem\getMapWorkCopyType().

{
$a_desired_type = strtolower($a_desired_type);
// get supported Image Types
$im_types = ImageTypes();
switch($a_desired_type)
{
case "jpg":
if ($im_types & IMG_JPG) return "jpg";
if ($im_types & IMG_GIF) return "gif";
if ($im_types & IMG_PNG) return "png";
break;
case "gif":
if ($im_types & IMG_GIF) return "gif";
if ($im_types & IMG_JPG) return "jpg";
if ($im_types & IMG_PNG) return "png";
break;
case "png":
if ($im_types & IMG_PNG) return "png";
if ($im_types & IMG_JPG) return "jpg";
if ($im_types & IMG_GIF) return "gif";
break;
}
return "";
}

+ Here is the caller graph for this function:

ilUtil::getHtmlPath (   $relative_path)

get url of path

Author
Brandon Blackmoor brand.nosp@m.on.b.nosp@m.lackm.nosp@m.oor@.nosp@m.jfcom.nosp@m..mil 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 151 of file class.ilUtil.php.

Referenced by ilObjMediaObject\_getURL(), ilChatSmilies\_parseString(), SurveyTextQuestionGUI\getPrintView(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyMatrixQuestionGUI\getPrintView(), assMultipleChoiceGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), ilTestEvaluationGUI\outParticipantsPassDetails(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilTestEvaluationGUI\outUserResultsOverview(), ilObjTestGUI\printobject(), and ilObjSurveyGUI\printViewObject().

{
if (substr($relative_path, 0, 2) == './')
{
$relative_path = (substr($relative_path, 1));
}
if (substr($relative_path, 0, 1) != '/')
{
$relative_path = '/' . $relative_path;
}
$htmlpath = ILIAS_HTTP_PATH . $relative_path;
return $htmlpath;
}

+ Here is the caller graph for this function:

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

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

public

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

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

References $ilCtrl, and $img.

Referenced by ilLearningProgressBaseGUI\__buildHeader(), ilCourseContentGUI\__editAdvancedUserTimings(), ilObjPaymentSettingsGUI\__editPricesTable(), ilPaymentObjectGUI\__editPricesTable(), ilCourseContentGUI\__editUserTimings(), ilLearningProgressBaseGUI\__getLegendHTML(), ilCourseContentGUI\__getOptions(), ilLPListOfObjectsGUI\__renderContainerRow(), ilLPListOfProgressGUI\__renderContainerRow(), ilCourseContentGUI\__renderEvent(), ilCourseContentGUI\__renderUserItem(), ilObjLinkResourceGUI\__setHeader(), ilObjChatGUI\__setHeader(), ilObjRoleGUI\__setHeader(), ilObjLinkResourceGUI\__setLocator(), ilObjUserFolderGUI\__showAppliedUsersTable(), ilObjRoleGUI\__showAssignedUsersTable(), ilObjectGUI\__showClipboardTable(), ilLPListOfSettingsGUI\__showCollectionTable(), ilLPListOfProgressGUI\__showContainerList(), ilPaymentShoppingCartGUI\__showCouponInput(), ilObjCourseGUI\__showDeleteSubscriberTable(), ilCourseObjectivePresentationGUI\__showHideLinks(), ilCourseObjectivePresentationGUI\__showLearningMaterials(), ilCourseObjectivePresentationGUI\__showObjectives(), ilObjectStatusGUI\__showObjectSummaryTable(), ilObjCourseGUI\__showRemoveFromWaitingListTable(), ilObjRoleFolderGUI\__showRolesTable(), ilObjCategoryGUI\__showRolesTable(), ilObjUserGUI\__showRolesTable(), ilLPListOfSettingsGUI\__showSCOTable(), ilAdminUserSearchGUI\__showSearch(), ilObjiLincCourseGUI\__showSearchGroupTable(), ilLMStatisticsGUI\__showSearchGroupTable(), ilAdminUserSearchGUI\__showSearchGroupTable(), ilObjRoleGUI\__showSearchGroupTable(), ilObjiLincCourseGUI\__showSearchRoleTable(), ilLMStatisticsGUI\__showSearchRoleTable(), ilAdminUserSearchGUI\__showSearchRoleTable(), ilObjRoleGUI\__showSearchRoleTable(), ilObjPaymentSettingsGUI\__showSearchUserSPTable(), ilObjiLincCourseGUI\__showSearchUserTable(), ilPaymentTrusteeGUI\__showSearchUserTable(), ilLMStatisticsGUI\__showSearchUserTable(), ilAdminUserSearchGUI\__showSearchUserTable(), ilPaymentStatisticGUI\__showSearchUserTable(), ilObjRoleGUI\__showSearchUserTable(), ilObjPaymentSettingsGUI\__showSearchUserTable(), ilObjCourseGUI\__showSubscribersTable(), ilPaymentTrusteeGUI\__showTrusteesTable(), ilLPListOfObjectsGUI\__showUsersList(), ilObjCategoryGUI\__showUsersTable(), ilObjPaymentSettingsGUI\__showVendorsTable(), ilObjCourseGUI\__showWaitingListTable(), ilPermanentLinkGUI\_getBookmarksSelectionList(), ilObject\_getIcon(), ilObjUser\_getPersonalPicturePath(), ilPCTableGUI\_renderTable(), ilLearningProgressBaseGUI\_showImageByStatus(), ilFeedbackGUI\addBarometer(), ilPaymentStatisticGUI\addCustomer(), ilObjPaymentSettingsGUI\addCustomerObject(), ilGlossaryTermGUI\addDefinition(), ilContainerSessionsContentGUI\addFooterRow(), ilContainerObjectiveGUI\addFooterRow(), ilShopPurchaseGUI\addHeaderRow(), ilShopResultPresentationGUI\addHeaderRow(), ilContainerContentGUI\addHeaderRow(), ilPDSelectedItemsBlockGUI\addHeaderRow(), ilContainerGUI\addHeaderRow(), ilInfoScreenGUI\addObjectSections(), ilPDSelectedItemsBlockGUI\addParentRow(), ilPaymentObjectGUI\addPrice(), ilObjPaymentSettingsGUI\addPriceObject(), ilShopPurchaseGUI\addStandardRow(), ilContainerGUI\addStandardRow(), ilPDSelectedItemsBlockGUI\addStandardRow(), ilSearchResultPresentation\appendRelevance(), ilObjRoleGUI\askDeleteDesktopItemObject(), ilCourseObjectivesGUI\askDeleteObjective(), ilObjChatGUI\askDeleteRecordingsObject(), ilPaymentBaseGUI\buildHeader(), ilObjContentObjectGUI\chapters(), ilContainerGUI\cloneWizardPageObject(), ilObjForumGUI\cloneWizardPageObject(), ilECSSettingsGUI\communities(), ilGlossaryTermGUI\confirmDefinitionDeletion(), ilObjGlossaryGUI\confirmDeleteExportFile(), ilObjContentObjectGUI\confirmDeleteExportFile(), ilObjUserFolderGUI\confirmDeleteExportFileObject(), ilPDExternalFeedBlockGUI\confirmDeleteFeedBlock(), ilObjGroupGUI\confirmDeleteMembersObject(), ilObjRoleGUI\confirmDeleteRoleObject(), ilObjMediaCastGUI\confirmDeletionItemsObject(), ilNewsItemGUI\confirmDeletionNewsItems(), ilObjMediaPoolGUI\confirmRemove(), ilObjGlossaryGUI\confirmTermDeletion(), ilObjSurveyGUI\constraintsObject(), ilGlossaryTermGUI\create(), ilObjCourseGUI\createObject(), ilObjGlossaryGUI\createObject(), ilObjFolderGUI\createObject(), ilObjSAHSLearningModuleGUI\createObject(), ilObjCategoryGUI\createObject(), ilObjGroupGUI\createObject(), ilObjectGUI\createObject(), ilObjSurveyQuestionPoolGUI\createObject(), ilObjContentObjectGUI\createObject(), ilObjQuestionPoolGUI\createObject(), ilObjSurveyGUI\createObject(), ilObjTestGUI\createObject(), ilBookmarkAdministrationGUI\delete(), ilObjContentObjectGUI\delete(), ilObjCourseGUI\deleteMembersObject(), ilObjSCORM2004LearningModuleGUI\deleteNodes(), ilObjStyleSheetGUI\deleteObject(), ilObjTestGUI\deleteSingleUserResultsObject(), ilObjStyleSheetFolderGUI\deleteStyleObject(), ilObjStyleSettingsGUI\deleteStyleObject(), ilGlossaryLocatorGUI\display(), ilObjSystemFolderGUI\displayBasicSettings(), ilAccountRegistrationGUI\displayForm(), ilPDNewsGUI\displayHeader(), ilPDNotesGUI\displayHeader(), ilBookmarkAdministrationGUI\displayHeader(), ilPersonalDesktopGUI\displayHeader(), ilLMEditorGUI\displayLocator(), ilPageObjectGUI\displayMediaFullscreen(), ilFeedbackGUI\edit(), ilObjUserFolderGUI\editAppliedUsersObject(), ilPCDataTableGUI\editData(), ilPaymentObjectGUI\editDetails(), ilObjFileAccessSettingsGUI\editDiskQuotaMailTemplate(), ilRegistrationSettingsGUI\editEmailAssignments(), ilObjMediaObjectGUI\editFilesObject(), ilLMPageObjectGUI\editLayout(), ilObjContentObjectGUI\editMenuProperties(), ilObjTypeDefinitionGUI\editObject(), ilObjPaymentSettingsGUI\editObjectObject(), ilContainerGUI\editPageContentObject(), ilRegistrationSettingsGUI\editRoles(), ilPDNewsBlockGUI\editSettings(), ilPaymentStatisticGUI\editStatistic(), ilObjPaymentSettingsGUI\editStatisticObject(), ilGlossaryTermGUI\editTerm(), ilCourseContentGUI\editTimings(), ilObjPaymentSettingsGUI\editVendor(), ilObjSessionGUI\eventsListObject(), ilLMPageObjectGUI\executeCommand(), ilSCORM2004PageNodeGUI\executeCommand(), ilTermDefinitionEditorGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPersonalDesktopGUI\executeCommand(), ilObjContentObjectGUI\explorer(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilObjGlossaryGUI\exportList(), ilObjContentObjectGUI\exportList(), ilObjUserFolderGUI\exportObject(), ilObjSCORMLearningModuleGUI\exportOptions(), ilFeedbackGUI\fbList(), ilObjChatGUI\fetchActiveUsers(), ilObjChatGUI\fetchOnlineUsers(), ilMailFolderTableGUI\fetchTableData(), ilTable2GUI\fillActionRow(), ilLuceneAdvancedSearchGUI\fillAdminPanel(), ilLuceneSearchGUI\fillAdminPanel(), ilTemplate\fillAdminPanel(), ilObjectGUI\fillCloneSearchTemplate(), ilBlockGUI\fillDetailRow(), ilTable2GUI\fillHeader(), ilBlockGUI\fillHeaderCommands(), ilCopyWizardPage\fillMainBlock(), ilTemplate\fillMessage(), ilBlockGUI\fillMoveLink(), ilBookmarkAdministrationTableGUI\fillRow(), ilSearchResultTableGUI\fillRow(), ilExerciseMemberTableGUI\fillRow(), ilShibbolethRoleAssignmentTableGUI\fillRow(), ilLDAPRoleAssignmentTableGUI\fillRow(), ilECSCommunityTableGUI\fillRow(), ilWikiContributorsTableGUI\fillRow(), ilCourseObjectiveQuestionsTableGUI\fillRow(), ilCalendarInboxSharedTableGUI\fillRow(), ilCalendarSharedListTableGUI\fillRow(), ilCalendarCategoryTableGUI\fillRow(), ilPageLayoutTableGUI\fillRow(), ilCalendarChangedAppointmentsTableGUI\fillRow(), ilObjectivesAlignmentTableGUI\fillRow(), ilCourseObjectivesTableGUI\fillRow(), ilClipboardTableGUI\fillRow(), ilListOfQuestionsTableGUI\fillRow(), ilComponentsTableGUI\fillRow(), ilObjectCopySelectionTableGUI\fillRow(), ilTestQuestionsTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilGroupParticipantsTableGUI\fillRow(), ilFileSystemTableGUI\fillRow(), ilCourseParticipantsTableGUI\fillRow(), ilSurveyQuestionsTableGUI\fillRow(), ilSessionParticipantsTableGUI\fillRow(), ilQuestionBrowserTableGUI\fillRow(), ilUsersOnlineBlockGUI\fillRow(), ilMediaPoolTableGUI\fillRow(), ilTemplate\fillSideIcons(), ilSAHSPresentationGUI\finishSahs(), ilSCORMPresentationGUI\finishSahs(), ilAdministrationExplorer\formatHeader(), ilMediaPoolExplorer\formatHeader(), ilLMExplorer\formatHeader(), ilStyleScopeExplorer\formatHeader(), ilLMEditorExplorer\formatHeader(), ilScorm2004EditorExplorer\formatHeader(), ilFileSelectorGUI\formatHeader(), ilPoolSelectorGUI\formatHeader(), ilIntLinkRepItemExplorer\formatHeader(), ilForumExplorer\formatHeader(), ilHACPExplorer\formatObject(), ilAICCExplorer\formatObject(), ilPublicSectionSelector\formatObject(), ilForumExplorer\formatObject(), ilSCORMExplorer\formatObject(), ilFileExplorer\formatObject(), ilContainerGUI\forwardToPageObject(), ilChapterHierarchyFormGUI\getChildIcon(), ilHierarchyFormGUI\getChildIcon(), ilChapterHierarchyFormGUI\getChildIconAlt(), ilObjTestListGUI\getCommandImage(), ilObjFileListGUI\getCommandImage(), ilObjLearningModuleListGUI\getCommandImage(), ilHierarchyFormGUI\getContent(), ilHistoryGUI\getHistoryTable(), ilChatInvitationGUI\getHTML(), ilLPFilterGUI\getHTML(), ilMiniCalendarGUI\getHTML(), ilRatingGUI\getHTML(), ilPublicUserProfileGUI\getHTML(), ilPDNewsBlockGUI\getHTML(), ilNewsForContextBlockGUI\getHTML(), ilCalendarBlockGUI\getHTML(), ilAdvancedSelectionListGUI\getHTML(), ilNavigationHistoryGUI\getHTMLOld(), ilCopyWizardExplorer\getImage(), ilLMTOCExplorer\getImage(), ilLMEditorExplorer\getImage(), ilMailExplorer\getImage(), ilTableOfContentsExplorer\getImage(), ilExplorer\getImage(), ilContainerContentGUI\getIntroduction(), ilPDSelectedItemsBlockGUI\getIntroduction(), ilHierarchyFormGUI\getLevelHTML(), ilPDNotesBlockGUI\getListRowData(), ilBookmarkBlockGUI\getListRowData(), ilMainMenuGUI\getMemberViewHTML(), ilTemplate\getMessageHTML(), ilNoteGUI\getNoteListHTML(), ilExplorer\getOutput(), ilSCORMExplorer\getOutputIcons(), ilTestServiceGUI\getPassDetailsOverview(), ilNoteGUI\getPDNoteHTML(), ilSCORM13Player\getPlayer(), assSingleChoiceGUI\getPreview(), assOrderingQuestionGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assMatchingQuestionGUI\getPreview(), assMatchingQuestionGUI\getPreviewJS(), SurveyTextQuestionGUI\getPrintView(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyMatrixQuestionGUI\getPrintView(), ilTestServiceGUI\getResultsSignature(), assFileUploadGUI\getSolutionOutput(), assOrderingHorizontalGUI\getSolutionOutput(), assTextQuestionGUI\getSolutionOutput(), assTextSubsetGUI\getSolutionOutput(), assNumericGUI\getSolutionOutput(), assFlashQuestionGUI\getSolutionOutput(), assJavaAppletGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), assOrderingQuestionGUI\getSolutionOutput(), assMatchingQuestionGUI\getSolutionOutput(), assClozeTestGUI\getSolutionOutput(), assImagemapQuestionGUI\getSolutionOutput(), ilObjStyleSheetGUI\getStyleExampleHTML(), ilObjGlossaryGUI\getTemplate(), assOrderingHorizontalGUI\getTestOutput(), assSingleChoiceGUI\getTestOutput(), assMultipleChoiceGUI\getTestOutput(), assOrderingQuestionGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutputJS(), getTypeIconPath(), ilBookmarkBlockGUI\ilBookmarkBlockGUI(), ilCalendarBlockGUI\ilCalendarBlockGUI(), ilChatBlockGUI\ilChatBlockGUI(), ilExternalFeedBlockGUI\ilExternalFeedBlockGUI(), ilLMPresentationGUI\ilLMHead(), ilLMPresentationGUI\ilLMNavigation(), ilLMPresentationGUI\ilMedia(), ilNewsForContextBlockGUI\ilNewsForContextBlockGUI(), ilNoteGUI\ilNoteGUI(), ilLMPresentationGUI\ilPage(), ilPDExternalFeedBlockGUI\ilPDExternalFeedBlockGUI(), ilPDFeedbackBlockGUI\ilPDFeedbackBlockGUI(), ilPDMailBlockGUI\ilPDMailBlockGUI(), ilPDNewsBlockGUI\ilPDNewsBlockGUI(), ilPDNotesBlockGUI\ilPDNotesBlockGUI(), ilPDSysMessageBlockGUI\ilPDSysMessageBlockGUI(), ilPDTaggingBlockGUI\ilPDTaggingBlockGUI(), ilLMPresentationGUI\ilTOC(), ilUsersOnlineBlockGUI\ilUsersOnlineBlockGUI(), ilSCORM2004ScoGUI\import(), ilObjSCORMLearningModuleGUI\importForm(), ilLMPageObjectGUI\initEditLayoutForm(), ilObjCourseGUI\initForm(), ilObjSessionGUI\initForm(), ilObjGroupGUI\initForm(), ilConditionHandlerInterface\initFormCondition(), ilCourseItemAdministrationGUI\initFormEdit(), ilContainerReferenceGUI\initFormEditSelection(), ilCourseObjectivesGUI\initFormLimits(), ilContainerReferenceGUI\initFormSelection(), ilAdvancedMDSettingsGUI\initFormSubstitutions(), ilCourseObjectivesGUI\initFormTitle(), ilObjForumGUI\initForumCreateForm(), ilObjForumGUI\initForumImportForm(), ilShopNewsGUI\initNewsForm(), ilObjContentObjectGUI\initPropertiesForm(), ilObjExerciseGUI\initPropertiesForm(), ilShopNewsGUI\initSettingsForm(), ilObjWikiGUI\initSettingsForm(), ilNewsForContextBlockGUI\initSettingsForm(), ilObjFileGUI\initSingleUploadForm(), ilObjForumGUI\initTopicCreateForm(), ilCourseObjectivesGUI\initWizard(), ilObjFileGUI\initZipUploadForm(), ilTextWizardInputGUI\insert(), ilColorPickerInputGUI\insert(), ilMatchingPairWizardInputGUI\insert(), ilAnswerWizardInputGUI\insert(), ilRandomTestInputGUI\insert(), ilFileWizardInputGUI\insert(), ilImagemapFileInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilTRBLColorPickerInputGUI\insert(), ilImageWizardInputGUI\insert(), ilCategoryWizardInputGUI\insert(), ilKVPWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilObjectListGUI\insertCommands(), ilObjectListGUI\insertCutCommand(), ilObjectListGUI\insertDeleteCommand(), ilPageObjectGUI\insertHelp(), ilObjectListGUI\insertIconsAndCheckboxes(), ilObjectListGUI\insertInfoScreenCommand(), ilPropertyFormGUI\insertItem(), ilObjectListGUI\insertLinkCommand(), ilObjectListGUI\insertPayment(), ilCourseObjectiveListGUI\insertProgressInfo(), ilObjectListGUI\insertRelevance(), ilObjectListGUI\insertSubscribeCommand(), ilHACPPresentationGUI\launchSahs(), ilAICCPresentationGUI\launchSahs(), ilSAHSPresentationGUI\launchSahs(), ilSCORMPresentationGUI\launchSahs(), ilObjContentObjectGUI\linkChecker(), ilObjLinkResourceGUI\linkCheckerObject(), ilConditionHandlerInterface\listConditions(), ilGlossaryTermGUI\listDefinitions(), ilGlossaryPresentationGUI\listDefinitions(), ilObjRoleGUI\listDesktopItemsObject(), ilObjGroupGUI\listExportFilesObject(), ilFileSystemGUI\listFiles(), ilObjCourseGroupingGUI\listGroupings(), ilObjMediaCastGUI\listItemsObject(), ilSessionOverviewGUI\listSessions(), ilObjCourseGUI\listStructureObject(), ilAccountRegistrationGUI\login(), ilObjiLincCourseGUI\mailMembersObject(), ilObjGroupGUI\mailMembersObject(), ilObjCourseGUI\mailMembersObject(), ilObjTestGUI\marksObject(), ilObjSessionGUI\materialsObject(), ilGlossaryPresentationGUI\media(), ilObjSessionGUI\membersObject(), ilObjGroupGUI\membersObject(), ilObjCourseGUI\membersObject(), ilObjUserFolderGUI\newAccountMailObject(), ilObjSCORMLearningModuleGUI\newModuleVersion(), ilTestEvaluationGUI\outParticipantsPassDetails(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilSAHSPresentationGUI\outputInfoScreen(), ilLMPresentationGUI\outputInfoScreen(), assQuestionGUI\outQuestionType(), ilSurveyExecutionGUI\outSurveyPage(), ilTestEvaluationGUI\outUserResultsOverview(), ilTestOutputGUI\outWorkingForm(), ilPermissionGUI\owner(), ilObjContentObjectGUI\pages(), ilPermissionGUI\perm(), ilObjRoleTemplateGUI\permObject(), ilObjRoleGUI\permObject(), ilPersonalDesktopGUI\prepareContentView(), ilNewsItemGUI\prepareFormNewsItem(), ilSearchBaseGUI\prepareOutput(), ilShopBaseGUI\prepareOutput(), ilGlossaryPresentationGUI\prepareOutput(), ilObjLanguageExtGUI\prepareOutput(), ilObjForumGUI\prepareThreadScreen(), ilObjCourseGUI\printMembersObject(), ilObjTestGUI\printobject(), ilObjSurveyGUI\printViewObject(), ilObjSurveyGUI\questionsObject(), ilObjGlossaryGUI\quickList(), ilObjiLincClassroomGUI\removeClassroom(), ilBirthdayInputGUI\render(), ilDateTimeInputGUI\render(), ilDateDurationInputGUI\render(), ilTableGUI\render(), ilTable2GUI\render(), ilHierarchyFormGUI\renderChild(), ilTableGUI\renderHeader(), ilLPObjectiveItemListGUI\renderTypeImage(), ilLPSAHSItemListGUI\renderTypeImage(), ilLPEventListGUI\renderTypeImage(), ilLDAPSettingsGUI\roleMapping(), ilPersonalProfileGUI\saveMailOptions(), ilObjectGUI\searchCloneSourceObject(), ilObjCourseGroupingGUI\selectCourse(), ilObjCourseGUI\selectStarterObject(), ilSCORM2004NodeGUI\setLocator(), ilSCORM2004SeqChapterGUI\setTabs(), ilSCORM2004ChapterGUI\setTabs(), ilSCORM2004PageNodeGUI\setTabs(), ilPageLayoutGUI\setTabs(), ilEditClipboardGUI\setTabs(), ilSCORM2004ScoGUI\setTabs(), ilLMPageObjectGUI\setTabs(), ilObjSAHSLearningModuleGUI\setTabs(), ilObjFileBasedLMGUI\setTabs(), ilStructureObjectGUI\setTabs(), ilObjMediaObjectGUI\setTabs(), ilObjContentObjectGUI\setTabs(), ilMainMenuGUI\setTemplateVars(), ilObjUserTrackingGUI\settingsObject(), ilObjUserGUI\setTitleAndDescription(), ilObjectGUI\setTitleAndDescription(), ilContainerGUI\setTitleAndDescription(), ilObjLanguageExtGUI\setTitleAndDescription(), ilObjQuestionPoolGUI\setTitleAndDescription(), ilLPListOfSettingsGUI\show(), ilCourseUserFieldsGUI\show(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), ilCalendarMonthGUI\show(), ilPersonalDesktopGUI\show(), ilLMObjectGUI\showActions(), ilObjStyleSheetFolderGUI\showActions(), ilObjUserFolderGUI\showActions(), ilObjGlossaryGUI\showActions(), ilObjStyleSettingsGUI\showActions(), ilObjContentObjectGUI\showActions(), ilPasswordAssistanceGUI\showAssignPasswordForm(), ilPasswordAssistanceGUI\showAssistanceForm(), ilFeedbackGUI\showBarometerById(), ilPurchaseBillGUI\showBillConfirm(), ilPaymentBillAdminGUI\showBillData(), ilPersonalProfileGUI\showChatOptions(), ilPaymentCouponGUI\showCodes(), ilShopShoppingCartGUI\showCouponInput(), ilPurchaseBMFGUI\showCreditCard(), ilObjPaymentSettingsGUI\showCustomerTable(), ilPurchaseBMFGUI\showDebitEntry(), ilShopPurchaseGUI\showDemoVersion(), ilPaymentPurchaseGUI\showDetails(), ilShopPurchaseGUI\showDetails(), ilGlossaryPresentationGUI\showDownloadList(), ilLMPresentationGUI\showDownloadList(), ilCalendarMonthGUI\showEvents(), ilObjForumGUI\showExplorerObject(), ilStartUpGUI\showFailure(), ilPDExternalFeedBlockGUI\showFeedItem(), ilExternalFeedBlockGUI\showFeedItem(), ilPDNewsBlockGUI\showFeedUrl(), ilNewsForContextBlockGUI\showFeedUrl(), ilMemberExportGUI\showFileList(), ilCalendarDayGUI\showFulldayAppointment(), ilCalendarWeekGUI\showFulldayAppointment(), ilPersonalProfileGUI\showGeneralSettings(), ilMailGUI\showHeader(), ilStructureObjectGUI\showHierarchy(), ilShopShoppingCartGUI\showItemsTable(), ilPersonalProfileGUI\showjsMath(), ilInternalLinkGUI\showLinkHelp(), ilPersonalProfileGUI\showLocation(), ilStartUpGUI\showLogin(), ilPDMailBlockGUI\showMail(), ilMailFolderGUI\showMail(), ilPersonalProfileGUI\showMailOptions(), ilObjMediaPoolGUI\showMedia(), ilMailGUI\showMenu(), ilPasswordAssistanceGUI\showMessageForm(), ilNewsForContextBlockGUI\showNews(), ilPDNotesBlockGUI\showNote(), ilPaymentCouponGUI\showObjects(), ilSCORM2004NodeGUI\showOrganization(), ilObjSCORM2004LearningModuleGUI\showOrganization(), ilPageObjectGUI\showPage(), ilPersonalProfileGUI\showPassword(), ilPurchaseBMFGUI\showPaymentType(), ilPurchaseBillGUI\showPersonalData(), ilPurchaseBMFGUI\showPersonalData(), ilPersonalProfileGUI\showPersonalData(), ilLMPresentationGUI\showPrintView(), ilLMPresentationGUI\showPrintViewSelection(), ilPersonalProfileGUI\showProfile(), ilSCORM2004ScoGUI\showProperties(), ilPersonalProfileGUI\showPublicProfile(), ilPDTaggingBlockGUI\showResourcesForTag(), ilMailSearchGUI\showResults(), ilPaymentObjectGUI\showSelectedObject(), ilCourseContentGUI\showStartObjects(), ilObjCourseGUI\showStartObjects(), ilContainerObjectiveGUI\showStatus(), ilStartUpGUI\showSuccess(), ilLMPresentationGUI\showTableOfContents(), ilNoteGUI\showTargets(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItems(), ilObjSCORM2004LearningModuleGUI\showTree(), ilMailFolderGUI\showUser(), ilPasswordAssistanceGUI\showUsernameAssistanceForm(), ilCourseContentGUI\showUserTimings(), ilStructureObjectGUI\subchap(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjTestGUI\uploadTstObject(), ilCourseArchivesGUI\view(), ilStructureObjectGUI\view(), ilObjExerciseGUI\viewObject(), and ilObjForumGUI\viewThreadObject().

{
global $ilias, $styleDefinition, $ilCtrl;
if (is_int(strpos($_SERVER["PHP_SELF"], "setup.php")))
{
$module_path = "..";
}
if ($module_path != "")
{
$module_path = "/".$module_path;
}
// default image
$default_img = ".".$module_path."/templates/default/images/".$img;
if (is_object($styleDefinition))
{
$image_dir = $styleDefinition->getImageDirectory($ilias->account->prefs["style"]);
}
if ($ilUser->skin == "default")
{
$user_img = ".".$module_path."/templates/default/".$image_dir."/".$img;
$skin_img = ".".$module_path."/templates/default/images/".$img;
}
else if (is_object($styleDefinition) && $ilUser->skin != "default")
{
$user_img = "./Customizing/global/skin/".
$ilias->account->skin.$module_path."/".$image_dir."/".$img;
$skin_img = "./Customizing/global/skin/".
$ilias->account->skin.$module_path."/images/".$img;
}
if ($offline)
{
return "./images/".$img;
}
else if (@file_exists($user_img) && $image_dir != "")
{
return $user_img; // found image for skin and style
}
else if (file_exists($skin_img))
{
return $skin_img; // found image in skin/images
}
return $default_img; // take image in default
}

+ Here is the caller graph for this function:

ilUtil::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 public.

Parameters
stringobject type
stringtpl path

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

References $filename, and $lng.

Referenced by ilBookmarkAdministrationGUI\delete(), ilObjRoleFolderGUI\deleteObject(), ilObjUserFolderGUI\deleteObject(), ilObjStyleSettingsGUI\deletePglObject(), ilObjSCORMLearningModuleGUI\deleteTrackingForUser(), ilObjSCORM2004LearningModuleGUI\deleteTrackingForUser(), ilObjTypeDefinitionGUI\displayList(), ilObjSystemFolderGUI\displayList(), ilObjTypeDefinitionGUI\editObject(), ilObjiLincClassroomGUI\removeClassroom(), ilObjiLincCourseGUI\removeMemberObject(), and ilObjUserFolderGUI\showActionConfirmation().

{
global $lng;
if ($a_big)
{
$big = "_b";
}
$filename = "icon_".$a_type."$big.gif";
return "<img src=\"".ilUtil::getImagePath($filename)."\" alt=\"".$lng->txt("obj_".$a_type)."\" title=\"".$lng->txt("obj_".$a_type)."\" border=\"0\" vspace=\"0\"/>";
//return "<img src=\"".$a_path."/images/"."icon_".$a_type."$big.gif\" alt=\"".$lng->txt("obj_".$a_type)."\" title=\"".$lng->txt("obj_".$a_type)."\" border=\"0\" vspace=\"0\"/>";
}

+ Here is the caller graph for this function:

ilUtil::getJavaPath ( )

get full java path (dir + java command)

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

Referenced by ilObjSCORMValidator\validateXML().

{
return PATH_TO_JAVA;
//global $ilias;
//return $ilias->getSetting("java_path");
}

+ Here is the caller graph for this function:

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

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 public

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

References $filename.

Referenced by ilTestOutputGUI\outWorkingForm().

{
global $ilias;
// add version as parameter to force reload for new releases
$js_name = $a_js_name;
if (strlen($a_js_location) && (strcmp(substr($a_js_location, -1), "/") != 0)) $a_js_location = $a_js_location . "/";
$filename = "";
if ($ilias->account->skin != "default")
{
$filename = "./Customizing/global/skin/".$ilias->account->skin."/".$a_js_location.$js_name;
}
if (strlen($filename) == 0 || !file_exists($filename))
{
$filename = "./" . $a_js_location . "templates/default/".$js_name;
}
$vers = "";
if ($add_version)
{
$vers = str_replace(" ", "-", $ilias->getSetting("ilias_version"));
$vers = "?vers=".str_replace(".", "-", $vers);
}
return $filename . $vers;
}

+ Here is the caller graph for this function:

ilUtil::getMemString ( )

get current memory usage as string

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

{
$my_pid = getmypid();
return ("MEMORY USAGE (% KB PID ): ".`ps -eo%mem,rss,pid | grep $my_pid`);
}
ilUtil::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.

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

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

References $ilDB.

Referenced by ilObjExercise\_lookupFeedbackTime(), ilObjExercise\_lookupSentTime(), ilObjExercise\_lookupStatusTime(), and ilObjExercise\getLastSubmission().

{
global $ilDB;
return $a_ts;
}

+ Here is the caller graph for this function:

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

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

public

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

Referenced by ilTinyMCE\addCustomRTESupport(), ilTinyMCE\addRTESupport(), ilTinyMCE\addUserTextEditor(), and ilTemplate\fillNewContentStyle().

{
global $ilias;
// add version as parameter to force reload for new releases
if ($mode != "filesystem")
{
$vers = str_replace(" ", "-", $ilias->getSetting("ilias_version"));
$vers = "?vers=".str_replace(".", "-", $vers);
}
if ($ilias->account->skin == "default")
{
$in_style = "./templates/".$ilias->account->skin."/".$ilias->account->prefs["style"]."_cont.css";
}
else
{
$in_style = "./Customizing/global/skin/".$ilias->account->skin."/".$ilias->account->prefs["style"]."_cont.css";
}
if (is_file("./".$in_style))
{
return $base.$in_style.$vers;
}
else
{
return $base."templates/default/delos_cont.css".$vers;
}
}

+ Here is the caller graph for this function:

ilUtil::getP3PLocation ( )

Get p3p file path.

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

public

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

References ILIAS_MODULE.

{
global $ilias;
if (defined("ILIAS_MODULE"))
{
$base = '';
for($i = 0;$i < count(explode('/',ILIAS_MODULE));$i++)
{
$base .= "../Services/Privacy/";
}
}
else
{
$base = "./Services/Privacy/";
}
if (is_file($base."w3c/p3p.xml"))
{
return ILIAS_HTTP_PATH."w3c/p3p.xml";
}
else
{
return ILIAS_HTTP_PATH."/w3c/p3p_template.xml";
}
}
ilUtil::getPasswordRequirementsInfo ( )

infotext for ilPasswordInputGUI setInfo()

<type> $lng

Returns
<string> info about allowed chars for password

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

References $lng, $ok, ilSecuritySettings\_getInstance(), and ilSecuritySettings\ACCOUNT_SECURITY_MODE_CUSTOMIZED.

Referenced by ilObjUserGUI\initForm(), and ilPersonalProfileGUI\initPasswordForm().

{
global $lng;
include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
$ok = '';
if( $security->getAccountSecurityMode() == ilSecuritySettings::ACCOUNT_SECURITY_MODE_CUSTOMIZED )
{
if( $security->isPasswordCharsAndNumbersEnabled() )
{
$ok .= 'A-Za-z0-9';
}
else $ok .= 'A-Za-z0-9';
if( $security->isPasswordSpecialCharsEnabled() )
{
$ok .= '_.+?#-*@!$%/:;~';
}
else $ok .= '_.+?#-*@!$%~';
}
else
{
$ok .= 'A-Za-z0-9_.+?#-*@!$%~';
}
return sprintf($lng->txt('password_allow_chars'), $ok);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::getSecureTags ( )

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

Referenced by secureString().

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

+ Here is the caller graph for this function:

ilUtil::getSelectName (   $selected,
  $values 
)

???

public

Parameters
string
string

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

{
return($values[$selected]);
}
ilUtil::getStyleSheetLocation (   $mode = "output",
  $a_css_name = "",
  $a_css_location = "" 
)

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 public

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

References $filename.

Referenced by ilPaymentBaseGUI\__buildStylesheet(), ilPaymentPurchaseGUI\__buildStylesheet(), ilShopPurchaseGUI\__buildStylesheet(), ilPurchaseBillGUI\__buildStylesheet(), ilPurchaseBMFGUI\__buildStylesheet(), ilObjChatGUI\__loadStylesheet(), ilExport\_generateIndexFile(), ilTinyMCE\addRTESupport(), ilTinyMCE\addUserTextEditor(), ilInternalLinkGUI\changeTargetObject(), ilObjTest\deliverPDFfromHTML(), ilTestEvaluationGUI\detailedEvaluation(), ilPageObjectGUI\displayMediaFullscreen(), ilObjSurveyQuestionPoolGUI\executeCommand(), ilObjQuestionPoolGUI\executeCommand(), ilObjSurveyGUI\executeCommand(), ilPersonalDesktopGUI\executeCommand(), ilHACPPresentationGUI\explorer(), ilAICCPresentationGUI\explorer(), ilSAHSPresentationGUI\explorer(), ilSCORMPresentationGUI\explorer(), ilObjFileBasedLMGUI\explorer(), ilObjContentObjectGUI\explorer(), ilLMPresentationGUI\exportbibinfo(), ilSCORM2004Sco\exportHTML(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilSAHSPresentationGUI\finishSahs(), ilSCORMPresentationGUI\finishSahs(), ilObjTest\getCustomStyles(), ilExplorer\getOutput(), ilSCORM13Player\getPlayer(), assOrderingQuestionGUI\getPreview(), assMatchingQuestionGUI\getPreviewJS(), assOrderingQuestionGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutputJS(), ilObjTest\getTestStyleLocation(), ilLMPresentationGUI\glossary(), ilLMPresentationGUI\ilMedia(), ilLMPresentationGUI\ilTOC(), ilInitialisation\initILIAS(), ilLMPresentationGUI\layout(), ilGlossaryPresentationGUI\media(), ilObjGroupGUI\membersGalleryObject(), ilObjiLincCourseGUI\membersGalleryObject(), ilObjCourseGUI\membersGalleryObject(), ilLMPresentationGUI\offlineexport(), ilTestEvaluationGUI\outCorrectSolution(), ilTestOutputGUI\outCorrectSolution(), ilTestEvaluationGUI\outEvaluation(), ilTestEvaluationGUI\outParticipantsPassDetails(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilLMPresentationGUI\outputInfoScreen(), ilTestEvaluationGUI\outUserListOfAnswerPasses(), ilTestEvaluationGUI\outUserPassDetails(), ilTestEvaluationGUI\outUserResultsOverview(), ilTestOutputGUI\outWorkingForm(), ilObjSessionGUI\printAttendanceListObject(), ilObjCourseGUI\printMembersObject(), ilObjQuestionPoolGUI\printObject(), ilObjTestGUI\printobject(), ilObjSessionGUI\printViewMembersObject(), ilInternalLinkGUI\selectRepositoryItem(), ilObjSurveyGUI\setNewTemplate(), ilMainMenuGUI\setTemplateVars(), ilContainerLinkListGUI\show(), ilFramesetGUI\show(), ilCalendarPresentationGUI\show(), ilObjDlBookGUI\showAbstract(), ilObjDlBookGUI\showCitation(), ilLMPresentationGUI\showDownloadList(), ilWysiwygUtil\showFootnote(), ilWysiwygUtil\showItl(), ilInternalLinkGUI\showLinkHelp(), ilContainerGUI\showLinkListObject(), ilTestOutputGUI\showListOfAnswers(), ilObjMediaPoolGUI\showMedia(), ilPageObjectGUI\showMediaFullscreen(), ilWysiwygUtil\showMoveCopyQuestion(), ilLMPresentationGUI\showPrintViewSelection(), ilLMPresentationGUI\showTableOfContents(), ilObjSCORM2004LearningModuleGUI\showTree(), ilObjTestGUI\showUserResults(), ilWysiwygUtil\showXtl(), ilSCORM13Player\specialPage(), ilSAHSPresentationGUI\unloadSahs(), ilSCORMPresentationGUI\unloadSahs(), ilAICCPresentationGUI\view(), ilSAHSPresentationGUI\view(), and ilSCORMPresentationGUI\view().

{
global $ilias;
// add version as parameter to force reload for new releases
$stylesheet_name = (strlen($a_css_name)) ? $a_css_name : $ilias->account->prefs["style"].".css";
if (strlen($a_css_location) && (strcmp(substr($a_css_location, -1), "/") != 0)) $a_css_location = $a_css_location . "/";
$filename = "";
if ($ilias->account->skin != "default")
{
$filename = "./Customizing/global/skin/".$ilias->account->skin."/".$a_css_location.$stylesheet_name;
}
if (strlen($filename) == 0 || !file_exists($filename))
{
$filename = "./" . $a_css_location . "templates/default/".$stylesheet_name;
}
$vers = "";
if ($mode != "filesystem")
{
$vers = str_replace(" ", "-", $ilias->getSetting("ilias_version"));
$vers = "?vers=".str_replace(".", "-", $vers);
}
return $filename . $vers;
}

+ Here is the caller graph for this function:

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

Get type icon path path Return image path for icon_xxx.gifs Or (if enabled) path to custom icon.

public

Parameters
stringobj_type
intobj_id
stringsize 'tiny','small' or 'big'

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

References $ilSetting, ilContainer\_lookupIconPath(), and getImagePath().

Referenced by ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilCourseObjectivePresentationGUI\__showOtherResources(), ilCalendarCategoryGUI\addReferenceLinks(), ilAdministrationCommandGUI\delete(), ilCourseContentGUI\displayRow(), ilRegistrationGUI\fillMembershipLimitation(), ilECSImportedContentTableGUI\fillRow(), ilCourseObjectiveMaterialAssignmentTableGUI\fillRow(), ilCourseObjectiveQuestionAssignmentTableGUI\fillRow(), ilPathGUI\getHTML(), ilCourseObjectivesGUI\initFormLimits(), ilObjiLincClassroomGUI\initSettingsForm(), ilObjiLincCourseGUI\initSettingsForm(), and ilLPItemListGUI\renderTypeImage().

{
global $ilSetting;
if($ilSetting->get("custom_icons"))
{
switch($a_type)
{
case 'cat':
case 'crs':
case 'grp':
include_once('./Services/Container/classes/class.ilContainer.php');
if(strlen($path = ilContainer::_lookupIconPath($a_obj_id,$a_size)))
{
return $path;
}
}
}
switch($a_size)
{
case 'tiny':
$postfix = '_s.gif';
break;
case 'big':
$postfix = '_b.gif';
break;
default:
$postfix = '.gif';
break;
}
return ilUtil::getImagePath('icon_'.$a_type.$postfix);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::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

Parameters
integeruser_id (optional)
Returns
array

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

References ilObjUser\_getUsersOnline().

Referenced by ilObjUserGUI\editOldObject(), and ilChatRoom\getOnlineUsers().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

get webspace directory

Parameters
string$modeuse "filesystem" for filesystem operations and "output" for output operations, e.g. images

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

Referenced by ilFileDataShop\__construct(), ilExternalFeed\_createCacheDirectory(), ilObjStyleSheet\_createImagesDirectory(), ilObjMediaObject\_createThumbnailDirectory(), ilChatSmilies\_deleteSmiley(), ilObjFileBasedLMAccess\_determineStartUrl(), ilContainer\_getContainerDirectory(), ilObjMediaObject\_getDirectory(), ilObjStyleSheet\_getImagesDirectory(), ilChatSmilies\_getSmiley(), ilChatSmilies\_getSmileyDir(), ilChatSmilies\_getSmilies(), ilChatSmilies\_getSmiliesBasePath(), ilChatSmilies\_getSmiliesById(), ilObjMediaObject\_getThumbnailDirectory(), ilObjMediaObject\_getURL(), ilObjSAHSLearningModuleAccess\_lookupDiskUsage(), ilObjFileBasedLMAccess\_lookupDiskUsage(), ilPCTableGUI\_renderTable(), ilChatSmilies\_setupFolder(), ilObjUser\_uploadPersonalPicture(), ilObjMediaObjectGUI\assignFullscreenObject(), ilObjMediaObjectGUI\assignStandardObject(), ilContObjParser\copyMobFiles(), ilContainer\createContainerDirectory(), ilObjSAHSLearningModule\createDataDirectory(), ilObjMediaObjectGUI\createDirectoryObject(), ilObjExternalToolsSettingsGUI\createSocialBookmarkObject(), ilObjStyleSheet\delete(), ilObjMediaObjectGUI\deleteFileObject(), ilPublicUserProfileGUI\deliverVCard(), ilPageObjectGUI\displayMediaFullscreen(), ilObjMediaObjectGUI\editFilesObject(), ilObjUserGUI\editOldObject(), ilObjMediaObjectGUI\executeCommand(), ilObjMediaObject\exportFiles(), ilObjGlossary\exportHTMLMOB(), ilObjContentObject\exportHTMLMOB(), ilObjStyleSheet\getContentStylePath(), ilFileDataShop\getCurrentImageWebPath(), ilObjSAHSLearningModule\getDataDirectory(), ilObjFileBasedLM\getDataDirectory(), ilObjMediaObject\getDataDirectory(), ilPublicUserProfileGUI\getHTML(), ilImageMapEditorGUI\getImageMapOutput(), ilFileDataCourse\getOnlineLink(), ilFSStorageCourse\getOnlineLink(), ilUserXMLWriter\getPictureValue(), ilFSStorageMail\getRelativePathExMailDirectory(), ilLMPresentationGUI\ilMedia(), ilFileSystemStorage\init(), ilGlossaryPresentationGUI\media(), ilObjUser\removeUserPicture(), ilObjUserGUI\removeUserPictureObject(), ilObjMediaPoolGUI\showMedia(), ilPageObjectGUI\showMediaFullscreen(), ilPageObjectGUI\showPage(), ilLMPresentationGUI\showPrintView(), ilPersonalProfileGUI\showProfile(), ilObjExternalToolsSettingsGUI\updateSocialBookmarkObject(), ilObjMediaObjectGUI\uploadFileObject(), ilPersonalProfileGUI\uploadUserPicture(), ilObjUserGUI\uploadUserPictureObject(), ilObjForumGUI\viewThreadObject(), and ilObjStyleSheet\writeCSSFile().

{
global $ilias;
if ($mode == "filesystem")
{
return "./".ILIAS_WEB_DIR."/".$ilias->client_id;
}
else
{
if (defined("ILIAS_MODULE"))
{
return "../".ILIAS_WEB_DIR."/".$ilias->client_id;
}
else
{
return "./".ILIAS_WEB_DIR."/".$ilias->client_id;
}
}
//return $ilias->ini->readVariable("server","webspace_dir");
}

+ Here is the caller graph for this function:

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

checks if group name already exists.

Groupnames must be unique for mailing purposes static function public

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

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

References $ilDB, $ilErr, and $q.

Referenced by ilMail\checkRecipients(), ilMail\getUserIds(), and ilSoapGroupAdministration\groupExists().

{
global $ilDB,$ilErr;
if (empty($a_group_name))
{
$message = get_class($this)."::_NameExists(): No groupname given!";
$ilErr->raiseError($message,$ilErr->WARNING);
}
$clause = ($a_id) ? " AND obj_id != ".$ilDB->quote($a_id)." " : "";
$q = "SELECT obj_id FROM object_data ".
"WHERE title = ".$ilDB->quote($a_group_name, "text")." ".
"AND type = ".$ilDB->quote("grp", "text").
$clause;
$r = $ilDB->query($q);
if ($r->numRows())
{
return true;
}
else
{
return false;
}
}

+ Here is the caller graph for this function:

ilUtil::html2pdf (   $html,
  $pdf_file 
)

produce pdf out of html with htmldoc

Parameters
htmlString HTML-Data given to create pdf-file
pdf_fileString Filename to save pdf in

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

References htmlfile2pdf().

Referenced by ilPurchasePaypal\__sendBill(), ilPurchaseBillGUI\__sendBill(), ilPurchaseBMFGUI\__sendBill(), and ilLMPresentationGUI\offlineexport().

{
$html_file = str_replace(".pdf",".html",$pdf_file);
$fp = fopen( $html_file ,"wb");
fwrite($fp, $html);
fclose($fp);
ilUtil::htmlfile2pdf($html_file,$pdf_file);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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 2587 of file class.ilUtil.php.

References makeClickable().

Referenced by ilMailFolderGUI\showMail().

{
$encoded = "";
if ($a_make_links_clickable)
{
// Find text sequences in the plain text string which match
// the URI syntax rules, and pass them to ilUtil::makeClickable.
// Encode all other text sequences in the plain text string using
// htmlspecialchars and nl2br.
// The following expressions matches URI's as specified in RFC 2396.
//
// The expression matches URI's, which start with some well known
// schemes, like "http:", or with "www.". This must be followed
// by at least one of the following RFC 2396 expressions:
// - alphanum: [a-zA-Z0-9]
// - reserved: [;\/?:|&=+$,]
// - mark: [\\-_.!~*\'()]
// - escaped: %[0-9a-fA-F]{2}
// - fragment delimiter: #
// - uric_no_slash: [;?:@&=+$,]
$matches = array();
$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);
$pos1 = 0;
$encoded = "";
foreach ($matches as $match)
{
}
foreach ($matches[0] as $match)
{
$matched_text = $match[0];
$pos2 = $match[1];
if ($matched_offset != previous_offset)
{
// encode plain text
$encoded .= nl2br(htmlspecialchars(substr($a_str, $pos1, $pos2 - $pos1)));
}
// encode URI
$encoded .= ilUtil::makeClickable($matched_text, $a_detect_goto_links);
$pos1 = $pos2 + strlen($matched_text);
}
if ($pos1 < strlen($a_str))
{
$encoded .= nl2br(htmlspecialchars(substr($a_str, $pos1)));
}
}
else
{
$encoded = nl2br(htmlspecialchars($a_str));
}
return $encoded;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::htmlentitiesOutsideHTMLTags (   $htmlText)

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

Referenced by assMatchingQuestionGUI\getPreview(), assMatchingQuestionGUI\getPreviewJS(), assMatchingQuestionGUI\getSolutionOutput(), assMatchingQuestionGUI\getTestOutput(), and assMatchingQuestionGUI\getTestOutputJS().

{
$matches = Array();
$sep = '###HTMLTAG###';
preg_match_all("@<[^>]*>@", $htmlText, $matches);
$tmp = preg_replace("@(<[^>]*>)@", $sep, $htmlText);
$tmp = explode($sep, $tmp);
for ($i=0; $i<count($tmp); $i++)
$tmp[$i] = htmlentities($tmp[$i], ENT_COMPAT, "UTF-8");
$tmp = join($sep, $tmp);
for ($i=0; $i<count($matches[0]); $i++)
$tmp = preg_replace("@$sep@", $matches[0][$i], $tmp, 1);
return $tmp;
}

+ Here is the caller graph for this function:

ilUtil::htmlfile2pdf (   $html_file,
  $pdf_file 
)

produce pdf out of html with htmldoc

Parameters
htmlString HTML-Data given to create pdf-file
pdf_fileString Filename to save pdf in

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

References escapeShellArg().

Referenced by ilScorm2004Export\buildExportFilePDF(), and html2pdf().

{
$htmldoc_path = PATH_TO_HTMLDOC;
$htmldoc = $htmldoc_path." ";
$htmldoc .= "--no-toc ";
$htmldoc .= "--no-jpeg ";
$htmldoc .= "--webpage ";
$htmldoc .= "--outfile " . ilUtil::escapeShellArg($pdf_file) . " ";
$htmldoc .= "--bodyfont Arial ";
$htmldoc .= "--charset iso-8859-15 ";
$htmldoc .= "--color ";
$htmldoc .= "--size A4 "; // --landscape
$htmldoc .= "--format pdf ";
$htmldoc .= "--footer ... ";
$htmldoc .= "--header ... ";
$htmldoc .= "--left 60 ";
// $htmldoc .= "--right 200 ";
$htmldoc .= $html_file;
exec($htmldoc);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::ilTempnam ( )

Create a temporary file in an ILIAS writable directory.

Returns
string File name of the temporary file

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

References createDirectory(), and getDataDir().

Referenced by ilTestExport\aggregatedResultsToExcel(), ilObjSurvey\deliverPDFfromFO(), ilObjTest\deliverPDFfromFO(), ilFileDataExercise\downloadAllDeliveredFiles(), ilObjFolder\downloadFolder(), ilExerciseMembers\downloadMultipleFiles(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilTestExport\exportToExcel(), ilSurveyEvaluationGUI\exportUserSpecificResults(), assFileUpload\getFileUploadZIPFile(), ilFileXMLParser\handlerBeginTag(), ilFileXMLParser\handlerEndTag(), ilImagemapPreview\ilImagemapPreview(), ilObjExercise\processUploadedFile(), ilUserImportParser\saveTempImage(), ilObjFileGUI\saveUnzipObject(), ilBookmarkAdministrationGUI\sendmail(), and ilECSConnector\updateResource().

{
$temp_path = ilUtil::getDataDir() . "/temp";
if (!is_dir($temp_path))
{
}
$temp_name = tempnam($temp_path, "tmp");
// --->
// added the following line because tempnam creates a backslash on some
// Windows systems which leads to problems, because the "...\tmp..." can be
// interpreted as "...{TAB-CHARACTER}...". The normal slash works fine
// even under windows (Helmut Schottmüller, 2005-08-31)
$temp_name = str_replace("\\", "/", $temp_name);
// --->
unlink($temp_name);
return $temp_name;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::img (   $a_src,
  $a_alt = "",
  $a_width = "",
  $a_height = "",
  $a_border = 0 
)

Build img tag.

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

References $img.

Referenced by ilTable2GUI\fillHeader(), ilTrashTableGUI\fillRow(), ilSearchResultTableGUI\fillRow(), ilAdminSubItemsTableGUI\fillRow(), ilMediaPoolTableGUI\fillRow(), ilLMPageObjectGUI\initEditLayoutForm(), and ilObjContentObjectGUI\initPropertiesForm().

{
$img = '<img src="'.$a_src.'"';
if ($a_alt != "")
{
$img.= ' alt="'.$a_alt.'" title="'.$a_alt.'"';
}
if ($a_width != "")
{
$img.= ' width="'.$a_width.'"';
}
if ($a_height != "")
{
$img.= ' height="'.$a_height.'"';
}
$img.= ' border="'.(int) $a_border.'"/>';
return $img;
}

+ Here is the caller graph for this function:

ilUtil::infoPanel (   $a_keep = true)

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

References $_SESSION, $lng, $tpl, and ilFrameTargetInfo\_getFrame().

Referenced by ilLearningProgressBaseGUI\__buildHeader(), ilObjLinkResourceGUI\__prepareOutput(), ilObjChatGUI\__prepareOutput(), ilObjRoleGUI\__prepareOutput(), ilPDNewsGUI\displayHeader(), ilPDNotesGUI\displayHeader(), ilBookmarkAdministrationGUI\displayHeader(), ilPersonalDesktopGUI\prepareContentView(), ilSearchBaseGUI\prepareOutput(), ilShopBaseGUI\prepareOutput(), ilObjectGUI\prepareOutput(), ilObjForumGUI\prepareThreadScreen(), ilPersonalDesktopGUI\show(), ilMailGUI\showHeader(), ilPersonalProfileGUI\showProfile(), and ilStartUpGUI\showUserAgreement().

{
global $tpl,$ilias,$lng;
if (!empty($_SESSION["infopanel"]) and is_array($_SESSION["infopanel"]))
{
$tpl->addBlockFile("INFOPANEL", "infopanel", "tpl.infopanel.html");
$tpl->setCurrentBlock("infopanel");
if (!empty($_SESSION["infopanel"]["text"]))
{
$link = "<a href=\"".$dir.$_SESSION["infopanel"]["link"]."\" target=\"".
"\">";
$link .= $lng->txt($_SESSION["infopanel"]["text"]);
$link .= "</a>";
}
// deactivated
if (!empty($_SESSION["infopanel"]["img"]))
{
$link .= "<td><a href=\"".$_SESSION["infopanel"]["link"]."\" target=\"".
"\">";
$link .= "<img src=\"".$ilias->tplPath.$ilias->account->prefs["skin"]."/images/".
$_SESSION["infopanel"]["img"]."\" border=\"0\" vspace=\"0\"/>";
$link .= "</a></td>";
}
$tpl->setVariable("INFO_ICONS",$link);
$tpl->parseCurrentBlock();
}
//if (!$a_keep)
//{
session_unregister("infopanel");
//}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::insertInstIntoID (   $a_value)

inserts installation id into ILIAS id

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

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

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

{
if (substr($a_value, 0, 4) == "il__")
{
$a_value = "il_".IL_INST_ID."_".substr($a_value, 4, strlen($a_value) - 4);
}
return $a_value;
}

+ Here is the caller graph for this function:

ilUtil::insertLatexImages (   $a_text,
  $a_start = "\[tex\]",
  $a_end = "\[\/tex\]",
  $a_cgi = URL_TO_LATEX 
)

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

added additional parameters to make this method usable for other start and end tags as well

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

References $lng, and $tpl.

Referenced by ilGlossaryPresentationGUI\listTermByGiven(), ilObjGlossaryGUI\listTerms(), ilForum\prepareText(), prepareTextareaOutput(), and ilPageObjectGUI\showPage().

{
global $tpl, $lng, $ilUser;
// - take care of html exports (-> see buildLatexImages)
include_once "./Services/Administration/classes/class.ilSetting.php";
$jsMathSetting = new ilSetting("jsMath");
$use_jsmath =
$jsMathSetting->get("enable") && ($ilUser->getPref("js_math") || ($ilUser->getPref("js_math") === FALSE && ($jsMathSetting->get("makedefault"))));
if ($use_jsmath)
{
$info = "";
if (!$tpl->out_jsmath_info)
{
include_once "./classes/class.ilTemplate.php";
$template = new ilTemplate("tpl.jsmath_warning.html", TRUE, TRUE);
$lng->loadLanguageModule("jsmath");
$template->setVariable("TEXT_JSMATH_NO_JAVASCRIPT", $lng->txt("jsmath_no_javascript"));
$info = $template->get();
$tpl->out_jsmath_info = TRUE;
}
$a_text = preg_replace("/\\\\([RZN])([^a-zA-Z]|<\/span>)/", "\\mathbb{"."$1"."}"."$2", $a_text);
$tpl->addJavaScript($jsMathSetting->get("path_to_jsmath") . "/easy/load.js");
}
// this is a fix for bug5362
$cpos = 0;
$o_start = $a_start;
$o_end = $a_end;
$a_start = str_replace("\\", "", $a_start);
$a_end = str_replace("\\", "", $a_end);
/*$a_start = str_replace("\]", "]", $a_start);
$a_start = str_replace("\[", "[", $a_start);
$a_end = str_replace("\]", "]", $a_end);
$a_end = str_replace("\[", "[", $a_end);
$a_end = str_replace("\/", "/", $a_end);*/
while (is_int($spos = stripos($a_text, $a_start, $cpos))) // find next start
{
if (is_int ($epos = stripos($a_text, $a_end, $spos + 1)))
{
$tex = substr($a_text, $spos + strlen($a_start), $epos - $spos - strlen($a_start));
// replace, if tags do not go across div borders
if (!is_int(strpos($tex, "</div>")))
{
if (!$use_jsmath)
{
$a_text = substr($a_text, 0, $spos).
"<img alt=\"".htmlentities($tex)."\" src=\"".$a_cgi."?".
rawurlencode(str_replace('&amp;', '&', str_replace('&gt;', '>', str_replace('&lt;', '<', $tex))))."\" ".
" />".
substr($a_text, $epos + strlen($a_end));
}
else
{
$tex = $a_start.$tex.$a_end;
//echo "<br>1:".$tex;
$replacement =
preg_replace('/' . $o_start . '(.*?)' . $o_end . '/ie',
"'<span class=\"math\">' . preg_replace('/[\\\\\\\\\\]{2}/', '\\cr', str_replace('<', '&lt;', str_replace('<br/>', '', str_replace('<br />', '', str_replace('<br>', '', '$1'))))) . '</span>[[info]]'", $tex);
// added special handling for \\ -> \cr, < -> $lt; and removal of <br/> tags in jsMath expressions, H. Schottmüller, 2007-09-09
//echo "<br>2:".htmlentities($replacement);
$a_text = substr($a_text, 0, $spos).
$replacement.
substr($a_text, $epos + strlen($a_end));
}
}
}
$cpos = $spos + 1;
}
if ($use_jsmath)
{
$a_text = str_replace("[[info]]", $info, $a_text);
}
$result_text = $a_text;
// $result_text = preg_replace('/' . $a_start . '(.*?)' . $a_end . '/ie',
// "'<img alt=\"'.htmlentities('$1').'\" src=\"$a_cgi?'.rawurlencode(str_replace('&amp;', '&', str_replace('&gt;', '>', str_replace('&lt;', '<', '$1')))).'\" ".
// " />'", $a_text);
//echo htmlentities($a_text);
return $result_text;
}

+ Here is the caller graph for this function:

ilUtil::int2array (   $seconds,
  $periods = null 
)

Return an array of date segments.

Parameters
int$secondsNumber of seconds to be parsed
Returns
mixed An array containing named segments

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

Referenced by ilObjExerciseAccess\_lookupRemainingWorkingTimeString(), ilObjExerciseGUI\infoScreen(), and ilObjExerciseGUI\viewObject().

{
// Define time periods
if (!is_array($periods))
{
$periods = array (
'years' => 31536000,
'months' => 2592000,
'days' => 86400,
'hours' => 3600,
'minutes' => 60,
'seconds' => 1
);
}
// Loop
$seconds = (float) $seconds;
foreach ($periods as $period => $value)
{
$count = floor($seconds / $value);
if ($count == 0)
{
continue;
}
$values[$period] = $count;
$seconds = $seconds % $value;
}
// Return
if (empty($values))
{
$values = null;
}
return $values;
}

+ Here is the caller graph for this function:

ilUtil::is_email (   $a_email)

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

References $ilErr, ilMail\_usePearMail(), PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION, and PEAR\setErrorHandling().

Referenced by ilSoapUserAdministration\__validateUserData(), ilSetup\checkClientContact(), ilEMailInputGUI\checkInput(), ilMailAddressbookGUI\checkInput(), ilMail\checkRecipients(), ilMail\getEmailOfSender(), ilMail\getMimeMailSender(), ilAccountRegistrationGUI\saveForm(), ilPersonalProfileGUI\saveProfile(), ilObjSystemFolderGUI\saveSettingsObject(), ilObjUserGUI\updateObjectOld(), and ilObjCourse\validateInfoSettings().

{
// BEGIN Mail: If possible, use PearMail to validate e-mail address
global $ilErr, $ilias;
// Note the use of @include_once here. We need this, because
// inclusion fails when the function is_email is called from setup.php.
$successfulInclude = @include_once ('Services/Mail/classes/class.ilMail.php');
// additional checks for include and ilias object are needed,
// otherwise setup will fail with this if branch
if ($successfulInclude && is_object($ilias) && ilMail::_usePearMail())
{
require_once 'Mail/RFC822.php';
$parser = &new Mail_RFC822();
try {
$addresses = $parser->parseAddressList($a_email, 'ilias', false, true);
if (! is_a($addresses, 'PEAR_Error') &&
count($addresses) == 1 && $addresses[0]->host != 'ilias')
{
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr, "errorHandler"));
return true;
}
} catch (Exception $e) {
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr, "errorHandler"));
return false;
}
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr, "errorHandler"));
return false;
}
else
{
$tlds = strtolower(
"AC|AD|AE|AERO|AF|AG|AI|AL|AM|AN|AO|AQ|AR|ARPA|AS|ASIA|AT|AU|AW|AX|AZ|BA|BB|BD|BE|BF|BG|BH|BI|BIZ|BJ|BM|BN|BO|BR|BS|BT|BV|BW|BY|".
"BZ|CA|CAT|CC|CD|CF|CG|CH|CI|CK|CL|CM|CN|CO|COM|COOP|CR|CU|CV|CX|CY|CZ|DE|DJ|DK|DM|DO|DZ|EC|EDU|EE|EG|".
"ER|ES|ET|EU|FI|FJ|FK|FM|FO|FR|GA|GB|GD|GE|GF|GG|GH|GI|GL|GM|GN|GOV|GP|GQ|GR|GS|GT|GU|GW|GY|HK|HM|HN|HR|HT|".
"HU|ID|IE|IL|IM|IN|INFO|INT|IO|IQ|IR|IS|IT|JE|JM|JO|JOBS|JP|KE|KG|KH|KI|KM|KN|KP|KR|KW|KY|KZ|LA|LB|LC|".
"LI|LK|LR|LS|LT|LU|LV|LY|MA|MC|MD|ME|MG|MH|MIL|MK|ML|MM|MN|MO|MOBI|MP|MQ|MR|MS|MT|MU|MUSEUM|MV|MW|MX|".
"MY|MZ|NA|NAME|NC|NE|NET|NF|NG|NI|NL|NO|NP|NR|NU|NZ|OM|ORG|PA|PE|PF|PG|PH|PK|PL|PM|PN|PR|PRO|PS|".
"PT|PW|PY|QA|RE|RO|RS|RU|RW|SA|SB|SC|SD|SE|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SR|ST|SU|SV|SY|SZ|TC|TD|TEL|".
"TF|TG|TH|TJ|TK|TL|TM|TN|TO|TP|TR|TRAVEL|TT|TV|TW|TZ|UA|UG|UK|US|UY|UZ|VA|VC|VE|VG|VI|VN|VU|".
"WF|WS|XN|YE|YT|YU|ZA|ZM|ZW");
return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(".$tlds.")|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$a_email));
}
// END Mail: If possible, use PearMail to validate e-mail address
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::isAPICall ( )

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

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

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

+ Here is the caller graph for this function:

ilUtil::isDN (   $a_str)

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

Referenced by ilObjExternalToolsSettingsGUI\saveiLincObject(), and ilRadiusSettings\validateServers().

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

+ Here is the caller graph for this function:

ilUtil::isIPv4 (   $a_str)

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

Referenced by ilObjExternalToolsSettingsGUI\saveiLincObject(), and ilRadiusSettings\validateServers().

{
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])\.".
"(\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));
}

+ Here is the caller graph for this function:

ilUtil::isLogin (   $a_login)

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

Referenced by ilSoapUserAdministration\__validateUserData(), ilUserLoginInputGUI\checkInput(), ilAccountRegistrationGUI\saveForm(), ilPersonalProfileGUI\savePersonalData(), and ilObjUserGUI\updateObjectOld().

{
if (empty($a_login))
{
return false;
}
if (strlen($a_login) < 3)
{
return false;
}
// FIXME - If ILIAS is configured to use RFC 822
// compliant mail addresses we should not
// allow the @ character.
if (!ereg("^[A-Za-z0-9_\.\+\*\@!\$\%\~\-]+$", $a_login))
{
return false;
}
return true;
}

+ Here is the caller graph for this function:

ilUtil::isPassword (   $a_passwd,
$custom_error = null 
)

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

References $lng, ilSecuritySettings\_getInstance(), ilSecuritySettings\ACCOUNT_SECURITY_MODE_CUSTOMIZED, and elseif().

Referenced by ilSoapUserAdministration\__validateUserData(), ilPDNewsBlockGUI\changeFeedSettings(), ilPersonalProfileGUI\changeUserPassword(), ilPasswordInputGUI\checkInput(), ilAccountRegistrationGUI\saveForm(), ilPersonalProfileGUI\savePassword(), ilPasswordAssistanceGUI\submitAssignPasswordForm(), and ilObjUserGUI\updateObjectOld().

{
global $lng;
$a_custom_error = '';
include_once('./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
// differentiate the account security mode (ilias standard/customized)
if( $security->getAccountSecurityMode() == ilSecuritySettings::ACCOUNT_SECURITY_MODE_CUSTOMIZED )
{
// check if passwd not empty
if( $a_passwd == '' )
{
$custom_error = $lng->txt('password_empty');
return false;
}
// check if passwd not to short
if( $security->getPasswordMinLength() > 0 &&
strlen($a_passwd) < $security->getPasswordMinLength() )
{
$custom_error = sprintf( $lng->txt('password_to_short'), $security->getPasswordMinLength() );
return false;
}
// check if passwd not to long
elseif( $security->getPasswordMaxLength() > 0 &&
strlen($a_passwd) > $security->getPasswordMaxLength() )
{
$custom_error = sprintf( $lng->txt('password_to_long'), $security->getPasswordMaxLength() );
return false;
}
else
{
// if passwd must contains Chars and Numbers
if( $security->isPasswordCharsAndNumbersEnabled() )
{
$reg = '/[A-Za-z]+/';
if( !preg_match($reg,$a_passwd) )
{
$custom_error = $lng->txt('password_must_chars_and_numbers');
return false;
}
$reg = '/[0-9]+/';
if( !preg_match($reg,$a_passwd) )
{
$custom_error = $lng->txt('password_must_chars_and_numbers');
return false;
}
}
else
{
// use ILIAS-Standard
if (!preg_match("/^[A-Za-z0-9]+/", $a_passwd))
{
return false;
}
}
// if passwd must contain Special-Chars
if( $security->isPasswordSpecialCharsEnabled() )
{
#$reg = '/[_\.\+\?\#\-\*\@!\$\%\~]+/';
$reg = '/[_\.\+\?\#\-\*\@!\$\%\/\:\;\~]+/';
if( !preg_match($reg,$a_passwd) )
{
$custom_error = $lng->txt('password_must_special_chars');
return false;
}
}
else
{
// use ILIAS-Standard
if (!preg_match("/^[_\.\+\?\#\-\*\@!\$\%\~]+/", $a_passwd))
{
return false;
}
}
}
}
else
{
if (empty($a_passwd))
{
return false;
}
if (strlen($a_passwd) < 6)
{
return false;
}
// due to bug in php does not work
//if (!ereg("^[A-Za-z0-9_\.\+\-\*\@!\$\%\~]+$", $a_passwd))
if (!preg_match("/^[A-Za-z0-9_\.\+\?\#\-\*\@!\$\%\~]+$/", $a_passwd))
{
return false;
}
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::isWindows ( )

check wether the current client system is a windows system

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

Referenced by ilSetupGUI\determineTools(), execQuoted(), ilSetupGUI\initBasicSettingsForm(), ilSetupGUI\saveBasicSettings(), and ilSetupGUI\updateBasicSettings().

{
if (strtolower(substr(php_uname(), 0, 3)) == "win")
{
return true;
}
return false;
}

+ Here is the caller graph for this function:

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

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

Referenced by replaceUrlParameterString().

{
if (preg_match("/&" . $paramName . "=/", $qstring)) {
return preg_replace("/&" . $paramName . "=[^&]+/", "&" . $paramName . "=" . urlencode($paramValue), $qstring);
} else {
return $qstring . "&" . $paramName . "=" . urlencode($paramValue);
}
}

+ Here is the caller graph for this function:

ilUtil::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.

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

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 692 of file class.ilUtil.php.

References $key, and $params.

Referenced by ilLPListOfObjectsGUI\__showUsersList(), ilObjForumGUI\getContent(), ilTableGUI\render(), and ilObjForumGUI\viewThreadObject().

{
$LinkBar = "";
$layout_link = "";
$layout_prev = "&lt;&lt;";
$layout_next = "&gt;&gt;";
// layout options
if (count($ALayout > 0))
{
if ($ALayout["link"])
{
$layout_link = " class=\"".$ALayout["link"]."\"";
}
if ($ALayout["prev"])
{
$layout_prev = $ALayout["prev"];
}
if ($ALayout["next"])
{
$layout_next = $ALayout["next"];
}
}
// show links, if hits greater limit
// or offset > 0 (can be > 0 due to former setting)
if ($AHits > $ALimit || $AOffset > 0)
{
if (!empty($AParams))
{
foreach ($AParams as $key => $value)
{
$params.= $key."=".$value."&";
}
}
// if ($params) $params = substr($params,0,-1);
if(strpos($AScript,'&'))
{
$link = $AScript."&".$params.$prefix."offset=";
}
else
{
$link = $AScript."?".$params.$prefix."offset=";
}
// ?bergehe "zurck"-link, wenn offset 0 ist.
if ($AOffset >= 1)
{
$prevoffset = $AOffset - $ALimit;
if ($prevoffset < 0) $prevoffset = 0;
$LinkBar .= "<a".$layout_link." href=\"".$link.$prevoffset."\">".$layout_prev."&nbsp;</a>";
}
// Ben?tigte Seitenzahl kalkulieren
$pages=intval($AHits/$ALimit);
// Wenn ein Rest bleibt, addiere eine Seite
if (($AHits % $ALimit))
$pages++;
// Bei Offset = 0 keine Seitenzahlen anzeigen : DEAKTIVIERT
// if ($AOffset != 0) {
// ansonsten zeige Links zu den anderen Seiten an
for ($i = 1 ;$i <= $pages ; $i++)
{
$newoffset=$ALimit*($i-1);
if ($newoffset == $AOffset)
{
$LinkBar .= "[".$i."] ";
}
else
{
$LinkBar .= '<a '.$layout_link.' href="'.
$link.$newoffset.'">['.$i.']</a> ';
}
}
// }
// Checken, ob letze Seite erreicht ist
// Wenn nicht, gebe einen "Weiter"-Link aus
if (! ( ($AOffset/$ALimit)==($pages-1) ) && ($pages!=1) )
{
$newoffset=$AOffset+$ALimit;
$LinkBar .= "<a".$layout_link." href=\"".$link.$newoffset."\">&nbsp;".$layout_next."</a>";
}
return $LinkBar;
}
else
{
return false;
}
}

+ Here is the caller graph for this function:

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

makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen

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 800 of file class.ilUtil.php.

References $ret.

Referenced by ilObjChatGUI\__formatMessage(), ilGroupRegistrationGUI\fillInformations(), ilCourseRegistrationGUI\fillInformations(), ilNewsForContextTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilPDMailGUI\getPDMailHTML(), htmlencodePlainString(), ilObjCourseGUI\infoScreen(), ilObjGroupGUI\infoScreen(), and ilNewsForContextBlockGUI\showNews().

{
// New code, uses MediaWiki Sanitizer
$ret = $a_text;
// www-URL ohne ://-Angabe
$ret = eregi_replace("(^|[[:space:]]+)(www\.)([[:alnum:]#?/&=\.-]+)",
"\\1http://\\2\\3", $ret);
// ftp-URL ohne ://-Angabe
$ret = eregi_replace("(^|[[:space:]]+)(ftp\.)([[:alnum:]#?/&=\.-]+)",
"\\1ftp://\\2\\3", $ret);
// E-Mail (this does not work as expected, users must add mailto: manually)
//$ret = eregi_replace("(([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))",
// "mailto:\\1", $ret);
// mask existing image tags
$ret = str_replace('src="http://', '"***masked_im_start***', $ret);
include_once("./Services/Utilities/classes/class.ilMWParserAdapter.php");
$parser = new ilMWParserAdapter();
$ret = $parser->replaceFreeExternalLinks($ret);
// unmask existing image tags
$ret = str_replace('"***masked_im_start***', 'src="http://', $ret);
// Should be Safe
if ($detectGotoLinks)
// replace target blank with self and text with object title.
{
$regExp = "<a[^>]*href=\"(".str_replace("/","\/",ILIAS_HTTP_PATH)."\/goto.php\?target=\w+_(\d+)[^\"]*)\"[^>]*>[^<]*<\/a>";
// echo htmlentities($regExp);
$ret = preg_replace_callback(
"/".$regExp."/i",
array("ilUtil", "replaceLinkProperties"),
$ret);
// Static links
$regExp = "<a[^>]*href=\"(".str_replace("/","\/",ILIAS_HTTP_PATH)."\/goto_.*[a-z0-9]+_([0-9]+)\.html)\"[^>]*>[^<]*<\/a>";
// echo htmlentities($regExp);
$ret = preg_replace_callback(
"/".$regExp."/i",
array("ilUtil", "replaceLinkProperties"),
$ret);
}
return($ret);
}

+ Here is the caller graph for this function:

ilUtil::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.

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.

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 924 of file class.ilUtil.php.

References $lng, and $name.

Referenced by ilCourseContentGUI\__renderItem(), ilPaymentCouponGUI\addCoupon(), ilRegistrationSettingsGUI\editRoleAccessLimitations(), ilCourseContentGUI\editTimings(), ilBirthdayInputGUI\render(), ilDateTimeInputGUI\render(), ilDateDurationInputGUI\render(), ilObjUserFolderGUI\setAccessRestrictionObject(), ilPaymentCouponGUI\showCoupons(), and ilObjUserFolderGUI\viewObject().

{
global $lng;
$disabled = '';
if(isset($a_further_options['disabled']) and $a_further_options['disabled'])
{
$disabled = 'disabled="disabled" ';
}
$now = getdate();
if (!$emptyoption)
{
if (!strlen($year)) $year = $now["year"];
if (!strlen($month)) $month = $now["mon"];
if (!strlen($day)) $day = $now["mday"];
}
$year = (int) $year;
$month = (int) $month;
$day = (int) $day;
// build day select
$sel_day .= '<select ';
if(isset($a_further_options['select_attributes']))
{
foreach($a_further_options['select_attributes'] as $name => $value)
{
$sel_day .= ($name.'="'.$value.'" ');
}
}
$sel_day .= $disabled."name=\"".$prefix."[d]\" id=\"".$prefix."_d\">\n";
if ($emptyoption) $sel_day .= "<option value=\"0\">--</option>\n";
for ($i = 1; $i <= 31; $i++)
{
$sel_day .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
}
$sel_day .= "</select>\n";
$sel_day = preg_replace("/(value\=\"$day\")/", "$1 selected=\"selected\"", $sel_day);
// build month select
$sel_month = '<select ';
if(isset($a_further_options['select_attributes']))
{
foreach($a_further_options['select_attributes'] as $name => $value)
{
$sel_month .= ($name.'="'.$value.'" ');
}
}
$sel_month .= $disabled."name=\"".$prefix."[m]\" id=\"".$prefix."_m\">\n";
if ($emptyoption) $sel_month .= "<option value=\"0\">--</option>\n";
for ($i = 1; $i <= 12; $i++)
{
if($a_long_month)
{
$sel_month .= "<option value=\"$i\">" . $lng->txt("month_" . sprintf("%02d", $i) . "_long") . "</option>\n";
}
else
{
$sel_month .= "<option value=\"$i\">" . $i . "</option>\n";
}
}
$sel_month .= "</select>\n";
$sel_month = preg_replace("/(value\=\"$month\")/", "$1 selected=\"selected\"", $sel_month);
// build year select
$sel_year = '<select ';
if(isset($a_further_options['select_attributes']))
{
foreach($a_further_options['select_attributes'] as $name => $value)
{
$sel_year .= ($name.'="'.$value.'" ');
}
}
$sel_year .= $disabled."name=\"".$prefix."[y]\" id=\"".$prefix."_y\">\n";
if ((strlen($startyear) == 0) || ($startyear > $year))
{
if (!$emptyoption || $year != 0) $startyear = $year - 5;
}
if(($year + 5) < (date('Y',time()) + 5))
{
$end_year = date('Y',time()) + 5;
}
else
{
$end_year = $year + 5;
}
if ($emptyoption) $sel_year .= "<option value=\"0\">----</option>\n";
for ($i = $startyear; $i <= $end_year; $i++)
{
$sel_year .= "<option value=\"$i\">" . sprintf("%04d", $i) . "</option>\n";
}
$sel_year .= "</select>\n";
$sel_year = preg_replace("/(value\=\"$year\")/", "$1 selected=\"selected\"", $sel_year);
//$dateformat = $lng->text["lang_dateformat"];
$dateformat = "d-m-Y";
$dateformat = strtolower(preg_replace("/\W/", "", $dateformat));
$dateformat = strtolower(preg_replace("/(\w)/", "%%$1", $dateformat));
$dateformat = preg_replace("/%%d/", $sel_day, $dateformat);
$dateformat = preg_replace("/%%m/", $sel_month, $dateformat);
$dateformat = preg_replace("/%%y/", $sel_year, $dateformat);
return $dateformat;
}

+ Here is the caller graph for this function:

ilUtil::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.

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

public

Parameters
string[path] + directory name
Returns
boolean

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

Referenced by ilFileDataCourse\__checkImportPath(), ilFileDataCourse\__checkPath(), ilFileDataChat\__createDirectory(), ilFileDataGroup\__initDirectory(), ilFileDataCourse\__initDirectory(), ilFileDataExercise\__initDirectory(), ilPurchasePaypal\__sendBill(), ilPurchaseBillGUI\__sendBill(), ilPurchaseBMFGUI\__sendBill(), ilExternalFeed\_createCacheDirectory(), ilExport\_createExportDirectory(), ilStyleMigration\_createImagesDirectory(), ilObjStyleSheet\_createImagesDirectory(), ilObjQuestionPool\_createImportDirectory(), ilObjTest\_createImportDirectory(), ilFileDataImport\_initDirectory(), ilFileDataImportMail\_initDirectory(), ilFileDataImportForum\_initDirectory(), ilFileDataImportGroup\_initDirectory(), ilFileDataGroup\addDirectory(), ilFileDataCourse\addDirectory(), ilFileDataGroup\addGroupDirectory(), ilFileDataGroup\addImportDirectory(), ilScorm2004Export\buildExportFileHTML(), ilScorm2004Export\buildExportFileISO(), ilScorm2004Export\buildExportFilePDF(), ilScorm2004Export\buildExportFileSCORM(), ilSurveyExport\buildExportFileXML(), ilContObjectExport\buildExportFileXML(), ilQuestionpoolExport\buildExportFileXML(), ilGlossaryExport\buildExportFileXML(), ilTestExport\buildExportFileXML(), ilTestExport\buildExportResultFile(), ilContObjParser\copyFileItems(), ilContObjParser\copyMobFiles(), ilClient\create(), ilFSStorageCourse\createArchiveOnlineVersion(), ilContainer\createContainerDirectory(), ilObjSAHSLearningModule\createDataDirectory(), ilObjFileBasedLM\createDataDirectory(), ilFileSystemGUI\createDirectory(), createDirectory(), ilObjMediaObjectGUI\createDirectoryObject(), ilObjContentObject\createExportDirectory(), ilScorm2004Export\createExportDirectory(), ilObjSurveyQuestionPool\createExportDirectory(), ilObjQuestionPool\createExportDirectory(), ilObjUserFolder\createExportDirectory(), ilObjTest\createExportDirectory(), ilObjStyleSheet\createExportDirectory(), ilObjSurvey\createExportDirectory(), ilObjStyleSheet\createExportSubDirectory(), ilObjContentObject\createImportDirectory(), ilObjGlossary\createImportDirectory(), ilObjSurveyQuestionPool\createImportDirectory(), ilObjTest\createImportDirectory(), ilObjStyleSheet\createImportDirectory(), ilObjSurvey\createImportDirectory(), ilFileDataCourse\createImportFile(), ilFileDataCourse\createOnlineVersion(), ilCertificate\deliverExportFileXML(), ilFileDataExercise\deliverFile(), ilFileDataExercise\downloadAllDeliveredFiles(), ilObjFolder\downloadFolder(), ilExerciseMembers\downloadMultipleFiles(), ilObjFile\export(), ilObjMediaObject\exportFiles(), ilSCORM2004Sco\exportHTML(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilSCORM2004Sco\exportHTML4PDF(), ilObjSCORM2004LearningModule\exportHTML4PDF(), ilObjGlossary\exportHTMLFile(), ilObjContentObject\exportHTMLFile(), ilObjGlossary\exportHTMLMOB(), ilObjContentObject\exportHTMLMOB(), ilObjSCORM2004LearningModule\exportHTMLScoObjects(), ilObjContentObject\exportSCORM(), ilObjSCORM2004LearningModule\exportXMLScoObjects(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilObjExercise\processUploadedFile(), rCopy(), ilObjFolder\recurseFolder(), ilSetup\saveMasterSetup(), ilObjFileGUI\saveUnzipObject(), ilFileXMLParser\setFileContents(), ilObjFile\storeUnzipedFile(), and ilChatServerConfig\writeConfigFile().

{
$a_dir = trim($a_dir);
// remove trailing slash (bugfix for php 4.2.x)
if (substr($a_dir,-1) == "/")
{
$a_dir = substr($a_dir,0,-1);
}
// check if a_dir comes with a path
if (!($path = substr($a_dir,0, strrpos($a_dir,"/") - strlen($a_dir))))
{
$path = ".";
}
// create directory with file permissions of parent directory
umask(0000);
return @mkdir($a_dir,fileperms($path));
}

+ Here is the caller graph for this function:

ilUtil::makeDirParents (   $a_dir)

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 public

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

References $dir, $dirs, $key, and elseif().

Referenced by ilChatSmilies\_checkSetup(), ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), ilFSStorageCourse\addArchiveSubDirectory(), ilCertificate\cloneCertificate(), assFlashQuestion\copyApplet(), assJavaApplet\copyApplet(), assImagemapQuestion\copyImage(), assOrderingQuestion\copyImages(), assMatchingQuestion\copyImages(), assMultipleChoice\copyImages(), assSingleChoice\copyImages(), assQuestion\copySuggestedSolutionFiles(), ilFileSystemStorage\create(), ilFSStorageCourse\createArchiveOnlineVersion(), ilFSStorageSession\createDirectory(), ilFSStorageEvent\createDirectory(), ilObjFile\createDirectory(), assFlashQuestion\duplicateApplet(), assJavaApplet\duplicateApplet(), assImagemapQuestion\duplicateImage(), assOrderingQuestion\duplicateImages(), assMatchingQuestion\duplicateImages(), assMultipleChoice\duplicateImages(), assSingleChoice\duplicateImages(), SurveyQuestion\duplicateMaterials(), assQuestion\duplicateSuggestedSolutionFiles(), assFlashQuestionImport\fromXML(), assOrderingQuestionImport\fromXML(), assImagemapQuestionImport\fromXML(), assJavaAppletImport\fromXML(), assMultipleChoiceImport\fromXML(), assSingleChoiceImport\fromXML(), ilObjFileDAV\getContentOutputStream(), assFileUpload\getFileUploadZIPFile(), ilObjUserFolderGUI\getImportDir(), ilObjSurvey\getImportDirectory(), ilObjFile\getUploadFile(), ilLMPresentationGUI\handleCodeParagraph(), ilAdvancedMDRecordImportFiles\init(), ilAdvancedMDRecordExportFiles\init(), ilFSStorageCourse\initArchiveDirectory(), ilFileDataShop\initDirectory(), ilFSStorageCourse\initInfoDirectory(), ilFSStorageCourse\initMemberExportDirectory(), assFlashQuestion\moveUploadedFile(), ilObjSurveyQuestionPool\pasteFromClipboard(), ilObjQuestionPool\pasteFromClipboard(), ilCertificate\saveCertificate(), assMatchingQuestionImport\saveImage(), assFlashQuestion\saveToDb(), assFileUpload\saveWorkingData(), assOrderingQuestion\setImageFile(), assMultipleChoice\setImageFile(), assSingleChoice\setImageFile(), assMatchingQuestion\setImageFile(), assImagemapQuestion\setImageFilename(), assJavaApplet\setJavaAppletFilename(), SurveyQuestion\setMaterialsfile(), assQuestionGUI\suggestedsolution(), assMultipleChoice\syncImages(), assSingleChoice\syncImages(), assQuestion\syncSuggestedSolutionFiles(), ilObjCertificateSettings\uploadBackgroundImage(), and ilCertificate\uploadBackgroundImage().

{
$dirs = array($a_dir);
$a_dir = dirname($a_dir);
$last_dirname = '';
while($last_dirname != $a_dir)
{
array_unshift($dirs, $a_dir);
$last_dirname = $a_dir;
$a_dir = dirname($a_dir);
}
// find the first existing dir
$reverse_paths = array_reverse($dirs, TRUE);
$found_index = -1;
foreach ($reverse_paths as $key => $value)
{
if ($found_index == -1)
{
if (is_dir($value))
{
$found_index = $key;
}
}
}
umask(0000);
foreach ($dirs as $dirindex => $dir)
{
// starting with the longest existing path
if ($dirindex >= $found_index)
{
if (! file_exists($dir))
{
if (strcmp(substr($dir,strlen($dir)-1,1),"/") == 0)
{
// on some systems there is an error when there is a slash
// at the end of a directory in mkdir, see Mantis #2554
$dir = substr($dir,0,strlen($dir)-1);
}
if (! mkdir($dir, $umask))
{
error_log("Can't make directory: $dir");
return false;
}
}
elseif (! is_dir($dir))
{
error_log("$dir is not a directory");
return false;
}
else
{
// get umask of the last existing parent directory
$umask = fileperms($dir);
}
}
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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.

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 1051 of file class.ilUtil.php.

References $lng, and $name.

Referenced by ilMDEditorGUI\listEducational(), ilMDEditorGUI\listQuickEdit(), ilMDEditorGUI\listQuickEdit_scorm(), ilDateTimeInputGUI\render(), ilDateDurationInputGUI\render(), and ilObjUserFolderGUI\setAccessRestrictionObject().

{
global $lng;
$minute_steps = 1;
$disabled = '';
if(count($a_further_options))
{
if(isset($a_further_options['minute_steps']))
{
$minute_steps = $a_further_options['minute_steps'];
}
if(isset($a_further_options['disabled']) and $a_further_options['disabled'])
{
$disabled = 'disabled="disabled" ';
}
}
if ($a_use_default and !strlen("$hour$minute$second")) {
$now = localtime();
$hour = $now[2];
$minute = $now[1];
$second = $now[0];
} else {
$hour = (int)$hour;
$minute = (int)$minute;
$second = (int)$second;
}
// build hour select
$sel_hour = '<select ';
if(isset($a_further_options['select_attributes']))
{
foreach($a_further_options['select_attributes'] as $name => $value)
{
$sel_hour .= $name.'='.$value.' ';
}
}
$sel_hour .= " ".$disabled."name=\"".$prefix."[h]\" id=\"".$prefix."_h\">\n";
for ($i = 0; $i <= 23; $i++)
{
$sel_hour .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
}
$sel_hour .= "</select>\n";
$sel_hour = preg_replace("/(value\=\"$hour\")/", "$1 selected=\"selected\"", $sel_hour);
// build minutes select
$sel_minute .= "<select ".$disabled."name=\"".$prefix."[m]\" id=\"".$prefix."_m\">\n";
for ($i = 0; $i <= 59; $i = $i + $minute_steps)
{
$sel_minute .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
}
$sel_minute .= "</select>\n";
$sel_minute = preg_replace("/(value\=\"$minute\")/", "$1 selected=\"selected\"", $sel_minute);
if (!$short) {
// build seconds select
$sel_second .= "<select ".$disabled."name=\"".$prefix."[s]\" id=\"".$prefix."_s\">\n";
for ($i = 0; $i <= 59; $i++)
{
$sel_second .= "<option value=\"$i\">" . sprintf("%02d", $i) . "</option>\n";
}
$sel_second .= "</select>\n";
$sel_second = preg_replace("/(value\=\"$second\")/", "$1 selected=\"selected\"", $sel_second);
}
$timeformat = $lng->text["lang_timeformat"];
if (strlen($timeformat) == 0) $timeformat = "H:i:s";
$timeformat = strtolower(preg_replace("/\W/", "", $timeformat));
$timeformat = preg_replace("/(\w)/", "%%$1", $timeformat);
$timeformat = preg_replace("/%%h/", $sel_hour, $timeformat);
$timeformat = preg_replace("/%%i/", $sel_minute, $timeformat);
if ($short) {
$timeformat = preg_replace("/%%s/", "", $timeformat);
} else {
$timeformat = preg_replace("/%%s/", $sel_second, $timeformat);
}
return $timeformat;
}

+ Here is the caller graph for this function:

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

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

References $ilLog.

Referenced by maskSecureTags().

{
global $ilLog;
$ws = "[ \t\r\f\v\n]*";
$att = $ws."[^>]*".$ws;
while (eregi("<($tag$att($tag_att$ws=$ws\"(([\$@!*()~;,_0-9A-z/:=%\\.&#?+\\-])*)\")$att)>",
$a_str, $found))
{
$un = array(".", "-", "+", "?", '$', "*", "(", ")");
$esc = array();
foreach($un as $v)
{
$esc[] = "\\".$v;
}
$ff = str_replace($un, $esc, $found[1]);
$old_str = $a_str;
$a_str = eregi_replace("<".$ff.">",
"&lt;$tag $tag_att$tag_att=\"".$found[3]."\"&gt;", $a_str);
if ($old_str == $a_str)
{
$ilLog->write("ilUtil::maskA-".htmlentities($old_str)." == ".
htmlentities($a_str));
return $a_str;
}
}
$a_str = str_ireplace("</$tag>",
"&lt;/$tag&gt;", $a_str);
return $a_str;
}

+ Here is the caller graph for this function:

ilUtil::maskSecureTags (   $a_str,
  $allow_array 
)

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

References $t, maskAttributeTag(), and maskTag().

Referenced by secureString().

{
foreach ($allow_array as $t)
{
switch($t)
{
case "a":
$a_str = ilUtil::maskAttributeTag($a_str, "a", "href");
break;
case "img":
$a_str = ilUtil::maskAttributeTag($a_str, "img", "src");
break;
case "p":
case "div":
$a_str = ilUtil::maskTag($a_str, $t, array(
array("param" => "align", "value" => "left"),
array("param" => "align", "value" => "center"),
array("param" => "align", "value" => "justify"),
array("param" => "align", "value" => "right")
));
break;
default:
$a_str = ilUtil::maskTag($a_str, $t);
break;
}
}
return $a_str;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References $t.

Referenced by maskSecureTags().

{
$a_str = str_replace(array("<$t>", "<".strtoupper($t).">"),
"&lt;".$t."&gt;", $a_str);
$a_str = str_replace(array("</$t>", "</".strtoupper($t).">"),
"&lt;/".$t."&gt;", $a_str);
if (is_array($fix_param))
{
foreach ($fix_param as $p)
{
$k = $p["param"];
$v = $p["value"];
$a_str = str_replace("<$t $k=\"$v\">",
"&lt;"."$t $k=\"$v\""."&gt;", $a_str);
}
}
return $a_str;
}

+ Here is the caller graph for this function:

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

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

Referenced by stableSortArray().

{
// Arrays of size < 2 require no action.
if (count($array) < 2) return;
// Split the array in half
$halfway = count($array) / 2;
$array1 = array_slice($array, 0, $halfway);
$array2 = array_slice($array, $halfway);
// Recurse to sort the two halves
ilUtil::mergesort($array1, $cmp_function);
ilUtil::mergesort($array2, $cmp_function);
// If all of $array1 is <= all of $array2, just append them.
if (call_user_func($cmp_function, end($array1), $array2[0]) < 1) {
$array = array_merge($array1, $array2);
return;
}
// Merge the two sorted arrays into a single sorted array
$array = array();
$ptr1 = $ptr2 = 0;
while ($ptr1 < count($array1) && $ptr2 < count($array2)) {
if (call_user_func($cmp_function, $array1[$ptr1], $array2[$ptr2]) < 1) {
$array[] = $array1[$ptr1++];
}
else {
$array[] = $array2[$ptr2++];
}
}
// Merge the remainder
while ($ptr1 < count($array1)) $array[] = $array1[$ptr1++];
while ($ptr2 < count($array2)) $array[] = $array2[$ptr2++];
return;
}

+ Here is the caller graph for this function:

ilUtil::moveUploadedFile (   $a_file,
  $a_name,
  $a_target,
  $a_raise_errors = true 
)

move uploaded file

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

References $lng, sendFailure(), sendInfo(), and virusHandling().

Referenced by ilObjCategoryGUI\_importCategories(), ilObjMediaObject\_saveTempFileAsMediaObject(), ilSessionFile\create(), ilCourseFile\create(), ilFileDataGroup\createImportFile(), ilFileDataCourse\createImportFile(), ilObjExternalToolsSettingsGUI\createSocialBookmarkObject(), ilFileDataExercise\deliverFile(), ilObjFile\getUploadFile(), ilObjStyleSheet\import(), ilCertificate\importCertificate(), ilObjGlossaryGUI\importFileObject(), ilObjContentObjectGUI\importFileObject(), ilObjSurvey\importObject(), ilSCORM2004ScoGUI\importSave(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilAdvancedMDRecordImportFiles\moveUploadedFile(), assFlashQuestion\moveUploadedFile(), assQuestion\moveUploadedMediaFile(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilObjMediaObjectGUI\savePropertiesObject(), assFileUpload\saveWorkingData(), assOrderingQuestion\setImageFile(), assMultipleChoice\setImageFile(), assSingleChoice\setImageFile(), assMatchingQuestion\setImageFile(), assImagemapQuestion\setImageFilename(), assJavaApplet\setJavaAppletFilename(), SurveyQuestion\setMaterialsfile(), ilObjMediaObjectGUI\setObjectPerCreationForm(), ilFileDataImportMail\storeUploadedFile(), ilFileDataImportGroup\storeUploadedFile(), ilFileDataImportForum\storeUploadedFile(), ilFileDataShop\storeUploadedFile(), ilFileDataExercise\storeUploadedFile(), ilFileDataForum\storeUploadedFile(), ilFileDataMail\storeUploadedFile(), assQuestionGUI\suggestedsolution(), ilObjMediaCastGUI\updateMediaItem(), ilObjExternalToolsSettingsGUI\updateSocialBookmarkObject(), ilObjCertificateSettings\uploadBackgroundImage(), ilCertificate\uploadBackgroundImage(), ilObjMediaObjectGUI\uploadFileObject(), ilObjStyleSheet\uploadImage(), ilObjLanguageExtGUI\uploadObject(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjSurveyQuestionPoolGUI\uploadQuestionsObject(), ilObjSurveyQuestionPoolGUI\uploadSplObject(), ilObjTestGUI\uploadTstObject(), ilPersonalProfileGUI\uploadUserPicture(), and ilObjUserGUI\uploadUserPictureObject().

{
global $lng, $ilias;
//echo "<br>ilUtli::moveuploadedFile($a_name)";
if (!is_file($a_file))
{
if ($a_raise_errors)
{
$ilias->raiseError($lng->txt("upload_error_file_not_found"), $ilias->error_obj->MESSAGE);
}
else
{
ilUtil::sendFailure($lng->txt("upload_error_file_not_found"), true);
}
return false;
}
// virus handling
$vir = ilUtil::virusHandling($a_file, $a_name);
if (!$vir[0])
{
unlink($a_file);
if ($a_raise_errors)
{
$ilias->raiseError($lng->txt("file_is_infected")."<br />".
$vir[1],
$ilias->error_obj->MESSAGE);
}
else
{
ilUtil::sendFailure($lng->txt("file_is_infected")."<br />".
$vir[1], true);
}
return false;
}
else
{
if ($vir[1] != "")
{
ilUtil::sendInfo($vir[1], true);
}
return move_uploaded_file($a_file, $a_target);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

prepares string output for html forms 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 2842 of file class.ilUtil.php.

References stripSlashes().

Referenced by ilBookmarkImportExport\__parseExport(), ilLPListOfObjectsGUI\__showEditUser(), ilObjUserGUI\__showUserDefinedFields(), ilPersonalProfileGUI\__showUserDefinedFields(), ilObjLanguageExtGUI\_getTranslationLink(), ilFeedbackGUI\addBarometer(), assQuestionGUI\addBasicQuestionFormProperties(), ilPaymentCouponGUI\addCoupon(), ilPaymentStatisticGUI\addCustomer(), ilObjPaymentSettingsGUI\addCustomerObject(), ilObjSurveyGUI\addHeadingObject(), ilInfoScreenGUI\addPropertyTextinput(), ilObjSystemFolderGUI\changeHeaderTitleObject(), ilObjCourseGroupingGUI\create(), assErrorText\createErrorTextExport(), assErrorText\createErrorTextOutput(), ilObjRoleTemplateGUI\createObject(), ilObjGlossaryGUI\createObject(), ilObjFolderGUI\createObject(), ilObjCategoryGUI\createObject(), ilObjectGUI\createObject(), ilObjSurveyQuestionPoolGUI\createObject(), ilObjContentObjectGUI\createObject(), ilObjQuestionPoolGUI\createObject(), ilObjSurveyGUI\createObject(), ilObjTestGUI\createObject(), ilBookmarkAdministrationGUI\delete(), ilObjStyleSheetGUI\deleteColorConfirmationObject(), ilObjTest\deliverPDFfromHTML(), ilObjSystemFolderGUI\displayBasicSettings(), ilAccountRegistrationGUI\displayForm(), ilObjFileAccessSettingsGUI\editDiskQuotaMailTemplate(), ilCourseUserFieldsGUI\editField(), ilObjRootFolderGUI\editObject(), ilObjRoleTemplateGUI\editObject(), ilObjFileGUI\editObject(), ilObjCategoryGUI\editObject(), ilObjectGUI\editObject(), ilObjRoleGUI\editObject2(), ilObjUserGUI\editOldObject(), ilContainerGUI\editPageContentObject(), assTextQuestionGUI\editQuestion(), assErrorTextGUI\editQuestion(), assClozeTestGUI\editQuestion(), ilObjPaymentSettingsGUI\editVendor(), ilMailFolderGUI\enterFolderData(), ilBibItemGUI\fill(), ilObjectGUI\fillCloneSearchTemplate(), ilAccessKeyTableGUI\fillRow(), ilObjectTranslationTableGUI\fillRow(), ilExerciseMemberTableGUI\fillRow(), assFileUploadFileTableGUI\fillRow(), ilWikiContributorsTableGUI\fillRow(), ilAssessmentFolderLogTableGUI\fillRow(), ilStyleColorTableGUI\fillRow(), ilTestHistoryTableGUI\fillRow(), ilQuestionPoolPrintViewTableGUI\fillRow(), ilAssessmentFolderLogAdministrationTableGUI\fillRow(), ilListOfQuestionsTableGUI\fillRow(), ilComponentsTableGUI\fillRow(), ilSCORM2004ExportTableGUI\fillRow(), ilSurveyQuestionPoolExportTableGUI\fillRow(), ilSurveyQuestionblockbrowserTableGUI\fillRow(), ilTestParticipantsTableGUI\fillRow(), ilQuestionPoolExportTableGUI\fillRow(), ilTestFixedParticipantsTableGUI\fillRow(), ilSurveyQuestionbrowserTableGUI\fillRow(), ilBookmarkBlockGUI\fillRow(), ilMDCopyrightSelectionGUI\fillTemplate(), ilObjPaymentSettingsGUI\generalSettingsObject(), ilPaymentCouponGUI\generateCodes(), ilFeedbackGUI\get_last(), ilBookmarkAdministrationGUI\get_last(), ilSCORMCertificateAdapter\getCertificateVariablesForPresentation(), ilTestCertificateAdapter\getCertificateVariablesForPresentation(), ilSCORMCertificateAdapter\getCertificateVariablesForPreview(), ilTestCertificateAdapter\getCertificateVariablesForPreview(), ilObjAssessmentFolder\getFullPath(), ilFormPropertyGUI\getHiddenTag(), ilUserFilterGUI\getHTML(), ilLPFilterGUI\getHTML(), ilBookmarkBlockGUI\getListRowData(), SurveyQuestionGUI\getMaterialOutput(), ilTestServiceGUI\getPassListOfAnswersWithScoring(), SurveyMetricQuestion\getPreconditionSelectValue(), assOrderingHorizontalGUI\getPreview(), assClozeTestGUI\getPreview(), assSingleChoiceGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assImagemapQuestionGUI\getPreview(), assMatchingQuestionGUI\getPreview(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyMatrixQuestionGUI\getPrintView(), assOrderingHorizontalGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), assMatchingQuestionGUI\getSolutionOutput(), assClozeTestGUI\getSolutionOutput(), assQuestion\getSuggestedSolutionOutput(), ilTaggingGUI\getTaggingInputHTML(), assOrderingHorizontalGUI\getTestOutput(), assTextQuestionGUI\getTestOutput(), assSingleChoiceGUI\getTestOutput(), assMultipleChoiceGUI\getTestOutput(), assImagemapQuestionGUI\getTestOutput(), assClozeTestGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutputJS(), ilObjTest\getTestResult(), SurveyTextQuestionGUI\getWorkingForm(), SurveyMultipleChoiceQuestionGUI\getWorkingForm(), SurveySingleChoiceQuestionGUI\getWorkingForm(), SurveyMatrixQuestionGUI\getWorkingForm(), ilHiddenInputGUI\insert(), ilRandomTestROInputGUI\insert(), ilEMailInputGUI\insert(), ilUserLoginInputGUI\insert(), ilBackgroundImageInputGUI\insert(), ilTextWizardInputGUI\insert(), ilColorPickerInputGUI\insert(), ilMatchingPairWizardInputGUI\insert(), ilAnswerWizardInputGUI\insert(), ilRandomTestInputGUI\insert(), ilCSSRectInputGUI\insert(), ilFileWizardInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilImageWizardInputGUI\insert(), ilCategoryWizardInputGUI\insert(), ilErrorTextWizardInputGUI\insert(), ilPasswordInputGUI\insert(), ilKVPWizardInputGUI\insert(), ilFlashFileInputGUI\insert(), ilNumberInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilTextAreaInputGUI\insert(), ilMDEditorGUI\listAnnotation(), ilMDEditorGUI\listClassification(), ilMDEditorGUI\listEducational(), ilMDEditorGUI\listGeneral(), ilMDEditorGUI\listLifecycle(), ilMDEditorGUI\listMetaMetaData(), ilMDEditorGUI\listQuickEdit(), ilMDEditorGUI\listQuickEdit_scorm(), ilMDEditorGUI\listRelation(), ilMDEditorGUI\listRights(), ilMDEditorGUI\listTechnical(), ilObjAssessmentFolderGUI\logsObject(), SurveyQuestionGUI\material(), ilObjUserFolderGUI\newAccountMailObject(), ilObjPaymentSettingsGUI\objectsObject(), assQuestionGUI\outPageSelector(), ilObjUserTrackingGUI\outputTrackingDataObject(), ilTestOutputGUI\outQuestionSummary(), ilObjQuestionPoolGUI\printObject(), ilObjTestGUI\printobject(), ilMultiSelectInputGUI\render(), ilRepositorySelectorInputGUI\render(), ilTextInputGUI\render(), ilHierarchyFormGUI\renderChild(), ilLDAPSettingsGUI\roleMapping(), ilObjSystemFolderGUI\saveSettingsObject(), ilForumModeratorsGUI\searchModeratorsForm(), ilMailFormGUI\searchUsers(), ilMailAddressbookGUI\showAddressbook(), ilMailAddressbookGUI\showAddressForm(), ilPurchaseBillGUI\showBillConfirm(), ilPaymentBillAdminGUI\showBillData(), ilPaymentCouponGUI\showCoupons(), ilPurchaseBMFGUI\showCreditCard(), ilPurchaseBMFGUI\showDebitEntry(), ilSCORM2004ScoGUI\showExportList(), ilObjSCORM2004LearningModuleGUI\showExportList(), ilShopAdvancedSearchGUI\showForm(), ilObjUserTrackingGUI\showForm(), ilStartUpGUI\showLogin(), ilPurchaseBillGUI\showPersonalData(), ilPurchaseBMFGUI\showPersonalData(), ilPersonalProfileGUI\showProfile(), ilMailSearchGUI\showResults(), ilMailFormGUI\showSearchForm(), ilShopGUI\showShopContent(), ilPaymentStatisticGUI\showStatistics(), ilAccountRegistrationGUI\showUserDefinedFields(), ilStartUpGUI\showUserMappingSelection(), ilObjPaymentSettingsGUI\statisticObject(), assQuestionGUI\suggestedsolution(), ilRegistrationSettingsGUI\view(), and ilObjLanguageExtGUI\viewObject().

{
if($a_strip)
{
$a_str = ilUtil::stripSlashes($a_str);
}
$a_str = htmlspecialchars($a_str);
// Added replacement of curly brackets to prevent
// problems with PEAR templates, because {xyz} will
// be removed as unused template variable
$a_str = str_replace("{", "&#123;", $a_str);
$a_str = str_replace("}", "&#125;", $a_str);
// needed for LaTeX conversion \\ in LaTeX is a line break
// but without this replacement, php changes \\ to \
$a_str = str_replace("\\", "&#92;", $a_str);
return $a_str;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::prepareTextareaOutput (   $txt_output,
  $prepare_for_latex_output = 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.

Parameters
string$txt_outputString which should be prepared for output public

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

References $result, and insertLatexImages().

{
$result = $txt_output;
$is_html = $this->isHTML($result);
if ($prepare_for_latex_output)
{
$result = ilUtil::insertLatexImages($result, "<span class\=\"latex\">", "<\/span>", URL_TO_LATEX);
$result = ilUtil::insertLatexImages($result, "\[tex\]", "\[\/tex\]", URL_TO_LATEX);
}
// removed: did not work with magic_quotes_gpc = On
if (!$is_html)
{
// if the string does not contain HTML code, replace the newlines with HTML line breaks
$result = preg_replace("/[\n]/", "<br />", $result);
}
else
{
// patch for problems with the <pre> tags in tinyMCE
if (preg_match_all("/(<pre>.*?<\/pre>)/ims", $result, $matches))
{
foreach ($matches[0] as $found)
{
$replacement = "";
if (strpos("\n", $found) === FALSE)
{
$replacement = "\n";
}
$removed = preg_replace("/<br\s*?\/>/ims", $replacement, $found);
$result = str_replace($found, $removed, $result);
}
}
}
if ($prepare_for_latex_output)
{
// replace special characters to prevent problems with the ILIAS template system
// eg. if someone uses {1} as an answer, nothing will be shown without the replacement
$result = str_replace("{", "&#123;", $result);
$result = str_replace("}", "&#125;", $result);
$result = str_replace("\\", "&#92;", $result);
}
return $result;
}

+ Here is the call graph for this function:

& ilUtil::processCSVRow ( $row,
  $quoteAll = FALSE,
  $separator = ";",
  $outUTF8 = FALSE,
  $compatibleWithMSExcel = TRUE 
)

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 public

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

References $row, and $separator.

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

{
$resultarray = array();
foreach ($row as $rowindex => $entry)
{
$surround = FALSE;
if ($quoteAll)
{
$surround = TRUE;
}
if (strpos($entry, "\"") !== FALSE)
{
$entry = str_replace("\"", "\"\"", $entry);
$surround = TRUE;
}
if (strpos($entry, $separator) !== FALSE)
{
$surround = TRUE;
}
if ($compatibleWithMSExcel)
{
// replace all CR LF with LF (for Excel for Windows compatibility
$entry = str_replace(chr(13).chr(10), chr(10), $entry);
}
if ($surround)
{
if ($outUTF8)
{
$resultarray[$rowindex] = "\"" . $entry . "\"";
}
else
{
$resultarray[$rowindex] = utf8_decode("\"" . $entry . "\"");
}
}
else
{
if ($outUTF8)
{
$resultarray[$rowindex] = $entry;
}
else
{
$resultarray[$rowindex] = utf8_decode($entry);
}
}
}
return $resultarray;
}

+ Here is the caller graph for this function:

ilUtil::quoteArray (   $a_array)

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

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

References $ilDB.

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

{
global $ilDB;
if(!is_array($a_array) or !count($a_array))
{
return array("''");
}
foreach($a_array as $k => $item)
{
$a_array[$k] = $ilDB->quote($item);
}
return $a_array;
}

+ Here is the caller graph for this function:

ilUtil::randomhash ( )

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

{
return md5(rand(1,9999999) + str_replace(" ", "", (string) microtime()));
}
ilUtil::rCopy (   $a_sdir,
  $a_tdir,
  $preserveTimeAttributes = false 
)

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 public

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

References $dir, $file, and makeDir().

Referenced by ilFileSystemStorage\_copyDirectory(), ilObjFile\cloneObject(), ilContObjParser\copyFileItems(), ilObjStyleSheet\copyImagesToDir(), ilContObjParser\copyMobFiles(), ilObjStyleSheet\create(), ilFSStorageCourse\createArchiveOnlineVersion(), ilObjDlBook\export(), ilObjFile\export(), ilObjStyleSheet\export(), ilObjMediaObject\exportFiles(), ilObjGlossary\exportHTMLMOB(), ilObjContentObject\exportHTMLMOB(), ilObjSCORM2004LearningModule\exportScorm(), and ilObjStyleSheet\import().

{
// check if arguments are directories
if (!@is_dir($a_sdir) or
!@is_dir($a_tdir))
{
return FALSE;
}
// read a_sdir, copy files and copy directories recursively
$dir = opendir($a_sdir);
while($file = readdir($dir))
{
if ($file != "." and
$file != "..")
{
// directories
if (@is_dir($a_sdir."/".$file))
{
if (!@is_dir($a_tdir."/".$file))
{
if (!ilUtil::makeDir($a_tdir."/".$file))
return FALSE;
//chmod($a_tdir."/".$file, 0775);
}
if (!ilUtil::rCopy($a_sdir."/".$file,$a_tdir."/".$file))
{
return FALSE;
}
}
// files
if (@is_file($a_sdir."/".$file))
{
if (!copy($a_sdir."/".$file,$a_tdir."/".$file))
{
return FALSE;
}
if ($preserveTimeAttributes)
touch($a_tdir."/".$file, filectime($a_sdir."/".$file));
}
}
}
return TRUE;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::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.

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

Referenced by deliverFile(), and ilWebAccessChecker\sendFile().

{
$chunksize = 1*(1024*1024); // how many bytes per chunk
$buffer = '';
$handle = fopen($a_file, 'rb');
if ($handle === false)
{
return false;
}
while (!feof($handle))
{
$buffer = fread($handle, $chunksize);
print $buffer;
}
return fclose($handle);
}

+ Here is the caller graph for this function:

ilUtil::redirect (   $a_script)

http redirect to other script

Parameters
string$a_scripttarget script

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

References $log, and exit.

Referenced by ilObjForumGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilGroupRegistrationGUI\add(), ilCourseRegistrationGUI\add(), ilShopPurchaseGUI\addToShoppingCart(), ilObjRootFolderGUI\addTranslationObject(), ilObjCategoryGUI\addTranslationObject(), ilObjiLincCourseGUI\addUserObject(), ilObjGroupGUI\addUserObject(), ilObjMediaPoolGUI\afterSave(), ilObjFileBasedLMGUI\afterSave(), ilObjiLincCourseGUI\agendaObject(), ilSetupGUI\applyHotfix(), ilObjGroupGUI\assignMemberObject(), ilObjTestGUI\backToCourseObject(), ilObjSurveyGUI\backToRepositoryObject(), ilObjTestGUI\backToRepositoryObject(), ilObjRemoteCourseGUI\callObject(), ilPurchaseBillGUI\cancel(), ilPurchaseBMFGUI\cancel(), ilLMPageObjectGUI\cancel(), SurveyQuestionGUI\cancel(), ilRegistrationGUI\cancel(), assQuestionGUI\cancel(), ilBookmarkAdministrationGUI\cancel(), ilObject2GUI\cancelCreation(), ilObjFileBasedLMGUI\cancelCreationObject(), ilAdminUserSearchGUI\cancelDelete(), ilObjUserFolderGUI\cancelDeleteExportFileObject(), ilMailFolderGUI\cancelDeleteFolder(), ilMailFolderGUI\cancelEnterFolderData(), ilSurveyEvaluationGUI\cancelEvaluationAccess(), ilLMStatisticsGUI\cancelMember(), ilObjCourseGUI\cancelMemberObject(), ilObjiLincCourseGUI\cancelMemberObject(), ilObjSurveyQuestionPoolGUI\cancelObject(), ilObjSurveyGUI\cancelObject(), ilObjQuestionPoolGUI\cancelObject(), ilObjTestGUI\cancelObject(), ilObjSAHSLearningModuleGUI\cancelObject(), ilObjFileBasedLMGUI\cancelObject(), ilObjForumGUI\cancelObject(), ilObjGlossaryGUI\cancelObject(), ilObjContentObjectGUI\cancelObject(), ilRegistrationGUI\cancelSubscriptionRequest(), assQuestionGUI\cancelSync(), ilSetupGUI\changeAccessMode(), ilSetupGUI\changeDefaultClient(), ilSetupGUI\changeMasterPassword(), ilObjectGUI\checkPermission(), ilInitialisation\checkUserAgreement(), ilInitialisation\checkUserClientIP(), ilObjUser\checkUserId(), ilObjectGUI\cloneAllObject(), ilContainerGUI\cloneAllObject(), ilInternalLinkGUI\closeLinkHelp(), ilSetupGUI\cmdClient(), ilObjUserFolderGUI\confirmaccessFreeObject(), ilObjUserFolderGUI\confirmaccessRestrictObject(), ilObjUserFolderGUI\confirmactivateObject(), ilObjUserFolderGUI\confirmdeactivateObject(), ilObjUserFolderGUI\confirmdeleteObject(), ilObjStyleSheetFolderGUI\confirmedDeleteObject(), ilObjStyleSettingsGUI\confirmedDeleteObject(), ilObjiLincCourseGUI\confirmedRemoveMemberObject(), ilObjUserFolderGUI\confirmexportObject(), ilStartUpGUI\confirmRegistration(), ilObjectCopyGUI\copyContainer(), ilObjectCopyGUI\copySingleObject(), ilBookmarkAdministrationGUI\createBookmark(), ilFeedbackGUI\delete(), ilObjUserFolderGUI\deleteExportFileObject(), ilMailFolderGUI\deleteFolder(), ilSetupGUI\displayDeleteConfirmation(), ilSCORMPresentationGUI\downloadCertificate(), ilObjMediaCastGUI\downloadItemObject(), ilImageMapEditorGUI\editImagemapForward(), ilErrorHandling\errorHandler(), ilShopPersonalSettingsGUI\executeCommand(), ilShopGUI\executeCommand(), ilObjMediaPoolGUI\executeCommand(), ilMailGUI\executeCommand(), ilSearchController\executeCommand(), ilCalendarPresentationGUI\executeCommand(), ilRepositoryGUI\executeCommand(), ilObjSurveyGUI\executeCreateQuestionObject(), ilObjTestGUI\executeCreateQuestionObject(), ilObjUserFolderGUI\exportObject(), ilObjWikiGUI\gotoPageObject(), ilObjWikiGUI\gotoStartPageObject(), ilInitialisation\handleMaintenanceMode(), ilNavigationHistoryGUI\handleNavigationRequest(), ilObjCourseGUI\importFileObject(), ilObjGlossaryGUI\importFileObject(), ilObjSurveyQuestionPoolGUI\importFileObject(), ilObjContentObjectGUI\importFileObject(), ilObjGroupGUI\importFileObject(), ilObjSurveyGUI\importFileObject(), ilObjQuestionPoolGUI\importVerifiedFileObject(), ilObjTestGUI\importVerifiedFileObject(), ilInitialisation\initILIAS(), ilEditClipboardGUI\insert(), ilSetupGUI\installDatabase(), ilObjSurveyGUI\inviteObject(), ilObjChatGUI\invitePDObject(), ilMailAddressbookGUI\inviteToChat(), ilObjiLincClassroomGUI\joinClassroom(), ilObjiLincCourseGUI\joinObject(), ilRegistrationGUI\leaveWaitingList(), ShibAuth\login(), ilSetupGUI\loginClient(), ilAuthContainerRadius\loginObserver(), ilAuthContainerLDAP\loginObserver(), ilMailSearchCoursesGUI\mailCourses(), ilMailSearchGroupsGUI\mailGroups(), ilMailSearchGroupsGUI\mailMembers(), ilMailSearchCoursesGUI\mailMembers(), ilMailingListsGUI\mailToList(), ilObjRoleGUI\mailToRoleObject(), ilMailAddressbookGUI\mailToUsers(), ilStartUpGUI\migrateAccount(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilMailFolderGUI\performDeleteFolder(), ilObjRoleGUI\performDeleteRoleObject(), ilObjForumGUI\performImportObject(), ilSetupGUI\performLogin(), ilSetupGUI\performMLogin(), ilObjCourseGUI\performUnsubscribeObject(), ilObjSCORM2004LearningModuleGUI\preview(), ilStartUpGUI\processStartingPage(), ilObjSurveyGUI\questionsObject(), ilObjTestGUI\questionsObject(), ilObjExerciseGUI\redirectFeedbackMailObject(), ilContainerReferenceGUI\redirectObject(), ilObjGroupGUI\refuseApplicantsObject(), ilObjRootFolderGUI\removeBigIconObject(), ilObjGroupGUI\removeBigIconObject(), ilObjCategoryGUI\removeBigIconObject(), ilObjCourseGUI\removeBigIconObject(), ilObjRootFolderGUI\removeSmallIconObject(), ilObjGroupGUI\removeSmallIconObject(), ilObjCategoryGUI\removeSmallIconObject(), ilObjCourseGUI\removeSmallIconObject(), ilObjRootFolderGUI\removeTinyIconObject(), ilObjGroupGUI\removeTinyIconObject(), ilObjCategoryGUI\removeTinyIconObject(), ilObjCourseGUI\removeTinyIconObject(), ilObjRootFolderGUI\removeTranslationObject(), ilObjCategoryGUI\removeTranslationObject(), ilLMPageObjectGUI\save(), SurveyQuestionGUI\save(), ilFeedbackGUI\save(), assQuestionGUI\save(), ilObjStyleSettingsGUI\saveActiveStylesObject(), ilObjSessionGUI\saveAndAssignMaterialsObject(), ilSetupGUI\saveBasicSettings(), ilObjStyleSettingsGUI\saveBasicStyleSettingsObject(), ilSetupGUI\saveClientIni(), ilSetupGUI\saveContact(), assQuestionGUI\saveEdit(), ilMailFolderGUI\saveFolderSettings(), ilMailingListsGUI\saveForm(), ilSetupGUI\saveLanguages(), GUI\saveObject(), ilObjStyleSheetFolderGUI\saveObject(), ilObjMediaCastGUI\saveObject(), ilContainerReferenceGUI\saveObject(), ilObjStyleSettingsGUI\saveObject(), ilObjSurveyQuestionPoolGUI\saveObject(), ilObjSurveyGUI\saveObject(), ilObjLinkResourceGUI\saveObject(), ilObjWikiGUI\saveObject(), ilObjChatGUI\saveObject(), ilObjTestGUI\saveObject(), ilObjGlossaryGUI\saveObject(), ilObjExerciseGUI\saveObject(), ilObjFileGUI\saveObject(), ilObjSAHSLearningModuleGUI\saveObject(), ilObjQuestionPoolGUI\saveObject(), ilObjForumGUI\saveObject(), ilObjContentObjectGUI\saveObject(), ilObjCourseGUI\saveObject(), ilSetupGUI\saveRegistration(), ilObjStyleSettingsGUI\saveScopeObject(), ilObjStyleSettingsGUI\saveStyleSettingsObject(), ilMailFolderGUI\saveSubFolderSettings(), ilLMStatisticsGUI\searchCancelled(), ilBookmarkAdministrationGUI\sendmail(), ilObjCourseGUI\sendMailToSelectedUsersObject(), ilObjGroupGUI\sendMailToSelectedUsersObject(), ilObjAuthSettingsGUI\setAuthModeObject(), ilHelpGUI\showHelp(), ilObjFileBasedLMGUI\showLearningModule(), ilStartUpGUI\showLogin(), ilObjRemoteCourseGUI\showObject(), ilStartUpGUI\showUserAgreement(), ilObjChatGUI\showUserFrameObject(), ilMailAddressbookGUI\submitInvitation(), assQuestionGUI\sync(), ilSetupGUI\toggleClientList(), ilObjStyleSheetFolderGUI\toggleGlobalDefaultObject(), ilObjStyleSettingsGUI\toggleGlobalDefaultObject(), ilObjStyleSheetFolderGUI\toggleGlobalFixedObject(), ilObjStyleSettingsGUI\toggleGlobalFixedObject(), ilObjGroupGUI\unsubscribeObject(), ilSetupGUI\updateBasicSettings(), ilSetupGUI\updateDatabase(), ilObjiLincCourseGUI\updateMemberStatusObject(), ilObjForumGUI\updateObject(), ilObjRootFolderGUI\updateObject(), ilObjFileGUI\updateObject(), ilObjCategoryGUI\updateObject(), ilRegistrationGUI\updateSubscriptionRequest(), ilObjSAHSLearningModuleGUI\uploadObject(), and ilObjSurveyGUI\uploadObject().

{
global $log, $PHP_SELF;
//$log->write("redirect FROM:".$PHP_SELF." to ".$a_script);
//vd($a_script);
//echo "-".$a_script."-";
header("Location: ".$a_script);
exit();
}

+ Here is the caller graph for this function:

ilUtil::removeItemFromDesktops (   $a_id)

removes object from all user's desktops public

Parameters
integerref_id
Returns
array user_ids of all affected users

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

References ilObjUser\_removeItemFromDesktops().

Referenced by ilObject\delete(), ilSoapCourseAdministration\deleteCourse(), ilSoapObjectAdministration\deleteObject(), ilRepUtil\deleteObjects(), and ilObjectDAV\remove().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::renameExecutables (   $a_dir)

Rename uploaded executables for security reasons.

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

References rRenameSuffix().

Referenced by ilObjMediaObject\_saveTempFileAsMediaObject(), ilSCORM13Package\dbImportSco(), ilSCORM2004ScoGUI\importSave(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilObjSCORM2004LearningModuleGUI\preview(), ilFileSystemGUI\renameFile(), ilObjMediaObjectGUI\savePropertiesObject(), ilObjMediaObjectGUI\setObjectPerCreationForm(), ilFileSystemGUI\unzipFile(), ilObjMediaCastGUI\updateMediaItem(), ilFileSystemGUI\uploadFile(), ilObjMediaObjectGUI\uploadFileObject(), and ilObjSAHSLearningModuleGUI\uploadObject().

{
$def_arr = explode(",", SUFFIX_REPL_DEFAULT);
foreach ($def_arr as $def)
{
ilUtil::rRenameSuffix($a_dir, trim($def), "sec");
}
$def_arr = explode(",", SUFFIX_REPL_ADDITIONAL);
foreach ($def_arr as $def)
{
ilUtil::rRenameSuffix($a_dir, trim($def), "sec");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::replaceLinkProperties (   $matches)
private

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 862 of file class.ilUtil.php.

References $ref_id, $title, ilObject\_lookupObjId(), and ilObject\_lookupTitle().

{
$link = $matches[0];
$ref_id = $matches[2];
if ($ref_id > 0)
{
if ($obj_id > 0)
{
$link = "<a href=".$matches[1]." target=\"_self\">".$title."</a>";
}
}
return $link;
}

+ Here is the call graph for this function:

ilUtil::replaceUrlParameterString (   $url,
  $parametersArray 
)

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

References KT_replaceParam().

{
foreach ($parametersArray as $paramName => $paramValue ) {
$url = ilUtil::KT_replaceParam($url, $paramName, $paramValue);
}
return $url;
}

+ Here is the call graph for this function:

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

resize image

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

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

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

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

{
if ($a_constrain_prop)
{
$size = " -geometry ".$a_width."x".$a_height." ";
}
else
{
$size = " -resize ".$a_width."x".$a_height."! ";
}
$convert_cmd = ilUtil::getConvertCmd()." ".
ilUtil::escapeShellArg($a_from)." ".$size.ilUtil::escapeShellArg($a_to);
system($convert_cmd);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

public

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

References $dir, and $file.

Referenced by renameExecutables().

{
if ($a_dir == "/" || $a_dir == "" || is_int(strpos($a_dir, ".."))
|| trim($a_old_suffix) == "")
{
return false;
}
// check if argument is directory
if (!@is_dir($a_dir))
{
return false;
}
// read a_dir
$dir = opendir($a_dir);
while($file = readdir($dir))
{
if ($file != "." and
$file != "..")
{
// directories
if (@is_dir($a_dir."/".$file))
{
ilUtil::rRenameSuffix($a_dir."/".$file, $a_old_suffix, $a_new_suffix);
}
// files
if (@is_file($a_dir."/".$file))
{
// first check for files with trailing dot
if(strrpos($file,'.') == (strlen($file) - 1))
{
rename($a_dir.'/'.$file,substr($a_dir.'/'.$file,0,-1));
$file = substr($file,0,-1);
}
$path_info = pathinfo($a_dir."/".$file);
if (strtolower($path_info["extension"]) ==
strtolower($a_old_suffix))
{
$pos = strrpos($a_dir."/".$file, ".");
$new_name = substr($a_dir."/".$file, 0, $pos).".".$a_new_suffix;
rename($a_dir."/".$file, $new_name);
}
}
}
}
return true;
}

+ Here is the caller graph for this function:

ilUtil::searchGroups (   $a_search_str)

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

References $ilDB, $q, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilMailSearchGUI\showResults().

{
global $ilDB;
$q = "SELECT * ".
"FROM object_data ,object_reference ".
"WHERE (".$ilDB->like("object_data.title", "text", "%".$a_search_str."%")." ".
"OR ".$ilDB->like("object_data.description", "text", "%".$a_search_str."%").") ".
"AND object_data.type = 'grp' ".
"AND object_data.obj_id = object_reference.obj_id ".
"ORDER BY title ";
$res = $ilDB->query($q);
while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
// STORE DATA IN ARRAY WITH KEY obj_id
// SO DUPLICATE ENTRIES ( LINKED OBJECTS ) ARE UNIQUE
$ids[$row->obj_id] = array(
"ref_id" => $row->ref_id,
"title" => $row->title,
"description" => $row->description);
}
return $ids ? $ids : array();
}

+ Here is the caller graph for this function:

ilUtil::secureLink (   $a_str)

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

Referenced by ilExternalFeedItem\setMagpieItem().

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

+ Here is the caller graph for this function:

ilUtil::securePlainString (   $a_str)

Remove unsecure characters from a plain text string.

This function currently returns the string without doing any changes.

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

Referenced by ilMailFormGUI\editAttachments(), ilPDMailGUI\getPDMailHTML(), ilMailFormGUI\saveDraft(), ilMailFormGUI\searchCoursesTo(), ilMailFormGUI\searchGroupsTo(), ilMailFormGUI\searchUsers(), ilMailFormGUI\sendMessage(), and ilMailFormGUI\showForm().

{
if (ini_get("magic_quotes_gpc"))
{
return stripslashes($a_str);
}
else
{
return $a_str;
}
}

+ Here is the caller graph for this function:

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

Remove unsecure tags.

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

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

Referenced by stripSlashes().

{
// check whether all allowed tags can be made secure
$only_secure = true;
$allow_tags = explode(">", $a_allow);
$sec_tags = ilUtil::getSecureTags();
$allow_array = array();
foreach($allow_tags as $allow)
{
if ($allow != "")
{
$allow = str_replace("<", "", $allow);
if (!in_array($allow, $sec_tags))
{
$only_secure = false;
}
$allow_array[] = $allow;
}
}
// default behaviour: allow only secure tags 1:1
if (($only_secure || $a_allow == "") && $a_strip_html)
{
if ($a_allow == "")
{
$allow_array = array ("b", "i", "strong", "em", "code", "cite",
"gap", "sub", "sup", "pre", "strike");
}
// this currently removes parts of strings like "a <= b"
// because "a <= b" is treated like "<spam onclick='hurt()'>ss</spam>"
$a_str = ilUtil::maskSecureTags($a_str, $allow_array);
$a_str = strip_tags($a_str); // strip all other tags
$a_str = ilUtil::unmaskSecureTags($a_str, $allow_array);
// a possible solution could be something like:
// $a_str = str_replace("<", "&lt;", $a_str);
// $a_str = str_replace(">", "&gt;", $a_str);
// $a_str = ilUtil::unmaskSecureTags($a_str, $allow_array);
//
// output would be ok then, but input fields would show
// "a &lt;= b" for input "a <= b" if data is brought back to a form
}
else
{
// only for scripts, that need to allow more/other tags and parameters
if ($a_strip_html)
{
$a_str = ilUtil::stripScriptHTML($a_str, $a_allow);
}
}
return $a_str;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 4524 of file class.ilUtil.php.

References $tpl.

Referenced by ilPDFPresentation\__convert(), ilLPListOfObjectsGUI\__listObjects(), ilLMStatisticsGUI\__search(), ilCourseArchivesGUI\__showArchivesMenu(), ilObjChatGUI\__showInputAreas(), ilLPListOfProgressGUI\__showProgressList(), ilLPListOfSettingsGUI\__showSCOTable(), ilLPListOfObjectsGUI\__showUsersList(), ilPDFPresentation\__toPDF(), ilChatSmilies\_checkSetup(), ilUploadFiles\_copyUploadFile(), ilObjRemoteCourseGUI\_goto(), ilObjectPluginGUI\_goto(), ilLMPageObjectGUI\_goto(), ilGlossaryTermGUI\_goto(), ilObjWikiGUI\_goto(), ilObjFileGUI\_goto(), ilObjFileBasedLMGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilStructureObjectGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjExerciseGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjCategoryGUI\_goto(), ilObjChatGUI\_goto(), ilObjGroupGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjCourseGUI\_goto(), ilObjCategoryGUI\_importCategories(), ilCalendarInboxGUI\acceptShared(), ilStructureObjectGUI\activatePages(), ilObjComponentSettingsGUI\activatePlugin(), ilObjCourseGroupingGUI\add(), ilConditionHandlerInterface\add(), ilObjCourseGUI\addAsMemberObject(), ilObjGlossaryGUI\addDefinition(), ilObjExerciseGUI\addMembersObject(), ilPermissionGUI\addRole(), ilLDAPSettingsGUI\addRoleAssignment(), ilAuthShibbolethSettingsGUI\addRoleAssignmentRule(), ilObjCourseGUI\addStarterObject(), ilObjGlossaryGUI\addTerm(), ilObjDlBookGUI\addTranslation(), ilObjRoleGUI\addUserObject(), ilObjGroupGUI\addUserObject(), ilObjPaymentSettingsGUI\addUserObject(), ilObjPaymentSettingsGUI\addVendorObject(), ilObjChatGUI\adminRoomsObject(), ilObjRoleTemplateGUI\adoptPermSaveObject(), ilObjRoleGUI\adoptPermSaveObject(), ilObjUserFolderGUI\appliedUsersObject(), ilCalendarCategoryGUI\askDeleteAppointments(), ilObjRoleGUI\askDeleteDesktopItemObject(), ilObjCourseGroupingGUI\askDeleteGrouping(), ilCourseObjectivesGUI\askDeleteObjective(), ilObjChatGUI\askDeleteRecordingsObject(), ilLPListOfSettingsGUI\assign(), ilConditionHandlerInterface\assign(), ilPageEditorGUI\assignCharacteristicForm(), ilObjCourseGroupingGUI\assignCourse(), ilObjRoleGUI\assignDesktopItemObject(), ilObjGroupGUI\assignFromWaitingListObject(), ilObjCourseGUI\assignFromWaitingListObject(), ilObjCourseGUI\assignMembersObject(), ilObjCategoryGUI\assignRolesObject(), ilObjCategoryGUI\assignSaveObject(), ilObjUserGUI\assignSaveObject(), ilObjGroupGUI\assignSubscribersObject(), ilObjCourseGUI\assignSubscribersObject(), ilObjRoleGUI\assignUserObject(), ilObjCourseGUI\autoFillObject(), ilObjChatGUI\blockUserObject(), ilObjRemoteCourseGUI\callObject(), ilCertificateGUI\certificateEditor(), ilPDNewsBlockGUI\changeFeedSettings(), ilPermissionGUI\changeOwner(), ilSurveyEvaluationGUI\checkEvaluationAccess(), ilObjPaymentSettingsGUI\checkForERPerror(), ilPropertyFormGUI\checkInput(), ilTestOutputGUI\checkPassword(), ilObjectGUI\checkPermission(), assMatchingQuestion\checkSaveData(), ilObjectGUI\cloneAllObject(), ilContainerGUI\cloneAllObject(), ilContainerGUI\cloneWizardPageObject(), ilObjUserFolderGUI\confirmaccessRestrictObject(), ilCalendarCategoryGUI\confirmDelete(), ilCourseUserFieldsGUI\confirmDelete(), ilCourseArchivesGUI\confirmDeleteArchives(), ilMemberExportGUI\confirmDeleteExportFile(), ilObjTestGUI\confirmDeleteExportFileObject(), ilObjGroupGUI\confirmDeleteExportFileObject(), ilObjSurveyGUI\confirmDeleteExportFileObject(), ilAdvancedMDSettingsGUI\confirmDeleteFields(), ilAdvancedMDSettingsGUI\confirmDeleteFiles(), ilObjSessionGUI\confirmDeleteFilesObject(), ilObjCourseGUI\confirmDeleteInfoFilesObject(), ilObjLinkResourceGUI\confirmDeleteLinkObject(), ilObjGroupGUI\confirmDeleteMembersObject(), ilObjUserFolderGUI\confirmdeleteObject(), ilAdvancedMDSettingsGUI\confirmDeleteRecords(), ilLDAPSettingsGUI\confirmDeleteRules(), ilAuthShibbolethSettingsGUI\confirmDeleteRules(), ilNewsItemGUI\confirmDeletionNewsItems(), ilObjMediaPoolGUI\confirmRemove(), ilObjSurveyGUI\constraintsAddObject(), ilObjectCopyGUI\copyContainer(), ilStructureObjectGUI\copyItems(), ilObjContentObjectGUI\copyItems(), ilContainerGUI\copyObject(), ilMediaItem\copyOriginal(), ilObjectCopyGUI\copySingleObject(), ilObjMediaPoolGUI\copyToClipboard(), ilBookmarkAdministrationGUI\createBookmark(), ilBookmarkAdministrationGUI\createBookmarkFolder(), ilFileSystemGUI\createDirectory(), ilPCFileListGUI\createFileItem(), ilObjSurveyGUI\createSurveyCodesObject(), ilStructureObjectGUI\cutItems(), ilObjContentObjectGUI\cutItems(), ilObjLinkResourceGUI\deactivateLinkObject(), ilObjComponentSettingsGUI\deactivatePlugin(), ilLPListOfSettingsGUI\deassign(), ilObjExerciseGUI\deassignMembersObject(), ilCalendarInboxGUI\declineShared(), ilCourseArchivesGUI\delete(), ilConditionHandlerInterface\delete(), ilCalendarCategoryGUI\delete(), ilCourseUserFieldsGUI\delete(), ilCalendarCategoryGUI\deleteAppointments(), ilPCImageMapEditorGUI\deleteAreas(), ilImageMapEditorGUI\deleteAreas(), ilRegistrationSettingsGUI\deleteAssignment(), ilObjExerciseGUI\deleteDeliveredObject(), ilObjRoleGUI\deleteDesktopItemsObject(), ilCourseUserFieldsGUI\deleteField(), ilAdvancedMDSettingsGUI\deleteFields(), ilAdvancedMDSettingsGUI\deleteFiles(), ilObjSessionGUI\deleteFilesObject(), ilObjCourseGroupingGUI\deleteGrouping(), ilObjCourseGUI\deleteInfoFilesObject(), SurveyQuestionGUI\deleteMaterial(), ilObjGroupGUI\deleteMembersObject(), ilObjCourseGUI\deleteMembersObject(), ilPaymentObjectGUI\deleteObject(), ilCourseObjectivesGUI\deleteObjectives(), ilRepUtilGUI\deleteObjects(), ilObjLinkResourceGUI\deleteParameterFormObject(), ilObjLinkResourceGUI\deleteParameterObject(), ilObjSurveyQuestionPoolGUI\deleteQuestionsObject(), ilObjChatGUI\deleteRecordingsObject(), ilAdvancedMDSettingsGUI\deleteRecords(), ilLDAPSettingsGUI\deleteRoleMapping(), ilObjChatGUI\deleteRoomObject(), ilLDAPSettingsGUI\deleteRules(), ilAuthShibbolethSettingsGUI\deleteRules(), ilObjCourseGUI\deleteSubscribers(), ilObjDlBookGUI\deleteTranslation(), ilObjCategoryGUI\deleteUserObject(), ilObjPaymentSettingsGUI\deleteVendors(), ilObjExerciseGUI\deliverFileObject(), ilObjMediaCastGUI\determinePlaytimeObject(), ilSetupGUI\displayLanguages(), ilCourseArchivesGUI\downloadArchives(), ilObjCourseGUI\downloadArchivesObject(), ilMemberExportGUI\downloadExportFile(), ilObjGroupGUI\downloadExportFileObject(), ilObjSurveyGUI\downloadExportFileObject(), ilAdvancedMDSettingsGUI\downloadFile(), ilObjExerciseGUI\downloadFileObject(), ilObjMediaCastGUI\downloadItemObject(), ilObjSystemFolderGUI\downloadJavaServerIniObject(), ilObjExerciseGUI\downloadObject(), ilCalendarCategoryGUI\edit(), ilConditionHandlerInterface\edit(), ilObjCourseGroupingGUI\edit(), ilCourseObjectivesGUI\edit(), ilPageObjectGUI\edit(), ilObjUserFolderGUI\editAppliedUsersObject(), ilCourseUserFieldsGUI\editField(), ilObjLinkResourceGUI\editLinkObject(), ilObjGroupGUI\editMembersObject(), ilObjCourseGUI\editMembersObject(), assMatchingQuestionGUI\editQuestion(), ilLDAPSettingsGUI\editRoleAssignment(), ilSurveyEvaluationGUI\evaluation(), ilSurveyEvaluationGUI\evaluationuser(), ilRadiusSettingsGUI\executeCommand(), ilAuthShibbolethSettingsGUI\executeCommand(), ilLDAPSettingsGUI\executeCommand(), ilObjChatServerGUI\executeCommand(), ilCourseItemAdministrationGUI\executeCommand(), ilPersonalDesktopGUI\executeCommand(), ilCalendarPresentationGUI\executeCommand(), ilPageObjectGUI\executeCommand(), ilObjSurveyGUI\executeCreateQuestionObject(), ilObjSurveyGUI\exportCodesObject(), ilObjChatGUI\exportObject(), ilObjChatGUI\exportRecordingObject(), ilAdvancedMDSettingsGUI\exportRecords(), ilGroupRegistrationGUI\fillMaxMembers(), ilCourseRegistrationGUI\fillMaxMembers(), ilGroupRegistrationGUI\fillRegistrationPeriod(), ilCourseRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationType(), ilCourseRegistrationGUI\fillRegistrationType(), ilCourseObjectivesGUI\finalTestAssignment(), ilCourseObjectivesGUI\finalTestLimits(), ilShopShoppingCartGUI\finishEPay(), ilShopShoppingCartGUI\finishPaypal(), ilCtrl\getCallStructure(), ilLPFilterGUI\hideSelected(), ilObjectStatusGUI\ilObjectStatusGUI(), ilBookmarkAdministrationGUI\importFile(), ilObjGroupGUI\importFileObject(), ilAdvancedMDSettingsGUI\importRecord(), ilSetupGUI\initClientDbForm(), ilObjSystemFolderGUI\initServerInfoForm(), ilObjTestGUI\insertQuestionsAfterObject(), ilObjTestGUI\insertQuestionsBeforeObject(), ilSetupGUI\installDatabase(), ilObjSurveyGUI\inviteObject(), ilObjChatGUI\invitePDObject(), ilObjSurveyGUI\inviteUserGroupObject(), ilRegistrationGUI\join(), ilPersonalDesktopGUI\jumpToBookmarks(), ilPersonalDesktopGUI\jumpToNotes(), ilObjCourseGUI\leaveObject(), ilRepositorySearchGUI\listUsers(), ilLMStatisticsGUI\listUsersGroup(), ilObjRoleGUI\listUsersGroupObject(), ilLMStatisticsGUI\listUsersRole(), ilObjRoleGUI\listUsersRoleObject(), ilMailingListsGUI\mailToList(), ilObjLanguageExtGUI\maintainObject(), ilCourseObjectivesGUI\materialAssignment(), ilObjSessionGUI\materialsObject(), ilObjSessionGUI\membersObject(), moveUploadedFile(), ilSurveyExecutionGUI\navigate(), ilPCFileItemGUI\newFileItem(), ilObjSurveyQuestionPool\pasteFromClipboard(), ilObjPaymentSettingsGUI\performEditVendorObject(), ilObjForumGUI\performImportObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObjCourseGUI\performRemoveFromWaitingListObject(), ilRepositorySearchGUI\performSearch(), ilObjWikiGUI\performSearchObject(), ilObjPaymentSettingsGUI\performSearchSPObject(), ilObjRoleTemplateGUI\permObject(), ilObjSessionGUI\printAttendanceListObject(), ilObjSessionGUI\printViewMembersObject(), ilStartUpGUI\processStartingPage(), ilObjExercise\processUploadedFile(), ilObjSurveyGUI\propertiesObject(), ilObjSurveyGUI\questionsObject(), ilObjExerciseGUI\redirectFeedbackMailObject(), ilObjComponentSettingsGUI\refreshLanguages(), ilObjContentObjectGUI\refreshLinkCheck(), ilObjLinkResourceGUI\refreshLinkCheckObject(), ilObjChatGUI\refreshRoomObject(), ilObjGroupGUI\refuseFromListObject(), ilObjCourseGUI\refuseFromListObject(), ilObjGroupGUI\refuseSubscribersObject(), ilObjCourseGUI\refuseSubscribersObject(), ilObjCourseGUI\removeFromWaitingList(), ilObjCourseGUI\removeMembersObject(), ilRepUtilGUI\removeObjectsFromSystem(), ilObjChatGUI\renameObject(), ilRepUtilGUI\restoreObjects(), ilCalendarUserSettingsGUI\save(), ilCalendarCategoryGUI\save(), ilCourseAgreementGUI\save(), ilRadiusSettingsGUI\save(), ilRegistrationSettingsGUI\save(), ilObjCalendarSettingsGUI\save(), ilCalendarAppointmentGUI\save(), ilFeedbackGUI\save(), ilCourseObjectivesGUI\save(), ilLDAPSettingsGUI\save(), ilObjPrivacySecurityGUI\save_privacy(), ilObjPrivacySecurityGUI\save_security(), ilObjLinkResourceGUI\saveAddLinkObject(), ilRegistrationSettingsGUI\saveAssignment(), ilSetupGUI\saveBasicSettings(), ilObjPaymentSettingsGUI\saveBmfSettingsObject(), ilObjMediaCastGUI\saveCastItemObject(), ilSetupGUI\saveClientIni(), ilObjPaymentSettingsGUI\saveEPaySettingsObject(), ilCourseUserFieldsGUI\saveField(), ilAdvancedMDSettingsGUI\saveField(), ilObjUserFolderGUI\saveFieldObject(), ilAccountRegistrationGUI\saveForm(), ilObjPaymentSettingsGUI\saveGeneralSettingsObject(), ilObjUserFolderGUI\saveGlobalUserSettingsObject(), ilObjSystemFolderGUI\saveHeaderTitlesObject(), ilObjSurveyGUI\saveHeadingObject(), ilObjExternalToolsSettingsGUI\savejsMathObject(), ilSetupGUI\saveLanguages(), ilObjUserFolderGUI\saveLoginnameSettingsObject(), ilObjSearchSettingsGUI\saveLuceneSettingsObject(), ilObjContentObjectGUI\saveMenuEntry(), ilContainerReferenceGUI\saveObject(), ilObjSurveyQuestionPoolGUI\saveObject(), ilObjSurveyGUI\saveObject(), ilObjLinkResourceGUI\saveObject(), ilObjTestGUI\saveObject(), ilObjGroupGUI\saveObject(), ilObjCategoryGUI\saveObject(), ilObjSessionGUI\saveObject(), ilObjQuestionPoolGUI\saveObject(), ilObjRoleGUI\saveObject(), ilObjCourseGUI\saveObject(), ilObjPaymentSettingsGUI\savePaypalSettingsObject(), ilPersonalProfileGUI\savePersonalData(), SurveySingleChoiceQuestionGUI\savePhraseanswers(), SurveyMatrixQuestionGUI\savePhrasecolumns(), ilPersonalProfileGUI\saveProfile(), ilCourseObjectivesGUI\saveQuestionOverview(), ilAdvancedMDSettingsGUI\saveRecord(), ilSetupGUI\saveRegistration(), ilRegistrationSettingsGUI\saveRoleAccessLimitations(), ilLDAPSettingsGUI\saveRoleMapping(), ilLDAPSettingsGUI\saveRoleSelection(), ilObjPersonalDesktopSettingsGUI\saveSettings(), ilObjUserTrackingGUI\saveSettingsObject(), ilObjLinkResourceGUI\saveSettingsObject(), ilObjSystemFolderGUI\saveSettingsObject(), ilObjectCopyGUI\saveSource(), ilObjectCopyGUI\saveTarget(), ilShopTopicsGUI\saveTopic(), ilObjFileGUI\saveUnzipObject(), ilSurveyExecutionGUI\saveUserInput(), ilLMStatisticsGUI\search(), ilObjRoleGUI\searchObject(), ilObjectCopyGUI\searchSource(), ilObjCourseGroupingGUI\selectCourse(), ilObjRoleGUI\selectDesktopItemObject(), ilCourseObjectivesGUI\selfAssessmentAssignment(), ilCourseObjectivesGUI\selfAssessmentLimits(), ilCourseAgreementGUI\sendInfoMessage(), ilObjCourseGUI\sendMailToSelectedUsersObject(), ilObjGroupGUI\sendMailToSelectedUsersObject(), ilObjExerciseGUI\sendMembersObject(), ilObjAuthSettingsGUI\setAuthModeObject(), ilTestScoringGUI\setFeedbackManual(), ilImageMapEditorGUI\setLink(), ilTestScoringGUI\setPointsManual(), ilLMPresentationGUI\setSessionVars(), ilImageMapEditorGUI\setShape(), ilCalendarCategoryGUI\shareAssign(), ilCalendarCategoryGUI\shareAssignRoles(), ilCalendarCategoryGUI\shareDeassign(), ilCalendarCategoryGUI\sharePerformSearch(), ilCalendarCategoryGUI\shareSearch(), ilRepUtilGUI\showDeleteConfirmation(), ilObjectCopyGUI\showItemSelection(), ilPageObjectGUI\showPage(), ilLMPresentationGUI\showPrintView(), ilObjChatGUI\showUserFrameObject(), ilCourseContentGUI\showUserTimings(), ilSurveyExecutionGUI\start(), ilObjPaymentSettingsGUI\testERPSettingsObject(), ilObjChatGUI\unblockUsersObject(), ilCalendarCategoryGUI\update(), ilCourseItemAdministrationGUI\update(), ilObjCourseGroupingGUI\update(), ilCalendarAppointmentGUI\update(), ilObjUserFolderGUI\updateAppliedUsersObject(), ilSetupGUI\updateBasicSettings(), ilBookmarkAdministrationGUI\updateBookmark(), ilBookmarkAdministrationGUI\updateBookmarkFolder(), ilConditionHandlerInterface\updateCondition(), ilObjCourseGUI\updateECSExportSettings(), ilCourseUserFieldsGUI\updateField(), ilAdvancedMDSettingsGUI\updateField(), ilAdvancedMDSettingsGUI\updateFields(), ilObjUserFolderGUI\updateFieldsObject(), ilCourseObjectivesGUI\updateFinalTestAssignment(), ilCourseObjectivesGUI\updateFinalTestLimits(), ilMDEditorGUI\updateGeneral(), ilLPFilterGUI\updateHidden(), ilObjCourseGUI\updateInfoObject(), ilObjLinkResourceGUI\updateLinkObject(), ilObjLinkResourceGUI\updateLinksObject(), ilCourseObjectivesGUI\updateMaterialAssignment(), ilObjSessionGUI\updateMembersObject(), ilObjGroupGUI\updateMembersObject(), ilObjCourseGUI\updateMembersObject(), ilContainerReferenceGUI\updateObject(), ilObjGroupGUI\updateObject(), ilObjChatServerGUI\updateObject(), ilObjSessionGUI\updateObject(), ilObjRoleGUI\updateObject(), ilObjCategoryGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjUserGUI\updateObject(), ilObjUserGUI\updateObjectOld(), ilObjComponentSettingsGUI\updatePlugin(), ilMDEditorGUI\updateQuickEdit(), ilAdvancedMDSettingsGUI\updateRecord(), ilLDAPSettingsGUI\updateRoleAssignment(), ilAuthShibbolethSettingsGUI\updateRoleAssignmentRule(), ilRegistrationSettingsGUI\updateRoles(), ilObjUserFolderGUI\updateSelectFieldObject(), ilCourseObjectivesGUI\updateSelfAssessmentAssignment(), ilCourseObjectivesGUI\updateSelfAssessmentLimits(), ilCourseContentGUI\updateTimings(), ilCourseContentGUI\updateUserTimings(), ilFileSystemGUI\uploadFile(), ilObjExerciseGUI\uploadFileObject(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjTestGUI\uploadTstObject(), ilPersonalProfileGUI\uploadUserPicture(), ilObjUserGUI\uploadUserPictureObject(), ilObjExerciseGUI\uploadZipObject(), ilObjLanguageExtGUI\viewObject(), and ilObjChatGUI\viewObject().

{
global $tpl;
$tpl->setMessage("failure", $a_info, $a_keep);
}

+ Here is the caller graph for this function:

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 4512 of file class.ilUtil.php.

References $tpl.

Referenced by ilLPListOfSettingsGUI\__addInfo(), ilPaymentBaseGUI\__buildLocator(), ilPaymentPurchaseGUI\__buildLocator(), ilShopPurchaseGUI\__buildLocator(), ilPurchaseBillGUI\__buildLocator(), ilPurchaseBMFGUI\__buildLocator(), ilChatController\__construct(), ilPaymentBillAdminGUI\__initBillVendorData(), ilRepositorySearchGUI\__performCourseSearch(), ilRepositorySearchGUI\__performGroupSearch(), ilAdminUserSearchGUI\__performGroupSearch(), ilRepositorySearchGUI\__performRoleSearch(), ilAdminUserSearchGUI\__performRoleSearch(), ilRepositorySearchGUI\__performUserSearch(), ilAdminUserSearchGUI\__performUserSearch(), ilObjLinkResourceGUI\__prepareOutput(), ilObjChatGUI\__prepareOutput(), ilObjRoleGUI\__prepareOutput(), ilObjiLincCourseGUI\__search(), ilPaymentTrusteeGUI\__search(), ilPaymentStatisticGUI\__search(), ilObjRoleGUI\__search(), ilObjPaymentSettingsGUI\__search(), ilUserFilter\__searchObjects(), ilObjPaymentSettingsGUI\__searchSP(), ilObjChatGUI\__showInputAreas(), ilPurchaseBillGUI\__showShoppingCart(), ilPurchaseBMFGUI\__showShoppingCart(), ilChatSmilies\_checkSetup(), ilUploadFiles\_copyUploadFile(), ilObjSAHSLearningModuleGUI\_goto(), ilObjForumGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjTestGUI\_goto(), ilObjStyleSettingsGUI\activateObject(), ilMailFolderGUI\add(), ilObjFileBasedLMGUI\addBibItemObject(), ilObjContentObjectGUI\addBibItemObject(), ilECSSettingsGUI\addCategoryMapping(), ilPaymentStatisticGUI\addCustomer(), ilObjPaymentSettingsGUI\addCustomerObject(), ilObjTestGUI\addDefaultsObject(), SurveyQuestionGUI\addMaterial(), ilForumModeratorsGUI\addModerator(), ilPaymentObjectGUI\addObject(), ilObjTestGUI\addParticipantsObject(), ilPaymentObjectGUI\addPrice(), ilObjPaymentSettingsGUI\addPriceObject(), SurveySingleChoiceQuestionGUI\addSelectedPhrase(), SurveyMatrixQuestionGUI\addSelectedPhrase(), ilObjSurveyAdministrationGUI\addSpecialUserObject(), assTextQuestionGUI\addSuggestedSolution(), ilPaymentPurchaseGUI\addToShoppingCart(), ilShopPurchaseGUI\addToShoppingCart(), ilPaymentTrusteeGUI\addTrustee(), ilPaymentTrusteeGUI\addUser(), ilObjiLincCourseGUI\addUserObject(), ilObjPaymentSettingsGUI\addUserObject(), ilObjChatGUI\adminRoomsObject(), ilMailSearchGroupsGUI\adoptMembers(), ilMailSearchCoursesGUI\adoptMembers(), ilObjTestGUI\applyDefaultsObject(), ilSetupGUI\applyHotfix(), assImagemapQuestionGUI\areaEditor(), ilObjQuestionPoolGUI\assessmentObject(), assImagemapQuestionGUI\back(), ilObjChatGUI\blockUserObject(), ilObjiLincUserGUI\cancel(), ilObjiLincClassroomGUI\cancel(), ilObjSCORMLearningModuleGUI\cancel(), ilAdminUserSearchGUI\cancel(), ilObjStyleSheetGUI\cancelCharacteristicDeletionObject(), ilObjSurveyGUI\cancelDefineQuestionblockObject(), ilObjSCORMLearningModuleGUI\cancelDelete(), ilAdminUserSearchGUI\cancelDelete(), ilObjiLincClassroomGUI\cancelDeleteClassroom(), ilObjTestGUI\cancelDeleteExportFileObject(), ilObjSurveyGUI\cancelDeleteExportFileObject(), ilObjStyleSettingsGUI\cancelDeleteObject(), ilObjStyleSettingsGUI\cancelDeletePgObject(), ilObjSurveyGUI\cancelDeleteSelectedUserDataObject(), ilObjSCORM2004LearningModuleGUI\cancelDeleteTracking(), ilObjiLincCourseGUI\canceledObject(), ilShopShoppingCartGUI\cancelEPay(), SurveyQuestionGUI\cancelExplorer(), ilObjiLincCourseGUI\cancelMemberObject(), ilObjSearchSettingsGUI\cancelObject(), ilObjForumGUI\cancelObject(), ilObjStyleSheetGUI\cancelObject(), ilPaymentShoppingCartGUI\cancelPaypal(), ilShopShoppingCartGUI\cancelPaypal(), SurveySingleChoiceQuestionGUI\cancelSavePhrase(), SurveyMatrixQuestionGUI\cancelSavePhrase(), SurveySingleChoiceQuestionGUI\cancelStandardNumbers(), SurveyMatrixQuestionGUI\cancelStandardNumbers(), SurveyQuestionGUI\cancelSync(), SurveySingleChoiceQuestionGUI\cancelViewPhrase(), SurveyMatrixQuestionGUI\cancelViewPhrase(), ilSetupGUI\changeAccessMode(), ilSetupGUI\changeDefaultClient(), ilMailFolderGUI\changeFolder(), ilSetupGUI\changeMasterPassword(), ilObjPaymentSettingsGUI\checkForERPerror(), ilMailAddressbookGUI\checkInput(), ilObjCourseGUI\checkLicenses(), ilTestOutputGUI\checkOnlineTestAccess(), assOrderingQuestion\checkSaveData(), assFileUpload\checkUpload(), ilLuceneSearchGUI\chooseRoot(), ilContainerGUI\cloneAllObject(), ilObjForumGUI\cloneWizardPageObject(), ilObjChatGUI\closeFrame(), ilObjSurveyGUI\codesObject(), ilECSSettingsGUI\communities(), ilMailingListsGUI\confirmDelete(), ilMailAddressbookGUI\confirmDelete(), ilShopNewsGUI\confirmDelete(), ilMailAttachmentGUI\confirmDeleteAttachments(), ilObjMDSettingsGUI\confirmDeleteEntries(), ilSCORM2004ScoGUI\confirmDeleteExportFile(), ilObjSCORM2004LearningModuleGUI\confirmDeleteExportFile(), ilObjSurveyQuestionPoolGUI\confirmDeleteExportFileObject(), ilObjQuestionPoolGUI\confirmDeleteExportFileObject(), ilMailFolderGUI\confirmDeleteFolder(), ilMailFolderGUI\confirmDeleteMails(), ilMailingListsGUI\confirmDeleteMembers(), ilObjForumGUI\confirmDeleteThreads(), ilShopTopicsGUI\confirmDeleteTopic(), ilObjPaymentSettingsGUI\confirmDeleteVatObject(), ilObjSCORM2004LearningModuleGUI\confirmedDelete(), ilObjiLincClassroomGUI\confirmedDeleteClassroom(), ilObjiLincCourseGUI\confirmedRemoveMemberObject(), ilObjForumGUI\confirmMoveThreadsObject(), SurveySingleChoiceQuestionGUI\confirmSavePhrase(), SurveyMatrixQuestionGUI\confirmSavePhrase(), ilPCTabsGUI\confirmTabsDeletion(), ilObjSurveyGUI\constraintsObject(), ilObjSurveyGUI\constraintStep1Object(), ilObjContentObjectGUI\copyChapter(), ilObjectCopyGUI\copyContainer(), ilStructureObjectGUI\copyItems(), ilSCORM2004NodeGUI\copyItems(), ilObjSCORM2004LearningModuleGUI\copyItems(), ilObjContentObjectGUI\copyItems(), ilObjSurveyQuestionPoolGUI\copyObject(), ilObjQuestionPoolGUI\copyObject(), ilContainerGUI\copyObject(), ilStructureObjectGUI\copyPage(), ilObjContentObjectGUI\copyPage(), ilBookmarkAdministrationGUI\createBookmark(), ilObjSurveyGUI\createConstraintsObject(), ilPDFPresentation\createDetails(), ilObjSurveyQuestionPoolGUI\createExportFileObject(), ilObjQuestionPoolGUI\createExportFileObject(), ilPDFPresentation\createList(), ilObjTestGUI\createTestExportObject(), ilObjTestGUI\createTestResultsExportObject(), ilStructureObjectGUI\cutItems(), ilSCORM2004NodeGUI\cutItems(), ilObjSCORM2004LearningModuleGUI\cutItems(), ilObjContentObjectGUI\cutItems(), ilContainerGUI\cutObject(), ilStructureObjectGUI\cutPage(), ilObjSCORM2004LearningModuleGUI\decreaseAttempts(), ilObjSCORMLearningModuleGUI\decreaseAttempts(), ilObjTestGUI\defaultsObject(), ilObjSurveyGUI\defineQuestionblock(), ilObjSurveyGUI\defineQuestionblockObject(), ilObjPaymentSettingsGUI\delERPpreviewObject(), ilMailAttachmentGUI\deleteAttachments(), ilECSSettingsGUI\deleteCategoryMappings(), ilObjStyleSheetGUI\deleteCharacteristicConfirmationObject(), ilPaymentCouponGUI\deleteCodes(), ilObjSurveyGUI\deleteCodesObject(), ilObjStyleSheetGUI\deleteColorConfirmationObject(), ilObjUserTrackingGUI\deleteDataObject(), ilObjMDSettingsGUI\deleteEntries(), ilMailFolderGUI\deleteFolder(), ilPaymentShoppingCartGUI\deleteItem(), ilShopShoppingCartGUI\deleteItem(), ilObjAssessmentFolderGUI\deleteLogObject(), ilPDMailBlockGUI\deleteMail(), ilObjTestGUI\deleteMarkStepsObject(), ilObjChatServerGUI\deleteMultipleObject(), ilPaymentObjectGUI\deleteObject(), ilObjStyleSheetGUI\deleteObject(), ilObjPaymentSettingsGUI\deleteObjectObject(), ilObjStyleSettingsGUI\deletePglObject(), ilSurveyPhrasesGUI\deletePhrase(), ilPaymentObjectGUI\deletePrice(), ilObjPaymentSettingsGUI\deletePriceObject(), ilObjSurveyQuestionPoolGUI\deleteQuestionsObject(), ilObjQuestionPoolGUI\deleteQuestionsObject(), ilObjChatGUI\deleteRoomObject(), ilObjSurveyGUI\deleteSingleUserResultsObject(), ilObjTestGUI\deleteSingleUserResultsObject(), ilPaymentStatisticGUI\deleteStatistic(), ilObjPaymentSettingsGUI\deleteStatisticObject(), ilObjStyleSheetFolderGUI\deleteStyleObject(), ilObjStyleSettingsGUI\deleteStyleObject(), ilObjStyleSheetGUI\deleteTemplateConfirmationObject(), ilObjSCORMLearningModuleGUI\deleteTrackingForUser(), ilObjSCORM2004LearningModuleGUI\deleteTrackingForUser(), ilPaymentTrusteeGUI\deleteTrustee(), ilObjPaymentSettingsGUI\deleteVendors(), ilMailFolderGUI\deliverFile(), ilObjExerciseGUI\deliverObject(), ilForumModeratorsGUI\detachModeratorRole(), ilTestEvaluationGUI\detailedEvaluation(), ilSetupGUI\displayClientList(), ilSetupGUI\displayDeleteConfirmation(), ilBookmarkAdministrationGUI\displayHeader(), ilObjUserFolderGUI\displayList(), ilSetupGUI\displayTools(), ilObjTestGUI\downloadExportFileObject(), ilObjSurveyQuestionPoolGUI\downloadExportFileObject(), ilObjQuestionPoolGUI\downloadExportFileObject(), ilObjFolder\downloadFolder(), ilObjUserFolderGUI\editAppliedUsersObject(), ilECSSettingsGUI\editCategoryMapping(), ilPaymentObjectGUI\editDetails(), ilMailFolderGUI\editFolder(), ilObjPaymentSettingsGUI\editObjectObject(), ilPaymentObjectGUI\editPayMethod(), ilPaymentObjectGUI\editPrices(), ilObjPaymentSettingsGUI\editPricesObject(), ilPaymentStatisticGUI\editStatistic(), ilObjPaymentSettingsGUI\editStatisticObject(), ilObjPaymentSettingsGUI\editVendor(), ilObjForumGUI\enableForumNotificationObject(), ilTestOutputGUI\endingTimeReached(), ilTestEvaluationGUI\eval_a(), ilTestEvaluationGUI\evalSettings(), ilSurveyEvaluationGUI\evaluationuser(), ilChatPresentationGUI\executeCommand(), ilPersonalProfileGUI\executeCommand(), ilMailGUI\executeCommand(), ilQuestionEditGUI\executeCommand(), ilObjTestGUI\executeCreateQuestionObject(), ilObjTestGUI\exportObject(), ilObjSurveyQuestionPoolGUI\exportQuestionObject(), ilObjQuestionPoolGUI\exportQuestionObject(), ilObjChatGUI\exportRoomObject(), ilObjSCORM2004LearningModuleGUI\exportSelected(), ilObjSCORMLearningModuleGUI\exportSelected(), ilPaymentShoppingCartGUI\finishPaypal(), ilPaymentObjectGUI\forwardToPageObject(), ilObjPaymentSettingsGUI\forwardToPageObject(), ilPurchaseBillGUI\getBill(), ilPurchaseBMFGUI\getCreditCard(), ilPurchaseBMFGUI\getDebitEntry(), ilPurchaseBMFGUI\getPaymentType(), ilPurchaseBillGUI\getPersonalData(), ilPurchaseBMFGUI\getPersonalData(), ilImagemapPreview\getPreviewFilename(), ilObjiLincCourse\getSubItems(), ilObjSurveyGUI\handleWriteAccess(), ilObjectStatusGUI\ilObjectStatusGUI(), ilObjSCORMLearningModuleGUI\import(), ilPaymentCouponGUI\importCodes(), ilObjTestGUI\importFileObject(), ilObjSurveyQuestionPoolGUI\importFileObject(), ilObjQuestionPoolGUI\importFileObject(), ilObjSurveyGUI\importFileObject(), ilObjUserFolderGUI\importUsersObject(), ilObjSessionGUI\infoScreen(), ilObjSurveyGUI\infoScreen(), ilObjTestGUI\infoScreen(), ilSetupGUI\initClientDbForm(), ilObjLinkResourceGUI\initFormLink(), ilObjMediaPoolGUI\insertFromClipboard(), ilObjSurveyGUI\insertQuestionblocksObject(), ilObjSurveyGUI\insertQuestions(), ilObjSurveyGUI\insertQuestionsObject(), ilObjTestGUI\insertQuestionsObject(), ilObjTestGUI\insertRandomSelectionObject(), SurveySingleChoiceQuestionGUI\insertStandardNumbers(), SurveyMatrixQuestionGUI\insertStandardNumbers(), ilObjSurveyGUI\inviteObject(), ilObjTestGUI\inviteParticipantsObject(), ilMailAddressbookGUI\inviteToChat(), ilObjiLincCourseGUI\joinObject(), ilSetupGUI\jumpToFirstUnfinishedSetupStep(), ilContainerGUI\linkObject(), ilObjRoleGUI\listDesktopItemsObject(), ilObjCourseGUI\listStructureObject(), ilAdminUserSearchGUI\listUsersGroup(), ilObjiLincCourseGUI\listUsersGroupObject(), ilObjCategoryGUI\listUsersObject(), ilAdminUserSearchGUI\listUsersRole(), ilObjiLincCourseGUI\listUsersRoleObject(), ilContainerGUI\lockObject(), ilObjAssessmentFolderGUI\logsObject(), ilMailSearchCoursesGUI\mail(), ilMailSearchGroupsGUI\mail(), ilMailingListsGUI\mailToList(), ilMailAddressbookGUI\mailToUsers(), ilTestScoringGUI\manscoring(), ilECSSettingsGUI\mappings(), ilObjForumGUI\markAllReadObject(), ilObjTestGUI\marksObject(), ilObjContentObjectGUI\moveChapter(), ilObjSurveyQuestionPoolGUI\moveObject(), ilObjQuestionPoolGUI\moveObject(), ilObjSurveyGUI\moveQuestionsObject(), ilObjForumGUI\moveThreadsObject(), moveUploadedFile(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilObjPaymentSettingsGUI\objectsObject(), ilObjLanguageFolderGUI\out(), SurveyQuestionGUI\outErrorMessages(), ilTestEvaluationGUI\outEvaluation(), assQuestionGUI\outSolutionExplorer(), ilSurveyExecutionGUI\outSurveyPage(), ilTestOutputGUI\outTestPage(), ilObjTestGUI\participantsObject(), ilObjSurveyQuestionPoolGUI\pasteObject(), ilObjQuestionPoolGUI\pasteObject(), ilPaymentObjectGUI\performAddPrice(), ilObjPaymentSettingsGUI\performAddPriceObject(), ilAdvancedSearchGUI\performAdvMDSearch(), ilMailingListsGUI\performDelete(), ilMailAddressbookGUI\performDelete(), ilShopNewsGUI\performDelete(), ilPaymentObjectGUI\performDelete(), ilPaymentStatisticGUI\performDelete(), ilPaymentCouponGUI\performDeleteCodes(), ilMailFolderGUI\performDeleteFolder(), ilMailingListsGUI\performDeleteMembers(), ilObjPaymentSettingsGUI\performDeleteObject(), ilPaymentObjectGUI\performDeletePrice(), ilObjPaymentSettingsGUI\performDeletePriceObject(), ilObjForumGUI\performDeleteThreadsObject(), ilShopTopicsGUI\performDeleteTopic(), ilPaymentTrusteeGUI\performDeleteTrustee(), ilObjPaymentSettingsGUI\performDeleteVatObject(), ilObjPaymentSettingsGUI\performDeleteVendorsObject(), ilObjPaymentSettingsGUI\performEditVendorObject(), ilMailFolderGUI\performEmptyTrash(), ilObjMailGUI\performImportObject(), ilObjForumGUI\performMoveThreadsObject(), ilObjPaymentSettingsGUI\performObjectDeleteObject(), ilObjForumGUI\performPostActivationObject(), ilObjForumGUI\performPostAndChildPostsActivationObject(), ilShopAdvancedSearchGUI\performSearch(), ilAdvancedSearchGUI\performSearch(), ilLuceneAdvancedSearchGUI\performSearch(), ilShopGUI\performSearch(), ilRepositorySearchGUI\performSearch(), ilPaymentTrusteeGUI\performSearch(), ilLuceneSearchGUI\performSearch(), ilAdminUserSearchGUI\performSearch(), ilSearchGUI\performSearch(), ilPaymentStatisticGUI\performSearch(), ilAdminUserSearchGUI\performSearchSimple(), ilObjPaymentSettingsGUI\performSearchSPObject(), ilObjForumGUI\performThreadsActionObject(), ilPermissionGUI\perm(), ilSurveyPhrasesGUI\phrases(), ilObjForumGUI\prepareThreadScreen(), ilSurveyEvaluationGUI\printEvaluation(), ilObjTestGUI\printobject(), ilStartUpGUI\processStartingPage(), ilObjTestGUI\propertiesObject(), ilObjSurveyGUI\questionsObject(), ilObjTestGUI\questionsObject(), ilECSSettingsGUI\readAll(), ilObjChatGUI\recordingsObject(), ilTestOutputGUI\redirectQuestion(), ilObjChatGUI\refreshRoomObject(), ilSetupGUI\reloadControlStructure(), ilObjiLincClassroomGUI\removeClassroom(), ilObjTestGUI\removeParticipantObject(), ilObjSurveyGUI\removeQuestionsForm(), ilObjTestGUI\removeQuestionsForm(), ilObjSurveyGUI\removeQuestionsObject(), ilObjTestGUI\removeQuestionsObject(), ilObjSurveyAdministrationGUI\removeSpecialUserObject(), ilObjChatGUI\renameObject(), ilObjPaymentSettingsGUI\resetFilterObject(), ilObjPaymentSettingsGUI\resetObjectFilterObject(), ilObjiLincClassroomGUI\save(), ilObjiLincUserGUI\save(), ilObjSearchSettingsGUI\saveAdvancedLuceneSettingsObject(), ilMailingListsGUI\saveAssignmentForm(), ilObjStyleSheetGUI\saveCharacteristicObject(), ilObjTestGUI\saveClientIPObject(), ilPaymentCouponGUI\saveCodeForm(), ilObjMDSettingsGUI\saveCopyrightSettings(), ilPaymentCouponGUI\saveCouponForm(), ilPaymentStatisticGUI\saveCustomer(), ilObjPaymentSettingsGUI\saveCustomerObject(), ilObjSurveyGUI\saveDefineQuestionblockObject(), ilObjFileAccessSettingsGUI\saveDiskQuotaSettings(), ilObjFileAccessSettingsGUI\saveDownloadingSettings(), ilMailFormGUI\saveDraft(), ilMailAddressbookGUI\saveEntry(), ilObjMDSettingsGUI\saveEntry(), ilMailFolderGUI\saveFolderSettings(), ilAccountRegistrationGUI\saveForm(), ilObjAdvancedEditingGUI\saveFrmPostSettingsObject(), ilObjMDSettingsGUI\saveGeneralSettings(), ilObjStyleSheetGUI\saveHideStatusObject(), ilSetupGUI\saveLanguages(), ilObjSearchSettingsGUI\saveLuceneSettingsObject(), ilECSSettingsGUI\saveMappings(), ilObjTestGUI\saveMarksObject(), ilShopNewsGUI\saveNews(), GUI\saveObject(), ilObjStyleSheetFolderGUI\saveObject(), ilObjStyleSettingsGUI\saveObject(), ilObjiLincCourseGUI\saveObject(), ilObjGroupGUI\saveObject(), ilObjSessionGUI\saveObject(), ilObjSAHSLearningModuleGUI\saveObject(), ilObjUserGUI\saveObject(), ilObjComponentSettingsGUI\saveOptions(), ilObjAdvancedEditingGUI\savePageEditorSettingsObject(), ilObjPaymentSettingsGUI\savePayMethodsObject(), ilObjSCORMLearningModuleGUI\saveProperties(), ilObjMediaObjectGUI\savePropertiesObject(), ilObjSCORM2004LearningModuleGUI\saveSequencing(), ilShopNewsGUI\saveSettings(), ilECSSettingsGUI\saveSettings(), ilObjSearchSettingsGUI\saveSettingsObject(), ilObjSystemFolderGUI\saveSettingsObject(), ilShopPersonalSettingsGUI\saveSorting(), ilObjStyleSettingsGUI\saveStyleSettingsObject(), ilMailFolderGUI\saveSubFolderSettings(), ilObjPaymentSettingsGUI\saveVatObject(), ilObjFileAccessSettingsGUI\saveWebDAVSettings(), assNumeric\saveWorkingData(), assFileUpload\saveWorkingData(), ilObjTestGUI\scoringObject(), ilMailSearchGUI\search(), ilLuceneAdvancedSearchGUI\search(), ilMailFormGUI\search(), ilObjectGUI\searchCloneSourceObject(), ilForumModeratorsGUI\searchModerators(), ilObjSurveyAdministrationGUI\searchObject(), ilObjiLincCourseGUI\searchObject(), ilObjRoleGUI\searchObject(), ilObjPaymentSettingsGUI\searchObject(), ilMailFormGUI\searchRcpBc(), ilMailFormGUI\searchRcpCc(), ilMailFormGUI\searchRcpTo(), ilObjectCopyGUI\searchSource(), ilObjDlBookGUI\searchTranslation(), ilPaymentStatisticGUI\searchUser(), ilObjUserFolderGUI\searchUserObject(), ilObjRoleGUI\selectDesktopItemObject(), ilPCMediaObjectGUI\selectObjectReference(), ilLPFilterGUI\selector(), ilConditionHandlerInterface\selector(), ilPurchaseBMFGUI\sendCreditCard(), ilPurchaseBMFGUI\sendDebitEntry(), ilMailFormGUI\sendMessage(), ilObjAuthSettingsGUI\setAuthModeObject(), ilPaymentShoppingCartGUI\setCoupon(), ilShopShoppingCartGUI\setCoupon(), ilObjMediaObjectGUI\setObjectPerCreationForm(), ilObjDlBookGUI\showAbstract(), ilStartUpGUI\showAccountMigration(), ilMailingListsGUI\showAssignmentForm(), ilPurchaseBillGUI\showBillConfirm(), ilPaymentCouponGUI\showCodes(), ilPaymentCouponGUI\showCoupons(), ilPurchaseBMFGUI\showCreditCard(), ilObjPaymentSettingsGUI\showCustomerTable(), ilPurchaseBMFGUI\showDebitEntry(), ilPaymentPurchaseGUI\showDetails(), ilShopPurchaseGUI\showDetails(), ilObjContentObjectGUI\showEntrySelector(), ilMailFormGUI\showForm(), ilPaymentBuyedObjectsGUI\showItems(), ilShopBoughtObjectsGUI\showItems(), ilPaymentShoppingCartGUI\showItems(), ilShopShoppingCartGUI\showItems(), ilObjectCopyGUI\showItemSelection(), ilObjSCORM2004LearningModuleGUI\showLearningObjectivesAlignment(), ilMailSearchGroupsGUI\showMembers(), ilMailSearchCoursesGUI\showMembers(), ilPaymentObjectGUI\showObjects(), ilPaymentStatisticGUI\showObjectSelector(), ilPaymentObjectGUI\showObjectSelector(), ilObjPaymentSettingsGUI\showObjectSelectorObject(), ilPurchaseBMFGUI\showPaymentType(), ilPurchaseBillGUI\showPersonalData(), ilPurchaseBMFGUI\showPersonalData(), ilPersonalProfileGUI\showPersonalData(), ilPersonalProfileGUI\showProfile(), ilRepositorySelectorInputGUI\showRepositorySelection(), ilMailSearchGUI\showResults(), ilLuceneAdvancedSearchGUI\showSavedResults(), ilLuceneSearchGUI\showSavedResults(), ilPaymentObjectGUI\showSelectedObject(), ilSearchGUI\showSelectRoot(), ilObjectCopyGUI\showSourceSelectionTree(), ilPaymentStatisticGUI\showStatistics(), ilObjForumGUI\showStatisticsObject(), ilObjectCopyGUI\showTargetSelectionTree(), ilObjForumGUI\showThreadFramesetObject(), ilRepUtilGUI\showTrashTable(), ilPaymentTrusteeGUI\showTrustees(), ilObjTestGUI\showUserResults(), ilTestEvaluationGUI\singleResults(), ilObjPaymentSettingsGUI\statisticObject(), ilMailAddressbookGUI\submitInvitation(), assQuestionGUI\suggestedsolution(), assFlashQuestionGUI\suggestRange(), ilObjPaymentSettingsGUI\testERPSettingsObject(), ilSetupGUI\toggleClientList(), ilObjForumGUI\toggleThreadNotificationObject(), ilObjSurveyGUI\unfoldQuestionblockObject(), ilPaymentShoppingCartGUI\unlockBillObjectsInShoppingCart(), ilShopShoppingCartGUI\unlockBillObjectsInShoppingCart(), ilPaymentShoppingCartGUI\unlockBMFObjectsInShoppingCart(), ilShopShoppingCartGUI\unlockBMFObjectsInShoppingCart(), ilPaymentShoppingCartGUI\unlockPAYPALObjectsInShoppingCart(), ilShopNewsGUI\update(), ilPaymentBillAdminGUI\update(), ilPaymentTrusteeGUI\update(), ilMDEditorGUI\updateAnnotation(), ilECSSettingsGUI\updateCategoryMapping(), ilMDEditorGUI\updateClassification(), ilObjiLincClassroomGUI\updateClassroom(), ilECSSettingsGUI\updateCommunities(), ilSetupGUI\updateDatabase(), ilPaymentObjectGUI\updateDetails(), ilMDEditorGUI\updateEducational(), ilObjMDSettingsGUI\updateEntry(), ilMDEditorGUI\updateGeneral(), ilLicenseGUI\updateLicense(), ilMDEditorGUI\updateLifecycle(), ilObjiLincCourseGUI\updateMemberStatusObject(), ilMDEditorGUI\updateMetaMetaData(), ilObjiLincCourseGUI\updateObject(), ilObjForumGUI\updateObject(), ilObjStyleSheetGUI\updateObject(), ilObjGroupGUI\updateObject(), ilObjPaymentSettingsGUI\updateObjectDetailsObject(), ilObjComponentSettingsGUI\updatePluginDB(), ilPaymentObjectGUI\updatePrice(), ilObjPaymentSettingsGUI\updatePriceObject(), ilPageLayoutGUI\updateProperties(), ilSCORM2004ScoGUI\updateProperties(), ilMDEditorGUI\updateQuickEdit(), ilMDEditorGUI\updateQuickEdit_scorm(), ilMDEditorGUI\updateRelation(), ilMDEditorGUI\updateRights(), ilPaymentStatisticGUI\updateStatistic(), ilObjPaymentSettingsGUI\updateStatisticObject(), ilMDEditorGUI\updateTechnical(), ilObjPaymentSettingsGUI\updateVatObject(), ilMailAttachmentGUI\uploadFile(), ilObjMailGUI\uploadObject(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjSurveyGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), ilObjSurveyQuestionPoolGUI\uploadSplObject(), ilObjTestGUI\uploadTstObject(), ilObjContentObject\validatePages(), ilObjPaymentSettingsGUI\vendorsObject(), ilObjLanguageExtGUI\viewObject(), ilObjChatGUI\viewObject(), ilObjWikiGUI\viewPageObject(), ilObjForumGUI\viewThreadObject(), assMultipleChoiceGUI\writePostData(), and assSingleChoiceGUI\writePostData().

{
global $tpl;
$tpl->setMessage("info", $a_info, $a_keep);
}

+ Here is the caller graph for this function:

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

Send Question to Screen.

Parameters
stringmessage
booleanif true message is kept in session

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

References $tpl.

Referenced by ilRegistrationGUI\addCommandButtons(), ilObjRoleGUI\askDeleteDesktopItemObject(), ilObjUserFolderGUI\askDeleteFieldObject(), ilObjCourseGroupingGUI\askDeleteGrouping(), ilCourseObjectivesGUI\askDeleteObjective(), ilObjChatGUI\askDeleteRecordingsObject(), ilMailFolderGUI\askForEmptyTrash(), ilGlossaryTermGUI\confirmDefinitionDeletion(), ilObjGlossaryGUI\confirmDefinitionDeletion(), ilCourseUserFieldsGUI\confirmDelete(), ilCourseArchivesGUI\confirmDeleteArchives(), ilMemberExportGUI\confirmDeleteExportFile(), ilSCORM2004ScoGUI\confirmDeleteExportFile(), ilObjGlossaryGUI\confirmDeleteExportFile(), ilObjSCORM2004LearningModuleGUI\confirmDeleteExportFile(), ilObjContentObjectGUI\confirmDeleteExportFile(), ilObjTestGUI\confirmDeleteExportFileObject(), ilObjSurveyQuestionPoolGUI\confirmDeleteExportFileObject(), ilObjQuestionPoolGUI\confirmDeleteExportFileObject(), ilObjSurveyGUI\confirmDeleteExportFileObject(), ilObjUserFolderGUI\confirmDeleteExportFileObject(), ilObjRoleGUI\confirmDeleteRoleObject(), ilObjTestGUI\confirmFixedParticipantsStatusChange(), ilObjMediaPoolGUI\confirmRemove(), ilObjSurveyGUI\confirmRemoveHeadingForm(), ilObjGlossaryGUI\confirmTermDeletion(), ilAdministrationCommandGUI\delete(), ilBookmarkAdministrationGUI\delete(), ilObjContentObjectGUI\delete(), ilObjSurveyGUI\deleteAllUserDataObject(), ilObjTestGUI\deleteAllUserDataObject(), ilObjTestGUI\deleteAllUserResultsObject(), ilObjRoleFolderGUI\deleteObject(), ilPaymentObjectGUI\deleteObject(), ilObjUserFolderGUI\deleteObject(), ilObjPaymentSettingsGUI\deleteObjectObject(), ilSurveyPhrasesGUI\deletePhrase(), ilObjSurveyQuestionPoolGUI\deleteQuestionsObject(), ilObjQuestionPoolGUI\deleteQuestionsObject(), ilObjSurveyGUI\deleteSingleUserResultsObject(), ilObjTestGUI\deleteSingleUserResultsObject(), ilObjPaymentSettingsGUI\deleteStatisticObject(), ilObjCourseGUI\deleteSubscribers(), ilObjPaymentSettingsGUI\deleteVendors(), ilMailFolderGUI\editFolder(), ilPaymentObjectGUI\editPrices(), ilSimpleConfirmationGUI\getHTML(), ilConfirmationGUI\getHTML(), ilObjGroupGUI\leaveObject(), ilObjCourseGUI\leaveObject(), SurveyQuestionGUI\originalSyncForm(), ilObjSurveyGUI\questionsObject(), ilObjiLincCourseGUI\removeMemberObject(), ilObjSurveyGUI\removeQuestionsObject(), ilObjUserFolderGUI\showActionConfirmation(), ilObjCourseGUI\unsubscribeObject(), and ilObjGroupGUI\updateObject().

{
global $tpl;
$tpl->setMessage("question", $a_info, $a_keep);
}

+ Here is the caller graph for this function:

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

Send Success Message to Screen.

Parameters
stringmessage
booleanif true message is kept in session

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

References $tpl.

Referenced by ilLPListOfSettingsGUI\__addInfo(), ilChatSmilies\_checkSetup(), ilObjCategoryGUI\_importCategories(), ilCalendarInboxGUI\acceptShared(), ilObjStyleSettingsGUI\activateObject(), ilObjComponentSettingsGUI\activatePlugin(), ilObjCourseGroupingGUI\add(), ilGroupRegistrationGUI\add(), ilCourseRegistrationGUI\add(), ilRegistrationSettingsGUI\addAssignment(), ilPageEditorGUI\addChangeComment(), SurveyQuestionGUI\addGIT(), assQuestionGUI\addGIT(), ilCourseArchivesGUI\addHTMLArchive(), ilObjExerciseGUI\addMembersObject(), SurveyQuestionGUI\addPG(), assQuestionGUI\addPG(), ilPermissionGUI\addRole(), ilLDAPSettingsGUI\addRoleAssignment(), ilAuthShibbolethSettingsGUI\addRoleAssignmentRule(), ilObjChatGUI\addRoomObject(), SurveySingleChoiceQuestionGUI\addSelectedPhrase(), SurveyMatrixQuestionGUI\addSelectedPhrase(), SurveyQuestionGUI\addST(), assQuestionGUI\addST(), ilObjCourseGUI\addStarterObject(), ilObjForumGUI\addThreadObject(), ilObjDlBookGUI\addTranslation(), ilObjRoleGUI\addUserObject(), ilObjGroupGUI\addUserObject(), ilObjPaymentSettingsGUI\addVendorObject(), ilCourseArchivesGUI\addXMLArchive(), ilObjChatGUI\adminRoomsObject(), ilObjRoleFolderGUI\adoptPermSaveObject(), ilObjRoleTemplateGUI\adoptPermSaveObject(), ilObjRoleGUI\adoptPermSaveObject(), ilObjectPluginGUI\afterSave(), ilObjMediaPoolGUI\afterSave(), ilObjFileBasedLMGUI\afterSave(), ilObjTestGUI\applyDefaultsObject(), ilLPListOfSettingsGUI\assign(), ilConditionHandlerInterface\assign(), ilObjRoleGUI\assignDesktopItemObject(), ilObjGroupGUI\assignFromWaitingListObject(), ilObjCourseGUI\assignFromWaitingListObject(), ilObjGroupGUI\assignMemberObject(), ilObjCourseGUI\assignMembersObject(), ilObjCategoryGUI\assignSaveObject(), ilObjUserGUI\assignSaveObject(), ilObjGroupGUI\assignSubscribersObject(), ilObjCourseGUI\assignSubscribersObject(), ilObjRoleGUI\assignUserObject(), ilObjCourseGUI\autoFillObject(), ilObjChatGUI\blockUserObject(), ilRegistrationGUI\cancelSubscriptionRequest(), ilObjCourseGUI\cciResetObject(), ilCertificateGUI\certificateEditor(), ilObjRoleGUI\changeExistingObjectsObject(), ilPDNewsBlockGUI\changeFeedSettings(), ilPermissionGUI\changeOwner(), ilPersonalProfileGUI\changeUserPassword(), ilConditionHandlerInterface\chi_update(), ilContainerGUI\clearObject(), ilObjectGUI\cloneAllObject(), ilContainerGUI\cloneAllObject(), ilBookmarkAdministrationGUI\confirm(), ilObjUserFolderGUI\confirmaccessFreeObject(), ilObjUserFolderGUI\confirmaccessRestrictObject(), ilObjUserFolderGUI\confirmactivateObject(), ilObjUserFolderGUI\confirmdeactivateObject(), ilObjSurveyGUI\confirmDeleteAllUserDataObject(), ilObjTestGUI\confirmDeleteAllUserResultsObject(), ilObjGroupGUI\confirmDeleteExportFileObject(), ilObjUserFolderGUI\confirmdeleteObject(), ilSurveyPhrasesGUI\confirmDeletePhrase(), ilObjSurveyQuestionPoolGUI\confirmDeleteQuestionsObject(), ilObjQuestionPoolGUI\confirmDeleteQuestionsObject(), ilObjSurveyGUI\confirmDeleteSelectedUserDataObject(), ilObjTestGUI\confirmDeleteSelectedUserDataObject(), ilObjContentObjectGUI\confirmedDelete(), ilObjRoleFolderGUI\confirmedDeleteObject(), ilObjChatGUI\confirmedDeleteRoomObject(), ilObjSurveyGUI\confirmInsertQuestionObject(), ilObjSurveyGUI\confirmRemoveQuestionsObject(), ilObjTestGUI\confirmRemoveQuestionsObject(), SurveySingleChoiceQuestionGUI\confirmSavePhrase(), SurveyMatrixQuestionGUI\confirmSavePhrase(), ilWikiPageGUI\confirmWikiPageDeletion(), ilObjectCopyGUI\copyContainer(), ilPageEditorGUI\copyLinkedMediaToClipboard(), ilObjectCopyGUI\copySingleObject(), ilObjMediaPoolGUI\copyToClipboard(), ilPCMediaObjectGUI\copyToClipboard(), ilPCMediaObjectGUI\create(), ilFileSystemGUI\createDirectory(), ilObjSurveyGUI\createSurveyCodesObject(), ilObjLinkResourceGUI\deactivateLinkObject(), ilObjComponentSettingsGUI\deactivatePlugin(), ilLPListOfSettingsGUI\deassign(), ilObjRoleGUI\deassignUserObject(), ilCalendarInboxGUI\declineShared(), ilCourseArchivesGUI\delete(), ilConditionHandlerInterface\delete(), ilCalendarCategoryGUI\delete(), ilCourseUserFieldsGUI\delete(), ilCalendarAppointmentGUI\delete(), ilCalendarCategoryGUI\deleteAppointments(), ilPCImageMapEditorGUI\deleteAreas(), ilImageMapEditorGUI\deleteAreas(), ilRegistrationSettingsGUI\deleteAssignment(), ilObjSurveyGUI\deleteCodesObject(), ilObjRoleGUI\deleteDesktopItemsObject(), ilMemberExportGUI\deleteExportFile(), ilSCORM2004ScoGUI\deleteExportFile(), ilObjSCORM2004LearningModuleGUI\deleteExportFile(), ilObjTestGUI\deleteExportFileObject(), ilObjSurveyGUI\deleteExportFileObject(), ilCourseUserFieldsGUI\deleteField(), ilObjUserFolderGUI\deleteFieldObject(), ilAdvancedMDSettingsGUI\deleteFields(), ilFileSystemGUI\deleteFile(), ilAdvancedMDSettingsGUI\deleteFiles(), ilObjCourseGroupingGUI\deleteGrouping(), ilObjCourseGUI\deleteInfoFilesObject(), ilObjLinkResourceGUI\deleteLinksObject(), ilObjAssessmentFolderGUI\deleteLogObject(), SurveyQuestionGUI\deleteMaterial(), ilObjGroupGUI\deleteMembersObject(), ilObjContentObjectGUI\deleteMenuEntry(), ilCourseObjectivesGUI\deleteObjectives(), ilRepUtilGUI\deleteObjects(), ilObjLinkResourceGUI\deleteParameterFormObject(), ilObjLinkResourceGUI\deleteParameterObject(), ilObjChatGUI\deleteRecordingsObject(), ilAdvancedMDSettingsGUI\deleteRecords(), ilLDAPSettingsGUI\deleteRoleMapping(), ilLDAPSettingsGUI\deleteRules(), ilAuthShibbolethSettingsGUI\deleteRules(), ilObjCourseGUI\deleteStarterObject(), ilObjDlBookGUI\deleteTranslation(), ilObjUserFolderGUI\deleteValueObject(), ilObjMediaCastGUI\determinePlaytimeObject(), ilObjSurveyGUI\disinviteUserGroupObject(), ilObjExternalFeedGUI\exitSave(), ilAdvancedMDSettingsGUI\exportRecords(), ilShopShoppingCartGUI\finishEPay(), ilShopShoppingCartGUI\finishPaypal(), ilObjContentObjectGUI\fixTree(), ilLPFilterGUI\hide(), ilLPFilterGUI\hideSelected(), ilBookmarkAdministrationGUI\importFile(), ilObjCourseGUI\importFileObject(), ilObjGlossaryGUI\importFileObject(), ilObjSurveyQuestionPoolGUI\importFileObject(), ilObjContentObjectGUI\importFileObject(), ilObjGroupGUI\importFileObject(), ilObjSurveyGUI\importFileObject(), ilAdvancedMDSettingsGUI\importRecord(), ilObjUserFolderGUI\importUsersObject(), ilObjQuestionPoolGUI\importVerifiedFileObject(), ilObjTestGUI\importVerifiedFileObject(), ilSetupGUI\initClientDbForm(), ilObjSurveyGUI\insertQuestionblocksObject(), ilObjSurveyGUI\insertQuestions(), ilObjTestGUI\insertQuestionsAfterObject(), ilObjTestGUI\insertQuestionsBeforeObject(), ilObjSurveyGUI\insertQuestionsObject(), ilObjTestGUI\insertQuestionsObject(), ilObjTestGUI\insertRandomSelectionObject(), SurveySingleChoiceQuestionGUI\insertStandardNumbers(), SurveyMatrixQuestionGUI\insertStandardNumbers(), ilSetupGUI\installDatabase(), ilObjChatGUI\invitePDObject(), ilObjSurveyGUI\inviteUserGroupObject(), ilObjSessionGUI\joinObject(), ilRegistrationGUI\leaveWaitingList(), SurveyQuestionGUI\linkChilds(), assQuestionGUI\linkChilds(), ilObjLanguageExtGUI\maintainObject(), ilCourseItemAdministrationGUI\moveDown(), ilObjTestGUI\moveQuestionsObject(), ilCourseItemAdministrationGUI\moveUp(), ilObjSurveyQuestionPool\pasteFromClipboard(), ilObjQuestionPoolGUI\pasteObject(), ilContainerGUI\pasteObject(), ilPaymentObjectGUI\performAddPrice(), ilObjRoleGUI\performDeleteRoleObject(), ilObjCategoryGUI\performDeleteUsersObject(), ilObjPaymentSettingsGUI\performDeleteVatObject(), ilObjForumGUI\performImportObject(), ilContainerGUI\performPasteIntoMultipleObjectsObject(), ilObjCourseGUI\performRemoveFromWaitingListObject(), ilObjCourseGUI\performUnsubscribeObject(), ilPermissionGUI\permSave(), ilObjRoleTemplateGUI\permSaveObject(), ilObjRoleGUI\permSaveObject(), ilObjExercise\processUploadedFile(), ilObjSurveyGUI\questionsObject(), ilObjContentObjectGUI\refreshLinkCheck(), ilObjLinkResourceGUI\refreshLinkCheckObject(), ilObjChatGUI\refreshRoomObject(), ilObjGroupGUI\refuseApplicantsObject(), ilObjGroupGUI\refuseFromListObject(), ilObjCourseGUI\refuseFromListObject(), ilObjGroupGUI\refuseSubscribersObject(), ilObjCourseGUI\refuseSubscribersObject(), ilObjSessionGUI\registerObject(), ilObjMediaPoolGUI\remove(), ilObjCourseGUI\removeFromWaitingList(), ilObjCourseGUI\removeMembersObject(), ilRepUtilGUI\removeObjectsFromSystem(), ilObjUserGUI\removeUserPictureObject(), ilFileSystemGUI\renameFile(), ilObjChatGUI\renameRoomObject(), ilCourseObjectivePresentationGUI\reset(), ilObjCourseGUI\resetObject(), ilRepUtilGUI\restoreObjects(), ilCalendarUserSettingsGUI\save(), ilCalendarCategoryGUI\save(), ilRadiusSettingsGUI\save(), ilRegistrationSettingsGUI\save(), SurveyQuestionGUI\save(), ilObjCalendarSettingsGUI\save(), ilAuthShibbolethSettingsGUI\save(), ilObject2GUI\save(), ilCalendarAppointmentGUI\save(), ilCourseUserFieldsGUI\save(), ilCourseObjectivesGUI\save(), assQuestionGUI\save(), ilLDAPSettingsGUI\save(), ilObjPrivacySecurityGUI\save_privacy(), ilObjPrivacySecurityGUI\save_security(), ilCourseContentGUI\saveAcceptance(), ilObjAccessibilitySettingsGUI\saveAccessKeys(), ilPageObjectGUI\saveActivation(), ilObjLinkResourceGUI\saveAddLinkObject(), ilPCImageMapEditorGUI\saveArea(), ilImageMapEditorGUI\saveArea(), ilObjAdvancedEditingGUI\saveAssessmentSettingsObject(), ilRegistrationSettingsGUI\saveAssignment(), ilSetupGUI\saveBasicSettings(), ilObjSystemFolderGUI\saveBasicSettingsObject(), ilObjStyleSettingsGUI\saveBasicStyleSettingsObject(), ilObjSystemFolderGUI\saveBenchSettingsObject(), ilObjPaymentSettingsGUI\saveBmfSettingsObject(), ilObjAuthSettingsGUI\saveCASObject(), ilPersonalProfileGUI\saveChatOptions(), ilSetupGUI\saveClientIni(), ilObjExerciseGUI\saveCommentsObject(), ilSetupGUI\saveContact(), ilObjSystemFolderGUI\saveContactInformationObject(), ilObjSystemFolderGUI\saveCronJobsObject(), ilObjAssessmentFolderGUI\saveDefaultsObject(), ilObjSurveyGUI\saveDefineQuestionblockObject(), ilObjFileAccessSettingsGUI\saveDiskQuotaMailTemplate(), assQuestionGUI\saveEdit(), ilObjPaymentSettingsGUI\saveEPaySettingsObject(), ilObjPaymentSettingsGUI\saveERPsettingsObject(), ilTestEvaluationGUI\saveEvalSettings(), assQuestionGUI\saveFeedback(), ilCourseUserFieldsGUI\saveField(), ilAdvancedMDSettingsGUI\saveField(), ilObjUserFolderGUI\saveFieldObject(), ilObjMediaPoolGUI\saveFolder(), ilObjTaggingSettingsGUI\saveForbiddenTags(), ilMailingListsGUI\saveForm(), ilObjAdvancedEditingGUI\saveFrmPostSettingsObject(), ilPersonalProfileGUI\saveGeneralSettings(), ilObjPaymentSettingsGUI\saveGeneralSettingsObject(), ilObjUserFolderGUI\saveGlobalUserSettingsObject(), ilObjWikiGUI\saveGradingObject(), ilObjSystemFolderGUI\saveHeaderTitleObject(), ilObjSystemFolderGUI\saveHeaderTitlesObject(), ilObjExternalToolsSettingsGUI\saveiLincObject(), ilTaggingGUI\saveInput(), ilObjSurveyGUI\saveInvitationStatusObject(), ilObjSystemFolderGUI\saveJavaServerObject(), ilLMPageObjectGUI\saveLayout(), ilObjAdvancedEditingGUI\saveLearningModuleSettingsObject(), ilObjContentObjectGUI\saveLinkCheck(), ilObjLinkResourceGUI\saveLinkCheckObject(), ilPersonalProfileGUI\saveLocation(), ilObjAuthSettingsGUI\saveLoginInfoObject(), ilObjUserFolderGUI\saveLoginnameSettingsObject(), ilPersonalProfileGUI\saveMailOptions(), ilLDAPSettingsGUI\saveMapping(), ilObjTestGUI\saveMarksObject(), ilObjSessionGUI\saveMaterialsObject(), ilObjMediaPoolGUI\saveMediaPoolPage(), ilObjContentObjectGUI\saveMenuEntry(), ilObjContentObjectGUI\saveMenuProperties(), ilObjUserFolderGUI\saveNewAccountMailObject(), ilObjRecoveryFolderGUI\saveObject(), ilObjSurveyAdministrationGUI\saveObject(), ilObjAssessmentFolderGUI\saveObject(), ilObjMediaCastGUI\saveObject(), ilObjAdvancedEditingGUI\saveObject(), ilObjRoleTemplateGUI\saveObject(), ilObjMailGUI\saveObject(), ilObjSurveyQuestionPoolGUI\saveObject(), ilObjSurveyGUI\saveObject(), ilObjLinkResourceGUI\saveObject(), ilObjWikiGUI\saveObject(), ilObjTypeDefinitionGUI\saveObject(), ilObjFileBasedLMGUI\saveObject(), ilObjTestGUI\saveObject(), ilObjFolderGUI\saveObject(), ilObjGlossaryGUI\saveObject(), ilObjGroupGUI\saveObject(), ilObjExerciseGUI\saveObject(), ilObjFileGUI\saveObject(), ilObjCategoryGUI\saveObject(), ilObjRoleFolderGUI\saveObject(), ilObjMediaObjectGUI\saveObject(), ilObjQuestionPoolGUI\saveObject(), ilObjRoleGUI\saveObject(), ilObjForumGUI\saveObject(), ilObjUserGUI\saveObject(), ilObjContentObjectGUI\saveObject(), ilObjCourseGUI\saveObject(), ilObjSurveyGUI\saveObligatoryObject(), ilMailOptionsGUI\saveOptions(), ilObjComponentSettingsGUI\saveOptions(), ilContainerGUI\savePageContentObject(), ilPersonalProfileGUI\savePassword(), ilObjPaymentSettingsGUI\savePayMethodsObject(), ilObjPaymentSettingsGUI\savePaypalSettingsObject(), ilPersonalProfileGUI\savePersonalData(), ilObjForumGUI\savePostObject(), ilPersonalProfileGUI\saveProfile(), ilInfoScreenGUI\saveProgress(), ilObjFileBasedLMGUI\saveProperties(), ilObjContentObjectGUI\saveProperties(), ilObjSCORM2004LearningModuleGUI\saveProperties(), ilObjGlossaryGUI\saveProperties(), ilObjSurveyGUI\savePropertiesObject(), ilObjSurveyQuestionPoolGUI\savePropertiesObject(), ilObjQuestionPoolGUI\savePropertiesObject(), ilObjMediaObjectGUI\savePropertiesObject(), ilObjTestGUI\savePropertiesObject(), ilPersonalProfileGUI\savePublicProfile(), ilObjContentObjectGUI\savePublicSection(), ilCourseObjectivesGUI\saveQuestionOverview(), ilObjTestGUI\saveRandomQuestionsObject(), ilAdvancedMDSettingsGUI\saveRecord(), ilSetupGUI\saveRegistration(), ilObjAdvancedEditingGUI\saveRepositorySettingsObject(), ilRegistrationSettingsGUI\saveRoleAccessLimitations(), ilLDAPSettingsGUI\saveRoleMapping(), ilLDAPSettingsGUI\saveRoleSelection(), ilAuthShibbolethSettingsGUI\saveRoleSelection(), ilObjTestGUI\saveScoringObject(), ilObjAuthSettingsGUI\saveScriptObject(), ilCalendarCategoryGUI\saveSelection(), ilObjMediaObjectsSettingsGUI\saveSettings(), ilObjMediaCastSettingsGUI\saveSettings(), ilObjTaggingSettingsGUI\saveSettings(), ilObjLearningResourcesSettingsGUI\saveSettings(), ilObjPersonalDesktopSettingsGUI\saveSettings(), ilObjNewsSettingsGUI\saveSettings(), ilObjAssessmentFolderGUI\saveSettingsObject(), ilObjUserTrackingGUI\saveSettingsObject(), ilObjLinkResourceGUI\saveSettingsObject(), ilObjSurveyAdministrationGUI\saveSettingsObject(), ilObjAdvancedEditingGUI\saveSettingsObject(), ilObjWikiGUI\saveSettingsObject(), ilObjMediaCastGUI\saveSettingsObject(), assImagemapQuestionGUI\saveShape(), ilObjAuthSettingsGUI\saveSOAPObject(), ilCourseObjectivesGUI\saveSorting(), ilShopTopicsGUI\saveSorting(), ilObjLinkResourceGUI\saveSortingObject(), ilContainerGUI\saveSortingObject(), ilObjExerciseGUI\saveStatusObject(), ilObjContentObjectGUI\saveStyleSettings(), ilObjWikiGUI\saveStyleSettingsObject(), ilContainerGUI\saveStyleSettingsObject(), ilObjAdvancedEditingGUI\saveSurveySettingsObject(), ilGlossaryTermGUI\saveTerm(), ilObjGlossaryGUI\saveTerm(), ilShopTopicsGUI\saveTopic(), ilObjFileGUI\saveUnzipObject(), ilObjSystemFolderGUI\saveWebServicesObject(), ilLPFilterGUI\selectRoot(), ilObjExerciseGUI\sendMembersObject(), ilObjAuthSettingsGUI\setAuthModeObject(), ilObjSurveyGUI\setCodeLanguageObject(), ilTestScoringGUI\setFeedbackManual(), ilTestScoringGUI\setPointsManual(), ilPCTableGUI\setSpans(), ilPCTableGUI\setStyles(), ilPCTableGUI\setWidths(), ilCalendarCategoryGUI\shareAssign(), ilCalendarCategoryGUI\shareAssignRoles(), ilCalendarCategoryGUI\shareDeassign(), assQuestionGUI\suggestedsolution(), SurveyQuestionGUI\sync(), ilObjChatGUI\unblockUsersObject(), ilObjSurveyGUI\unfoldQuestionblockObject(), ilShopShoppingCartGUI\unlockPAYPALObjectsInShoppingCart(), ilObjSessionGUI\unregisterObject(), ilObjGroupGUI\unsubscribeObject(), ilFileSystemGUI\unzipFile(), ilCalendarCategoryGUI\update(), ilCourseItemAdministrationGUI\update(), ilPCDataTableGUI\update(), ilObjCourseGroupingGUI\update(), ilCalendarAppointmentGUI\update(), ilObjUserFolderGUI\updateAppliedUsersObject(), ilImageMapEditorGUI\updateAreas(), ilPCImageMapEditorGUI\updateAreas(), ilObjAuthSettingsGUI\updateAuthModeDeterminationObject(), ilObjAuthSettingsGUI\updateAuthRolesObject(), ilSetupGUI\updateBasicSettings(), ilConditionHandlerInterface\updateCondition(), ilObjCourseGUI\updateCourseIconsObject(), ilCourseUserFieldsGUI\updateField(), ilAdvancedMDSettingsGUI\updateField(), ilAdvancedMDSettingsGUI\updateFields(), ilObjUserFolderGUI\updateFieldsObject(), ilCourseObjectivesGUI\updateFinalTestAssignment(), ilCourseObjectivesGUI\updateFinalTestLimits(), ilObjMediaPoolGUI\updateFolder(), ilObjGroupGUI\updateGroupIconsObject(), ilObjGroupGUI\updateGroupTypeObject(), ilLPFilterGUI\updateHidden(), ilObjCategoryGUI\updateInfoObject(), ilObjGroupGUI\updateInfoObject(), ilObjCourseGUI\updateInfoObject(), ilObjLinkResourceGUI\updateLinkObject(), ilObjLinkResourceGUI\updateLinksObject(), ilCourseObjectivesGUI\updateMaterialAssignment(), ilObjMediaPoolGUI\updateMediaPoolPage(), ilObjCourseGUI\updateMemberObject(), ilObjSessionGUI\updateMembersObject(), ilObjGroupGUI\updateMembersObject(), ilObjCourseGUI\updateMembersObject(), ilObjContentObjectGUI\updateMenuEntry(), ilContainerReferenceGUI\updateObject(), ilObjRemoteCourseGUI\updateObject(), ilObjFolderGUI\updateObject(), ilObjRootFolderGUI\updateObject(), ilObject2GUI\updateObject(), ilObjFileGUI\updateObject(), ilObjMediaPoolGUI\updateObject(), ilObjGroupGUI\updateObject(), ilObjSurveyQuestionPoolGUI\updateObject(), ilObjExerciseGUI\updateObject(), ilObjChatServerGUI\updateObject(), ilObjRoleTemplateGUI\updateObject(), ilObjSessionGUI\updateObject(), ilObjRoleGUI\updateObject(), ilObjCategoryGUI\updateObject(), ilObjectGUI\updateObject(), ilObjQuestionPoolGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjUserGUI\updateObject(), ilObjRoleGUI\updateObject2(), ilObjUserGUI\updateObjectOld(), ilObjCourseGUI\updateParticipantsStatus(), ilObjComponentSettingsGUI\updatePlugin(), ilObjPaymentSettingsGUI\updatePriceObject(), ilAdvancedMDSettingsGUI\updateRecord(), ilAdvancedMDSettingsGUI\updateRecords(), ilLDAPSettingsGUI\updateRoleAssignment(), ilAuthShibbolethSettingsGUI\updateRoleAssignmentRule(), ilRegistrationSettingsGUI\updateRoles(), ilObjUserFolderGUI\updateSelectFieldObject(), ilCourseObjectivesGUI\updateSelfAssessmentAssignment(), ilCourseObjectivesGUI\updateSelfAssessmentLimits(), ilObjSearchSettingsGUI\updateSettingsObject(), ilObjPaymentSettingsGUI\updateStatisticObject(), ilObjGroupGUI\updateStatusObject(), ilRegistrationGUI\updateSubscriptionRequest(), ilAdvancedMDSettingsGUI\updateSubstitutions(), ilGlossaryTermGUI\updateTerm(), ilObjGlossaryGUI\updateTerm(), ilObjUserFolderGUI\updateTextFieldObject(), ilCourseContentGUI\updateTimings(), ilLPListOfObjectsGUI\updateUser(), ilCourseContentGUI\updateUserTimings(), ilObjUserFolderGUI\updateWysiwygFieldObject(), ilFileSystemGUI\uploadFile(), ilObjLanguageExtGUI\uploadObject(), and ilContainerGUI\useNewEditorObject().

{
global $tpl;
$tpl->setMessage("success", $a_info, $a_keep);
}

+ Here is the caller graph for this function:

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

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

References $_COOKIE.

Referenced by ilStartUpGUI\confirmRegistration(), ilInitialisation\determineClient(), ilInitialisation\initFeed(), ilInitialisation\initILIAS(), ilSoapUserAdministration\login(), ilStartUpGUI\showLogin(), and ilStartUpGUI\showLogout().

{
/*
if(!(bool)$a_set_cookie_invalid) $expire = IL_COOKIE_EXPIRE;
else $expire = time() - (365*24*60*60);
*/
// Temporary fix for feed.php
if(!(bool)$a_set_cookie_invalid) $expire = 0;
else $expire = time() - (365*24*60*60);
// setcookie() supports 5th parameter
// only for php version 5.2.0 and above
if( version_compare(PHP_VERSION, '5.2.0', '>=') )
{
// PHP version >= 5.2.0
setcookie( $a_cookie_name, $a_cookie_value, $expire,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE, IL_COOKIE_HTTPONLY
);
}
else
{
// PHP version < 5.2.0
setcookie( $a_cookie_name, $a_cookie_value, $expire,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE
);
}
if((bool)$a_also_set_super_global) $_COOKIE[$a_cookie_name] = $a_cookie_value;
}

+ Here is the caller graph for this function:

ilUtil::setPathStr (   $a_path)

??? public

Parameters
string

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

{
if ("" != $a_path && "/" != substr($a_path, -1))
{
$a_path .= "/";
//$a_path = substr($a_path,1);
}
//return getcwd().$a_path;
return $a_path;
}
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) 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 1377 of file class.ilUtil.php.

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

Referenced by ilObjSystemFolder\_getHeaderTitleDescription(), ilObject\_writeDescription(), ilObject\create(), ilBookmarkAdministrationGUI\delete(), ilTree\fetchNodeData(), ilAdminSubItemsTableGUI\fillRow(), ilMediaPoolExplorer\formatHeader(), ilLMExplorer\formatHeader(), ilLMEditorExplorer\formatHeader(), ilPublicSectionSelector\formatHeader(), ilScorm2004EditorExplorer\formatHeader(), ilHACPExplorer\formatObject(), ilPasteIntoMultipleItemsExplorer\formatObject(), ilForumMoveTopicsExplorer\formatObject(), ilAICCExplorer\formatObject(), ilPublicSectionSelector\formatObject(), ilSCORMExplorer\formatObject(), ilExplorer\formatObject(), ilObjSystemFolder\getHeaderTitleTranslations(), ilPDNotesBlockGUI\getListRowData(), ilMailNotification\getObjectTitle(), ilCalendarEntry\getPresentationTitle(), ilLMPresentationGUI\ilLMNavigation(), ilLMPresentationGUI\ilLocator(), ilLuceneSearchGUI\initFormSearch(), ilGlossaryPresentationGUI\listTermByGiven(), ilObjGlossaryGUI\listTerms(), ilLDAPSettingsGUI\roleMapping(), ilObject\setDescription(), ilObject\setTitle(), and ilGlossaryDefinition\shortenShortText().

{
include_once("./Services/Utilities/classes/class.ilStr.php");
if (ilStr::strLen($a_str) > $a_len)
{
if ($a_next_blank)
{
$len = ilStr::strPos($a_str, " ", $a_len);
}
else
{
$len = $a_len;
}
// BEGIN WebDAV
// - Shorten names in the middle, before the filename extension
// Workaround for Windows WebDAV Client:
// Use the unicode ellipsis symbol for shortening instead of
// three full stop characters.
if ($a_keep_extension)
{
$p = strrpos($a_str, '.'); // this messes up normal shortening, see bug #6190
}
if ($p === false || $p == 0 || strlen($a_str) - $p > $a_len)
{
$a_str = ilStr::subStr($a_str,0,$len);
if ($a_dots)
{
$a_str .= "\xe2\x80\xa6"; // UTF-8 encoding for Unicode ellipsis character.
}
}
else
{
if ($a_dots)
{
$a_str = ilStr::subStr($a_str,0,$len - (strlen($a_str) - $p + 1))."\xe2\x80\xa6".substr($a_str, $p);
}
else
{
$a_str = ilStr::subStr($a_str,0,$len - (strlen($a_str) - $p + 1)).substr($a_str, $p);
}
}
}
return $a_str;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

Parameters
stringinput string
integermax. word length
booleanappend "..." to shortened words

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

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

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

{
include_once("./Services/Utilities/classes/class.ilStr.php");
$str_arr = explode(" ", $a_str);
for ($i = 0; $i < count($str_arr); $i++)
{
if (ilStr::strLen($str_arr[$i]) > $a_len)
{
$str_arr[$i] = ilStr::subStr($str_arr[$i], 0, $a_len);
if ($a_dots)
{
$str_arr[$i].= "...";
}
}
}
return implode($str_arr, " ");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::showTabs (   $a_hl,
  $a_o 
)

show the tabs in admin section

old code, do not reuse this

public

Parameters
integercolumn to highlight
arrayarray with templatereplacements

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

References $lng, and $tab.

{
global $lng;
$tpltab = new ilTemplate("tpl.tabs.html", true, true);
for ($i=1; $i<=4; $i++)
{
$tpltab->setCurrentBlock("tab");
if ($a_hl == $i)
{
$tabtype = "tabactive";
$tab = $tabtype;
}
else
{
$tabtype = "tabinactive";
$tab = "tab";
}
switch ($i)
{
case 1:
$txt = $lng->txt("view_content");
break;
case 2:
$txt = $lng->txt("edit_properties");
break;
case 3:
$txt = $lng->txt("perm_settings");
break;
case 4:
$txt = $lng->txt("show_owner");
break;
} // switch
$tpltab->setVariable("CONTENT", $txt);
$tpltab->setVariable("TABTYPE", $tabtype);
$tpltab->setVariable("TAB", $tab);
$tpltab->setVariable("LINK", $a_o["LINK".$i]);
$tpltab->parseCurrentBlock();
}
return $tpltab->get();
}
ilUtil::sort_func (   $a,
  $b 
)

sub-function to sort an array

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

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

References ilStr\strCmp(), and ilStr\strToUpper().

{
global $array_sortby,$array_sortorder;
// this comparison should give optimal results if
// locale is provided and mb string functions are supported
if ($array_sortorder == "asc")
{
return ilStr::strCmp($a[$array_sortby], $b[$array_sortby]);
}
if ($array_sortorder == "desc")
{
return !ilStr::strCmp($a[$array_sortby], $b[$array_sortby]);
return strcoll(ilStr::strToUpper($b[$array_sortby]), ilStr::strToUpper($a[$array_sortby]));
}
}

+ Here is the call graph for this function:

ilUtil::sort_func_numeric (   $a,
  $b 
)

sub-function to sort an array

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

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

{
global $array_sortby,$array_sortorder;
if ($array_sortorder == "asc")
{
return $a["$array_sortby"] > $b["$array_sortby"];
}
if ($array_sortorder == "desc")
{
return $a["$array_sortby"] < $b["$array_sortby"];
}
}
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 3057 of file class.ilUtil.php.

References stableSortArray().

Referenced by ilAdminUserSearchGUI\__setTableGUIUserData(), ilContainerSessionsContentGUI\__showMaterials(), ilCourseItems\__sort(), ilCourseContentGUI\__sortByStart(), ilObjUserFolderGUI\_addLearningProgressWorksheet(), ilCourseObjectiveMaterials\_getAssignableMaterials(), ilExport\_getLastExportFileDate(), ilExport\_getLastExportFileInformation(), ilNewsItem\_getNewsItemsOfUser(), ilCourseItems\_sort(), ilTemplate\addILIASFooter(), ilColumnGUI\determineBlocks(), ilObjTypeDefinitionGUI\editObject(), ilObjCourseGUI\fetchPrintMemberData(), ilObjCourseGUI\fetchPrintSubscriberData(), ilDataLoader\generateCourses(), ilNewsItem\getAggregatedChildNewsData(), ilNewsItem\getAggregatedNewsData(), ilObjectDefinition\getGroupedRepositoryObjectTypes(), ilTable2GUI\getHTML(), ilClipboardTableGUI\getItems(), ilPageObject\getRecentChanges(), ilObjCourse\getSubItems(), ilObjectDefinition\getSubObjects(), ilTagging\getTagsForUser(), ilPCQuestionGUI\insert(), ilObjectListGUI\insertPreconditions(), ilObjUserFolderGUI\learningProgressObject(), ilObjCategoryGUI\listUsersObject(), ilObjGroupGUI\membersGalleryObject(), ilObjCourseGUI\membersGalleryObject(), ilObjRoleTemplateGUI\permObject(), ilObjRoleGUI\permObject(), ilObjExercise\read(), ilObjUserFolderGUI\searchUserObject(), ilLMPresentationGUI\showPrintView(), ilObjSCORMLearningModuleGUI\showTrackingItem(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItemsBySco(), ilObjSCORMLearningModuleGUI\showTrackingItemSco(), ilTableGUI\sortData(), ilContainerSorting\sortItems(), ilLinkResourceItems\sortItems(), ilLDAPSettingsGUI\sortMappingData(), ilExplorer\sortNodes(), ilCourseObjectiveQuestionAssignmentTableGUI\sortQuestions(), ilShopResultPresentationGUI\sortResult(), ilContainerSorting\sortSubItems(), ilObjTypeDefinitionGUI\viewObject(), ilObjSystemFolderGUI\viewObject(), ilObjLanguageExtGUI\viewObject(), and ilObjUserFolderGUI\viewObject().

{
include_once("./Services/Utilities/classes/class.ilStr.php");
// BEGIN WebDAV: Provide a 'stable' sort algorithm
if (! $a_keep_keys) {
return self::stableSortArray($array,$a_array_sortby,$a_array_sortorder,$a_numeric,$a_keep_keys);
}
// END WebDAV Provide a 'stable' sort algorithm
global $array_sortby,$array_sortorder;
$array_sortby = $a_array_sortby;
if ($a_array_sortorder == "desc")
{
$array_sortorder = "desc";
}
else
{
$array_sortorder = "asc";
}
if($a_numeric)
{
if ($a_keep_keys)
{
uasort($array, array("ilUtil", "sort_func_numeric"));
}
else
{
usort($array, array("ilUtil", "sort_func_numeric"));
}
}
else
{
if ($a_keep_keys)
{
uasort($array, array("ilUtil", "sort_func"));
}
else
{
usort($array, array("ilUtil", "sort_func"));
}
}
//usort($array,"ilUtil::sort_func");
return $array;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::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.

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

@param      array   array to sort
@param      string  sort_column
@param      string  sort_order (ASC or DESC)
@param      bool    sort numeric?

@return     array   sorted array

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

References mergesort().

Referenced by sortArray().

{
global $array_sortby,$array_sortorder;
$array_sortby = $a_array_sortby;
if ($a_array_sortorder == "desc")
{
$array_sortorder = "desc";
}
else
{
$array_sortorder = "asc";
}
// Create a copy of the array values for sorting
$sort_array = array_values($array);
if($a_numeric)
{
ilUtil::mergesort($sort_array, array("ilUtil", "sort_func_numeric"));
}
else
{
ilUtil::mergesort($sort_array, array("ilUtil", "sort_func"));
}
return $sort_array;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilUtil::StopWatch (   $begin = -1)

StopWatch benchmark scriptcode.

Usage: $t1 = StopWatch(); // starts the StopWatch // your code you want to benchmark $diff = StopWatch($t1); // stops the StopWatch

$diff contains the time elapsed so far from the point where you set the marker $t1 in microseconds

public

Parameters
floatstarttime in microseconds
Returns
float time in microseconds

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

Referenced by ilInitialisation\requireCommonIncludes().

{
$m = explode(" ",microtime());
$m = $m[0] + $m[1];
if ($begin != -1)
{
$m = $m - $begin;
}
return($m);
}

+ Here is the caller graph for this function:

ilUtil::stripOnlySlashes (   $a_str)

strip slashes if magic qoutes is enabled

Parameters
stringstring

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

Referenced by ilTextAreaInputGUI\checkInput().

{
if (ini_get("magic_quotes_gpc"))
{
$a_str = stripslashes($a_str);
}
return $a_str;
}

+ Here is the caller graph for this function:

ilUtil::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

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 2763 of file class.ilUtil.php.

Referenced by ilTemplate\fillHeader(), ilTemplate\fillWindowTitle(), secureString(), ilTemplate\setHeaderPageTitle(), ilTemplate\setTitle(), and ilFramesetGUI\show().

{
//$a_str = strip_tags($a_str, $a_allow);
$negativestr = "a,abbr,acronym,address,applet,area,b,base,basefont,".
"bdo,big,blockquote,body,br,button,caption,center,cite,code,col,".
"colgroup,dd,del,dfn,dir,div,dl,dt,em,fieldset,font,form,frame,".
"frameset,h1,h2,h3,h4,h5,h6,head,hr,html,i,iframe,img,input,ins,isindex,kbd,".
"label,legend,li,link,map,menu,meta,noframes,noscript,object,ol,".
"optgroup,option,p,param,q,s,samp,script,select,small,span,".
"strike,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,".
"title,tr,tt,u,ul,var";
$a_allow = strtolower ($a_allow);
$negatives = split (",",$negativestr);
$outer_old_str = "";
while($outer_old_str != $a_str)
{
$outer_old_str = $a_str;
foreach ($negatives as $item)
{
$pos = strpos($a_allow, "<$item>");
// remove complete tag, if not allowed
if ($pos === false)
{
$old_str = "";
while($old_str != $a_str)
{
$old_str = $a_str;
$a_str = preg_replace("/<\/?\s*$item(\/?)\s*>/i", "", $a_str);
$a_str = preg_replace("/<\/?\s*$item(\/?)\s+([^>]*)>/i", "", $a_str);
}
}
}
}
if ($a_rm_js)
{
// remove all attributes if an "on..." attribute is given
$a_str = preg_replace("/<\s*\w*(\/?)(\s+[^>]*)?(\s+on[^>]*)>/i", "", $a_str);
// remove all attributes if a "javascript" is within tag
$a_str = preg_replace("/<\s*\w*(\/?)\s+[^>]*javascript[^>]*>/i", "", $a_str);
// remove all attributes if an "expression" is within tag
// (IE allows something like <b style='width:expression(alert(1))'>test</b>)
$a_str = preg_replace("/<\s*\w*(\/?)\s+[^>]*expression[^>]*>/i", "", $a_str);
}
return $a_str;
}

+ Here is the caller graph for this function:

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 2402 of file class.ilUtil.php.

References secureString().

Referenced by ilShopTopicsGUI\__construct(), ilObjChatGUI\__formatMessage(), ilUserFilter\__parseQueryString(), ilRepositorySearchGUI\__parseQueryString(), ilAdminUserSearchGUI\__parseQueryString(), ilSearchGUI\__parseQueryString(), ilAdvancedSearchGUI\__performContentSearch(), ilAdvancedSearchGUI\__performEntitySearch(), ilAdvancedSearchGUI\__performGeneralSearch(), ilAdvancedSearchGUI\__performKeywordSearch(), ilAdvancedSearchGUI\__performLifecycleSearch(), ilAdvancedSearchGUI\__performTaxonSearch(), ilAdvancedSearchGUI\__performTitleSearch(), ilObjiLincCourseGUI\__search(), ilPaymentTrusteeGUI\__search(), ilLMStatisticsGUI\__search(), ilPaymentStatisticGUI\__search(), ilObjRoleGUI\__search(), ilObjPaymentSettingsGUI\__search(), ilObjPaymentSettingsGUI\__searchSP(), ilPCParagraph\_input2xml(), ilObjFile\_lookupFileName(), ilObjFileAccess\_lookupVersion(), ilObjCourseGroupingGUI\add(), ilGroupRegistrationGUI\add(), ilCourseRegistrationGUI\add(), ilPageEditorGUI\addChangeComment(), ilObjGlossaryGUI\addDefinition(), ilObjChatGUI\addPrivateRoomAsyncObject(), ilPermissionGUI\addRole(), ilObjChatGUI\addRoomObject(), ilObjGlossaryGUI\addTerm(), ilObjPaymentSettingsGUI\addVendorObject(), ilPageEditorGUI\assignCharacteristic(), ilObjRole\assignData(), ilObjRoleGUI\changeExistingObjectsObject(), ilObjSystemFolderGUI\changeHeaderTitleObject(), ilCourseAgreementGUI\checkCourseDefinedFields(), ilSetup\checkDataDirSetup(), ilFormulaInputGUI\checkInput(), ilNonEditableValueGUI\checkInput(), ilLuceneQueryInputGUI\checkInput(), ilBirthdayInputGUI\checkInput(), ilFeedUrlInputGUI\checkInput(), ilFontSizeInputGUI\checkInput(), ilEMailInputGUI\checkInput(), ilUserLoginInputGUI\checkInput(), ilBackgroundImageInputGUI\checkInput(), ilRegExpInputGUI\checkInput(), ilNumericStyleValueInputGUI\checkInput(), ilCustomInputGUI\checkInput(), ilRadioMatrixInputGUI\checkInput(), ilTextWizardInputGUI\checkInput(), ilAdvSelectInputGUI\checkInput(), ilSelectInputGUI\checkInput(), ilMultiSelectInputGUI\checkInput(), ilRadioGroupInputGUI\checkInput(), ilWidthHeightInputGUI\checkInput(), ilMailAddressbookGUI\checkInput(), ilBackgroundPositionInputGUI\checkInput(), ilLocationInputGUI\checkInput(), ilCheckboxInputGUI\checkInput(), ilTRBLBorderStyleInputGUI\checkInput(), ilTRBLBorderWidthInputGUI\checkInput(), ilRepositorySelectorInputGUI\checkInput(), ilSuggestedSolutionSelectorGUI\checkInput(), ilTRBLNumericStyleValueInputGUI\checkInput(), ilCSSRectInputGUI\checkInput(), ilPasswordInputGUI\checkInput(), ilTextInputGUI\checkInput(), ilTRBLColorPickerInputGUI\checkInput(), ilNumberInputGUI\checkInput(), ilDateTimeInputGUI\checkInput(), ilDurationInputGUI\checkInput(), ilTextAreaInputGUI\checkInput(), ilDateDurationInputGUI\checkInput(), ilSetup\checkLogSetup(), ilSetup\checkToolsSetup(), ilNestedSetXML\clean(), ilObjSurvey\cloneTextblocks(), ilObjCourseGroupingGUI\create(), ilPCFileListGUI\create(), ilPCTableGUI\create(), ilBookmarkAdministrationGUI\createBookmark(), ilBookmarkAdministrationGUI\createBookmarkFolder(), ilFileSystemGUI\createDirectory(), ilFileUtils\createFile(), ilObjRoleTemplateGUI\createObject(), ilObjGlossaryGUI\createObject(), ilObjFolderGUI\createObject(), ilObjCategoryGUI\createObject(), ilObjectGUI\createObject(), ilObjContentObjectGUI\createObject(), ilFileSystemGUI\deleteFile(), ilObjGroupGUI\downloadExportFileObject(), ilFileSystemGUI\downloadFile(), ilPCParagraphGUI\edit(), ilObjCourseGroupingGUI\edit(), ilPCDataTableGUI\editData(), ilObjRootFolderGUI\editObject(), ilObjRoleTemplateGUI\editObject(), ilObjCategoryGUI\editObject(), ilObjectGUI\editObject(), ilObjRoleGUI\editObject2(), ilObjAuthSettingsGUI\editSOAPObject(), ilMailFolderGUI\enterFolderData(), ilChatPresentationGUI\executeCommand(), ilFileSystemGUI\extCommand(), ilPDNewsTableGUI\fillRow(), ilPaymentCouponGUI\generateCodes(), ilObjPaymentSettingsGUI\getERParray(), ilCertificateGUI\getFormFieldsFromPOST(), ilObjUser\getFullname(), ilAssignedUsersTableGUI\getItems(), ilUserTableGUI\getItems(), ilObjLanguageExtGUI\getPar(), ilHtmlBlockGUIGen\getValuesHtmlBlock(), ilObjSessionGUI\handleFileUpload(), ilObjForumGUI\handleFormInput(), ilObjForumGUI\ilObjForumGUI(), ilPaymentCouponGUI\importCodes(), ilPCTable\importHtml(), ilInitialisation\initILIAS(), ilInitialisation\initLanguage(), ilLuceneSearchGUI\initUserSearchCache(), ilFileSystemGUI\listFiles(), ilCalendarAppointmentGUI\load(), ilObjSessionGUI\load(), ilObjGroupGUI\load(), ilAdvancedMDSettingsGUI\loadFieldFormData(), ilECSUser\loadFromGET(), ilAdvancedMDRecordGUI\loadFromPost(), ilLDAPRoleGroupMappingSettings\loadFromPost(), ilAdvancedMDSettingsGUI\loadRecordFormData(), ilCalendarAppointmentGUI\loadRecurrenceSettings(), ilObjSessionGUI\loadRecurrenceSettings(), ilLDAPSettingsGUI\loadRoleAssignmentRule(), ilStartUpGUI\migrateAccount(), ilCSVReader\open(), ilObjUserTrackingGUI\outputTrackingDataObject(), ilShopAdvancedSearchGUI\parseQueryString(), ilMailingListsGUI\performDelete(), ilMailingListsGUI\performDeleteMembers(), ilShopGUI\performSearch(), ilRepositorySearchGUI\performSearch(), ilPaymentTrusteeGUI\performSearch(), ilPaymentStatisticGUI\performSearch(), ilObjWikiGUI\performSearchObject(), ilObjPaymentSettingsGUI\performSearchSPObject(), prepareFormOutput(), ilCourseDefinedFieldDefinition\prepareValues(), ilICalParser\purgeString(), ilMDFormat\read(), ilMDEntity\read(), ilMDLocation\read(), ilMDIdentifier_\read(), ilMDIdentifier\read(), ilMDTypicalAgeRange\read(), ilMDDescription\read(), ilMDKeyword\read(), ilMDTaxon\read(), ilMDAnnotation\read(), ilMDRights\read(), ilMDTaxonPath\read(), ilMDContribute\read(), ilMDLifecycle\read(), ilMDRequirement\read(), ilMDRelation\read(), ilMDMetaMetadata\read(), ilMDClassification\read(), ilMDTechnical\read(), ilMDGeneral\read(), ilMDEducational\read(), ilShopController\redirect(), ilLPFilterGUI\refresh(), ilLuceneSearchGUI\remoteSearch(), ilSearchGUI\remoteSearch(), ilLuceneAdvancedSearchGUI\remoteSearch(), ilFileSystemGUI\renameFile(), ilFileSystemGUI\renameFileForm(), ilObjChatGUI\renameRoomObject(), ilCalendarCategoryGUI\save(), ilRadiusSettingsGUI\save(), ilRegistrationSettingsGUI\save(), ilLMPageObjectGUI\save(), ilObjCalendarSettingsGUI\save(), ilObject2GUI\save(), ilFeedbackGUI\save(), ilCourseObjectivesGUI\save(), ilStructureObjectGUI\save(), ilObjPrivacySecurityGUI\save_security(), ilCourseContentGUI\saveAcceptance(), ilPCMediaObjectGUI\saveAliasProperties(), ilObjSCORM2004LearningModuleGUI\saveAllTitles(), ilPCImageMapEditorGUI\saveArea(), ilImageMapEditorGUI\saveArea(), ilRegistrationSettingsGUI\saveAssignment(), ilMailingListsGUI\saveAssignmentForm(), ilObjPaymentSettingsGUI\saveBmfSettingsObject(), ilPaymentCouponGUI\saveCodeForm(), ilObjExerciseGUI\saveCommentsObject(), ilPaymentCouponGUI\saveCouponForm(), ilObjSurveyGUI\saveDefineQuestionblockObject(), ilGlossaryTermGUI\saveDefinition(), ilObjFileAccessSettingsGUI\saveDiskQuotaMailTemplate(), ilObjFileAccessSettingsGUI\saveDownloadingSettings(), ilMailAddressbookGUI\saveEntry(), ilObjMDSettingsGUI\saveEntry(), ilCourseUserFieldsGUI\saveField(), ilMailFolderGUI\saveFolderSettings(), ilObjPaymentSettingsGUI\saveGeneralSettingsObject(), ilObjExternalToolsSettingsGUI\saveGoogleMapsObject(), ilObjWikiGUI\saveGradingObject(), ilObjSystemFolderGUI\saveHeaderTitleObject(), ilObjSystemFolderGUI\saveHeaderTitlesObject(), ilObjSurveyGUI\saveHeadingObject(), ilHtmlBlockGUIGen\saveHtmlBlock(), ilTaggingGUI\saveInput(), ilObjExternalToolsSettingsGUI\savejsMathObject(), ilPersonalProfileGUI\saveLocation(), ilPersonalProfileGUI\saveMailOptions(), ilLDAPSettingsGUI\saveMapping(), ilObjGroupGUI\saveMapSettingsObject(), ilObjCourseGUI\saveMapSettingsObject(), ilObjTestGUI\saveMarkSchemaFormData(), ilObjTestGUI\saveMarksObject(), ilSetup\saveMasterSetup(), ilPageObject\saveMetaKeywords(), ilObjUserFolderGUI\saveNewAccountMailObject(), ilObjRoleTemplateGUI\saveObject(), ilObjFileBasedLMGUI\saveObject(), ilObjFolderGUI\saveObject(), ilObjLanguageExtGUI\saveObject(), ilObjCategoryGUI\saveObject(), ilObjSAHSLearningModuleGUI\saveObject(), ilObjectGUI\saveObject(), ilObjStyleSheetGUI\saveObject(), ilMailOptionsGUI\saveOptions(), ilContainerGUI\savePageContentObject(), ilObjPaymentSettingsGUI\savePaypalSettingsObject(), SurveySingleChoiceQuestionGUI\savePhraseanswers(), SurveyMatrixQuestionGUI\savePhrasecolumns(), ilPersonalProfileGUI\saveProfile(), ilPCFileListGUI\saveProperties(), ilObjMediaObjectGUI\savePropertiesObject(), ilRatingGUI\saveRating(), ilLDAPSettingsGUI\saveRoleMapping(), ilObjTaggingSettingsGUI\saveSettings(), ilObjLearningResourcesSettingsGUI\saveSettings(), ilECSSettingsGUI\saveSettings(), ilObjSystemFolderGUI\saveSettingsObject(), ilObjExerciseGUI\saveStatusObject(), ilObjContentObjectGUI\saveStyleSettings(), ilObjWikiGUI\saveStyleSettingsObject(), ilContainerGUI\saveStyleSettingsObject(), ilMailFolderGUI\saveSubFolderSettings(), ilGlossaryTermGUI\saveTerm(), ilShopTopicsGUI\saveTopic(), SurveyTextQuestion\saveUserInput(), ilFeedbackGUI\saveVote(), ilObjFileAccessSettingsGUI\saveWebDAVSettings(), assTextQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), ilLMStatisticsGUI\search(), ilAdvancedSearchGUI\searchAdvancedMD(), ilObjectGUI\searchCloneSourceObject(), ilForumModeratorsGUI\searchModerators(), ilObjiLincCourseGUI\searchObject(), ilObjRoleGUI\searchObject(), ilObjPaymentSettingsGUI\searchObject(), ilTestScoringGUI\setFeedbackManual(), ilObjMediaObjectGUI\setObjectPerCreationForm(), ilPCTableGUI\setProperties(), ilPCTableGUI\setSpans(), ilPCTableGUI\setStyles(), ilPCTableGUI\setWidths(), ilCalendarCategoryGUI\sharePerformSearch(), ilPaymentCouponGUI\showCodeImport(), ilPaymentCouponGUI\showCodes(), ilPaymentCouponGUI\showCoupons(), ilCourseRegistrationGUI\showCourseDefinedFields(), ilStartUpGUI\showLogin(), ilPaymentCouponGUI\showObjects(), ilMailSearchGUI\showResults(), ilObjTaggingSettingsGUI\showUsers(), ilFeedbackGUI\stats(), stripSlashesArray(), stripSlashesRecursive(), ilPasswordAssistanceGUI\submitAssignPasswordForm(), ilPasswordAssistanceGUI\submitAssistanceForm(), ilPasswordAssistanceGUI\submitUsernameAssistanceForm(), ilSetup\testLatex(), ilFileSystemGUI\unzipFile(), ilPaymentBillAdminGUI\update(), ilCalendarCategoryGUI\update(), ilPCTabsGUI\update(), ilObjCourseGroupingGUI\update(), ilMDEditorGUI\updateAnnotation(), ilImageMapEditorGUI\updateAreas(), ilPCImageMapEditorGUI\updateAreas(), ilBookmarkAdministrationGUI\updateBookmark(), ilBookmarkAdministrationGUI\updateBookmarkFolder(), ilMDEditorGUI\updateClassification(), ilNestedSetXML\updateDomNode(), ilMDEditorGUI\updateEducational(), ilObjMDSettingsGUI\updateEntry(), ilCourseUserFieldsGUI\updateField(), ilMDEditorGUI\updateGeneral(), ilHtmlBlockGUIGen\updateHtmlBlock(), ilObjGroupGUI\updateInfoObject(), ilObjCourseGUI\updateInfoObject(), ilMDEditorGUI\updateLifecycle(), ilObjLinkResourceGUI\updateLinksObject(), ilExerciseXMLParser\updateMarking(), ilSetup\updateMasterSettings(), ilObjSessionGUI\updateMembersObject(), ilMDEditorGUI\updateMetaMetaData(), ilNoteGUI\updateNote(), ilObjForumGUI\updateObject(), ilObjRemoteCourseGUI\updateObject(), ilObjFolderGUI\updateObject(), ilObjRootFolderGUI\updateObject(), ilObjExerciseGUI\updateObject(), ilObjChatServerGUI\updateObject(), ilObjRoleTemplateGUI\updateObject(), ilObjCategoryGUI\updateObject(), ilObjectGUI\updateObject(), ilObjCourseGUI\updateObject(), ilObjRoleGUI\updateObject2(), ilObjUserGUI\updateObjectOld(), ilMDEditorGUI\updateQuickEdit(), ilMDEditorGUI\updateQuickEdit_scorm(), ilMDEditorGUI\updateQuickEdit_scorm_propagate(), ilMDEditorGUI\updateRelation(), ilMDEditorGUI\updateRights(), ilObjChatServerGUI\updateSmiliesObject(), ilRegistrationGUI\updateSubscriptionRequest(), ilMDEditorGUI\updateTechnical(), ilGlossaryTermGUI\updateTerm(), ilObjGlossaryGUI\updateTerm(), ilLPListOfObjectsGUI\updateUser(), ilFileSystemGUI\uploadFile(), ilObjChatServerGUI\uploadSmileyObject(), ilGroupRegistrationGUI\validate(), ilCourseRegistrationGUI\validate(), and ilCourseRegistrationGUI\validateCourseDefinedFields().

{
if (ini_get("magic_quotes_gpc"))
{
$a_str = stripslashes($a_str);
}
return ilUtil::secureString($a_str, $a_strip_html, $a_allow);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Strip slashes from array and sub-arrays.

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

References stripSlashes().

Referenced by ilMultipleChoiceWizardInputGUI\checkInput(), ilImagemapFileInputGUI\checkInput(), ilMatchingPairWizardInputGUI\checkInput(), ilImageWizardInputGUI\checkInput(), ilAnswerWizardInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), ilSingleChoiceWizardInputGUI\checkInput(), ilErrorTextWizardInputGUI\checkInput(), ilCategoryWizardInputGUI\checkInput(), and ilKVPWizardInputGUI\checkInput().

{
if (is_array($a_data))
{
foreach ($a_data as $k => $v)
{
if (is_array($v))
{
$a_data[$k] = ilUtil::stripSlashesRecursive($v, $a_strip_html, $a_allow);
}
else
{
$a_data[$k] = ilUtil::stripSlashes($v, $a_strip_html, $a_allow);
}
}
}
else
{
$a_data = ilUtil::stripSlashes($a_data, $a_strip_html, $a_allow);
}
return $a_data;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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 580 of file class.ilUtil.php.

Referenced by ilLPListOfObjectsGUI\__renderContainerRow(), ilLPListOfProgressGUI\__renderContainerRow(), ilCourseContentGUI\__renderEvent(), ilCourseContentGUI\__renderItem(), ilCourseContentGUI\__renderUserItem(), ilLPListOfSettingsGUI\__showCollectionTable(), ilPaymentShoppingCartGUI\__showCouponInput(), ilLPListOfSettingsGUI\__showSCOTable(), ilObjCategoryGUI\_importCategoriesForm(), ilObjRoleGUI\askDeleteDesktopItemObject(), ilObjCourseGroupingGUI\askDeleteGrouping(), ilCourseObjectivesGUI\askDeleteObjective(), ilObjChatGUI\askDeleteRecordingsObject(), ilObjSystemFolderGUI\benchmarkObject(), ilObjContentObjectGUI\chapters(), ilCourseUserFieldsGUI\confirmDelete(), ilCourseArchivesGUI\confirmDeleteArchives(), ilMemberExportGUI\confirmDeleteExportFile(), ilObjGlossaryGUI\confirmDeleteExportFile(), ilObjContentObjectGUI\confirmDeleteExportFile(), ilObjUserFolderGUI\confirmDeleteExportFileObject(), ilObjMediaPoolGUI\confirmRemove(), ilObjGlossaryGUI\confirmTermDeletion(), ilBookmarkAdministrationGUI\delete(), ilObjContentObjectGUI\delete(), ilObjRoleFolderGUI\deleteObject(), ilObjStyleSheetGUI\deleteObject(), ilObjUserFolderGUI\deleteObject(), ilObjStyleSettingsGUI\deletePglObject(), ilObjStyleSheetFolderGUI\deleteStyleObject(), ilObjStyleSettingsGUI\deleteStyleObject(), ilObjSCORMLearningModuleGUI\deleteTrackingForUser(), ilObjSCORM2004LearningModuleGUI\deleteTrackingForUser(), ilObjTypeDefinitionGUI\displayList(), ilObjObjectFolderGUI\displayList(), ilObjSystemFolderGUI\displayList(), ilObjUserFolderGUI\displayList(), ilCourseContentGUI\displayRow(), ilRegistrationSettingsGUI\editEmailAssignments(), ilObjMediaObjectGUI\editFilesObject(), ilObjTypeDefinitionGUI\editObject(), ilRegistrationSettingsGUI\editRoleAccessLimitations(), ilRegistrationSettingsGUI\editRoles(), ilCourseContentGUI\editTimings(), ilObjSessionGUI\eventsListObject(), ilForumExportGUI\exportHTML(), ilObjGlossaryGUI\exportList(), ilObjContentObjectGUI\exportList(), ilObjUserFolderGUI\exportObject(), ilCourseObjectiveQuestionsTableGUI\fillRow(), ilObjUserFolderGUI\learningProgressObject(), ilObjContentObjectGUI\linkChecker(), ilObjLinkResourceGUI\linkCheckerObject(), ilConditionHandlerInterface\listConditions(), ilObjRoleGUI\listDesktopItemsObject(), ilObjGroupGUI\listExportFilesObject(), ilFileSystemGUI\listFiles(), ilObjCourseGroupingGUI\listGroupings(), ilSessionOverviewGUI\listSessions(), ilObjCourseGUI\listStructureObject(), ilGlossaryPresentationGUI\listTermByGiven(), ilObjGlossaryGUI\listTerms(), ilObjSessionGUI\materialsObject(), ilObjContentObjectGUI\pages(), ilObjRoleTemplateGUI\permObject(), ilForumExportGUI\printThread(), ilObjGlossaryGUI\quickList(), ilObjiLincClassroomGUI\removeClassroom(), ilTableGUI\render(), ilSCORM2004ScoGUI\sahs_questions(), ilSCORM2004ScoGUI\sco_resources(), ilObjectGUI\searchCloneSourceObject(), ilObjUserFolderGUI\searchUserObject(), ilObjCourseGroupingGUI\selectCourse(), ilObjCourseGUI\selectStarterObject(), ilCourseUserFieldsGUI\show(), ilObjUserFolderGUI\showActionConfirmation(), ilShopShoppingCartGUI\showCouponInput(), ilGlossaryPresentationGUI\showDownloadList(), ilLMPresentationGUI\showDownloadList(), ilMemberExportGUI\showFileList(), ilSCORM2004ScoGUI\showProperties(), ilObjSCORM2004LearningModuleGUI\showTrackingItem(), ilObjSCORMLearningModuleGUI\showTrackingItem(), ilObjSCORMLearningModuleGUI\showTrackingItemPerUser(), ilObjAICCLearningModuleGUI\showTrackingItems(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItemsBySco(), ilObjSCORMLearningModuleGUI\showTrackingItemSco(), ilStructureObjectGUI\subchap(), ilCourseArchivesGUI\view(), ilStructureObjectGUI\view(), ilObjFileAccessSettingsGUI\viewDiskQuotaReport(), and ilObjForumGUI\viewThreadObject().

{
if (!($a_num % 2))
{
return $a_css1;
}
else
{
return $a_css2;
}
}

+ Here is the caller graph for this function:

ilUtil::timearray2string (   $duration)

Return a string of time periods.

Parameters
mixed$durationAn array of named segments
Returns
string

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

References $key, and $lng.

Referenced by ilObjExerciseAccess\_lookupRemainingWorkingTimeString(), ilObjExerciseGUI\infoScreen(), and ilObjExerciseGUI\viewObject().

{
global $lng;
if (!is_array($duration))
{
return false;
}
foreach ($duration as $key => $value) {
// Plural
if ($value > 1)
{
$segment_name = $key;
$segment_name = $lng->txt($segment_name);
$segment = $value . ' ' . $segment_name;
}
else
{
$segment_name = substr($key, 0, -1);
$segment_name = $lng->txt($segment_name);
$segment = $value . ' ' . $segment_name;
}
$array[] = $segment;
}
$len = count($array);
if ($len>3)
{
$array=array_slice($array,0,(3-$len));
}
$str = implode(', ', $array);
return $str;
}

+ Here is the caller graph for this function:

ilUtil::unique_multi_array (   $array,
  $sub_key 
)

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 3196 of file class.ilUtil.php.

References $key.

{
$target = array();
$existing_sub_key_values = array();
foreach ($array as $key=>$sub_array)
{
if (!in_array($sub_array[$sub_key], $existing_sub_key_values))
{
$existing_sub_key_values[] = $sub_array[$sub_key];
$target[$key] = $sub_array;
}
}
return $target;
}
ilUtil::unmaskAttributeTag (   $a_str,
  $tag,
  $tag_att 
)

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

References $ilLog.

Referenced by unmaskSecureTags().

{
global $ilLog;
while (eregi("&lt;($tag $tag_att$tag_att=\"(([\$@!*()~;,_0-9A-z/:=%\\.&#?+\\-])*)\")&gt;",
$a_str, $found))
{
$un = array(".", "-", "+", "?", '$', "*", "(", ")");
$esc = array();
foreach($un as $v)
{
$esc[] = "\\".$v;
}
$ff = str_replace($un, $esc, $found[1]);
$old_str = $a_str;
$a_str = eregi_replace("&lt;".$ff."&gt;",
"<$tag $tag_att=\"".ilUtil::secureLink($found[2])."\">", $a_str);
if ($old_str == $a_str)
{
$ilLog->write("ilUtil::unmaskA-".htmlentities($old_str)." == ".
htmlentities($a_str));
return $a_str;
}
}
$a_str = str_replace("&lt;/$tag&gt;", "</$tag>", $a_str);
return $a_str;
}

+ Here is the caller graph for this function:

ilUtil::unmaskSecureTags (   $a_str,
  $allow_array 
)

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

References $t, unmaskAttributeTag(), and unmaskTag().

Referenced by secureString().

{
foreach ($allow_array as $t)
{
switch($t)
{
case "a":
$a_str = ilUtil::unmaskAttributeTag($a_str, "a", "href");
break;
case "img":
$a_str = ilUtil::unmaskAttributeTag($a_str, "img", "src");
break;
case "p":
case "div":
$a_str = ilUtil::unmaskTag($a_str, $t, array(
array("param" => "align", "value" => "left"),
array("param" => "align", "value" => "center"),
array("param" => "align", "value" => "justify"),
array("param" => "align", "value" => "right")
));
break;
default:
$a_str = ilUtil::unmaskTag($a_str, $t);
break;
}
}
return $a_str;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References $t.

Referenced by unmaskSecureTags().

{
$a_str = str_replace("&lt;".$t."&gt;", "<".$t.">", $a_str);
$a_str = str_replace("&lt;/".$t."&gt;", "</".$t.">", $a_str);
if (is_array($fix_param))
{
foreach ($fix_param as $p)
{
$k = $p["param"];
$v = $p["value"];
$a_str = str_replace("&lt;$t $k=\"$v\"&gt;",
"<"."$t $k=\"$v\"".">", $a_str);
}
}
return $a_str;
}

+ Here is the caller graph for this function:

ilUtil::unzip (   $a_file,
  $overwrite = false 
)

unzip file

Parameters
string$a_filefull path/filename
boolean$overwritepass true to overwrite existing files

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

References $dir, $file, createDirectory(), escapeShellArg(), and execQuoted().

Referenced by ilObjCategoryGUI\_importCategories(), ilObjStyleSheet\import(), ilCertificate\importCertificate(), ilObjGlossaryGUI\importFileObject(), ilObjContentObjectGUI\importFileObject(), ilObjSurvey\importObject(), ilSCORM2004ScoGUI\importSave(), ilObjUserFolderGUI\importUserRoleAssignmentObject(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), ilObjSCORM2004LearningModuleGUI\preview(), ilFileUtils\processZipFile(), ilFileDataGroup\unpackImportFile(), ilFileDataCourse\unpackImportFile(), ilFileSystemGUI\unzipFile(), ilObjSAHSLearningModuleGUI\uploadObject(), ilObjQuestionPoolGUI\uploadQplObject(), and ilObjTestGUI\uploadTstObject().

{
$pathinfo = pathinfo($a_file);
$dir = $pathinfo["dirname"];
$file = $pathinfo["basename"];
// unzip
$cdir = getcwd();
chdir($dir);
$unzip = PATH_TO_UNZIP;
// workaround for unzip problem (unzip of subdirectories fails, so
// we create the subdirectories ourselves first)
// get list
$unzipcmd = "-Z -1 ".ilUtil::escapeShellArg($file);
$arr = ilUtil::execQuoted($unzip, $unzipcmd);
$zdirs = array();
foreach($arr as $line)
{
if(is_int(strpos($line, "/")))
{
$zdir = substr($line, 0, strrpos($line, "/"));
$nr = substr_count($zdir, "/");
//echo $zdir." ".$nr."<br>";
while ($zdir != "")
{
$nr = substr_count($zdir, "/");
$zdirs[$zdir] = $nr; // collect directories
//echo $dir." ".$nr."<br>";
$zdir = substr($zdir, 0, strrpos($zdir, "/"));
}
}
}
asort($zdirs);
foreach($zdirs as $zdir => $nr) // create directories
{
}
// real unzip
if (!$overwrite)
{
}
else
{
$unzipcmd = "-o ".ilUtil::escapeShellArg($file);
}
ilUtil::execQuoted($unzip, $unzipcmd);
chdir($cdir);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

scan file for viruses and clean files if possible

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

References $lng, and ilVirusScannerFactory\_getInstance().

Referenced by ilUploadFiles\_copyUploadFile(), ilMultipleChoiceWizardInputGUI\checkInput(), ilFlashFileInputGUI\checkInput(), ilImagemapFileInputGUI\checkInput(), ilFileWizardInputGUI\checkInput(), ilImageWizardInputGUI\checkInput(), ilFileInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), ilSingleChoiceWizardInputGUI\checkInput(), assFileUpload\checkUpload(), moveUploadedFile(), ilFileUtils\processZipFile(), and ilFileDataExercise\storeContentAsFile().

{
global $lng;
if (IL_VIRUS_SCANNER != "None")
{
require_once("classes/class.ilVirusScannerFactory.php");
if (($vs_txt = $vs->scanFile($a_file, $a_orig_name)) != "")
{
if ($a_clean && (IL_VIRUS_CLEAN_COMMAND != ""))
{
$clean_txt = $vs->cleanFile($a_file, $a_orig_name);
if ($vs->fileCleaned())
{
$vs_txt.= "<br />".$lng->txt("cleaned_file").
"<br />".$clean_txt;
$vs_txt.= "<br />".$lng->txt("repeat_scan");
if (($vs2_txt = $vs->scanFile($a_file, $a_orig_name)) != "")
{
return array(false, nl2br($vs_txt)."<br />".$lng->txt("repeat_scan_failed").
"<br />".nl2br($vs2_txt));
}
else
{
return array(true, nl2br($vs_txt)."<br />".$lng->txt("repeat_scan_succeded"));
}
}
else
{
return array(false, nl2br($vs_txt)."<br />".$lng->txt("cleaning_failed"));
}
}
else
{
return array(false, nl2br($vs_txt));
}
}
}
return array(true,"");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

zips given directory/file into given zip.file

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

References $dir, $file, $name, escapeShellArg(), and execQuoted().

Referenced by ilScorm2004Export\buildExportFileHTML(), ilScorm2004Export\buildExportFileSCORM(), ilSurveyExport\buildExportFileXML(), ilContObjectExport\buildExportFileXML(), ilQuestionpoolExport\buildExportFileXML(), ilGlossaryExport\buildExportFileXML(), ilTestExport\buildExportFileXML(), ilCertificate\deliverExportFileXML(), ilObjFolder\downloadFolder(), ilObjDlBook\export(), ilObjStyleSheet\export(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilObjContentObject\exportSCORM(), assFileUpload\getFileUploadZIPFile(), ilLMPresentationGUI\offlineexport(), ilFSStorageCourse\zipArchive(), ilFileDataGroup\zipFile(), and ilFileDataCourse\zipFile().

{
$cdir = getcwd();
if($compress_content)
{
$a_dir .="/*";
$pathinfo = pathinfo($a_dir);
chdir($pathinfo["dirname"]);
}
$pathinfo = pathinfo($a_file);
$dir = $pathinfo["dirname"];
$file = $pathinfo["basename"];
if(!$compress_content)
{
chdir($dir);
}
$zip = PATH_TO_ZIP;
if(!$zip)
{
chdir($cdir);
return false;
}
if (is_array($a_dir))
{
$source = "";
foreach($a_dir as $dir)
{
$name = basename($dir);
$source.= " ".ilUtil::escapeShellArg($name);
}
}
else
{
$name = basename($a_dir);
if (trim($name) != "*")
{
}
else
{
$source = $name;
}
}
$zipcmd = "-r ".ilUtil::escapeShellArg($a_file)." ".$source;
ilUtil::execQuoted($zip, $zipcmd);
chdir($cdir);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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