SurveyActivator
in package
Service class to activate survey.
Tags
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
$isSimulation
public
bool
$isSimulation
= \false
$createSurveyDir
protected
bool
$createSurveyDir
= \false
$error
protected
string
$error
$survey
protected
Survey
$survey
$tableDefinition
protected
array<string|int, mixed>
$tableDefinition
= []
$timingsTableDefinition
protected
array<string|int, mixed>
$timingsTableDefinition
= []
Methods
__construct()
public
__construct(Survey $survey) : mixed
Parameters
- $survey : Survey
activate()
Sets a survey into "activate" state.
public
activate() : array<string|int, mixed>
Creates necessary tables "responseTable", "timingTable". Fires events "beforeSurveyActivate" and "afterSurveyActivation"
Tags
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
boolcreateResponseTable()
protected
createResponseTable() : bool
Tags
Return values
boolcreateResponseTableKeys()
protected
createResponseTableKeys() : void
Tags
createSurveyDirectory()
protected
createSurveyDirectory() : bool
Return values
boolcreateTimingsTable()
protected
createTimingsTable() : bool
Return values
boolgetCollation()
protected
getCollation() : string
Return values
stringprepareResponsesTable()
protected
prepareResponsesTable() : void
prepareSimulateQuery()
protected
prepareSimulateQuery() : void
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>
prepareTimingsTable()
protected
prepareTimingsTable() : void
showEventMessages()
protected
showEventMessages(PluginEvent $event) : bool
Parameters
- $event : PluginEvent
Return values
boolsetMySQLDefaultEngine()
Set the default_storage_engine for mysql DB
private
setMySQLDefaultEngine(string $dbEngine) : mixed
Parameters
- $dbEngine : string