LimeSurvey API - Master branch

SurveyActivator
in package

Service class to activate survey.

Tags
todo

Move to models/services/survey/ folder.

Table of Contents

Properties

$isSimulation  : bool
$createSurveyDir  : bool
$error  : string
$survey  : Survey
$tableDefinition  : array<string|int, mixed>
$timingsTableDefinition  : array<string|int, mixed>

Methods

__construct()  : mixed
activate()  : array<string|int, mixed>
Sets a survey into "activate" state.
fixQuestionAttributeForRanking()  : void
See bug #09828: Ranking question : update allowed can broke Survey DB If max_subquestions is not set or is invalid : set it to actual answers numbers
isCloseAccessMode()  : bool
Checks if the survey is in close access mode.
createResponseTable()  : bool
createResponseTableKeys()  : void
createSurveyDirectory()  : bool
createTimingsTable()  : bool
getCollation()  : string
prepareResponsesTable()  : void
prepareSimulateQuery()  : void
prepareTableDefinition()  : void
For each question, create the appropriate field(s)
prepareTimingsTable()  : void
showEventMessages()  : bool
setMySQLDefaultEngine()  : mixed
Set the default_storage_engine for mysql DB

Properties

$tableDefinition

protected array<string|int, mixed> $tableDefinition = []

$timingsTableDefinition

protected array<string|int, mixed> $timingsTableDefinition = []

Methods

activate()

Sets a survey into "activate" state.

public activate() : array<string|int, mixed>

Creates necessary tables "responseTable", "timingTable". Fires events "beforeSurveyActivate" and "afterSurveyActivation"

Tags
throws
CException
Return values
array<string|int, mixed>

fixQuestionAttributeForRanking()

See bug #09828: Ranking question : update allowed can broke Survey DB If max_subquestions is not set or is invalid : set it to actual answers numbers

public fixQuestionAttributeForRanking(mixed $sFieldMap) : void
Parameters
$sFieldMap : mixed

isCloseAccessMode()

Checks if the survey is in close access mode.

public isCloseAccessMode() : bool
Return values
bool

createResponseTable()

protected createResponseTable() : bool
Tags
throws
CDbException
throws
CException
Return values
bool

createResponseTableKeys()

protected createResponseTableKeys() : void
Tags
throws
CDbException
throws
CException

createSurveyDirectory()

protected createSurveyDirectory() : bool
Return values
bool

createTimingsTable()

protected createTimingsTable() : bool
Return values
bool

getCollation()

protected getCollation() : string
Return values
string

prepareTableDefinition()

For each question, create the appropriate field(s)

protected prepareTableDefinition(string $collation, array<string|int, mixed> $sFieldMap) : void
Parameters
$collation : string
$sFieldMap : array<string|int, mixed>

setMySQLDefaultEngine()

Set the default_storage_engine for mysql DB

private setMySQLDefaultEngine(string $dbEngine) : mixed
Parameters
$dbEngine : string

        
On this page

Search results