Functions

setNoAnswerMode

setNoAnswerMode

« 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

« More »

mandatory_message

« More »

validation_message

« More »

file_validation_message

« More »

mandatory_popup

« More »

validation_popup

« More »

file_validation_popup

« More »

return_timer_script

« More »

currentRelevecanceClass

Return class of a specific row (hidden by relevance)

« More »

return_display_style

« More »

return_array_filter_strings

« More »

testKeypad

« More »

do_boilerplate

« More »

do_equation

« More »

do_5pointchoice

« More »

do_date

« More »

do_language

« More »

do_list_dropdown

« More »

do_list_radio

« More »

do_listwithcomment

« More »

do_ranking

« More »

do_multiplechoice

« More »

do_multiplechoice_withcomments

« More »

do_file_upload

« More »

do_multipleshorttext

« More »

do_multiplenumeric

« More »

do_numerical

« More »

do_shortfreetext

« More »

getLatLongFromIp

« More »

do_longfreetext

« More »

do_hugefreetext

« More »

do_yesno

« More »

do_gender

« More »

do_array_5point

Construct answer part array_5point

« More »

do_array_10point

« More »

do_array_yesnouncertain

« More »

do_array_increasesamedecrease

« More »

do_array

« More »

do_array_texts

« More »

do_array_multiflexi

« More »

do_arraycolumns

« More »

do_array_dual

« More »

getLabelInputWidth

Find the label / input width

« 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.
« 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). *
« More »

ldap_getCnx

« More »

ldap_bindCnx

« More »

ldap_readattr

« More »

ldap_search_withScope

« More »

ldap_doTokenSearch

« More »

prepareLDAPQuery

« More »

loadanswers

« More »

getLanguageChangerDatas

This function creates the language selector for a particular survey

« More »

getLanguageChangerDatasPublicList

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

« More »

checkUploadedFileValidity

checkUploadedFileValidity used in SurveyRuntimeHelper

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

« 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'
« More »

sendSubmitNotifications

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

« More »

submitfailed

submitfailed : used in em_manager_helper.php

"Unexpected error" Will send e-mail to adminemail if defined.
« 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.

« More »

checkPassthruLabel

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

« More »

prefillFromCommandLine

Prefill startvalues from command line param

« More »

initFieldArray

« More »

randomizationGroupsAndQuestions

Apply randomizationGroup and randomizationQuestion to session fieldmap

« More »

randomizationGroup

Randomization group for groups

« More »

randomizationQuestion

Randomization group for questions

« More »

finalizeRandomization

Stuff?

« More »

testIfTokenIsValid

Test if token is valid

« More »

getRenderWay

Returns which way should be rendered

« More »

renderRenderWayForm

Render token, captcha or register form

« More »

resetAllSessionVariables

Resets all session variables for this survey

« 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

« More »

breakOutAndCrash

« More »

renderError

« More »

getNavigatorDatas

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

« More »

doAssessment

Caculate assessement scores

« More »

UpdateGroupList

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

« 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

« More »

checkCompletedQuota

checkCompletedQuota() returns matched quotas information for the current response

« More »

encodeEmail

encodeEmail : encode admin email in public part

« More »

getReferringUrl

GetReferringUrl() returns the referring URL

« More »

display_first_page

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

« More »

killSurveySession

killSurveySession : reset $_SESSION part for the survey

« More »

resetTimers

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

« 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

« More »

getMove

getMove get move button clicked

« More »

getSideBodyClass

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

« More »

cookieConsentLocalization

For later use, don't remove.

« More »

App

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

« 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.

« More »

nice_addslashes

« 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.
« More »

beautify_filename

« 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.
« More »

sanitize_paranoid_string

« More »

sanitize_cquestions

« More »

sanitize_system_string

« More »

sanitize_xss_string

« More »

sanitize_sql_db_tablename

« More »

sanitize_ldap_string

« More »

sanitize_html_string

« More »

sanitize_int

« More »

sanitize_user

« More »

sanitize_userfullname

« More »

sanitize_labelname

« More »

sanitize_float

« More »

sanitize

« More »

check_paranoid_string

« More »

check_int

« More »

check_float

« More »

check_html_string

« More »

check_ldap_string

« More »

check_system_string

« More »

check

« More »

sanitize_languagecode

« More »

sanitize_languagecodeS

« More »

sanitize_signedint

« More »

injectglobalsettings

« More »

getGlobalSetting

Returns a global setting

« More »

setGlobalSetting

« 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

« More »

getStandardsReplacementFields

« More »

ReplaceFields

« 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

« More »

gT

Translation helper function

« More »

eT

Translation helper function which outputs right away.

« More »

ngT

Translation helper function for plural forms

« More »

neT

Translation helper function for plural forms which outputs right away

« 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

« More »

getQuestionTypeList

getQuestionTypeList() Returns list of question types available in LimeSurvey. Edit this if you are adding a new question type

« More »

isStandardTemplate

isStandardTemplate returns true if a template is a standard template This function does not check if a template actually exists

« More »

getSurveyList

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

« More »

getTemplateList

« More »

getGidPrevious

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

« More »

getGidNext

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

« More »

convertGETtoPOST

« More »

calculateTotalFileUploadUsage

This function calculates how much space is actually used by all files uploaded using the File Upload question type

« More »

getDirectorySize

« More »

getMaxGroupOrder

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

« More »

getGroupOrder

getGroupOrder($surveyid,$gid) queries the database for the sortorder of a group.

« More »

getMaxQuestionOrder

Queries the database for the maximum sort order of a question.

« More »

getQuestionClass

getQuestionClass() returns a class name for a given question type to allow custom styling for each question type.

« More »

setupColumns

setupColumns() defines all the html tags to be wrapped around various list type answers.

« More »

alternation

« More »

longestString

longestString() returns the length of the longest string past to it.

« More »

getGroupList

getGroupList() queries the database for a list of all groups matching the current survey sid

« More »

getGroupList3

« More »

getGroupListLang

put your comment there.

..
« More »

getUserList

« More »

getSurveyInfo

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

« More »

templateDefaultTexts

Returns the default email template texts as array

« 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

« More »

shiftOrderQuestions

« More »

fixSortOrderGroups

« More »

fixMovedQuestionConditions

« More »

returnGlobal

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

« More »

sendCacheHeaders

« More »

getExtendedAnswer

« More »

validateEmailAddress

Validate an email address - also supports IDN email addresses

« More »

validateEmailAddresses

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

« 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

« More »

createFieldMap

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

« More »

hasFileUploadQuestion

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

« More »

createTimingsFieldMap

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

« More »

arraySearchByKey

« More »

getSavedCount

This function returns a count of the number of saved responses to a survey

« More »

buildLabelSetCheckSumArray

« More »

getQuestionAttributeValue

Returns the questionAttribtue value set or '' if not set

« More »

categorySort

« More »

HTMLEscape

« 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

« More »

javascriptEscape

« More »

SendEmailMessage

This function mails a text $body to the recipient $to.

You can use more than one recipient when using a semikolon separated string with recipients.
« More »

flattenText

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

« More »

getArrayFilterExcludesCascadesForGroup

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

« More »

createPassword

« More »

languageDropdown

« More »

languageDropdownClean

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

« More »

rmdirr

This function removes a directory recursively

« More »

CSVUnquote

This function removes surrounding and masking quotes from the CSV field

« More »

incompleteAnsFilterState

This function return actual completion state

« More »

isCaptchaEnabled

isCaptchaEnabled($screen, $usecaptchamode)

« More »

tableExists

Check if a table does exist in the database

« More »

isTokenCompletedDatestamped

« 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
« More »

getBounceEmail

« More »

getEmailFormat

« More »

hasTemplateManageRights

« More »

reverseTranslateFieldNames

This function creates the old fieldnames for survey import

« More »

hasResources

put your comment there.

..
« More »

randomChars

Creates a random sequence of characters

« More »

conditionalNewlineToBreak

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

« More »

breakToNewline

« More »

safeDie

Provides a safe way to end the application

« More »

fixCKeditorText

« More »

filterForAttributes

This is a helper function for getAttributeFieldNames

« More »

getAttributeFieldNames

Retrieves the attribute field names from the related survey participants table

« 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

« More »

getTokenFieldsAndNames

Retrieves the attribute names from the related survey participants table

« More »

stripJavaScript

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

« More »

showJavaScript

This function converts emebedded Javascript to Text

« More »

cleanTempDirectory

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

« More »

useFirebug

« More »

convertDateTimeFormat

This is a convenience function for the coversion of datetime values

« 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

« More »

removeBOM

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

« More »

getTemplatePath

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

« More »

getTemplateURL

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

« More »

getSubQuestions

Return an array of subquestions for a given sid/qid

« More »

getXMLWriter

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

« More »

SSLRedirect

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

(Was redirect() before CodeIgniter port.)
« 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.

« 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

« More »

isNumericInt

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

« More »

short_implode

Implode and sort content array for very long arrays

« More »

includeKeypad

Include Keypad headers

« More »

translateInsertansTags

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

« More »

replaceExpressionCodes

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

« More »

cleanLanguagesFromSurvey

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

« More »

fixLanguageConsistency

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

« More »

switchMSSQLIdentityInsert

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

« More »

getLastInsertID

Retrieves the last Insert ID realiable for cross-DB applications

« More »

getGroupDepsForConditions

getGroupDepsForConditions() get Dependencies between groups caused by conditions

« More »

getQuestDepsForConditions

getQuestDepsForConditions() get Dependencies between groups caused by conditions

« More »

checkMoveQuestionConstraintsForConditions

checkMoveQuestionConstraintsForConditions()

« More »

getUserGroupList

Get a list of all user groups

« More »

getGroupUserList

« 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
« More »

getLabelSets

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

« More »

getHeader

get the header

« More »

doHeader

« More »

getPrintableHeader

This function returns the header for the printable survey

« More »

getFooter

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

« More »

doFooter

« More »

getSurveyUserList

Retrieve a HTML <OPTION> list of survey admin users

« More »

getSurveyUserGroupList

Return HTML <option> list of user groups

« More »

fixSubquestions

This function fixes the group ID and type on all subquestions Optimized for minimum memory usage even on huge databases

« 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.

« More »

json_decode_ls

Decode a json string, sometimes needs stripslashes

« More »

aEncodingsArray

Return accepted codingsArray for importing files

Used in vvimport TODO : use in token and
« More »

ellipsize

Ellipsize String

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

getIPAddress

This function returns the real IP address under all configurations

« 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

« More »

array_diff_assoc_recursive

« 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.
« More »

humanFilesize

Format size in human readable format.

« More »

convertPHPSizeToBytes

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

« More »

getMaximumFileUploadSize

« 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

« More »

getSerialClass

« More »

regenerateCSRFToken

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

« More »

get_absolute_path

A function to remove .

./ or ./ from paths to prevent directory traversal
« More »

dbExecuteAssoc

« More »

dbRandom

Return the random function to use in ORDER BY sql statements

« 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

« More »

dbGetTablesLike

Gets the table names. Do not prefix.

« More »

createChart

Generate a chart for a question

@param int $iQuestionID ID of the question
« More »

getQuestionMapData

Return data to populate a Google Map

« 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
« More »

square

Simple function to square a value

« More »

cmpQuestionSeq

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

« 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

« More »

exprmgr_count

Count the number of answered questions (non-empty)

« More »

exprmgr_countif

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

« More »

exprmgr_countifop

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

« More »

exprmgr_stripos

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

« More »

exprmgr_stristr

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

« More »

exprmgr_strlen

Get unicode string length

« More »

exprmgr_strpos

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

« More »

exprmgr_strstr

Finds first occurrence of a unicode string within another

« More »

exprmgr_strtolower

Make an unicode string lowercase

« More »

exprmgr_strtoupper

Make an unicode string uppercase

« More »

exprmgr_substr

Get part of unicode string

« More »

exprmgr_sumifop

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

« More »

exprmgr_convert_value

Find the closest matching numerical input values in a list an replace it by the corresponding value within another list

« More »

exprmgr_date

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

« More »

exprmgr_if

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

« 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

« More »

exprmgr_list

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

« More »

exprmgr_log

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

« 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
« More »

exprmgr_join

Join together $args[N]

« More »

exprmgr_implode

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

« More »

exprmgr_empty

Return true if the variable is NULL or blank.

« More »

exprmgr_stddev

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

« More »

expr_mgr_htmlspecialchars

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

« More »

expr_mgr_htmlspecialchars_decode

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

« More »

exprmgr_regexMatch

Return true if $input matches the regular expression $pattern

« More »

geterrors_exprmgr_regexMatch

Return error information from pattern of regular expression $pattern

« More »

exprmgr_fixnum

Display number with comma as radix separator, if needed

« More »

exprmgr_unique

Returns true if all non-empty values are unique

« More »

stripTagsFull

Strips html tags and replaces new lines

« More »

isNumericExtended

Returns true if passed $value is numeric

« More »

strSplitUnicode

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

« More »

SPSSExportData

Exports CSV response data for SPSS and R

« More »

SPSSGetValues

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

« More »

SPSSFieldMap

Creates a fieldmap with all information necessary to output the fields

« More »

SPSSGetQuery

Creates a query string with all fields for the export

« More »

buildXMLFromQuery

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

« More »

surveyGetXMLStructure

from export_structure_xml.php

« More »

surveyGetXMLData

from export_structure_xml.php

« More »

getXMLDataSingleTable

Exports a single table to XML

« More »

QueXMLCleanup

from export_structure_quexml.php

« More »

QueXMLCreateFree

from export_structure_quexml.php

« More »

QueXMLFixedArray

from export_structure_quexml.php

« More »

QueXMLSkipTo

Calculate if this item should have a QueXMLSkipTo element attached to it

from export_structure_quexml.php
« More »

QueXMLCreateFixed

from export_structure_quexml.php

« More »

quexml_get_lengthth

from export_structure_quexml.php

« More »

quexml_create_multi

from export_structure_quexml.php

« More »

quexml_create_subQuestions

from export_structure_quexml.php

« More »

quexml_set_default_value

Set defaultValue attribute of provided element from response table

« More »

quexml_create_question

Create a queXML question element

« More »

quexml_export

Export quexml survey.

« More »

group_export

« More »

groupGetXMLStructure

« More »

questionExport

« More »

questionGetXMLStructure

« More »

tokensExport

« More »

CPDBExport

« More »

stringSize

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

« More »

numericSize

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

« More »

getDateFormatData

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

« More »

getLanguageData

« 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]
« More »

getPHPDateFromDateFormat

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

« 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.
« More »

getDateFormatDataForQID

Get the date format details for a specific question.

« More »

getDateFormatForSID

Get the date format for a specified survey

« More »

canShowDatePicker

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

« More »

getLanguageCodefromLanguage

« More »

getLanguageNameFromCode

Returns a language name from the code

« More »

getLanguageRTL

« More »

getLanguageDetails

Returns the locale settings for a certain language code

« More »

convertLStoDateTimePickerLocale

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

« More »

getLanguageDataRestricted

« More »

userSort

« More »

userSortNative

« 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
« More »

db_upgrade_all

« More »

resetTutorials337

« More »

upgrade333

« More »

upgrade331

« More »

upgrade330

« More »

upgrade328

« More »

upgrade327

« More »

transferPasswordFieldToText

« More »

createSurveyMenuTable

« More »

createSurveyGroupTables306

« More »

upgradeTemplateTables304

« More »

upgradeTemplateTables298

« More »

upgradeTokenTables256

« More »

upgradeSurveyTables255

« More »

upgradeSurveyTables254

« More »

upgradeSurveyTables253

« More »

upgradeBoxesTable251

« More »

createBoxes250

Create boxes table

« More »

fixLanguageConsistencyAllSurveys

« More »

upgradeSurveyTables181

« More »

upgradeTokenTables181

« More »

alterColumn

« More »

addColumn

« 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

« More »

rollBackToTransactionBookmark

Roll back to a transaction bookmark

« More »

dropDefaultValueMSSQL

Drop a default value in MSSQL

« More »

dropUniqueKeyMSSQL

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

« More »

dropSecondaryKeyMSSQL

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

« More »

dropPrimaryKey

Drops the primary key of a table

« More »

addPrimaryKey

« More »

modifyPrimaryKey

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

« More »

fixMySQLCollations

« 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

« More »

ShowDBUpgradeNotice

« More »

getDBConnectionStringProperty

« More »

outputDatabase

Outputs a full dump of the current LimeSurvey database

« More »

_outputDBDescription

« More »

_outputDBData

« More »

_outputTableDescription

Outputs the table structure in sql format

« More »

_outputTableData

Outputs the table data in sql format

« More »

_outputRecords

« More »

_countNumberOfEntries

« More »

_getMaxNbRecords

« More »

_getDbName

Get the database name

« More »

emailTokens

Sends email to tokens - invitations, reminders, registers, and confirmations

« More »

doreplacement

« More »

getListOfFiles

« More »

mkdir_p

« More »

themeoptions

« More »

recursive_in_array

« More »

is_template_editable

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

« More »

templateExtractFilter

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

« More »

initKcfinder

« More »

sTranslateLangCode2CK

« More »

PrepareEditorScript

« More »

getEditor

« More »

getPopupEditor

« More »

getInlineEditor

« More »

getSurveyDefaultSettings

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

« More »

checkGroup

checks consistency of groups

« More »

checkQuestions

checks questions in a survey for consistency

« More »

activateSurvey

Function to activate a survey

« More »

mssql_drop_constraint

« More »

mssql_drop_primary_index

« More »

XMLImportGroup

This function imports a LimeSurvey .lsg question group XML file

« More »

XMLImportQuestion

This function imports a LimeSurvey .lsq question XML file

« More »

XMLImportLabelsets

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

« More »

importSurveyFile

« More »

XMLImportSurvey

This function imports a LimeSurvey .lss survey XML file

« More »

GetNewSurveyID

This function returns a new random sid if the existing one is taken, otherwise it returns the old one.

« More »

XMLImportTokens

« More »

XMLImportResponses

« More »

CSVImportResponses

This function imports a CSV file into the response table

« More »

XMLImportTimings

« More »

XSSFilterArray

« More »

TSVImportSurvey

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

NOTE: This currently only supports import of one language
« More »

updateset

« More »

deletelabelset

Deletes a label set alog with its labels

« More »

insertlabelset

« More »

modlabelsetanswers

« More »

fixorder

Function rewrites the sortorder for a label set

« More »

createChart

Generate a chart for a question

@param int $iQuestionID ID of the question
« More »

getQuestionMapData

Return data to populate a Google Map

« 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
« More »

square

Simple function to square a value

« More »

subval_sort

« More »

LS

LS Library autoloader

« More »

scanFile

« More »

setSeed

Set seed for this response If there is no seed, create a new one Also inits the twister.

« More »

shuffle

Shuffle an array using MersenneTwister Argument NOT called by reference!

« More »

clean

« More »

ignore

« More »

iterateList

« More »

checkFile

« More »

checkStatic

« More »

SureRemoveDir

« More »

SureRemoveDir

« More »

createDatabase

« More »

Constants

CHECKED

« More »

SELECTED

« More »

SHOW_NO_ANSWER

« More »

QUESTION_START

« More »

PARANOID

« More »

SYSTEM

« More »

FLOAT

« More »

MAGIC_QUOTES

« 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 »

K_PATH_IMAGES

« More »

LDAP_OPT_DIAGNOSTIC_MESSAGE

« 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 »

LOGO_URL

« More »

LOGO_ICON_URL

« More »

PRESENTATION

« More »

FIREBUG

« More »

TEST_BASE_URL

Change the following URL based on your server configuration Make sure the URL ends with a slash so that we can use relative URLs in test cases

« More »

BASEPATH

« More »

BASEPATH

« More »

STDIN

« More »

YII_DEBUG

« More »

APPPATH

« More »

BASEPATH

« More »

BASEPATH

« More »

FCPATH

« More »

SYSDIR

« More »

APPPATH

« More »

YII_DEBUG

« More »

BASEPATH

« More »

FCPATH

« More »

SYSDIR

« More »

APPPATH

« More »

YII_DEBUG

« More »

PHP_ENV

« More »

BASEPATH

« More »

Classes, interfaces and traits

IWriter

« More »

iPluginStorage

« More »

iPlugin

« More »

iQuestion

« More »

ClassFactory

« More »

SurveyRuntimeHelper

« More »

questionIndexHelper

« More »

questionHelper

General helper class for question + question setting system

« More »

userstatistics_helper

« More »

LimeExpressionManager

« More »

ExpressionManager

Description of ExpressionManager (1) Does safe evaluation of PHP expressions. Only registered Functions, and known Variables are allowed.

(a) Functions include any math, string processing, conditional, formatting, etc. functions (2) This class replaces LimeSurvey's <= 1.91+ process of resolving strings that contain LimeReplacementFields (a) String is split by expressions (by curly braces, but safely supporting strings and escaped curly braces) (b) Expressions (things surrounded by curly braces) are evaluated - thereby doing LimeReplacementField substitution and/or more complex calculations (c) Non-expressions are left intact (d) The array of stringParts are re-joined to create the desired final string. (3) The core of Expression Manager is a Recursive Descent Parser (RDP), based off of one build via JavaCC by TMSWhite in 1999. (a) Functions that start with RDP_ should not be touched unless you really understand compiler design.
« More »

remotecontrol_handle

This class handles all methods of the RemoteControl 2 API

« More »

viewHelper

General helper class for generating views.

« More »

ExportSurveyResultsService

« More »

AjaxHelper

Ajax helper This class will help to standardize the Ajax communication between server and client.

See the manual page for more info: https://manual.limesurvey.org/Backend_Ajax_protocol
« More »

JsonOutput

Base class for json output

« More »

JsonOutputNoPermission

Permission set to false

« More »

JsonOutputError

Set error in constructor, which will be shown as a pop-up on client.

« More »

JsonOutputSuccess

Set success message in constructor, which will be shown as a pop-up on client.

« More »

JsonOutputModal

Base class for json output

« More »

JsonOutputNotLoggedIn

Echo html for log in form modal body This is a special case of JsonOutputModal, but with fixed html Only used through JsonOutputNotLoggedIn in AdminController::run.

« More »

JsonOutputHtml

Echo HTML and put it in a <div> with id $target.

« 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 »

SurveyDao

« More »

DocWriter

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 »

JsonWriter

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 »

PdfWriter

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 »

ExcelWriter

Exports results in Microsoft Excel format. By default the Writer sends HTTP headers and the file contents via HTTP. For testing purposes a file name can be to the constructor which will cause the ExcelWriter to output to a file.

All extending classes must implement the internalWrite(...) method and have access to functionality as described below: TODO Write more docs here
« More »

HtmlWriter

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 »

SurveyObj

« More »

Writer

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 »

Translator

« More »

FormattingOptions

« More »

statistics_helper

« More »

pdfHelper

General helper class for generating pdf.

« More »

SurveysController

This class will handle survey creation and manipulation.

« More »

Statistics_userController

« More »

index

« More »

PluginsController

« More »

UploaderController

« More »

SurveyController

« More »

AdminController

« More »

limereplacementfields

Survey Common Action

This controller contains common functions for survey related views.
« More »

SettingsUserController

« More »

remotecontrol

Survey Common Action

This controller contains common functions for survey related views.
« More »

SurveymenuEntryController

Survey Common Action

This controller contains common functions for survey related views.
« More »

PluginHelper

Survey Common Action

This controller contains common functions for survey related views.
« More »

Expressions

Survey Common Action

This controller contains common functions for survey related views.
« More »

PluginManagerController

Survey Common Action

This controller contains common functions for survey related views.
« More »

Index

Survey Common Action

This controller contains common functions for survey related views.
« More »

themeoptions

Survey Common Action

This controller contains common functions for survey related views.
« More »

ExpressionValidate

Survey Common Action

This controller contains common functions for survey related views.
« More »

participantsaction

This is the main controller for Participants Panel

This controller contains common functions for survey related views.
« More »

homepagesettings

Survey Common Action

This controller contains common functions for survey related views.
« More »

TutorialEntryController

« More »

NotificationController

Mostly for Ajax actions

This controller contains common functions for survey related views.
« More »

SurveysGroupsController

Survey Common Action

This controller contains common functions for survey related views.
« More »

htmleditor_pop

Survey Common Action

This controller contains common functions for survey related views.
« More »

SurveymenuController

Survey Common Action

This controller contains common functions for survey related views.
« More »

TutorialsController

This tutorial controller is the first step to have user generated tutorials.

Current project stance is only to serve pregenerated tutorials bay LimeSurvey Company.
« More »

jsonRPCServer

This class build a json-RPC Server 1.0 http://json-rpc.org/wiki/specification

« More »

LSZend_XmlRpc_Response_Http

« More »

jsonRPCClient

The object of this class are generic jsonRPC 1.0 clients http://json-rpc.org/wiki/specification

« More »

Date_Time_Converter

Date and Time Converter by Elac v0.9.3 elacdude@gmail.com www.elacdude.com

You are free to use this code free of charge, modify it, and distrubute it, just leave this comment block at the top of this file. Changes/Modifications 6/24/08 - Version 0.9.2 released. Minor additions - Added "S" support. (th, rd, st, nd. example: 5th) - Added a few more abbreviations for units of time in calculate() (s. sec. secs. min. mins. m. and more) - Added example.php (php examples and usage) and date_time_formats.html (list of supported date/time formats) to the package. 6/25/08 - Version 0.9.3 released. Bug fixes - Fixed month subtraction (wrap to previous year) bug - Fixed month and year "$only_return_the_value=true" bug. If you calculated by months or years, and set $only_return_the_value=true, it would overwrite the values instead of just returning them. - Fixed the "D" (Sun, Mon, Tue) bug. If you supplied "D" and "d" in the same mask, it would not return the correct output. - Changed the names of public variables "day", "month", and "year" added "s" at the end for consistency purposes 11/14/08 - Version 0.9.4 released. Bug fix - Got rid of the _one_dig_num function and used ltrim($num "0") instead
« More »

LSjsonRPCServer

This class build a json-RPC Server 1.0 http://json-rpc.org/wiki/specification

« More »

LS_Exception

LS Base Exception Class

« More »

LimesurveyApi

Class exposing a Limesurvey API to plugins.

This class is instantiated by the plugin manager, plugins can obtain it by calling getAPI() on the plugin manager.
« More »

PluginEventContent

« More »

PluginManager

Factory for limesurvey plugin objects.

« More »

AuthPluginBase

Base class for plugins.

« More »

DummyStorage

« More »

DbStorage

« More »

PluginBase

Base class for plugins.

« More »

QuestionPluginBase

Base class for plugins.

« More »

QuestionPluginAbstract

Base class for plugins.

« More »

QuestionBase

« More »

PluginEvent

« More »

SimpleTester

« More »

ShowPasses

Display passes

« More »

SmallReporter

Displays a tiny div in upper right corner when ok

« More »

MinimalReporter

Minimal only displays on error

« More »

BigData

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

« More »

BigFile

« More »

MersenneTwister

Custom random algorithm to get consistent behaviour between PHP versions.

Copied from: http://www.dr-chuck.com/csev-blog/2015/09/a-mersenne_twister-implementation-in-php/
« More »

quexmlpdf

A TCPDF based class to produce queXF compatible questionnaire PDF files and banding description XML from queXML

« More »

ProgressBar

« More »

SettingsStorage

« More »

httpRequestIt

« More »

User

Class User

« More »

PluginEventBehavior

« More »

SettingGlobal

Class SettingGlobal

« More »

ParticipantAttributeNameLang

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

The followings are the available columns in table '{{{{participant_attribute_names_lang}}}}':
« More »

SurveysGroups

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

The followings are the available columns in table '{{surveys_groups}}':
« More »

LabelSet

Class LabelSet

« More »

PluginSetting

Class PluginSetting

« More »

SurveyLanguageSetting

Class SurveyLanguageSetting

« More »

MapTutorialUsers

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

The followings are the available columns in table '{{map_tutorial_users}}':
« More »

QuestionTemplate

« More »

CPDBException

Specific exception for our purpose Used to spit out error messages if mapping attributes doesn't work.

« More »

Participant

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

The followings are the available columns in table '{{participants}}':
« More »

SurveymenuEntries

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

The followings are the available columns in table '{{surveymenu_entries}}':
« More »

Token

Class Token

In this implementation class definitions are generated dynamically. This class and its descendants should be declared abstract!
« More »

UniqueNotification

Subclass of Notification, but with unique constraint.

If a new message is created exactly like another one, it will be marked as unread.
« More »

Condition

Class Condition

« More »

QuestionAttribute

Class QuestionAttribute

« More »

ParticipantAttributeName

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

The followings are the available columns in table '{{{{participant_attribute_names}}}}':
« More »

Response

Relations

In this implementation class definitions are generated dynamically. This class and its descendants should be declared abstract!
« More »

SurveymenuEntryData

« More »

PluginDynamic

Dynamic model used by plugins to access their table(s).

« More »

TutorialEntryRelation

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

The followings are the available columns in table '{{tutorial_entry_groups}}':
« More »

TemplateConfig

Class TemplateConfig Common methods for TemplateConfiguration and TemplateManifest

« More »

Session

Class Session

« More »

Plugin

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

« More »

UserGroup

Class UserGroup

« More »

Label

Class Label

« More »

DefaultValue

Class DefaultValue

« More »

Answer

Class Answer

« More »

Tutorial

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

The followings are the available columns in table '{{tutorials}}':
« More »

SurveyDynamic

« More »

Question

Class Question

« More »

SurveyTimingDynamic

Class SurveyTimingDynamic

« More »

ParticipantAttribute

Class ParticipantAttribute

« More »

TemplateConfiguration

Class TemplateConfig Common methods for TemplateConfiguration and TemplateManifest

« More »

QuotaLanguageSetting

« More »

Permission

Class Permission

« More »

TokenDynamic

Class TokenDynamic

« More »

Quota

Class Quota

« More »

UserInGroup

Class UserInGroup

« More »

InstallerConfigForm

« More »

SurveyURLParameter

Class SurveyURLParameter

« More »

Boxes

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

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

Surveymenu

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

The followings are the available columns in table '{{surveymenu}}':
« More »

Template

Class Template

« More »

TutorialEntry

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

The followings are the available columns in table '{{tutorial_entry}}':
« More »

ParticipantShare

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

The followings are the available columns in table '{{participant_shares}}':
« More »

QuestionGroup

Class QuestionGroup

« More »

ExpressionError

Class ExpressionError

« More »

Dynamic

This class implements the basis for dynamic models.

In this implementation class definitions are generated dynamically. This class and its descendants should be declared abstract!
« More »

QuotaMember

Class QuotaMember

« More »

Notification

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

The followings are the available columns in table '{{notifications}}':
« More »

Assessment

Class Assessment

« More »

Timing

Dynamic response timing model.

« More »

SavedControl

Class SavedControl

« More »

Survey

Class Survey

« More »

LSActiveRecord

« More »

SettingsUser

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

The followings are the available columns in table '{{settings_user}}':
« More »

FailedLoginAttempt

Class FailedLoginAttempt

« More »

LSUserIdentity

For 2.06 most of the functionality in this class will be moved to the LSWebUser class.

To not delay release of 2.05 this class was kept the way it is now. @@TODO Move to LSWebUser and change documentation / workflow for authentication plugins
« More »

LSCaptcha

CCaptcha class file.

« More »

DbHttpSession

« More »

LSYii_AssetManager

LimeSurvey Copyright (C) 2007-2011 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 »

LS_Twig_Extension

This extension is needed to add complex functions to twig, needing specific process (like accessing config datas).

Most of the calls to internal functions don't need to be set here, but can be directly added to the internal config file. For example, the calls to encode, gT and eT don't need any extra parameters or process, so they are added as filters in the congif/internal.php: 'filters' => array( 'jencode' => 'CJSON::encode', 't' => 'eT', 'gT' => 'gT', ), So you only add functions here when they need a specific process while called via Twig. To add an advanced function to twig: 1. Add it here as a static public function eg: static public function foo($bar) { return procces($bar); } 2. Add it in config/internal.php as a function, and as an allowed function in the sandbox eg: twigRenderer' => array( ... 'functions' => array( ... 'foo' => 'LS_Twig_Extension::foo', ...), ... 'sandboxConfig' => array( ... 'functions' => array('include', ..., 'foo') ), Now you access this function in any twig file via: {{ foo($bar) }}, it will show the result of process($bar). If LS_Twig_Extension::foo() returns some HTML, by default the HTML will be escaped and shows as text. To get the pure HTML, just do: {{ foo($bar) | raw }}
« More »

LSHttpRequest

Description of HttpRequest

Used in LSYii_Application.php <pre> 'request'=>array( 'class'=>'HttpRequest', 'noCsrfValidationRoutes'=>array( '^services/wsdl.*$' ), 'enableCsrfValidation'=>true, 'enableCookieValidation'=>true, ), </pre> Every route will be interpreted as a regex pattern.
« More »

WrongTemplateVersionException

Thrown when template/theme can't be loaded and there's a mismatch between template version in db and in config.xml

« More »

LSWebUser

« More »

ConsoleApplication

« More »

PluginManager

Class PluginManagerD Dummy class for 2.05 plugins.

« More »

LSYii_ClientScript

« More »

LSCGettextMessageSource

Extension of CGettextMessageSource to allow plugins to have their own localization files

« More »

LsDefaultDataSets

A collection of default data sets, like surveymenus, surveymenuentries, and tutorials

« More »

LSYii_CompareInsensitiveValidator

« More »

LSYii_Validators

« More »

LSYii_CaseValidator

« More »

LSYii_Controller

« More »

LSYii_Locale

« More »

AuthPluginBase

Base class for plugins.

« More »

MysqlSchema

« More »

DbConnection

« More »

PgsqlSchema

« More »

MssqlSchema

« More »

LSYii_EmailIDNAValidator

« More »

PluginBase

NB: Deleting this class will break plugin API, since plugins then would have to extend PluginBase in the namespace instead of this class.

« More »

LSDbCriteria

« More »

LSBootstrap

For updating from 2.06 to 2.5.

2.06 logout action still looks for this file at the end of the update process, causing an internal server error.
« More »

LSYii_Application

Implements global config

« More »

UserIdentity

« More »

PluginEvent

« More »

LSAuthResult

« More »

AuthLDAP

Base class for plugins.

« More »

Authwebserver

Base class for plugins.

« More »

RDataWriter

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 »

RSyntaxWriter

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 »

ExportR

Base class for plugins.

« More »

ExtendedStartpage

Extended startpage plugin to display more information about the sctive surveys on the startpage.

« More »

STATAxmlWriter

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 »

ExportSTATAxml

Base class for plugins.

« More »

Authdb

Base class for plugins.

« More »

oldUrlCompat

Plugin to redirect old url system (index.php?sid=surveyid) to the new url

« More »

ConsoleHttpSession

« More »

LSETwigViewRenderer

Twig view renderer, LimeSurvey overload

Allow to run sandbox Configuration Provide different render methods for different context: - render() : for general use - renderQuestion() : to render a question. It checks if a question template view should be use, else core's view (used from qanda helper). - convertTwigToHtml() : to render a string without any file (used from replacement helper) The only tricky point here is the path problematic (where should be searched the views to render?)
« More »

ExpressionManagerTest

« More »

WebTestCase

The base class for functional test cases.

In this class, we set the base URL for the test application. We also provide some common methods to be used by concrete test classes.
« More »

CTestCase

« More »

DemomodeCommand

« More »

WipeCommand

« More »

FlushAssetsCommand

« More »

PluginCommand

« More »

UpdateDBCommand

« More »

InstallCommand

« More »

CompileAssetsCommand

« More »

ResetPasswordCommand

« More »

LimeSurveyWebDriver

Subclass of Facebook webdriver.

This class contains helper methods to interact with a LimeSurvey survey, like filling in questions, going to next question group, changing language etc.
« More »

TestHelper

« More »

ScreenOutTest

Test survey when all other questions relevance is 0, due to first question being yes or no.

« More »

AjaxModeTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

LanguageChangerTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

MultipleChoiceWithExpressionTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

DateTimeTest

« More »

DateTimeValidationTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

DateTimeForwardBackTest

« More »

DateTimeDefaultAnswerExpressionTest

« More »

MultipleChoiceNextPreviousTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

GroupRandomizationTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

ExpressionManagerCoreTest

Test expression evaluation in PHP vs JS.

« More »

CheckDatabaseJsonValuesTest

Check the JSON saved in database.

« More »

ExpressionCoreAux

Helper class for expression core tests.

« More »

UpdateDbHelperTest

« More »

InstallationControllerTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

TemplateControllerTest

« More »

SaveDualScaleAnswerOptionsTest

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

CreateSurveyTest

Login and create a survey, add a group and a question.

« More »

TemplateConfigurationTest

« More »

DummyController

« More »

TestBaseClass

« More »

Example

NB: Deleting this class will break plugin API, since plugins then would have to extend PluginBase in the namespace instead of this class.

« More »

ShowResponse

NB: Deleting this class will break plugin API, since plugins then would have to extend PluginBase in the namespace instead of this class.

« More »

UnActivatable

Example plugin that can not be activated.

« More »

mdlAuditlog

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

« More »

AuditLog

Base class for plugins.

« More »

Classes, interfaces and traits

Hash

Library of array functions for manipulating and extracting data from arrays or 'sets' of data.

`Hash` provides an improved interface, more consistent and predictable set of features over `Set`. While it lacks the spotty support for pseudo Xpath, its more fully featured dot notation provides similar features in a more consistent implementation.
« More »

Classes, interfaces and traits

InstallerController

Installer

« More »

OptoutController

optout

« More »

RegisterController

register

« More »

PrintanswersController

printanswers

« More »

OptinController

optin

« More »

Classes, interfaces and traits

quotas

Quotas Controller

This controller performs quota actions
« More »

Authentication

Authentication Controller

This controller performs authentication
« More »

conditionsaction

Condition Controller

This controller performs token actions
« More »

themes

templates

This controller contains common functions for survey related views.
« More »

printablesurvey

Printable Survey Controller

This controller shows a printable survey.
« More »

translate

Translate Controller

This controller performs translation actions
« More »

emailtemplates

emailtemplates

This controller contains common functions for survey related views.
« More »

saved

Saved controller

This controller contains common functions for survey related views.
« More »

Dumpdb

Dump Database

This controller contains common functions for survey related views.
« More »

Assessments

Assessments Controller

This controller performs assessments actions
« More »

labels

labels

This controller contains common functions for survey related views.
« More »

database

Database g

This controller contains common functions for survey related views.
« More »

UserAction

User Controller

This controller performs user actions
« More »

questiongroups

questiongroup

This controller contains common functions for survey related views.
« More »

statistics

Statistics Controller

This controller performs statistics actions
« More »

surveypermission

surveypermission

This controller contains common functions for survey related views.
« More »

CheckIntegrity

CheckIntegrity Controller

This controller performs database repair functions.
« More »

export

Export Action

This controller performs export actions
« More »

tokens

Tokens Controller

This controller performs token actions
« More »

responses

Responses Controller

This controller performs browse actions.
« More »

Usergroups

Usergroups

This controller contains common functions for survey related views.
« More »

SurveyAdmin

survey

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 »

questions

question

This controller contains common functions for survey related views.
« More »

update

This controller performs updates, it is highly ajax oriented Methods are only called from JavaScript controller (wich is called from the global_setting view). comfortupdate.js is the first registered script.

Public methods are written in a chronological way: - First, when the user click on the 'check for updates' button, the plugin buildComfortButtons.js call for getstablebutton() or getbothbuttons() method and inject the HTML inside the li#udapteButtonsContainer in the _checkButtons view - Then, when the user click on one of those buttons, the comfortUpdateNextStep.js plugin will call for the getWelcome() method and inject the HTML inside div#updaterContainer in the _right_container view (all steps will be then injected here) - Then, when the user click on the continue button, the comfortUpdateNextStep.js plugin will call for the step1() method and inject the the HTML inside div#updaterContainer in the _right_container view - etc. etc. Some steps must be shown out of the chronological process: getNewKey and submitKey. They are at the end of the controller's interface. Some steps must be 'checked again' after the user fixed some errors (such as file permissions). Those steps are/can be diplayed by the plugin displayComfortStep.js. They are called from buttons like : <a class='button' href='<?php Yii::app()->createUrl('admin/globalsettings', array('update'=>'methodToCall', 'neededVariable'=>$value));?>'> <span class='ui-button-text'>button text</span> </a> so they will call an url such as : globalsettings?update=methodToCall&neededVariable=value. So the globalsetting controller will render the view as usual, but : the _ajaxVariables view will parse those url datas to some hidden field. The comfortupdate.js check the value of the hidden field update, and if the update's one contain a step, it call displayComfortStep.js wich will display the right step instead of the 'check update' buttons. Most steps are retrieving datas from the comfort update server thanks to the model UpdateForm's methods. The server return an answer object, with a property 'result' to tell if the process was succesfull or if it failed. This object contains in general all the necessary datas for the views. Handling errors : They are different types of possible errors : - Warning message (like : modified files, etc.) : they don't stop the process, they are parsed to the step view, and the view manage how to display them. They can be generated from the ComfortUpdate server ($answer_from_server->result == TRUE ; and something like $answer_from_server->error == message or anything else that the step view manage ), or in the LimeSurvey update controller/model - Error while processing a request on the server part : should never happen, but if something goes wrong in the server side (like generating an object from model), the server returns an error object ($answer_from_server->result == FALSE ; $answer_from_server->error == message ) Those errors stop the process, and are display in _error view. Very usefull to debug. They are parsed directly to $this->_renderError - Error while checking needed datas in the LimeSurvey update controller : the controller always check if it has the needed datas (such as destintion_build, or zip_file), or the state of the key (outdated, etc). For the code to be dryer, the method parse an error string to $this->_renderErrorString($error), wich generate the error object, and then render the error view
« More »

GlobalSettings

GlobalSettings Controller

This controller contains common functions for survey related views.
« More »

dataentry

dataentry

This controller contains common functions for survey related views.
« More »

AdminTheme

Admin Theme Model

« More »

UpdateForm

Update Form Model

This model retrieves all the data Comfort Updates needs. Most of them come from request to the Update Server.
« More »

TemplateManifest

Template Configuration Model

This model retrieves all the data of template configuration from the configuration file
« More »

Survey_Common_Action

Survey Common Action

This controller contains common functions for survey related views.
« More »

Classes, interfaces and traits

VerificationController

the Verification class, this is grouped with other classes in the "limesurvey_yii" package and * is part of "controllers" subpackage

« More »

Constants

SERVICES_JSON_SLICE

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_STR

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_ARR

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_OBJ

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_IN_CMT

Marker constant for Services_JSON::decode(), used to flag stack state

« More »

SERVICES_JSON_LOOSE_TYPE

Behavior switch for Services_JSON::decode()

« More »

SERVICES_JSON_SUPPRESS_ERRORS

Behavior switch for Services_JSON::decode()

« More »

Classes, interfaces and traits

Services_JSON

Converts to and from JSON format.

Brief example of use: <code> // create a new instance of Services_JSON $json = new Services_JSON(); // convert a complexe value to JSON notation, and send it to the browser $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); $output = $json->encode($value); print($output); // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] // accept incoming POST data, assumed to be in JSON notation $input = file_get_contents('php://input', 1000000); $value = $json->decode($input); </code>
« More »

Services_JSON_Error

« More »

Classes, interfaces and traits

TestBaseClassView

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

TestBaseClassWeb

Class TestBaseClassWeb this is the base class for functional tests that need browser simulation

« More »

AdminViewsTest

Class AdminViewsTest This test loops through all basic admin view pages and cheks if they open withour errors

« More »