Functions

_countNumberOfEntries

package

Default

Arguments

$sTableName

« More »

_getDbName

Get the database name

package

Default

« More »

_getMaxNbRecords

package

Default

« More »

_outputDBData

package

Default

Arguments

$bAllowExportAllDb

$bEchoOutput

$sFileName

$oFile

« More »

_outputDBDescription

package

Default

Arguments

$sDbName

$bAllowExportAllDb

« More »

_outputRecords

package

Default

Arguments

$sTableName

$aFieldNames

$aRecords

« More »

_outputTableData

Outputs the table data in sql format

package

Default

Arguments

$sTableName

$oTableData

$bEchoOutput

$sFileName

$oFile

« More »

_outputTableDescription

Outputs the table structure in sql format

package

Default

Arguments

$sTableName

« More »

addColumn

package

Default

Arguments

$sTableName

$sColumn

$sType

string

« More »

addPrimaryKey

package

Default

Arguments

$sTablename

string

$aColumns

« More »

addtoarray_single

Takes two single element arrays and adds second to end of first if value exists Why not use array_merge($array1,array_filter($array2);

package

Default

Arguments

$array1

$array2

« More »

aEncodingsArray

Return accepted codingsArray for importing files

Used in vvimport TODO : use in token and

package

Default

Response

array

« More »

alterColumn

package

Default

Arguments

$sTable

$sColumn

string

$sFieldType

string

$bAllowNull

$sDefault

« More »

alterLanguageCode

Renames a language code in the whole LimeSurvey database

package

Default

Arguments

$sOldLanguageCode

string

$sNewLanguageCode

string

« More »

alternation

package

Default

Arguments

$alternate

$type

« More »

App

Helper function to replace calls to Yii::app() and enable correct code completion.

package

Default

Response

\LSYii_Application

« More »

array_diff_assoc_recursive

package

Default

Arguments

$array1

$array2

« More »

arraySearchByKey

package

Default

Arguments

$needle

mixed

$haystack

mixed

$keyname

string

$maxanswers

integer

Response

array

« More »

beautify_filename

package

Default

Arguments

$filename

string

« More »

breakOutAndCrash

package

Default

todo

Rename

Move HTML to view

Arguments

$sTemplateViewPath

string

$totalquestions

integer

$iTotalGroupsWithoutQuestions

integer

$thissurvey

array

« More »

breakToNewline

package

Default

Arguments

$data

« More »

buildLabelSetCheckSumArray

package

Default

« More »

buildSelects

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

Arguments

$allfields

$surveyid

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'");

$language

« More »

buildSelects

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

Arguments

$allfields

$surveyid

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'");

$language

« More »

buildsurveysession

This function builds all the required session variables when a survey is first started and it loads any answer defaults from command line or from the table defaultvalues It is called from the related format script (group.php, question.php, survey.php) if the survey has just started.

package

Default

Arguments

$surveyid

integer

$preview

boolean

Defaults to false

« More »

buildXMLFromQuery

buildXMLFromQuery() creates a datadump of a table in XML using XMLWriter

package

Default

Arguments

$xmlwriter

mixed

The existing XMLWriter object

$Query

mixed

The table query to build from

$tagname

string

If the XML tag of the resulting question should be named differently than the table name set it here

$excludes

array<mixed,string>

array of columnames not to include in export

$iSurveyID

« More »

calculateTotalFileUploadUsage

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

« More »

canShowDatePicker

Check whether we can show the JS date picker with the current format

package

Default

returns

integer

Arguments

$dateformatdetails

array Date format details for the question

$dateformats

array Available date formats

« More »

categorySort

package

Default

Arguments

$a

$b

« More »

check

package

Default

deprecated 2018-01-29

has undefined function my_utf8_decode inside !!

Arguments

$input

$flags

$min

string

$max

string

Response

boolean

« More »

check_float

package

Default

Arguments

$input

$min

$max

« More »

check_html_string

package

Default

Arguments

$input

$min

$max

« More »

check_int

package

Default

Arguments

$input

$min

$max

« More »

check_ip_address

Checks the validity of IP address $ip

package

Default

Arguments

$ip

string

to check

Response

boolean

true if the $ip is a valid IP address

« More »

check_ldap_string

package

Default

Arguments

$input

$min

$max

« More »

check_paranoid_string

package

Default

Arguments

$input

$min

$max

« More »

check_system_string

package

Default

Arguments

$input

$min

$max

« More »

checkCompletedQuota

checkCompletedQuota() returns matched quotas information for the current response

package

Default

Arguments

$surveyid

integer

  • Survey identification number

$return

boolean

  • set to true to return information, false do the quota

Response

array|void

  • nested array, Quotas->Members->Fields, includes quota information matched in session.

« More »

CheckForDBUpgrades

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

Arguments

$subaction

« More »

checkGroup

checks consistency of groups

package

Default

Arguments

$postsid

integer

Response

\

« More »

checkHasGroup

checks if any group exists

package

Default

Arguments

$postsid

integer

Response

\

« More »

checkMoveQuestionConstraintsForConditions

checkMoveQuestionConstraintsForConditions()

package

Default

Arguments

$sid

string

  • the currently selected survey

$qid

string

  • qid of the question you want to check possible moves

$newgid

string

  • (optionnal) get only constraints when trying to move to this particular GroupId otherwise, get all moves constraints for this question

Response

array

  • returns an array describing the conditions Array ( ['notAbove'] = null | Array ( Array ( gid1, group_order1, qid1, cid1 ) ) ['notBelow'] = null | Array ( Array ( gid2, group_order2, qid2, cid2 ) ) )

This should be read as:

  • this question can't be move above group gid1 in position group_order1 because of the condition cid1 on question qid1
  • this question can't be move below group gid2 in position group_order2 because of the condition cid2 on question qid2

« More »

checkPassthruLabel

Check if a passthru label and value have been included in the query url

package

Default

Arguments

$surveyid

integer

$preview

boolean

$fieldmap

« More »

checkQuestions

checks questions in a survey for consistency

package

Default

Arguments

$postsid

integer

$iSurveyID

integer

Response

array|boolean

$faildcheck

« More »

checkUploadedFileValidity

checkUploadedFileValidity used in SurveyRuntimeHelper

package

Default

Arguments

$surveyid

$move

$backok

« More »

checkWrongQuestionAttributes

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

Arguments

$questionId

« More »

clean

package

Default

Arguments

$item

« More »

cleanLanguagesFromSurvey

cleanLanguagesFromSurvey() removes any languages from survey tables that are not in the passed list

package

Default

Arguments

$iSurveyID

$availlangs

string

  • space separated list of additional languages in survey

« More »

cleanTempDirectory

This function cleans files from the temporary directory being older than 1 day

package

Default

todo

Make the days configurable

« More »

cmpErrorTokens

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

Arguments

$a

array

$b

array

Response

integer

« More »

cmpQuestionSeq

Used by usort() to order $this->questionSeq2relevance in proper order

package

Default

Arguments

$a

array

$b

array

Response

integer

« More »

cmpWarningTokens

package

Default

todo

Unify errors and warnings with a EMErrorComparableInterface

Arguments

Response

integer

« More »

conditionalNewlineToBreak

used to translate simple text to html (replacing \n with <br />

package

Default

Arguments

$mytext

mixed

$ishtml

mixed

$encoded

Response

mixed

« More »

convertDateTimeFormat

This is a convenience function for the coversion of datetime values

package

Default

Arguments

$value

mixed

$fromdateformat

string

$todateformat

mixed

Response

string

« More »

convertGETtoPOST

convertGETtoPOST a function to create a post Request from get parameters !!! This functions result has to be wrappen in singlequotes!

package

Default

Arguments

$url

String

| The complete url with all parameters

Response

String

| The onclick action for the element

« More »

convertLStoDateTimePickerLocale

This functions translates LimeSurvey specific locale code to a matching datetimepicker locale

package

Default

Arguments

$sLocale

string

LimeSurvey locale code

« More »

convertPHPSizeToBytes

This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case)

package

Default

Arguments

$sSize

string

Response

integer

The value in bytes

« More »

convertToGlobalSettingFormat

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

Arguments

$sDate

string

$withTime

boolean

Response

string

« More »

cookieConsentLocalization

For later use, don't remove.

package

Default

Response

\array

« More »

CPDBExport

package

Default

Arguments

$data

$filename

string

« More »

createBoxes250

Create boxes table

package

Default

« More »

createChart

Generate a chart for a question

@param int $iQuestionID ID of the question

package

Default

Arguments

$iQuestionID

$iSurveyID

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

$type

$lbl

$gdata

$grawdata

$cache

$sLanguageCode

$sQuestionType

« More »

createChart

Generate a chart for a question

@param int $iQuestionID ID of the question

package

Default

Arguments

$iQuestionID

$iSurveyID

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

$type

$lbl

$gdata

$grawdata

$cache

$sLanguageCode

$sQuestionType

« More »

createCompleteSGQA

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 Statistics_userController

package

Default

Arguments

$iSurveyID

integer

Id of the Survey in question

$aFilters

array

an array which is the result of a query in Questions model

$sLanguage

string

Response

array

The summary

« More »

createFieldMap

This function generates an array containing the fieldcode, and matching data in the same order as the activate script

package

Default

Arguments

$survey

\Survey

Survey ActiveRecord model

$style

string

'short' (default) or 'full' - full creates extra information like default values

$force_refresh

\?boolean

  • Forces to really refresh the array, not just take the session copy

$questionid

boolean|integer

Limit to a certain qid only (for question preview) - default is false

$sLanguage

string

The language to use

$aDuplicateQIDs

array

Response

array

« More »

createPassword

package

Default

Arguments

$iPasswordLength

« More »

createRandomTempDir

Create a directory in tmp dir using a random string

package

Default

Arguments

$dir

string

the temp directory (if empty will use the one from configuration)

$prefix

string

wanted prefix for the directory

$mode

integer

wanted file mode for this directory

Response

string

the path of the created directory

« More »

createSurveyGroupTables306

package

Default

Arguments

$oDB

\CDbConnection

« More »

createSurveyMenuTable

package

Default

Arguments

$oDB

\CDbConnection

« More »

createSurveysGroupSettingsTable

package

Default

Arguments

$oDB

\CDbConnection

« More »

createTimingsFieldMap

This function generates an array containing the fieldcode, and matching data in the same order as the activate script

package

Default

Arguments

$surveyid

string

The Survey ID

$style

string

'short' (default) or 'full' - full creates extra information like default values

$force_refresh

boolean

  • Forces to really refresh the array, not just take the session copy

$questionid

integer

Limit to a certain qid only (for question preview) - default is false

$sQuestionLanguage

string

The language to use

Response

array

« More »

createXMLfromData

package

Default

Arguments

$aData

« More »

crypto_rand_secure

Get a random number between two values using openssl_random_pseudo_bytes

package

Default

Arguments

$min

integer

$max

integer

Response

string

« More »

CSVImportResponses

This function imports a CSV file into the response table

package

Default

Arguments

$sFullFilePath

string

$iSurveyId

integer

$aOptions

array

Return array $result ("errors","warnings","success")

« More »

CSVUnquote

This function removes surrounding and masking quotes from the CSV field

package

Default

Arguments

$field

mixed

Response

mixed

« More »

currentRelevecanceClass

Return class of a specific row (hidden by relevance)

package

Default

Arguments

$surveyId

integer

actual survey id

$baseName

string

the base name of the question

$name

string

The name of the question/row to test

$aQuestionAttributes

array

the question attributes

Response

string

« More »

dateShift

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

Arguments

$date

string

$dformat

string

$shift

mixed

Response

string

« More »

db_upgrade_all

package

Default

Arguments

$iOldDBVersion

integer

The previous database version

$bSilent

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.

« More »

dbGetTablesLike

Gets the table names. Do not prefix.

package

Default

uses

To get the tables like sql query

Arguments

$table

string

String to match

Response

array

Array of matched table names

« More »

dbQuoteAll

Escapes a text value for db

package

Default

Arguments

$value

string

Response

string

« More »

dbRandom

Return the database-specific random function to use in ORDER BY sql statements

package

Default

Response

string

« More »

dbSelectTablesLike

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

Arguments

$table

mixed

Response

string

« More »

decodeTokenAttributes

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

Arguments

$oTokenAttributeData

string

The original token attributes as stored in the database

Response

array|mixed

« More »

display_first_page

Shows the welcome page, used in group by group and question by question mode

package

Default

Arguments

$thissurvey

$aSurveyInfo

« More »

do_array

package

Default

deprecated 4.0

Replaced by core\QuestionTypes\RenderArrayFlexibleRow

Arguments

$ia

« More »

do_array_10point

package

Default

Arguments

$ia

« More »

do_array_5point

Construct answer part array_5point

package

Default

Arguments

$ia

array

Response

array

« More »

do_array_dual

package

Default

deprecated 4.0

Replaced by core\QuestionTypes\ArrayMultiscale

Arguments

$ia

« More »

do_array_increasesamedecrease

package

Default

Arguments

$ia

« More »

do_array_multiflexi

package

Default

Arguments

$ia

« More »

do_array_texts

package

Default

Arguments

$ia

« More »

do_array_yesnouncertain

package

Default

Arguments

$ia

« More »

do_arraycolumns

Renders array by column question type.

package

Default

Throws
\CException

Arguments

$ia

array

Response

array

« More »

do_file_upload

package

Default

Arguments

$ia

« More »

do_gender

Renders Gender Question Types.

package

Default

Arguments

$ia

array

Response

array

« More »

do_hugefreetext

package

Default

Arguments

$ia

« More »

do_language

package

Default

Arguments

$ia

« More »

do_list_dropdown

package

Default

Arguments

$ia

« More »

do_list_radio

package

Default

Arguments

$ia

« More »

do_listwithcomment

package

Default

Arguments

$ia

« More »

do_longfreetext

package

Default

Arguments

$ia

« More »

do_multiplechoice

package

Default

Arguments

$ia

« More »

do_multiplechoice_withcomments

package

Default

Arguments

$ia

« More »

do_multiplenumeric

package

Default

deprecated 4.?.?
see \RenderMultipleNumerical\DataSetMultipleNumerical

Arguments

$ia

« More »

do_multipleshorttext

package

Default

Arguments

$ia

« More »

do_numerical

package

Default

Arguments

$ia

« More »

do_ranking

package

Default

deprecated 4.0

Replaced by core\QuestionTypes\RankingStyle

Arguments

$ia

« More »

do_shortfreetext

package

Default

Arguments

$ia

« More »

do_yesno

Renders Yes/No Question Type.

package

Default

Arguments

$ia

array

Response

array

« More »

doAssessment

Caculate assessement scores

package

Default

Arguments

$surveyid

integer

$onlyCurrent

boolean

: only current ( ASSESSMENT_CURRENT_TOTAL )

Response

array

« More »

doFooter

package

Default

« More »

doHeader

package

Default

« More »

doRender

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

Arguments

$sView

string

name of the view to be rendered.

$aData

array

data to be extracted into PHP variables and made available to the view script

$bReturn

boolean

whether the rendering result should be returned instead of being displayed to end users (should be always true)

« More »

doreplacement

package

Default

Arguments

$file

string

$data

$oTemplate

« More »

dropColumn

Drops a column, automatically removes blocking default value on MSSQL

package

Default

Arguments

$sTableName

string

$sColumnName

string

« More »

dropDefaultValueMSSQL

Drop a default value in MSSQL

package

Default

Arguments

$fieldname

string

$tablename

mixed

« More »

dropPrimaryKey

Drops the primary key of a table

package

Default

Arguments

$sTablename

string

$oldPrimaryKeyColumn

string

« More »

dropSecondaryKeyMSSQL

This function drops a secondary key of an MSSQL database field by using the field name and the table name

package

Default

Arguments

$sFieldName

string

$sTableName

mixed

« More »

dropUniqueKeyMSSQL

This function drops a unique Key of an MSSQL database field by using the field name and the table name

package

Default

Arguments

$sFieldName

string

$sTableName

string

« More »

dummy_twig_translation_helper

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

« More »

ellipsize

Ellipsize String

This public static function will strip tags from a string, split it at its max_length and ellipsize

package

Default

Arguments

$sString

string

string to ellipsize

$iMaxLength

integer

max length of string

$fPosition

integer

int (1|0) or float, .5, .2, etc for position to split

$sEllipsis

string

ellipsis ; Default '...'

Response

string

ellipsized string

« More »

emailTokens

Sends email to tokens - invitations, reminders, registers, and confirmations Seems used only in remote_control : maybe move it to ?

package

Default

Arguments

$iSurveyID

integer

$aResultTokens

array<mixed,\CActiveRecord>

$sType

string

type of notification invite|register|remind|confirm

Response

array

of results

« More »

encodeEmail

encodeEmail : encode admin email in public part

package

Default

Arguments

$mail

mixed

$text

mixed

$class

mixed

$params

mixed

Response

mixed|string

« More »

enforceSSLMode

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

« More »

eT

As gT(), but echoes directly

package

Default

Arguments

$sToTranslate

string

$sEscapeMode

string

« More »

expr_mgr_htmlspecialchars

Javascript equivalent does not cope well with ENT_QUOTES and related PHP constants, so set default to ENT_QUOTES

package

Default

Arguments

$string

string

Response

string

« More »

expr_mgr_htmlspecialchars_decode

Javascript equivalent does not cope well with ENT_QUOTES and related PHP constants, so set default to ENT_QUOTES

package

Default

Arguments

$string

string

Response

string

« More »

exprmgr_convert_value

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

Arguments

$fValueToReplace

double

$iStrict

integer

  • 1 for exact matches only otherwise interpolation the closest value should be returned

$sTranslateFromList

string

  • comma seperated list of numeric values to translate from

$sTranslateToList

string

  • comma seperated list of numeric values to translate to

Response

integer|null

« More »

exprmgr_count

Count the number of answered questions (non-empty)

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_countif

Count the number of answered questions (non-empty) which match the first argument

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_countifop

Count the number of answered questions (non-empty) which meet the criteria (arg op value)

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_date

Return format a local time/date Need to test if timestamp is numeric (else E_WARNING with debug>0)

package

Default

link

http://php.net/function.date.php

Arguments

$format

string

$timestamp

integer

Response

string|false

« More »

exprmgr_empty

Return true if the variable is NULL or blank.

package

Default

Arguments

$arg

null|string|boolean

Response

boolean

« More »

exprmgr_fixnum

Display number with comma as radix separator, if needed

package

Default

Arguments

$value

string

Response

string

« More »

exprmgr_if

If $test is true, return $iftrue, else return $iffalse

package

Default

Arguments

$testDone

mixed

$iftrue

mixed

$iffalse

mixed

Response

mixed

« More »

exprmgr_implode

Join together $args[1-N] with $arg[0]

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_int

Return true if the variable is an integer for LimeSurvey Can not really use is_int due to SQL DECIMAL system. This function can surely be improved

package

Default

link

http://php.net/is_int#82857

Arguments

$arg

string

Response

integer

« More »

exprmgr_join

Join together $args[N]

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_list

Join together $args[0-N] with ', '

package

Default

Arguments

$args

array

Response

string

« More »

exprmgr_listifop

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

Arguments

$args

array

Response

string

« More »

exprmgr_log

return log($arg[0],$arg[1]=e)

package

Default

Arguments

$args

array

Response

float

« More »

exprmgr_mktime

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

Arguments

$hour

integer

$minute

integer

$second

integer

$month

integer

$day

integer

$year

integer

Response

integer|boolean

« More »

exprmgr_regexMatch

Return true if $input matches the regular expression $pattern

package

Default

Arguments

$pattern

string

$input

string

Response

boolean

« More »

exprmgr_stddev

Compute the Sample Standard Deviation of a set of numbers ($args[0-N])

package

Default

Arguments

$args

array

Response

float

« More »

exprmgr_stripos

Find position of first occurrence of unicode string in a unicode string, case insensitive

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$offset

: offset

Response

integer|false

: position or false if not found

« More »

exprmgr_stristr

Finds first occurrence of a unicode string within another, case-insensitive

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$before_needle

boolean

: portion to return

Response

string|false

« More »

exprmgr_strlen

Get unicode string length

package

Default

Arguments

$string

string

Response

integer

« More »

exprmgr_strpos

Find position of first occurrence of unicode string in a unicode string

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$offset

integer

: offset

Response

integer|false

: position or false if not found

« More »

exprmgr_strstr

Finds first occurrence of a unicode string within another

package

Default

Arguments

$haystack

string

: checked string

$needle

string

: string to find

$before_needle

boolean

: portion to return

Response

string|false

« More »

exprmgr_strtolower

Make an unicode string lowercase

package

Default

Arguments

$string

string

Response

string

« More »

exprmgr_strtoupper

Make an unicode string uppercase

package

Default

Arguments

$string

string

Response

string

« More »

exprmgr_substr

Get part of unicode string

package

Default

Arguments

$string

string

$start

integer

$end

integer

Response

string

« More »

exprmgr_sumifop

Sum of values of answered questions which meet the criteria (arg op value)

package

Default

Arguments

$args

array

Response

integer

« More »

exprmgr_unique

Returns true if all non-empty values are unique

package

Default

Arguments

$args

array

Response

boolean

« More »

extendDatafields364

package

Default

Arguments

$oDB

« More »

extendDatafields429

package

Default

Arguments

$oDB

« More »

file_validation_message

package

Default

Arguments

$ia

« More »

file_validation_popup

package

Default

Arguments

$ia

$filenotvalidated

boolean

« More »

fillDate

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

Arguments

$dateString

string

Response

string

« More »

filterForAttributes

This is a helper function for getAttributeFieldNames

package

Default

Arguments

$fieldname

mixed

Response

boolean

« More »

finalizeRandomization

Stuff?

package

Default

Arguments

$fieldmap

array

Response

array

Fieldmap

« More »

fixCKeditorText

package

Default

Arguments

$str

string

« More »

fixKCFinder184

package

Default

« More »

fixLanguageConsistency

fixLanguageConsistency() fixes missing groups, questions, answers, quotas & assessments for languages on a survey

package

Default

Arguments

$sid

string

  • the currently selected survey

$availlangs

string

  • space separated list of additional languages in survey - if empty all additional languages of a survey are checked against the base language

Response

boolean

  • always returns true

« More »

fixLanguageConsistencyAllSurveys

package

Default

« More »

fixMovedQuestionConditions

package

Default

Arguments

$qid

integer

$oldgid

$newgid

integer

$iSurveyID

integer

« More »

fixMySQLCollations

package

Default

Arguments

$sEncoding

string

$sCollation

string

« More »

fixNumbering

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

Arguments

$iQuestionID

$iSurveyID

integer

« More »

fixorder

Function rewrites the sortorder for a label set

package

Default

Arguments

$lid

mixed

Label set ID

« More »

fixPostgresSequence

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

Arguments

$tableName

string

Table name without prefix

« More »

fixSubquestions

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

« More »

flattenText

This functions removes all HTML tags, Javascript, CRs, linefeeds and other strange chars from a given text

package

Default

Arguments

$sTextToFlatten

string

Text you want to clean

$bKeepSpan

boolean

set to true for keep span, used for expression manager. Default: false

$bDecodeHTMLEntities

boolean

If set to true then all HTML entities will be decoded to the specified charset. Default: false

$sCharset

string

Charset to decode to if $decodeHTMLEntities is set to true. Default: UTF-8

$bStripNewLines

string

strip new lines if true, if false replace all new line by \r\n. Default: true

Response

string

Cleaned text

« More »

folderSize

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

Arguments

$dir

string

Folder

Response

integer

Size in bytes.

« More »

get_absolute_path

A function to remove .

./ or ./ from paths to prevent directory traversal

package

Default

Arguments

$path

string

Response

string

« More »

get_zip_originalsize

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

Arguments

$filename

string

Response

integer

« More »

getArrayFilterExcludesCascadesForGroup

getArrayFilterExcludesCascadesForGroup() queries the database and produces a list of array_filter_exclude questions and targets with in the same group

package

Default

Arguments

$surveyid

$gid

$output

Response

array

a keyed nested array, keyed by the qid of the question, containing cascade information

« More »

getAttributeFieldNames

Retrieves the attribute field names from the related survey participants table

package

Default

Arguments

$iSurveyID

mixed

The survey ID

Response

array

The fieldnames

« More »

getBounceEmail

package

Default

Arguments

$surveyid

« More »

getBrowserLanguage

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

« More »

getDateFormatData

Returns all available dateformats in a structured aray If $iDateFormat is given only the particual dateformat will be returned

package

Default

returns

array

Arguments

$iDateFormat

integer

$sLanguageCode

string

« More »

getDateFormatDataForQID

Get the date format details for a specific question.

package

Default

returns

array

Arguments

$aQidAttributes

array Question attributes

$mThisSurvey

mixed Array of Survey attributes or surveyid

$language

« More »

getDateFormatForSID

Get the date format for a specified survey

package

Default

returns

integer

Arguments

$surveyid

integer Survey id

$languagecode

string Survey language code (optional)

« More »

getDBConnectionStringProperty

package

Default

Arguments

$sProperty

string

« More »

getDirectorySize

package

Default

Arguments

$directory

string

Response

integer

« More »

getEditor

Returns Editor.

package

Default

Arguments

$fieldtype

string

Field Type

$fieldname

string

Field Name

$fieldtext

$surveyID

integer|null

Survey ID

$gID

integer|null

Group ID

$qID

integer|null

Question ID

$action

string

Action

Response

string

« More »

getEmailFormat

package

Default

Arguments

$surveyid

« More »

geterrors_exprmgr_regexMatch

Return error information from pattern of regular expression $pattern

package

Default

Arguments

$pattern

string

$input

string

Response

string|null

« More »

getExtendedAnswer

package

Default

Arguments

$iSurveyID

integer

The Survey ID

$sFieldCode

string

Field code of the particular field

$sValue

string

The stored response value

$sLanguage

string

Initialized limesurvey_lang object for the resulting response data

Response

string

« More »

getFooter

This function returns the Footer as result string If you want to echo the Footer use doFooter()!

package

Default

Response

string

« More »

getForwardParameters

Returns an array of URL parameters that can be forwarded

package

Default

Arguments

$request

\LSHttpRequest

the HTTP request

Response

\array

« More »

getFullResponseTable

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

Arguments

$iSurveyID

mixed

$iResponseID

mixed

$sLanguageCode

mixed

$bHonorConditions

boolean

Apply conditions

Response

array

« More »

getGidNext

getGidNext() returns the Gid of the group next to the current active group

package

Default

Arguments

$surveyid

integer

$gid

integer

Response

integer|string

The Gid of the next group or blank string if no group

« More »

getGidPrevious

getGidPrevious() returns the Gid of the group prior to the current active group

package

Default

Arguments

$surveyid

integer

$gid

integer

Response

integer|string

The GID of the previous group or blank string if no group

« More »

getGlobalSetting

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

Arguments

$settingname

string

Response

string

« More »

getGroupDepsForConditions

getGroupDepsForConditions() get Dependencies between groups caused by conditions

package

Default

Arguments

$sid

string

  • the currently selected survey

$depgid

string

  • (optionnal) get only the dependencies applying to the group with gid depgid

$targgid

string

  • (optionnal) get only the dependencies for groups dependents on group targgid

$indexby

string

  • (optionnal) "by-depgid" for result indexed with $res[$depgid][$targgid] "by-targgid" for result indexed with $res[$targgid][$depgid]

Response

array

  • returns an array describing the conditions or NULL if no dependecy is found

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:

  • Get all group dependencies for SID $sid indexed by depgid: $result=getGroupDepsForConditions($sid);
  • Get all group dependencies for GID $gid in survey $sid indexed by depgid: $result=getGroupDepsForConditions($sid,$gid);
  • Get all group dependents on group $gid in survey $sid indexed by targgid: $result=getGroupDepsForConditions($sid,"all",$gid,"by-targgid");

« More »

getGroupList3

package

Default

Arguments

$gid

$surveyid

« More »

getGroupListLang

put your comment there.

..

package

Default

Arguments

$gid

mixed

$language

mixed

$surveyid

Response

string

« More »

getGroupOrder

Queries the database for the sortorder of a group.

package

Default

Arguments

$gid

mixed

The groups ID

Response

integer

The sortorder digit

« More »

getHeader

get the header

package

Default

Arguments

$meta

boolean

: not used in any call (2016-10-18)

Response

string

« More »

getInlineEditor

package

Default

Arguments

$fieldtype

$fieldname

$fieldtext

$surveyID

$gID

$qID

$action

« More »

getIPAddress

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

« More »

getJSDateFromDateFormat

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

Arguments

$sDateformat

string

« More »

getLabelInputWidth

Find the label / input width

package

Default

Arguments

$labelAttributeWidth

string|integer

label width from attribute

$inputAttributeWidth

string|integer

input width from attribute

Response

array

labelWidth as integer,inputWidth as integer,defaultWidth as boolean

« More »

getLabelSets

Returns labelsets for given language(s), or for all if null

package

Default

Arguments

$languages

string

Response

array

« More »

getLanguageChangerDatas

This function creates the language selector for a particular survey

package

Default

Arguments

$sSelectedLanguage

string

: lang to be selected (forced)

Response

array|false

: array of data if more than one language, else false

« More »

getLanguageChangerDatasPublicList

This function creates the language selector for the public survey index page

package

Default

Arguments

$sSelectedLanguage

string

The language in which all information is shown

Response

array|boolean

« More »

getLanguageCodefromLanguage

package

Default

Arguments

$languagetosearch

string

this is the shortname for the language (e.g. 'en' see array in getLanguageData())

Response

integer|string

« More »

getLanguageData

package

Default

Arguments

$bOrderByNative

boolean

$sLanguageCode

string

Response

mixed

« More »

getLanguageDataRestricted

package

Default

Arguments

$bOrderByNative

$sDetail

« More »

getLanguageDetails

Returns the locale settings for a certain language code

package

Default

Arguments

$codetosearch

string

Response

array

Array with locale details

« More »

getLanguageNameFromCode

Returns a language name from the code

package

Default

todo

Should not give back different data types

Arguments

$codetosearch

string

$withnative

boolean

$sTranslationLanguage

string

Response

string|array

« More »

getLanguageRTL

package

Default

Arguments

$sLanguageCode

« More »

getLastInsertID

Retrieves the last Insert ID realiable for cross-DB applications

package

Default

Arguments

$sTableName

string

Needed for Postgres and MSSQL

Response

string

« More »

getLatLongFromIp

package

Default

Arguments

$sIPAddress

« More »

getListOfFiles

package

Default

Arguments

$wh

« More »

getLoaderHTML

package

Default

Arguments

$fieldname

« More »

getMaxGroupOrder

Queries the database for the maximum sortorder of a group and returns the next higher one.

package

Default

Arguments

$surveyid

integer

The survey ID

Response

integer

Next free sortorder digit

« More »

getMaximumFileUploadSize

package

Default

« More »

getMaxQuestionOrder

Queries the database for the maximum sort order of questions inside question group.

package

Default

Arguments

$gid

integer

Response

integer

« More »

getModalEditor

package

Default

Arguments

$fieldtype

$fieldname

$fieldtext

$surveyID

$gID

$qID

$action

« More »

getMove

getMove get move button clicked

package

Default

Response

string

« More »

getNavigatorDatas

TODO: call this function from surveyRuntimeHelper TODO: remove surveymover()

package

Default

« More »

getParticipantAttributes

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

Arguments

$iSurveyID

integer

The Survey ID

Response

array

« More »

getPHPDateFromDateFormat

Convert a 'dateformat' format string to a 'phpdate' format.

package

Default

returns

string

Arguments

$sDateformat

string

string

« More »

getPopupEditor

package

Default

Arguments

$fieldtype

$fieldname

$fieldtext

$surveyID

$gID

$qID

$action

« More »

getPrintableHeader

This function returns the header for the printable survey

package

Default

Response

String

« More »

getQuestDepsForConditions

getQuestDepsForConditions() get Dependencies between groups caused by conditions

package

Default

Arguments

$sid

string

  • the currently selected survey

$gid

string

  • (optionnal) only search dependecies inside the Group Id $gid

$depqid

string

  • (optionnal) get only the dependencies applying to the question with qid depqid

$targqid

string

  • (optionnal) get only the dependencies for questions dependents on question Id targqid

$indexby

string

  • (optionnal) "by-depqid" for result indexed with $res[$depqid][$targqid] "by-targqid" for result indexed with $res[$targqid][$depqid]

$searchscope

Response

array

  • returns an array describing the conditions or NULL if no dependecy is found

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:

  • Get all questions dependencies for Survey $sid and group $gid indexed by depqid: $result=getQuestDepsForConditions($sid,$gid);
  • Get all questions dependencies for question $qid in survey/group $sid/$gid indexed by depqid: $result=getGroupDepsForConditions($sid,$gid,$qid);
  • Get all questions dependents on question $qid in survey/group $sid/$gid indexed by targqid: $result=getGroupDepsForConditions($sid,$gid,"all",$qid,"by-targgid");

« More »

getQuestionAttributeValue

Returns the questionAttribtue value set or '' if not set

package

Default

author

: lemeur

Arguments

$questionAttributeArray

$attributeName

string

$language

string Optional: The language if the particualr attributes is localizable

Response

string

« More »

getQuestionMapData

Return data to populate a Google Map

package

Default

Arguments

$sField

string

$qsid

Survey id

Response

array

« More »

getQuestionMapData

Return data to populate a Google Map

package

Default

Arguments

$sField

string

$qsid

Survey id

Response

array

« More »

getRadixPointData

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

Arguments

$format

Response

integer|array

« More »

getRandomString

Generate a random string, using openssl if available, else using md5

package

Default

Arguments

$length

integer

wanted lenght of the random string (only for openssl mode)

Response

string

« More »

getReferringUrl

GetReferringUrl() returns the referring URL

package

Default

Response

string

« More »

getRenderWay

Returns which way should be rendered

package

Default

Arguments

$renderToken

string

$renderCaptcha

string

Response

string

« More »

getSerialClass

package

Default

Arguments

$sSerial

string

Response

string|null

« More »

getSideBodyClass

Get the margin class for side-body div depending on side-menu behaviour config and page (edit or not etc).

package

Default

Throws
\CException

Arguments

$sideMenustate

boolean

  • False for pages with collapsed side-menu

Response

string

« More »

getStandardsReplacementFields

package

Default

Arguments

$thissurvey

« More »

getSubQuestions

Return an array of subquestions for a given sid/qid

package

Default

Arguments

$sid

integer

$qid

integer

$sLanguage

string

Language of the subquestion text

Response

array

« More »

getSurveyDefaultSettings

package

Default

« More »

getSurveyInfo

Gets all survey infos in one big array including the language specific settings

package

Default

Arguments

$surveyid

integer

The survey ID

$languagecode

string

The language code - if not given the base language of the particular survey is used

$force

boolean

If true, don't use memoization

Response

array|boolean

Returns array with survey info or false, if survey does not exist

« More »

getSurveyList

getSurveyList() Queries the database (survey table) for a list of existing surveys

package

Default

Arguments

$bReturnArray

boolean

If set to true an array instead of an HTML option list is given back

Response

string|array

This string is returned containing formatted list of existing surveys

« More »

getSurveyUserGroupList

Return HTML <option> list of user groups

package

Default

Arguments

$outputformat

string

'htmloptions' or 'simpleugidarray' (todo: check if this is correct)

$surveyid

integer

Response

string|array

« More »

getSurveyUserList

Retrieve a HTML <OPTION> list of survey admin users

package

Default

Arguments

$bIncludeSuperAdmins

boolean

If Super admins should be included

$surveyid

integer

Response

string

« More »

getTemplatePath

This function returns the complete directory path to a given template name

package

Default

Arguments

$sTemplateName

mixed

Response

string

« More »

getTemplateURL

This function returns the complete URL path to a given template name

package

Default

Arguments

$sTemplateName

mixed

Response

string

« More »

getTokenFieldsAndNames

Retrieves the attribute names from the related survey participants table

package

Default

Arguments

$surveyid

mixed

The survey ID

$bOnlyAttributes

boolean

Set this to true if you only want the fieldnames of the additional attribue fields - defaults to false

Response

array

The fieldnames as key and names as value in an Array

« More »

getUserGroupList

Get a list of all user groups

package

Default

returns

array

« More »

getUserList

package

Default

Arguments

$outputformat

« More »

getXMLDataSingleTable

Exports a single table to XML

package

Default

Arguments

$iSurveyID

integer

The survey ID

$sTableName

string

The database table name of the table to be export

$sDocType

string

What doctype should be written

$sXMLTableTagName

string

Name of the tag table name in the XML file

$sFileName

$bSetIndent

Response

string|boolean

XMLWriter object

« More »

getXMLWriter

Wrapper function to retrieve an xmlwriter object and do error handling if it is not compiled into PHP

package

Default

« More »

group_export

package

Default

Arguments

$action

string

$iSurveyID

$gid

« More »

groupGetXMLStructure

package

Default

Arguments

$xml

\XMLWriter

$gid

« More »

groupOrderThenQuestionOrder

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

package

Default

Arguments

$a

mixed

$b

mixed

Response

integer

« More »

gT

Returns $sToTranslate translated to $sLanguage (defaults to lang set in session) escaped with $sEscapeMode

package

Default

Arguments

$sToTranslate

string

$sEscapeMode

string

Valid values are html (this is the default, js and unescaped)

$sLanguage

string

Response

string

« More »

hasFileUploadQuestion

Returns true if the given survey has a File Upload Question Type

package

Default

Arguments

$iSurveyID

integer

Response

boolean

« More »

hasResources

put your comment there.

..

package

Default

Arguments

$id

integer

$type

string

Response

boolean

« More »

hasTemplateManageRights

package

Default

Arguments

$userid

$sThemeFolder

« More »

HTMLEscape

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.

Arguments

$str

« More »

humanFilesize

Format size in human readable format.

package

Default

Arguments

$bytes

integer

$decimals

integer

Response

string

« More »

importSurveyFile

package

Default

Arguments

$sFullFilePath

string

$bTranslateLinksFields

boolean

$sNewSurveyName

string

$DestSurveyID

integer

« More »

includeKeypad

Include Keypad headers

package

Default

« More »

incompleteAnsFilterState

This function return actual completion state

package

Default

Response

string|boolean

(complete|incomplete|all) or false

« More »

initFieldArray

package

Default

Arguments

$surveyid

integer

$fieldmap

array

« More »

initKcfinder

package

Default

« More »

insertlabelset

package

Default

Response

\LabelSet

« More »

is_template_editable

This function checks if a certain template may be by modified, copied, deleted according to the settings in config.php

package

Default

Arguments

$templatename

mixed

« More »

isAssociativeArray

Check if array is associative

package

Default

Arguments

$array

array

Response

boolean

« More »

isCaptchaEnabled

isCaptchaEnabled($screen, $usecaptchamode)

package

Default

Arguments

$screen

string

  • the screen name for which to test captcha activation

$captchamode

Response

boolean|null

  • returns true if captcha must be enabled

« More »

isJson

Check if string is JSON array

package

Default

Arguments

$str

string

Response

boolean

« More »

isNumericExtended

Returns true if passed $value is numeric

package

Default

Arguments

$value

Response

boolean

« More »

isNumericInt

Check if $str is an integer, or string representation of an integer

package

Default

Arguments

$mStr

string

Response

boolean|integer

« More »

isTokenCompletedDatestamped

package

Default

Arguments

$thesurvey

« More »

isZipBomb

Test if a given zip file is Zip Bomb see comment here : http://php.net/manual/en/function.zip-entry-filesize.php

package

Default

Arguments

$zip_filename

string

Response

integer

« More »

javascriptEscape

package

Default

Arguments

$str

$strip_tags

$htmldecode

« More »

json_decode_ls

Decode a json string, sometimes needs stripslashes

package

Default

Arguments

$jsonString

string

Response

mixed

« More »

jsonEscape

package

Default

Arguments

$str

$strip_tags

$htmldecode

« More »

killSurveySession

killSurveySession : reset $_SESSION part for the survey

package

Default

Arguments

$iSurveyID

integer

« More »

languageDropdown

package

Default

Arguments

$surveyid

$selected

« More »

languageDropdownClean

Creates a <select> HTML element for language selection for this survey

package

Default

Arguments

$surveyid

integer

$selected

string

The selected language

Response

string

« More »

ldap_bindCnx

package

Default

Arguments

$ds

$server_id

« More »

ldap_doTokenSearch

package

Default

Arguments

$ds

$ldapq

$ResArray

$surveyid

integer

« More »

ldap_getCnx

package

Default

Arguments

$server_id

« More »

ldap_readattr

package

Default

Arguments

$attr

« More »

ldap_search_withScope

package

Default

Arguments

$ds

mixed

$basedn

mixed

$filter

mixed

$attrlist

mixed

$scope

mixed

« More »

loadanswers

package

Default

« More »

longestString

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.

Arguments

$new_string

$longest_length

integer

Response

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 );

« More »

ls_json_encode

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

Arguments

$content

« More »

makeFlashMessage

Construct flash message container Used in templatereplace to replace {FLASHMESSAGE} in startpage.tstpl

package

Default

Response

string

« More »

mandatory_message

package

Default

Arguments

$ia

« More »

mandatory_popup

package

Default

Arguments

$ia

$notanswered

« More »

MaskFormula

package

Default

Arguments

$sValue

« More »

mkdir_p

package

Default

Arguments

$target

string

« More »

modifyDatabase

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

Arguments

$sqlfile

string

The path where a file with sql commands can be found on the server.

$sqlstring

string

If no path is supplied then a string with semicolon delimited sql commands can be supplied in this argument.

Response

boolean

Returns true if database was modified successfully.

« More »

modifyPrimaryKey

Modifies a primary key in one command - this is only tested on MySQL

package

Default

Arguments

$sTablename

string

The table name

$aColumns

array<mixed,string>

Column names to be in the new key

« More »

modlabelsetanswers

package

Default

Arguments

$lid

null|integer

« More »

mssql_drop_constraint

package

Default

Arguments

$fieldname

string

$tablename

string

« More »

mssql_drop_coulmn_with_constraints

Deletes a column and removes all constraints from it

package

Default

Arguments

$tablename

string

The table the column should be deleted

$columnname

string

The column that should be deleted

« More »

mssql_drop_primary_index

package

Default

Arguments

$tablename

string

« More »

neT

Translation helper function for plural forms which outputs right away

package

Default

Arguments

$sToTranslate

string

$iCount

integer

$sEscapeMode

string

« More »

ngT

Translation helper function for plural forms

package

Default

Arguments

$sTextToTranslate

string

$iCount

integer

$sEscapeMode

string

Response

string

« More »

nice_addslashes

package

Default

Arguments

$string

« More »

numericSize

Find the numeric size according DB size for existing question for SPSS export Column name must be SGQA currently

package

Default

Arguments

$sColumn

$decimal

boolean

db type as decimal(30,10)

Response

string

integersize.decimalsize

« More »

outputDatabase

Outputs a full dump of the current LimeSurvey database

package

Default

Arguments

$sDbName

string

Database Name

$bEchoOutput

$sFileName

« More »

PassthruReplace

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

Arguments

$line

mixed

string - the string to iterate, and then return

$thissurvey

mixed

string - the string containing the surveyinformation

Response

string

This string is returned containing the substituted responses

« More »

permissionsAsArray

Checks Permission for the current user and returns an array with Permissions

package

Default

Arguments

$globalPermissions

array

$customPermissions

array

Response

array

« More »

pluginExtractFilter

PCLZip callback for plugin ZIP install.

package

Default

Arguments

$p_event

mixed

$p_header

mixed

Response

integer

Return 1 for yes (file can be extracted), 0 for no

« More »

populateDatabase

package

Default

Throws
\CHttpException
\CException

Arguments

$oDB

DbConnection

« More »

prefillFromCommandLine

Prefill startvalues from command line param

package

Default

Arguments

$surveyid

integer

« More »

PrepareEditorScript

package

Default

Arguments

$load

$controller

\CController

« More »

prepareLDAPQuery

package

Default

Arguments

$queryId

« More »

questionExport

package

Default

Arguments

$action

string

$iSurveyID

$gid

$qid

« More »

questionGetXMLStructure

package

Default

Arguments

$xml

\XMLWriter

$gid

$qid

« More »

questionTitleSort

package

Default

Arguments

$a

$b

« More »

quexml_create_multi

from export_structure_quexml.php

package

Default

Arguments

$question

$qid

$varname

$iResponseID

$fieldmap

$scale_id

$free

$other

$yesvalue

$comment

« More »

quexml_create_question

Create a queXML question element

package

Default

Arguments

$RowQ

\CActiveRecord

Question details in array

$additional

boolean|string

Any additional question text to append

« More »

quexml_create_subQuestions

from export_structure_quexml.php

package

Default

Arguments

$question

$qid

$varname

$iResponseID

$fieldmap

$use_answers

$aid

$scale

« More »

quexml_export

Export quexml survey.

package

Default

Arguments

$surveyi

$quexmllan

$iResponseID

« More »

quexml_get_lengthth

from export_structure_quexml.php

package

Default

Arguments

$qid

$attribute

$default

$quexmllang

« More »

quexml_reformat_date

Format defaultValue of Date/Time questions according to question date format

package

Default

Arguments

$element

mixed

DOM element with the date to change

$qid

integer

The qid of the question

$iSurveyID

integer

The survey id

« More »

quexml_set_default_value

Set defaultValue attribute of provided element from response table

package

Default

Arguments

$element

mixed

DOM element to add attribute to

$iResponseID

integer

The response id

$qid

integer

The qid of the question

$iSurveyID

integer

The survey id

$fieldmap

array

A mapping of fields to qid

$fieldadd

boolean|string

Anything additional to search for in the field name

$usesqid

boolean|string

Search using sqid instead of qid

$usesaid

boolean|string

Search using aid

$usesscale

« More »

QueXMLCleanup

from export_structure_quexml.php

package

Default

Arguments

$string

$allow

« More »

QueXMLCreateFixed

from export_structure_quexml.php

package

Default

Arguments

$qid

$iResponseID

$fieldmap

$rotate

$labels

$scale

$other

$varname

« More »

QueXMLCreateFree

from export_structure_quexml.php

package

Default

Arguments

$f

$len

$lab

« More »

QueXMLFixedArray

from export_structure_quexml.php

package

Default

Arguments

$array

« More »

QueXMLSkipTo

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

Arguments

$qid

mixed

$value

mixed

$cfieldname

Response

boolean|string

Text of item to skip to otherwise false if nothing to skip to

« More »

quoteSPSS

Quotes a string with surrounding quotes and masking inside quotes by doubling them

package

Default

Arguments

$sText

string

Text to quote

$sQuoteChar

string

The quote character (Use ' for SPSS and " for R)

$aField

string

General field information from SPSSFieldmap

« More »

quoteText

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

Arguments

$sText

mixed

Text to quote

$sEscapeMode

string

Optional - One of the values 'html','js' or 'unescaped' - defaults to 'html'

Response

mixed|string

« More »

randomChars

Creates a random sequence of characters

package

Default

Arguments

$length

integer

Length of resulting string

$pattern

string

To define which characters should be in the resulting string

Response

string

« More »

randomizationGroup

Randomization group for groups

package

Default

Arguments

$surveyid

integer

$fieldmap

array

$preview

boolean

Response

array

($fieldmap, $randomized)

« More »

randomizationGroupsAndQuestions

Apply randomizationGroup and randomizationQuestion to session fieldmap

package

Default

Arguments

$surveyid

integer

$preview

boolean

$fieldmap

« More »

randomizationQuestion

Randomization group for questions

package

Default

Arguments

$surveyid

integer

$fieldmap

array

$preview

boolean

Response

array

($fieldmap, $randomized)

« More »

recursive_in_array

package

Default

Arguments

$needle

$haystack

« More »

regenerateCSRFToken

Force Yii to create a new CSRF token by removing the old one

package

Default

« More »

removeBOM

This function removes the UTF-8 Byte Order Mark from a string

package

Default

Arguments

$str

string

Response

string

« More »

renderError

package

Default

Arguments

$sTitle

$sMessage

$thissurvey

$sTemplateViewPath

string

« More »

renderRenderWayForm

Render token, captcha or register form

package

Default

Arguments

$renderWay

string

$scenarios

array

$sTemplateViewPath

string

$aEnterTokenData

array

$surveyid

integer

$aSurveyInfo

« More »

replaceExpressionCodes

Replaces EM variable codes in a current survey with a new one

package

Default

Arguments

$iSurveyID

integer

The survey ID

$aCodeMap

mixed

The codemap array (old_code=>new_code)

« More »

ReplaceFields

package

Default

Arguments

$text

$fieldsarray

$bReplaceInsertans

$staticReplace

« More »

resetAllSessionVariables

Resets all session variables for this survey

package

Default

Arguments

$surveyid

integer

« More »

resetQuestionTimers

Removes all question timers for this survey from local storage

package

Default

Arguments

$surveyid

« More »

resetTimers

Resets all question timers by expiring the related cookie - this needs to be called before any output is done

package

Default

todo

Deprecated - Question timers no longer use cookies

« More »

resetTutorials337

package

Default

Arguments

$oDB

\CDbConnection

« More »

resourceExtractFilter

Helper to filter the contents of a .zip file uploaded into the file manager

package

Default

Arguments

$p_event

$p_header

« More »

retrieveAnswers

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

Arguments

$ia

array

Details of $ia can be found at top of this file

Response

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?

« More »

return_array_filter_strings

package

Default

Arguments

$ia

$aQuestionAttributes

$thissurvey

$ansrow

$rowname

string

$trbc

$valuename

string

$method

$class

« More »

return_display_style

package

Default

Arguments

$ia

$aQuestionAttributes

$thissurvey

$rowname

string

« More »

return_timer_script

package

Default

Arguments

$aQuestionAttributes

$ia

$disable

string

Response

string

« More »

returnGlobal

This function returns POST/REQUEST vars, for some vars like SID and others they are also sanitized TODO: extends Yii:getParam

package

Default

Arguments

$stringname

string

$bRestrictToString

boolean

Response

array|boolean|mixed|integer|null

« More »

reverseTranslateFieldNames

This function creates the old fieldnames for survey import

package

Default

Arguments

$iOldSID

mixed

The old survey id

$iNewSID

integer

The new survey id

$aGIDReplacements

array

An array with group ids (oldgid=>newgid)

$aQIDReplacements

array

An array with question ids (oldqid=>newqid)

Response

array|boolean

« More »

rmdirr

This function removes a directory recursively

package

Default

Arguments

$dirname

string

Response

boolean

« More »

rollBackToTransactionBookmark

Roll back to a transaction bookmark

package

Default

Arguments

$sBookmark

mixed

Name of the bookmark

« More »

runAddPrimaryKeyonAnswersTable400

package

Default

Arguments

$oDB

« More »

safecount

PHP7 has created a little nasty bomb with count throwing erroros on uncountables This is to "fix" this problem

package

Default

author

Arguments

$element

mixed

Response

integer

counted element

« More »

safeDie

Provides a safe way to end the application

package

Default

returns

boolean Fake return so Scrutinizes shuts up

Arguments

$sText

mixed

« More »

sanitize

package

Default

Arguments

$input

$flags

$min

$max

« More »

sanitize_cquestions

package

Default

Arguments

$string

$min

$max

« More »

sanitize_dirname

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

Arguments

$string

$force_lowercase

$alphanumeric

« More »

sanitize_filename

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

Arguments

$filename

$force_lowercase

$alphanumeric

$beautify

« More »

sanitize_float

package

Default

Arguments

$float

$min

$max

« More »

sanitize_html_string

package

Default

Arguments

$string

« More »

sanitize_int

package

Default

Arguments

$integer

$min

$max

« More »

sanitize_labelname

package

Default

Arguments

$string

« More »

sanitize_languagecode

package

Default

Arguments

$codetosanitize

« More »

sanitize_languagecodeS

package

Default

Arguments

$codestringtosanitize

string

« More »

sanitize_ldap_string

package

Default

Arguments

$string

$min

$max

« More »

sanitize_paranoid_string

package

Default

Arguments

$string

$min

$max

« More »

sanitize_signedint

package

Default

Arguments

$integer

$min

$max

« More »

sanitize_sql_db_tablename

package

Default

Arguments

$string

« More »

sanitize_system_string

package

Default

Arguments

$string

$min

$max

« More »

sanitize_user

package

Default

Arguments

$string

string

« More »

sanitize_userfullname

package

Default

Arguments

$string

« More »

sanitize_xss_string

package

Default

Arguments

$string

« More »

scanFile

package

Default

Arguments

$fileName

« More »

sendCacheHeaders

package

Default

« More »

SendEmailMessage

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.

Arguments

$body

string

Body text of the email in plain text or HTML

$subject

mixed

Email subject

$to

mixed

Array with several email addresses or single string with one email address

$from

mixed

$sitename

mixed

$ishtml

boolean

$bouncemail

mixed

$attachments

mixed

$customheaders

Response

boolean

If successful returns true

« More »

sendSubmitNotifications

Send a submit notification to the email address specified in the notifications tab in the survey settings

package

Default

Arguments

$surveyid

« More »

setNoAnswerMode

setNoAnswerMode

package

Default

Arguments

$thissurvey

« More »

SetSurveyLanguage

Set the public survey language Control if language exist in this survey, else set to survey default language if $surveyid <= 0 : set the language to default site language

package

Default

Arguments

$surveyid

integer

$sLanguage

string

« More »

setTotalSteps

The number of "pages" that will be presented in this survey The number of pages to be presented will differ depending on the survey format Set totalsteps in session

package

Default

Arguments

$surveyid

integer

$thissurvey

array

$totalquestions

integer

« More »

setTransactionBookmark

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

Arguments

$sBookmark

mixed

Name of the bookmark

« More »

setupColumns

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.

  • Using Tables is problematic semanticly.
  • Using inline or float to create columns, causes the answers flows horizontally, not vertically which is not ideal visually.
  • Using CSS3 columns is also a problem because of browser support and also because if you have answeres split across two or more lines, and those answeres happen to fall at the bottom of a column, the answer might be split across columns as well as lines.
  • Using nested unordered list with the first level of
  • s floated is the same as using tables and so is bad semantically for the same reason tables are bad.
  • Breaking the unordered lists into consecutive floated unordered lists is not great semantically but probably not as bad as using tables.

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.

Arguments

$columns

integer

  • the number of columns, usually supplied by $dcols

$answer_count

integer

  • the number of answers to a question, usually supplied by $anscount

$wrapperclass

string

  • a global class for the wrapper

$itemclass

string

  • a class for the item

Response

array

with all the various opening and closing tags to generate a set of columns.

« More »

short_implode

Implode and sort content array for very long arrays

package

Default

Arguments

$sDelimeter

string

$sHyphen

$aArray

array

Response

string

String showing array content

« More »

ShowDBUpgradeNotice

package

Default

Response

string

html

« More »

showJavaScript

This function converts emebedded Javascript to Text

package

Default

Arguments

$sContent

string

String to clean

Response

string

Cleaned string

« More »

sortArrayByColumn

Sort array by column name

package

Default

Arguments

$array

array

$column_name

string

« More »

SPSSExportData

Exports CSV response data for SPSS and R

package

Default

Arguments

$iSurveyID

mixed

The survey ID

$iLength

string

Maximum text lenght data, usually 255 for SPSS <v16 and 16384 for SPSS 16 and later

$na

string

Value for N/A data

$sEmptyAnswerValue

string

Value for empty data ('')

$q

string

sep Quote separator. Use ' for SPSS, " for R

$header

boolean

logical $header If TRUE, adds SQGA code as column headings (used by export to R)

$sLanguage

string

« More »

SPSSFieldMap

Creates a fieldmap with all information necessary to output the fields

package

Default

Arguments

$iSurveyID

$prefix

string prefix for the variable ID

$sLanguage

Response

array

« More »

SPSSGetQuery

Creates a query string with all fields for the export

package

Default

Arguments

$iSurveyID

$limit

$offset

Response

\CDbCommand

« More »

SPSSGetValues

Check it the gives field has a labelset and return it as an array if true

package

Default

Arguments

$field

array field from SPSSFieldMap

$qidattributes

$language

string

Response

array|boolean

« More »

square

Simple function to square a value

package

Default

Arguments

$number

mixed

Value to square

« More »

square

Simple function to square a value

package

Default

Arguments

$number

mixed

Value to square

« More »

SSLRedirect

SSLRedirect() generates a redirect URL for the appropriate SSL mode then applies it.

(Was redirect() before CodeIgniter port.)

package

Default

Arguments

$enforceSSLMode

string

string 's' or '' (empty).

« More »

sTranslateLangCode2CK

package

Default

Arguments

$sLanguageCode

« More »

stringSize

Find the string size according DB size for existing question Column name must be SGQA currently

package

Default

Arguments

$sColumn

Response

integer

« More »

stripCtrlChars

This function strips UTF-8 control characters from strings, except tabs, CR and LF - it is intended to be used before any response data is saved to the response table

package

Default

Arguments

$sValue

mixed

A string to be sanitized

Response

string

A sanitized string, otherwise the unmodified original variable

« More »

stripJavaScript

This function strips any content between and including <javascript> tags

package

Default

Arguments

$sContent

string

String to clean

Response

string

Cleaned string

« More »

stripTagsFull

Strips html tags and replaces new lines

package

Default

Arguments

$string

$removeOther

if 'true', removes '-oth-' from the string.

Response

string

« More »

strSplitUnicode

Returns splitted unicode string correctly source: http://www.php.net/manual/en/function.str-split.php#107658

package

Default

Arguments

$str

string

$l

Response

string

« More »

submitfailed

submitfailed : used in em_manager_helper.php

"Unexpected error"

Will send e-mail to adminemail if defined.

package

Default

Arguments

$errormsg

string

$query

string

Will be included in sent email

Response

string

Error message

« More »

submittokens

Marks a tokens as completed and sends a confirmation email to the participiant.

If $quotaexit is set to true then the user exited the survey due to a quota restriction and the according token is only marked as 'Q'

package

Default

Arguments

$quotaexit

boolean

« More »

SureRemoveDir

package

Default

Arguments

$dir

$DeleteMe

$excludes

« More »

SureRemoveDir

package

Default

Arguments

$dir

$DeleteMe

« More »

surveyGetThemeConfiguration

Write XML structure for themes

package

Default

Arguments

$iSurveyId

integer

Survey ID

$oXml

object

XMLWriter Object

$bInherit

boolean

should theme configuration be inherited?

$sElementName

string

name for XML element

« More »

surveyGetXMLData

from export_structure_xml.php

package

Default

Arguments

$iSurveyID

$exclude

« More »

surveyGetXMLStructure

from export_structure_xml.php

package

Default

Arguments

$iSurveyID

$xmlwriter

$exclude

« More »

switchMSSQLIdentityInsert

This function switches identity insert on/off for the MSSQL database

package

Default

Arguments

$table

string

table name (without prefix)

$state

boolean

Set to true to activate ID insert, or false to deactivate

« More »

tableExists

Check if a table does exist in the database

package

Default

Arguments

$sTableName

string

Table name to check for (without dbprefix!))

Response

boolean

True or false if table exists or not

« More »

templateDefaultTexts

Returns the default email template texts as array

package

Default

todo

Move to defaulttexts helper

Arguments

$sLanguage

mixed

Required language translationb object

$mode

string

Escape mode for the translation function

$sNewlines

Response

array

« More »

templateExtractFilter

This is a PCLZip callback function that ensures only files are extracted that have a valid extension

package

Default

Arguments

$p_event

mixed

$p_header

mixed

Response

integer

Return 1 for yes (file can be extracted), 0 for no

« More »

templatereplace

This function replaces keywords in a text and is mainly intended for templates If you use this functions put your replacement strings into the $replacements variable instead of using global variables NOTE - Don't do any embedded replacements in this function. Create the array of replacement values and they will be done in batch at the end

package

Default

Arguments

$line

string

Text to search in

$replacements

array<mixed,string>

Array of replacements: Array( =>

$redata

array<mixed,mixed>

: array of global var used in the function

$debugSrc

null

unused

$anonymized

null

unused (all done in EM now)

$questionNum

integer|null

  • needed to support dynamic JavaScript-based tailoring within questions

$registerdata

void

  • deprecated

$bStaticReplacement

$oTemplate

Response

string

Text with replaced strings

« More »

testIfTokenIsValid

Test if token is valid

package

Default

Arguments

$subscenarios

array

$thissurvey

array

$aEnterTokenData

array

$clienttoken

string

Response

array<mixed,string>

($renderToken, $FlashError)

« More »

testKeypad

package

Default

Arguments

$sUseKeyPad

string

Response

string

« More »

themeoptions

package

Default

Arguments

$optionarray

$selectedvalue

« More »

tokensExport

package

Default

Arguments

$iSurveyID

integer

« More »

traceVar

If debug = 2 in application/config.php this will produce output in the console / firebug similar to var_dump. It will also include the filename and line that called this method.

package

Default

Arguments

$variable

mixed

The variable to be dumped

$depth

integer

Maximum depth to go into the variable, default is 10

« More »

transferPasswordFieldToText

package

Default

Arguments

$oDB

\CDbConnection

« More »

translateInsertansTags

This function replaces the old insertans tags with new ones across a survey

package

Default

Arguments

$newsid

string

Old SID

$oldsid

string

New SID

$fieldnames

mixed

Array array('oldfieldname'=>'newfieldname')

« More »

TSVImportSurvey

Import survey from an TSV file template that does not require assigning of GID or QID values.

If ID's are presented, they would be respected and used Multilanguage imports are supported Original function is changed to allow generating of XML instead of creating database objects directly Generated XML code is send to existing lss import function

package

Default

author

TMSWhite

Arguments

$sFullFilePath

string

Response

string

XML data

« More »

tsvSurveyExport

Export survey to TSV format It is using existing XML function to get the same source data as lss format

package

Default

Arguments

$surveyid

Response

string

« More »

updateFieldArray

FieldArray contains all necessary information regarding the questions This function is needed to update it in case the survey is switched to another language

package

Default

todo

: Make 'fieldarray' obsolete by replacing with EM session info

« More »

UpdateGroupList

Update SESSION VARIABLE: grouplist A list of groups in this survey, ordered by group name.

package

Default

Arguments

$surveyid

integer

$language

string

« More »

updateset

package

Default

Arguments

$lid

integer

« More »

upgrade327

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgrade328

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgrade330

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgrade331

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgrade333

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgradeArchivedTableSettings446

Import previously archived tables to ArchivedTableSettings

package

Default

Throws
\CException
« More »

upgradeBoxesTable251

package

Default

« More »

upgradeCPDBAttributeDefaultNames173

package

Default

« More »

upgradePermissions166

Converts global permissions from users table to the new permission system, and converts template permissions from template_rights to new permission table

package

Default

« More »

upgradeQuestionAttributes142

package

Default

« More »

upgradeQuestionAttributes148

package

Default

« More »

upgradeSurveyPermissions145

package

Default

« More »

upgradeSurveys145

package

Default

« More »

upgradeSurveys156

package

Default

« More »

upgradeSurveys177

package

Default

« More »

upgradeSurveyTables139

package

Default

« More »

upgradeSurveyTables164

Make sure all active tables have the right sized token field

During a small period in the 2.0 cycle some survey tables got no token field or a token field that was too small. This patch makes sure all surveys that are not anonymous have a token field with the right size

package

Default

Response

string|null

« More »

upgradeSurveyTables181

package

Default

Arguments

$sMySQLCollation

string

« More »

upgradeSurveyTables183

package

Default

« More »

upgradeSurveyTables253

package

Default

« More »

upgradeSurveyTables254

package

Default

« More »

upgradeSurveyTables255

package

Default

« More »

upgradeSurveyTables402

package

Default

Arguments

$sMySQLCollation

string

« More »

upgradeSurveyTimings146

package

Default

« More »

upgradeSurveyTimings350

package

Default

« More »

upgradeTables143

package

Default

« More »

upgradeTemplateTables298

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgradeTemplateTables304

package

Default

Arguments

$oDB

\CDbConnection

« More »

upgradeTokens145

package

Default

« More »

upgradeTokens148

package

Default

« More »

upgradeTokens176

This function removes the old CPDB fields in token tables replaces them with standard attribute fields and records the mapping information in the attributedescription field in the survey table instead

package

Default

« More »

upgradeTokenTables134

package

Default

« More »

upgradeTokenTables179

package

Default

« More »

upgradeTokenTables181

package

Default

Arguments

$sMySQLCollation

string

« More »

upgradeTokenTables256

package

Default

« More »

upgradeTokenTables402

package

Default

Arguments

$sMySQLCollation

string

« More »

useFirebug

package

Default

« More »

userSort

package

Default

Arguments

$a

$b

« More »

userSortNative

package

Default

Arguments

$a

$b

« More »

UTF8Strrev

This function support the ability NOT to reverse numbers (for example when you output a phrase as a parameter for a SWF file that can't handle RTL languages itself, but obviously any numbers should remain the same as in the original phrase).

Note that it can be used just as well for UTF-8 usages if you want the numbers to remain intact

package

Default

Arguments

$str

string

$reverse_numbers

boolean

Response

string

« More »

validateEmailAddress

Validate an email address - also supports IDN email addresses

package

Default

deprecated

: use LimeMailer::validateAddress($sEmailAddress);

returns

True/false for valid/invalid

Arguments

$sEmailAddress

mixed

Email address to check

« More »

validateEmailAddresses

Validate an list of email addresses - either as array or as semicolon-limited text

package

Default

deprecated

: use LimeMailer::validateAddresses($aEmailAddressList);

returns

array

Arguments

$aEmailAddressList

string

Email address to check

Response

string

List with valid email addresses - invalid email addresses are filtered - false if none of the email addresses are valid

« More »

validation_message

package

Default

Arguments

$ia

array

$show

boolean

  • true if should initially be visible

Response

array

« More »

validation_popup

package

Default

Arguments

$ia

$notvalidated

« More »

writeXmlFromArray

Write XML from Associative Array, recursive function

package

Default

Arguments

$xml

object

XMLWriter Object

$aData

array

Associative Data Array

$sParentKey

integer

parent key

« More »

XMLImportGroup

This function imports a LimeSurvey .lsg question group XML file

package

Default

Arguments

$sFullFilePath

string

The full filepath of the uploaded file

$iNewSID

integer

The new survey id - the page will always be added after the last page in the survey

$bTranslateLinksFields

boolean

Response

mixed

« More »

XMLImportLabelsets

XMLImportLabelsets() Function resp[onsible to import a labelset from XML format.

package

Default

Arguments

$sFullFilePath

string

$options

mixed

Response

« More »

XMLImportQuestion

This function imports a LimeSurvey .lsq question XML file

package

Default

Throws
\CException

Arguments

$sFullFilePath

string

The full filepath of the uploaded file

$iNewSID

integer

The new survey id

$iNewGID

$options

array<mixed,boolean>

Response

array

« More »

XMLImportResponses

package

Default

Arguments

$sFullFilePath

string

$iSurveyID

$aFieldReMap

Response

mixed

« More »

XMLImportSurvey

This function imports a LimeSurvey .lss survey XML file

package

Default

Arguments

$sFullFilePath

string

The full filepath of the uploaded file

$sXMLdata

string

$sNewSurveyName

$iDesiredSurveyId

$bTranslateInsertansTags

$bConvertInvalidQuestionCodes

« More »

XMLImportTimings

package

Default

Arguments

$sFullFilePath

string

$iSurveyID

$aFieldReMap

« More »

XMLImportTokens

package

Default

Arguments

$sFullFilePath

string

$iSurveyID

$sCreateMissingAttributeFields

Response

mixed

« More »

Constants

BASEPATH

« More »

K_TCPDF_EXTERNAL_CONFIG

« More »

PDF_PAGE_FORMAT

« More »

PDF_PAGE_ORIENTATION

« More »

PDF_CREATOR

« More »

PDF_AUTHOR

« More »

PDF_HEADER_TITLE

« More »

PDF_HEADER_STRING

« More »

PDF_HEADER_LOGO_WIDTH

« More »

PDF_UNIT

« More »

PDF_MARGIN_HEADER

« More »

PDF_MARGIN_TOP

« More »

PDF_MARGIN_BOTTOM

« More »

PDF_MARGIN_LEFT

« More »

PDF_MARGIN_RIGHT

« More »

PDF_FONT_NAME_MAIN

« More »

PDF_FONT_SIZE_MAIN

« More »

PDF_FONT_NAME_DATA

« More »

PDF_FONT_SIZE_DATA

« More »

PDF_FONT_MONOSPACED

« More »

PDF_IMAGE_SCALE_RATIO

« More »

HEAD_MAGNIFICATION

« More »

K_CELL_HEIGHT_RATIO

« More »

K_TITLE_MAGNIFICATION

« More »

K_SMALL_RATIO

« More »

K_THAI_TOPCHARS

« More »

K_TCPDF_CALLS_IN_HTML

« More »

$const

« More »

BASEPATH

« More »

BASEPATH

« More »

STDIN

« More »

YII_DEBUG

« More »

APPPATH

« More »

K_PATH_IMAGES

« More »

PRINT_TEMPLATE_DIR

« More »

PRINT_TEMPLATE_URL

« More »

LDAP_OPT_DIAGNOSTIC_MESSAGE

« More »

LOGO_URL

« More »

LOGO_ICON_URL

« More »

PRESENTATION

« More »

QR_MODE_NUL

« More »

QR_MODE_NUM

« More »

QR_MODE_AN

« More »

QR_MODE_8

« More »

QR_MODE_KANJI

« More »

QR_MODE_STRUCTURE

« More »

QR_ECLEVEL_L

« More »

QR_ECLEVEL_M

« More »

QR_ECLEVEL_Q

« More »

QR_ECLEVEL_H

« More »

QR_FORMAT_TEXT

« More »

QR_FORMAT_PNG

« More »

QR_CACHEABLE

« More »

QR_CACHE_DIR

« More »

QR_LOG_DIR

« More »

QR_FIND_BEST_MASK

« More »

QR_FIND_FROM_RANDOM

« More »

QR_DEFAULT_MASK

« More »

QR_PNG_MAXIMUM_SIZE

« More »

QRSPEC_VERSION_MAX

« More »

QRSPEC_WIDTH_MAX

« More »

QRCAP_WIDTH

« More »

QRCAP_WORDS

« More »

QRCAP_REMINDER

« More »

QRCAP_EC

« More »

QR_IMAGE

« More »

STRUCTURE_HEADER_BITS

« More »

MAX_STRUCTURED_SYMBOLS

« More »

QR_VECT

« More »

FIREBUG

« More »

LEM_DEBUG_TIMING

« More »

LEM_DEBUG_VALIDATION_SUMMARY

« More »

LEM_DEBUG_VALIDATION_DETAIL

« More »

LEM_PRETTY_PRINT_ALL_SYNTAX

« More »

LEM_DEFAULT_PRECISION

« More »

CHECKED

« More »

SELECTED

« More »

SHOW_NO_ANSWER

« More »

QUESTION_START

« More »

PARANOID

« More »

SYSTEM

« More »

FLOAT

« More »

MAGIC_QUOTES

« More »

BASEPATH

« More »

FCPATH

« More »

SYSDIR

« More »

APPPATH

« More »

YII_DEBUG

« More »

Classes, interfaces and traits

PermissionTrait

« More »

EMWarningInterface

LimeSurvey Copyright (C) 2007-2013 The LimeSurvey Project Team / Carsten Schmitz All rights reserved.

License: GNU/GPL License v2 or later, see LICENSE.php LimeSurvey is free software. This version may have been modified pursuant to the GNU General Public License, and as distributed it includes or is derivative of works licensed under the GNU General Public License or other free or open source software licenses. See COPYRIGHT.php for copyright notices and details.

« More »

IWriter

« More »

PermissionInterface

« More »

AdminController

« More »

AdminTheme

Admin Theme Model

« More »

Answer

Class Answer

« More »

AnswerL10n

Class SurveyLanguageSetting

« More »

ArchivedTableSettings

This is the model class for table "{{archived_table_settings}}".

The followings are the available columns in table '{{archived_table_settings}}':

« More »

Assessment

Class Assessment

« More »

AssessmentController

Class LSBaseController

this controller will have all the necessary methods from the old AdminController

« More »

AssetVersion

Class AssetVersion

« More »

AuditLog

Base class for plugins.

« More »

Authdb

Base class for plugins.

« More »

Authentication

Authentication Controller

This controller performs authentication

« More »

AuthLDAP

Base class for plugins.

« More »

AuthPluginBase

Base class for plugins.

« More »

Authwebserver

Base class for plugins.

« More »

BigData

Class containing helper functions for dealing with "big data".

« More »

BigFile

« More »

Box

This is the model class for table "{{boxes}}".

The followings are the available columns in table '{{boxes}}':

« More »

CheckIntegrity

CheckIntegrity Controller

This controller performs database repair functions.

« More »

ClassFactory

« More »

ComfortUpdateChecker

NB: Deleting this class will break plugin API, since plugins then would have to extend PluginBase in the namespace instead of this class. This is especially a problem for plugins that should work on both 2.73 and 3.x, so please don't delete this class.

« More »

CompileAssetsCommand

« More »

ComposerAutoloaderInit2659d7f00f449de3862d7a6e5ccde300

« More »

Condition

Class Condition

« More »

conditionsaction

Condition Controller

This controller performs token actions

« More »

ConsoleApplication

« More »

ConsoleHttpSession

« More »

CsvWriter

Contains functions and properties that are common to all writers.

All extending classes must implement the internalWrite(...) method and have access to functionality as described below:

TODO Write more docs here

« More »

customToken

NB: Deleting this class will break plugin API, since plugins then would have to extend PluginBase in the namespace instead of this class. This is especially a problem for plugins that should work on both 2.73 and 3.x, so please don't delete this class.

« More »

database

Database

This controller contains common functions for survey related views.

« More »

databaseupdate

Update Database Controller This controller must be accessible by unlogged user (in case of modifications of {{permissions}} blocking the login )

This controller contains common functions for survey related views.

« More »

dataentry

dataentry

This controller contains common functions for survey related views.

« More »

DataSetArray10ChoiceQuestion

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArray5ChoiceQuestion

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayFlexibleColumn

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayFlexibleRow

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayMultiFlexNumbers

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayMultiFlexText

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayMultiscale

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayOfIncSameDecQuestions

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetArrayYesUncertainNo

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetBoilerplate

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetDate

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetDummyQuestion

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetEquation

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetFileUpload

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetFivePointChoice

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetGenderDropdown

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetHugeFreeText

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetLanguage

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetListDropdown

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetListRadio

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetListRadioFlexible

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetListWithComment

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetLongFreeText

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetMultipleChoice

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetMultipleChoiceWithComments

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetMultipleNumerical

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetMultipleShortText

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetNumerical

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetRanking

This is a base class to enable all question tpyes to extend the general settings.

« More »

DataSetShortFreeText

This is a base class to enable all question tpyes to extend the general settings.

« More »