Outputs the table data in sql format
package | Default |
---|---|
Outputs the table structure in sql format
package | Default |
---|---|
This function is adapted from code coming from Zend Framework.
package | Default |
---|---|
copyright | Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com) |
license | https://framework.zend.com/license/new-bsd New BSD License |
Return accepted codingsArray for importing files
Used in vvimport TODO : use in token and
package | Default |
---|---|
array
package | Default |
---|
string
string
Renames a language code in the whole LimeSurvey database
package | Default |
---|
string
string
package | Default |
---|
mixed
mixed
string
integer
array
Add two arbitrary precision numbers
package | Default |
---|---|
var | optional |
Compare two arbitrary precision numbers
package | Default |
---|---|
var | optional |
Divide two arbitrary precision numbers
package | Default |
---|---|
var | optional |
Get modulus of an arbitrary precision number
package | Default |
---|---|
var | optional |
Multiply two arbitrary precision numbers
package | Default |
---|---|
var | optional |
Raise an arbitrary precision number to another
package | Default |
---|---|
var | optional |
Raise an arbitrary precision number to another, reduced by a specified modulus
package | Default |
---|---|
var | optional |
Set or get default scale parameter for all bc math functions
package | Default |
---|---|
var | |
Get the square root of an arbitrary precision number
package | Default |
---|---|
var | optional |
Subtract one arbitrary precision number from another
package | Default |
---|---|
var | optional |
Builds the list of addon SQL select statements that builds the query result set
@param array $allfields An array containing the names of the fields/answers we want to display in the statistics summary
package | Default |
---|
integer
@param string $language The language to use
@return array $selects array of individual select statements that can be added/appended to
the 'where' portion of a SQL statement to restrict the result set
ie: array("FIELDNAME
='Y'", "FIELDNAME2
='Hello'");
buildXMLFromQuery() creates a datadump of a table in XML using XMLWriter
package | Default |
---|
mixed
The existing XMLWriter object
mixed
The table query to build from
string
If the XML tag of the resulting question should be named differently than the table name set it here
array<mixed,string>
array of columnames not to include in export
This function calculates how much space is actually used by all files uploaded using the File Upload question type
package | Default |
---|---|
returns | integer Actual space used in MB |
Check whether we can show the JS date picker with the current format
package | Default |
---|---|
returns | integer |
array Date format details for the question
array Available date formats
package | Default |
---|---|
deprecated | 2018-01-29 has undefined function my_utf8_decode inside !! |
string
string
boolean
Checks the validity of IP address $ip
package | Default |
---|
string
to check
boolean
true if the $ip is a valid IP address
package | KCFinder @version 3.12 @author Dany Alejandro Cabrera otello2040@gmail.com |
---|---|
This functions checks if the databaseversion in the settings table is the same one as required If not then the necessary upgrade procedures are run
package | Default |
---|---|
checks consistency of groups
package | Default |
---|
integer
\
checks if any group exists
package | Default |
---|
integer
\
checkMoveQuestionConstraintsForConditions()
package | Default |
---|
string
string
string
array
This should be read as:
checks questions in a survey for consistency
package | Default |
---|
integer
integer
array|boolean
$faildcheck
This function checks if there are set wrong values ('Y' or 'N') into table question_attributes. These are set to 1 and 0 if needed.
package | Default |
---|
cleanLanguagesFromSurvey() removes any languages from survey tables that are not in the passed list
package | Default |
---|
string
This function cleans files from the temporary directory being older than 1 day
package | Default |
---|---|
todo | Make the days configurable |
Used by usort() to order Error tokens by their position within the string This must be outside of the class in order to work in PHP 5.2
package | Default |
---|
array
array
integer
Used by usort() to order $this->questionSeq2relevance in proper order
package | Default |
---|
array
array
integer
package | Default |
---|---|
todo | Unify errors and warnings with a EMErrorComparableInterface |
integer
package | Default |
---|---|
used to translate simple text to html (replacing \n with <br />
package | Default |
---|
mixed
mixed
mixed
This is a convenience function for the coversion of datetime values
package | Default |
---|
mixed
string
mixed
string
convertGETtoPOST a function to create a post Request from get parameters !!! This functions result has to be wrappen in singlequotes!
package | Default |
---|
String
| The complete url with all parameters
String
| The onclick action for the element
This functions translates LimeSurvey specific locale code to a matching datetimepicker locale
package | Default |
---|
string
LimeSurvey locale code
This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case)
package | Default |
---|
string
integer
The value in bytes
This is a convenience function to convert any date, in any date format, to the global setting date format Check if the time shoul be rendered also
package | Default |
---|
string
boolean
string
Generate a chart for a question
@param int $iQuestionID ID of the question
package | Default |
---|
integer
ID of the survey @param mixed $type Type of the chart to be created - null produces bar chart, any other value produces pie chart @param array $lbl An array containing the labels for the chart items @param mixed $gdata An array containing the percentages for the chart items @param mixed $grawdata An array containing the raw count for the chart items @param pCache $cache An object containing [Hashkey] and [CacheFolder] @param mixed $sLanguageCode Language Code @param string $sQuestionType The question type @return false|string
This functions generates a a summary containing the SGQA for questions of a survey, enriched with options per question It can be used for the generation of statistics. Derived from StatisticsUserController
package | Default |
---|
integer
Id of the Survey in question
array
an array which is the result of a query in Questions model
string
array
The summary
This function generates an array containing the fieldcode, and matching data in the same order as the activate script
package | Default |
---|
string
'short' (default) or 'full' - full creates extra information like default values
\?boolean
boolean|integer
Limit to a certain qid only (for question preview) - default is false
string
The language to use
array
array
Returns the fieldmap for responses
package | Default |
---|---|
Throws |
|
array
Create a directory in tmp dir using a random string
package | Default |
---|
string
the temp directory (if empty will use the one from configuration)
string
wanted prefix for the directory
integer
wanted file mode for this directory
string
the path of the created directory
This function generates an array containing the fieldcode, and matching data in the same order as the activate script
package | Default |
---|
string
The Survey ID
string
'short' (default) or 'full' - full creates extra information like default values
boolean
integer
Limit to a certain qid only (for question preview) - default is false
string
The language to use
array
Get a random number between two values using openssl_random_pseudo_bytes
package | Default |
---|
integer
integer
string
This function imports a CSV file into the response table CSV file is deleted during process
package | Default |
---|
string
integer
array
Return array $result ("errors","warnings","success")
This function removes surrounding and masking quotes from the CSV field
package | Default |
---|
mixed
mixed
Return class of a specific row (hidden by relevance)
package | Default |
---|
integer
actual survey id
string
the base name of the question
string
The name of the question/row to test
array
the question attributes
string
example usage $date = "2006-12-31 21:00"; $shift "+6 hours"; // could be days, weeks.
.. see function strtotime() for usage
echo sql_date_shift($date, "Y-m-d H:i:s", $shift);
will output: 2007-01-01 03:00:00
package | Default |
---|
string
string
mixed
string
package | Default |
---|
integer
The previous database version
boolean
Run update silently with no output - this checks if the update can be run silently at all. If not it will not run any updates at all.
package | Default |
---|---|
deprecated | Do not use anymore. If you see this replace it with a proper ActiveRecord Model query |
Throws |
|
string
array|boolean
boolean
boolean|\CDbDataReader
Gets the table names. Do not prefix.
package | Default |
---|---|
uses | To get the tables like sql query |
string
String to match
array
Array of matched table names
Escapes a text value for db
package | Default |
---|
string
string
Return the database-specific random function to use in ORDER BY sql statements
package | Default |
---|---|
string
Return a sql statement for finding LIKE named tables Be aware that you have to escape underscore chars by using a backslash otherwise you might get table names returned you don't want
package | Default |
---|
mixed
string
Decodes token attribute data because due to bugs in the past it can be written in JSON or be serialized - future format should be JSON as serialized data can be exploited
package | Default |
---|
string
The original token attributes as stored in the database
array|mixed
Update Encryption for archived tables
package | Default |
---|---|
Throws |
|
\CDbConnection
Update encryption for CPDB participants
package | Default |
---|---|
Throws |
|
\CDbConnection
Update encryption for survey participants
package | Default |
---|
\CDbConnection
Update encryption for survey responses
package | Default |
---|---|
Throws |
|
\CDbConnection
package | Default |
---|---|
deprecated | 4.0 Replaced by core\QuestionTypes\RenderArrayFlexibleRow |
Construct answer part array_5point
package | Default |
---|
array
array
package | Default |
---|---|
deprecated | 4.0 Replaced by core\QuestionTypes\ArrayMultiscale |
Renders array by column question type.
package | Default |
---|---|
Throws |
|
array
array
Renders Gender Question Types.
package | Default |
---|
array
array
package | Default |
---|---|
deprecated | 4.?.? |
see | \RenderMultipleNumerical\DataSetMultipleNumerical |
package | Default |
---|---|
deprecated | 4.0 Replaced by core\QuestionTypes\RankingStyle |
Render the question view.
By default, it just renders the required core view from application/views/survey/... If user added a question template in the upload dirctory, add applied it to the question in its display settings, then the function will check if the required view exist in this directory and then will use this one to render the question.
Rem: all the logic has been moved to LSETwigViewRenderer::renderQuestion() We keep the function doRender here for convenience (it will probably be removed in further cycles of dev). *
package | Default |
---|
string
name of the view to be rendered.
array
data to be extracted into PHP variables and made available to the view script
boolean
whether the rendering result should be returned instead of being displayed to end users (should be always true)
Drops a column, automatically removes blocking default value on MSSQL
package | Default |
---|
string
string
Drop a default value in MSSQL
package | Default |
---|
string
mixed
Drops the primary key of a table
package | Default |
---|
string
string
This function drops a secondary key of an MSSQL database field by using the field name and the table name
package | Default |
---|
string
mixed
This function drops a unique Key of an MSSQL database field by using the field name and the table name
package | Default |
---|
string
string
Dummy helper intended to facilitate "twig only" strings to be picked by Translations Bot.
Since twig files are not scanned by the bot, translatable strings that only appear in twig files can be placed here in order to be scanned.
package | Default |
---|---|
Ellipsize String
This public static function will strip tags from a string, split it at its max_length and ellipsize
package | Default |
---|
string
string to ellipsize
integer
max length of string
integer
int (1|0) or float, .5, .2, etc for position to split
string
ellipsis ; Default '...'
string
ellipsized string
Sends email to tokens - invitations, reminders, registers, and confirmations Seems used only in remote_control : maybe move it to ?
package | Default |
---|
integer
array<mixed,\CActiveRecord>
string
type of notification invite|register|remind|confirm
array
of results
enforceSSLMode() $force_ssl is on or off, it checks if the current request is to HTTPS (or not). If $force_ssl is on, and the request is not to HTTPS, it redirects the request to the HTTPS version of the URL, if the request is to HTTPS, it rewrites all the URL variables so they also point to HTTPS.
package | Default |
---|---|
As gT(), but echoes directly
package | Default |
---|
string
string
Function for adding global 'void' function in Twig Needed to make possible to call functions and methods which return non-string result (object, resources and etc.) For example: {{ void(App.clientScript.registerScriptFile(.
..)) }}
package | Default |
---|
mixed
string
Javascript equivalent does not cope well with ENT_QUOTES and related PHP constants, so set default to ENT_QUOTES
package | Default |
---|
string
string
Javascript equivalent does not cope well with ENT_QUOTES and related PHP constants, so set default to ENT_QUOTES
package | Default |
---|
string
string
Find the closest matching Numerical input values in a list an replace it by the corresponding value within another list
package | Default |
---|---|
author | Johannes Weberhofer, 2013 |
double
integer
string
string
integer|null
Count the number of answered questions (non-empty)
package | Default |
---|
array
integer
Count the number of answered questions (non-empty) which match the first argument
package | Default |
---|
array
integer
Count the number of answered questions (non-empty) which meet the criteria (arg op value)
package | Default |
---|
array
integer
Return format a local time/date Need to test if timestamp is numeric (else E_WARNING with debug>0)
package | Default |
---|---|
link |
string
integer
string|false
Return true if the variable is NULL or blank.
package | Default |
---|
null|string|boolean
boolean
Display number with comma as radix separator, if needed
package | Default |
---|
string
string
If $test is true, return $iftrue, else return $iffalse
package | Default |
---|
mixed
mixed
mixed
mixed
Join together $args[1-N] with $arg[0]
package | Default |
---|
array
string
Return true if the variable is an integer for LimeSurvey Allow usage of numeric answercode as int Can not use is_int due to SQL DECIMAL system.
Join together $args[0-N] with ', '
package | Default |
---|
array
string
Implementation of listifop( $cmpAttr, $op, $value, $retAttr, $glue, $sgqa1, .
.., sgqaN ) Return a list of retAttr from sgqa1...sgqaN which pass the critiera (cmpAttr op value)
package | Default |
---|
array
string
return log($arg[0],$arg[1]=e)
package | Default |
---|
array
float
Get Unix timestamp for a date : false if parameters is invalid.
Get default value for unset (or null) value E_NOTICE if arguments are not numeric (debug>0), then test it before
package | Default |
---|
integer
integer
integer
integer
integer
integer
integer|boolean
Return true if $input matches the regular expression $pattern
package | Default |
---|
string
string
boolean
Compute the Sample Standard Deviation of a set of numbers ($args[0-N])
package | Default |
---|
array
float
Find position of first occurrence of unicode string in a unicode string, case insensitive
package | Default |
---|
string
: checked string
string
: string to find
: offset
integer|false
: position or false if not found
Finds first occurrence of a unicode string within another, case-insensitive
package | Default |
---|
string
: checked string
string
: string to find
boolean
: portion to return
string|false
Get unicode string length
package | Default |
---|
string
integer
Find position of first occurrence of unicode string in a unicode string
package | Default |
---|
string
: checked string
string
: string to find
integer
: offset
integer|false
: position or false if not found
Finds first occurrence of a unicode string within another
package | Default |
---|
string
: checked string
string
: string to find
boolean
: portion to return
string|false
Make an unicode string lowercase
package | Default |
---|
string
string
Make an unicode string uppercase
package | Default |
---|
string
string
Get part of unicode string
package | Default |
---|
string
integer
integer
string
Sum of values of answered questions which meet the criteria (arg op value)
package | Default |
---|
array
integer
Returns true if all non-empty values are unique
package | Default |
---|
array
boolean
Read a csv file and return a tmp resources to same file in utf8 CSV file is deleted during process
package | Default |
---|
string
string
from
resource
Take a date string and fill out missing parts, like day, hour, minutes (not seconds).
If string is NOT in standard date format (Y-m-d H:i), this methods makes no sense. Used when fetching answer for do_date, where answer can come from a default answer expression like date('Y'). Will also truncate date('c') to format Y-m-d H:i.
package | Default |
---|
string
string
This is a helper function for getAttributeFieldNames
package | Default |
---|
mixed
boolean
fixLanguageConsistency() fixes missing groups, questions, answers, quotas & assessments for languages on a survey
package | Default |
---|
string
string
string
boolean
package | Default |
---|
integer
integer
integer
fixes the numbering of questions This can happen if question 1 have subquestion code 1 and have question 11 in same survey and group (then same SGQA)
package | Default |
---|---|
todo | can call this function (no $_GET, but getParam) AND do it with Yii |
integer
Function rewrites the sortorder for a label set
package | Default |
---|
mixed
Label set ID
This function fixes Postgres sequences for one/all tables in a database This is necessary if a table is renamed. If tablename is given then only that table is fixed
package | Default |
---|
string
Table name without prefix
This function fixes the group ID and type on all subquestions, or removes the subquestions if the parent question's type doesn't allow them.
Optimized for minimum memory usage even on huge databases
package | Default |
---|---|
This functions removes all HTML tags, Javascript, CRs, linefeeds and other strange chars from a given text
package | Default |
---|
string
Text you want to clean
boolean
set to true for keep span, used for expression manager. Default: false
boolean
If set to true then all HTML entities will be decoded to the specified charset. Default: false
string
Charset to decode to if $decodeHTMLEntities is set to true. Default: UTF-8
string
strip new lines if true, if false replace all new line by \r\n. Default: true
string
Cleaned text
Calculate folder size NB: If this function is changed, please notify LimeSurvey GmbH.
An exact copy of this function is used to calculate storage limit on LimeSurvey Pro hosting.
package | Default |
---|
string
Folder
integer
Size in bytes.
A function to remove .
./ or ./ from paths to prevent directory traversal
package | Default |
---|
string
string
package | KCFinder @version 3.12 @author Dany Alejandro Cabrera otello2040@gmail.com |
---|---|
Get the original size of a zip archive to prevent Zip Bombing see comment here : http://php.net/manual/en/function.zip-entry-filesize.php
package | Default |
---|
string
integer
getArrayFilterExcludesCascadesForGroup() queries the database and produces a list of array_filter_exclude questions and targets with in the same group
package | Default |
---|---|
array
a keyed nested array, keyed by the qid of the question, containing cascade information
Retrieves the attribute field names from the related survey participants table
package | Default |
---|
mixed
The survey ID
array
The fieldnames
This function tries to find out a valid language code for the language of the browser used If it cannot find it it will return the default language from global settings
package | Default |
---|---|
Returns all available dateformats in a structured aray If $iDateFormat is given only the particual dateformat will be returned
package | Default |
---|---|
returns | array |
integer
string
Get the date format details for a specific question.
package | Default |
---|---|
returns | array |
array Question attributes
mixed Array of Survey attributes or surveyid
Get the date format for a specified survey
package | Default |
---|---|
returns | integer |
integer Survey id
string Survey language code (optional)
Returns Editor.
package | Default |
---|
string
Field Type
string
Field Name
integer|null
Survey ID
integer|null
Group ID
integer|null
Question ID
string
Action
string
Return error information from pattern of regular expression $pattern
package | Default |
---|
string
string
string|null
package | Default |
---|
integer
The Survey ID
string
Field code of the particular field
string
The stored response value
string
Initialized limesurvey_lang object for the resulting response data
string
Creates an array with details on a particular response for display purposes Used in Print answers, Detailed response view and Detailed admin notification email
package | Default |
---|
mixed
mixed
mixed
boolean
Apply conditions
array
getGidNext() returns the Gid of the group next to the current active group
package | Default |
---|
integer
integer
integer|string
The Gid of the next group or blank string if no group
getGidPrevious() returns the Gid of the group prior to the current active group
package | Default |
---|
integer
integer
integer|string
The GID of the previous group or blank string if no group
Returns a global setting
package | Default |
---|---|
deprecated | : use App()->getConfig($settingname) since all config are set at start of App : no need to read and test again |
string
string
getGroupDepsForConditions() get Dependencies between groups caused by conditions
package | Default |
---|
string
string
string
string
array
Example outupt assumin $index-by="by-depgid": Array ( [125] => Array // Group Id 125 is dependent on ( [123] => Array // Group Id 123 ( [depgpname] => G3 // GID-125 has name G3 [targetgpname] => G1 // GID-123 has name G1 [conditions] => Array ( [189] => Array // Because Question Id 189 ( [0] => 9 // Have condition 9 set [1] => 10 // and condition 10 set [2] => 14 // and condition 14 set )
)
)
[124] => Array // GID 125 is also dependent on GID 124
(
[depgpname] => G3
[targetgpname] => G2
[conditions] => Array
(
[189] => Array // Because Question Id 189 have conditions set
(
[0] => 11
)
[215] => Array // And because Question Id 215 have conditions set
(
[0] => 12
)
)
)
)
)
Usage example:
put your comment there.
..
package | Default |
---|
mixed
mixed
string
Queries the database for the sortorder of a group.
package | Default |
---|
mixed
The groups ID
integer
The sortorder digit
get the header
package | Default |
---|
boolean
: not used in any call (2016-10-18)
string
package | Default |
---|---|
This function tries to returns the 'real' IP address under all configurations Do not rely security-wise on the detected IP address as except for REMOTE_ADDR all fields could be manipulated by the web client
package | Default |
---|---|
string
Client's IP Address
Convert a 'dateformat' format string to a 'jsdate' format.
For Bootstrap, that means using capital letters, e.g. MM/DD/YYYY instead of mm/dd/yyyy and mm instead of MM for minutes.
package | Default |
---|---|
returns | string |
string
Find the label / input width
package | Default |
---|
string|integer
label width from attribute
string|integer
input width from attribute
array
labelWidth as integer,inputWidth as integer,defaultWidth as boolean
Returns labelsets for given language(s), or for all if null
package | Default |
---|
string
array
Returns a language code from the name
package | Default |
---|
string
this is the name of the language (e.g. 'English' see array in getLanguageData())
integer|string
package | Default |
---|
boolean
string
mixed
Returns the locale settings for a certain language code
package | Default |
---|
string
array
Array with locale details
Returns a language name from the code
package | Default |
---|---|
todo | Should not give back different data types |
string
boolean
string
string|array
Retrieves the last Insert ID realiable for cross-DB applications
package | Default |
---|
string
Needed for Postgres and MSSQL
string
Queries the database for the maximum sortorder of a group and returns the next higher one.
package | Default |
---|
integer
The survey ID
integer
Next free sortorder digit
Queries the database for the maximum sort order of questions inside question group.
package | Default |
---|
integer
integer
package | Default |
---|
string
Returns the full list of attribute token fields including the properties for each field Use this instead of plain Survey::model()->findByPk($iSurveyID)->tokenAttributes calls because Survey::model()->findByPk($iSurveyID)->tokenAttributes may contain old descriptions where the fields does not physically exist
package | Default |
---|
integer
The Survey ID
array
Convert a 'dateformat' format string to a 'phpdate' format.
package | Default |
---|---|
returns | string |
string
string
package | Default |
---|
string
This function returns the header for the printable survey
package | Default |
---|---|
String
getQuestDepsForConditions() get Dependencies between groups caused by conditions
package | Default |
---|
string
string
string
string
string
array
Example outupt assumin $index-by="by-depqid": Array ( [184] => Array // Question Id 184 ( [183] => Array // Depends on Question Id 183 ( [0] => 5 // Because of condition Id 5 )
)
)
Usage example:
Returns the questionAttribtue value set or '' if not set
package | Default |
---|---|
author | : lemeur |
string
string Optional: The language if the particualr attributes is localizable
string
Return data to populate a Google Map
package | Default |
---|
string
Survey id
array
Returns avaliable formats for Radix Points (Decimal Separators) or returns radix point info about a specific format.
@param int $format Format ID/Number [optional]
package | Default |
---|---|
integer|array
Generate a random string, using openssl if available, else using md5
package | Default |
---|
integer
wanted lenght of the random string (only for openssl mode)
string
Returns a sorted array of update objects with version higher than $iOldDBVersion
package | Default |
---|---|
todo | Move to class? |
integer
\CDbConnection
string
array<mixed,\LimeSurvey\Helpers\Update\DatabaseUpdateBase>
Return an array of subquestions for a given sid/qid
package | Default |
---|
integer
integer
string
Language of the subquestion text
array
Gets all survey infos in one big array including the language specific settings
package | Default |
---|
integer
The survey ID
string
The language code - if not given the base language of the particular survey is used
boolean
If true, don't use memoization
array|boolean
Returns array with survey info or false, if survey does not exist
getSurveyList() Queries the database (survey table) for a list of existing surveys
package | Default |
---|
boolean
If set to true an array instead of an HTML option list is given back
string|array
This string is returned containing formatted list of existing surveys
This function returns the complete directory path to a given template name
package | Default |
---|
mixed
string
This function returns the complete URL path to a given template name
package | Default |
---|
mixed
string
Retrieves the attribute names from the related survey participants table
package | Default |
---|
mixed
The survey ID
boolean
Set this to true if you only want the fieldnames of the additional attribue fields - defaults to false
array
The fieldnames as key and names as value in an Array
Get a list of all user groups All user group or filtered according to usercontrolSameGroupPolicy
package | Default |
---|---|
returns | array |
Returns a user list. If 'usercontrolSameGroupPolicy' is set and set to true, only users which are in the same group as me (--> logged in user) will be returned. Superadmin always gets the full list of users.
package | Default |
---|
string could be 'onlyuidarray' which only returns array with userids, default is 'fullinfoarray'
array
returns a list of user ids (param='onlyuidarray') or a list with full user details (e.g. uid, name, full_name etc.)
Exports a single table to XML
package | Default |
---|
integer
The survey ID
string
The database table name of the table to be export
string
What doctype should be written
string
Name of the tag table name in the XML file
string|boolean
XMLWriter object
Wrapper function to retrieve an xmlwriter object and do error handling if it is not compiled into PHP
package | Default |
---|---|
Compares two elements from an array (passed by the usort function) and returns -1, 0 or 1 depending on the result of the comparison of the sort order of the group_order and question_order field Used by : - remotecontrol_handle->export_statistics with merging group and question attributes (all in same array) - checkQuestions() in activate_helper function with ?
package | Default |
---|
mixed
mixed
integer
Returns $sToTranslate translated to $sLanguage (defaults to lang set in session) escaped with $sEscapeMode
package | Default |
---|
string
string
Valid values are html (this is the default, js and unescaped)
string
string
Returns true if the given survey has a File Upload Question Type
package | Default |
---|
integer
boolean
put your comment there.
..
package | Default |
---|
integer
string
boolean
make a string safe to include in an HTML 'value' attribute.
package | Default |
---|---|
deprecated | If you need this you are doing something wrong. Use CHTML functions instead. |
Format size in human readable format.
package | Default |
---|
integer
integer
string
Import default values inside $xml, record process in $results Also imports defaultvalue_l10ns.
package | Default |
---|
\SimpleXMLElement
array
array
package | Default |
---|
string
boolean
string
integer
This function return actual completion state
package | Default |
---|---|
string|boolean
(complete|incomplete|all) or false
This function checks if a certain template may be by modified, copied, deleted according to the settings in config.php
package | Default |
---|
mixed
Check if array is associative
package | Default |
---|
array
boolean
isCaptchaEnabled($screen, $usecaptchamode)
package | Default |
---|
string
boolean|null
Check if string is JSON array
package | Default |
---|
string
boolean
Returns true if passed $value is numeric
package | Default |
---|
boolean
Check if $str is an integer, or string representation of an integer
package | Default |
---|
string
boolean|integer
Test if a given zip file is Zip Bomb see comment here : http://php.net/manual/en/function.zip-entry-filesize.php
package | Default |
---|
string
integer
Decode a json string, sometimes needs stripslashes
package | Default |
---|
string
mixed
Creates a <select> HTML element for language selection for this survey
package | Default |
---|
integer
string
The selected language
string
package | Default |
---|
mixed
mixed
mixed
mixed
mixed
longestString() returns the length of the longest string past to it.
package | Default |
---|---|
peram | string $new_string integer $longest_length length of the (previously) longest string passed to it. |
integer
integer
representing the length of the longest string passed (updated if $new_string was longer than $longest_length)
usage should look like this: $longest_length = longestString( $new_string , $longest_length );
Must use ls_json_encode to json_encode content, otherwise LimeExpressionManager will think that the associative arrays are expressions and try to parse them.
package | Default |
---|---|
package | Default |
---|---|
Run an arbitrary sequence of semicolon-delimited SQL commands
Assumes that the input text (file or string) consists of a number of SQL statements ENDING WITH SEMICOLONS. The semicolons MUST be the last character in a line. Lines that are blank or that start with "#" or "--" (postgres) are ignored. Only tested with mysql dump files (mysqldump -p -d limesurvey) Function kindly borrowed by Moodle
package | Default |
---|
string
The path where a file with sql commands can be found on the server.
string
If no path is supplied then a string with semicolon delimited sql commands can be supplied in this argument.
boolean
Returns true if database was modified successfully.
Modifies a primary key in one command - this is only tested on MySQL
package | Default |
---|
string
The table name
array<mixed,string>
Column names to be in the new key
Deletes a column and removes all constraints from it
package | Default |
---|
string
The table the column should be deleted
string
The column that should be deleted
Translation helper function for plural forms which outputs right away
package | Default |
---|
string
integer
string
Translation helper function for plural forms
package | Default |
---|
string
integer
string
string
Find the numeric size according DB size for existing question for SPSS export Column name must be SGQA currently
package | Default |
---|
boolean
db type as decimal(30,10)
string
integersize.decimalsize
Outputs a full dump of the current LimeSurvey database
package | Default |
---|
string
Database Name
passthruReplace() takes a string and looks for {PASSTHRU:myarg} variables which it then substitutes for parameter data sent in the initial URL and stored in the session array containing responses
package | Default |
---|
mixed
string - the string to iterate, and then return
mixed
string - the string containing the surveyinformation
string
This string is returned containing the substituted responses
Checks Permission for the current user and returns an array with Permissions
package | Default |
---|
array
array
array
PCLZip callback for plugin ZIP install.
package | Default |
---|
mixed
mixed
integer
Return 1 for yes (file can be extracted), 0 for no
package | Default |
---|---|
Throws |
|
DbConnection
from export_structure_quexml.php
package | Default |
---|---|
Create a queXML question element
package | Default |
---|
\CActiveRecord
Question details in array
boolean|string
Any additional question text to append
from export_structure_quexml.php
package | Default |
---|---|
Export quexml survey.
package | Default |
---|---|
from export_structure_quexml.php
package | Default |
---|---|
Format defaultValue of Date/Time questions according to question date format
package | Default |
---|
mixed
DOM element with the date to change
integer
The qid of the question
integer
The survey id
Set defaultValue attribute of provided element from response table
package | Default |
---|
mixed
DOM element to add attribute to
integer
The response id
integer
The qid of the question
integer
The survey id
array
A mapping of fields to qid
boolean|string
Anything additional to search for in the field name
boolean|string
Search using sqid instead of qid
boolean|string
Search using aid
Set defaultValue attribute of provided element from response table
package | Default |
---|
mixed
DOM element to add attribute to
integer
The response id
integer
The qid of the question
integer
The survey id
array
A mapping of fields to qid
string
The answer code to search for
from export_structure_quexml.php
package | Default |
---|---|
Calculate if this item should have a QueXMLSkipTo element attached to it
from export_structure_quexml.php
package | Default |
---|---|
author | Adam Zammit adam.zammit@acspri.org.au |
since | 2010-10-28 |
TODO | Correctly handle conditions in a database agnostic way |
mixed
mixed
boolean|string
Text of item to skip to otherwise false if nothing to skip to
Quotes a string with surrounding quotes and masking inside quotes by doubling them
package | Default |
---|
string
Text to quote
string
The quote character (Use ' for SPSS and " for R)
string
General field information from SPSSFieldmap
Quotes a translation according to purpose if sEscapeMode is null, we use HTML method because probably we had to specify null as sEscapeMode upstream
package | Default |
---|
mixed
Text to quote
string
Optional - One of the values 'html','js' or 'unescaped' - defaults to 'html'
mixed|string
Creates a random sequence of characters
package | Default |
---|
integer
Length of resulting string
string
To define which characters should be in the resulting string
string
Applies preg_replace recursively until $recursion_limit is exceeded or no more replacements are done.
package | Default |
---|
array|string
array|string
array|string
integer
integer
If specified, this variable will be filled with the total number of replacements done (including all iterations)
integer
Max number of iterations allowed
string|array
Force Yii to create a new CSRF token by removing the old one
package | Default |
---|---|
Regenerate codes for problematic label sets Helper function (TODO: Put in separate class) Fails silently
package | Default |
---|
integer
Label set id
boolean
Should be true before dbversion 400 is finished, false after
This function removes the UTF-8 Byte Order Mark from a string
package | Default |
---|
string
string
Remove all zero-dates in $tableName by checking datetime columns from $tableSchema Zero-dates are replaced with null where possible; otherwise 1970-01-01
package | Default |
---|
string
\CDbTableSchema
\CDbConnection
Replaces EM variable codes in a current survey with a new one
package | Default |
---|
integer
The survey ID
mixed
The codemap array (old_code=>new_code)
package | Default |
---|---|
Helper to filter the contents of a .zip file uploaded into the file manager
package | Default |
---|---|
This function returns an array containing the "question/answer" html display and a list of the question/answer fieldnames associated. It is called from question.php, group.php, survey.php or preview.php
package | Default |
---|
array
Details of $ia can be found at top of this file
array
Array like [array $qanda, array $inputnames] where $qanda has elements [ $qtitle (question_text) : array [ all : string; complete HTML?; all has been added for backwards compatibility with templates that use question_start.pstpl (now redundant) 'text' => $qtitle, question?? $ia[3]? 'code' => $ia[2] or title?? 'number' => $number 'help' => '' 'mandatory' => '' man_message : string; message when mandatory is not answered 'valid_message' => '' file_valid_message : string; only relevant for file upload 'class' => '' 'man_class' => '' 'input_error_class' => '' // provides a class. 'essentials' => '' ] $answer ? 'help' : string $display : ? $qid : integer $ia[2] = title; $ia[5] = group id : int $ia[1] = fieldname : string ] and $inputnames is ? used for hiddenfieldnames and upload file?
package | Default |
---|
string
string
package | Default |
---|
string
package | Default |
---|
string
string
This function returns POST/REQUEST vars, for some vars like SID and others they are also sanitized TODO: extends Yii:getParam
package | Default |
---|
string
boolean
array|boolean|mixed|integer|null
This function creates the old fieldnames for survey import
package | Default |
---|
mixed
The old survey id
integer
The new survey id
array
An array with group ids (oldgid=>newgid)
array
An array with question ids (oldqid=>newqid)
array|boolean
This function removes a directory recursively
package | Default |
---|
string
boolean
Roll back to a transaction bookmark
package | Default |
---|
mixed
Name of the bookmark
PHP7 has created a little nasty bomb with count throwing erroros on uncountables This is to "fix" this problem
package | Default |
---|---|
author |
mixed
integer
counted element
Provides a safe way to end the application
package | Default |
---|---|
todo | This should probably never be used, since it returns 0 from CLI and makes PHPUnit think all is fine :( |
mixed
Remove all chars from $value that are not alphanumeric or dash or underscore
package | Default |
---|
string
string
Function: sanitize_dirname sanitizes a string that will be used as a directory name
Parameters: $string - The string to sanitize. $force_lowercase - Force the string to lowercase? $alphanumeric - If set to true, will remove all non-alphanumeric characters.
package | Default |
---|---|
Function: sanitize_filename Returns a sanitized string, typically for URLs.
Parameters: $string - The string to sanitize. $force_lowercase - Force the string to lowercase? $alphanumeric - If set to true, will remove all non-alphanumeric characters.
package | Default |
---|---|
This function mails a text $body to the recipient $to.
You can use more than one recipient when using a semicolon separated string with recipients.
package | Default |
---|---|
deprecated | : leave it in 4.0 for plugins ? Must remove in 5.0 at minima. |
string
Body text of the email in plain text or HTML
mixed
Email subject
mixed
Array with several email addresses or single string with one email address
mixed
mixed
boolean
mixed
mixed
boolean
If successful returns true
Set a transaction bookmark - this is critical for Postgres because a transaction in Postgres cannot be continued unless you roll back to the transaction bookmark first
package | Default |
---|
mixed
Name of the bookmark
setupColumns() defines all the html tags to be wrapped around various list type answers.
package | Default |
---|---|
deprecated | Don't use anymore. Only usage left in printabel survey where it needs to be replaced It returns an array with the following items: $wrapper['whole-start'] = Opening wrapper for the whole list $wrapper['whole-end'] = closing wrapper for the whole list $wrapper['col-devide'] = normal column devider $wrapper['col-devide-last'] = the last column devider (to allow for different styling of the last column $wrapper['item-start'] = opening wrapper tag for individual option $wrapper['item-start-other'] = opening wrapper tag for other option $wrapper['item-start-noanswer'] = opening wrapper tag for no answer option $wrapper['item-end'] = closing wrapper tag for individual option $wrapper['maxrows'] = maximum number of rows in each column $wrapper['cols'] = Number of columns to be inserted (and checked against) Columns are a problem. Really there is no perfect solution to columns at the moment.
Because I haven't been able to decide which option is the least bad, I have handed over that responsibility to the admin who sets LimeSurvey up on their server. There are four options: 'css' using one of the various CSS only methods for rendering columns. (Check the CSS file for your chosen template to see how columns are defined.) 'ul' using multiple floated unordered lists. (DEFAULT) 'table' using conventional tables based layout. NULL blocks the use of columns 'ul' is the default because it's the best possible compromise between semantic markup and visual layout. |
integer
integer
string
string
array
with all the various opening and closing tags to generate a set of columns.
Implode and sort content array for very long arrays
package | Default |
---|
string
array
string
String showing array content
Determines whether the list of user groups will need filtering before viewing.
package | Default |
---|---|
returns | bool |
This function converts emebedded Javascript to Text
package | Default |
---|
string
String to clean
string
Cleaned string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::add() |
Throws |
|
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::bin2base64() |
Throws |
|
string
integer
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::bin2base64() |
Throws |
|
string
integer
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::hex2bin() |
Throws |
|
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::compare() |
Throws |
|
string
string
integer
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt() |
string
string
string
string
string|boolean
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt() |
Throws |
|
string
string
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt() |
string
string
string
string
string|boolean
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt() |
Throws |
|
string
string
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt() |
string
string
string
string
string|boolean
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt() |
Throws |
|
string
string
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_keygen() |
Throws |
|
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_keygen() |
Throws |
|
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt() |
string
string
string
string
string|boolean
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt() |
Throws |
|
string
string
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_keygen() |
Throws |
|
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_auth() |
Throws |
|
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_auth_keygen() |
Throws |
|
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_auth_verify() |
Throws |
|
string
string
string
boolean
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box() |
Throws |
|
string
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box_keypair() |
Throws |
|
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey() |
Throws |
|
string
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box_open() |
string
string
string
string|boolean
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box_publickey() |
Throws |
|
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey() |
Throws |
|
string
string
package | Default |
---|---|
see | \ParagonIE_Sodium_Compat::crypto_box_seal() |
Throws |
|