CheckIntegrity
extends SurveyCommonAction
in package
CheckIntegrity Controller
This controller performs database repair functions.
Tags
Table of Contents
Methods
- __construct() : mixed
- Constructor
- fixintegrity() : mixed
- Fix integrity
- fixredundancy() : mixed
- index() : void
- index() : mixed
- Index
- questionbar() : mixed
- Shows admin menu for question
- renderInternal() : mixed
- run() : mixed
- Action classes require them to have a run method. We reroute it to index if called.
- runWithParams() : bool
- Override runWithParams() implementation in CAction to help us parse requests with subactions.
- surveybar() : mixed
- Shows admin menu for surveys
- beforeSideMenuRender() : string
- Returns content from event beforeSideMenuRender
- checkGroupOrderDuplicates() : array<string|int, mixed>
- Check group order duplicates.
- checkintegrity() : array<string|int, mixed>
- This function checks the LimeSurvey database for logical consistency and returns an according array containing all issues in the particular tables.
- checkQuestionOrderDuplicates() : array<string|int, mixed>
- Check question order duplicates.
- fetchExtraMenus() : array<string|int, ExtraMenu>
- Get extra menus from plugins that are using event beforeAdminMenuRender
- filterImportedResources() : array<string|int, mixed>
- listquestiongroups() : mixed
- REFACTORED in LayoutHelper
- listquestions() : mixed
- REFACTORED in LayoutHelper
- notifications() : mixed
- Display notifications
- nsurveysummary() : mixed
- REFACTORED in LayoutHelper
- organizequestionbar() : mixed
- Render the save/cancel bar for Organize question groups/questions
- renderCentralContents() : string
- Rendering the subviews and views of renderWrappedTemplate
- renderJSON() : void
- Method to render an array as a json document
- renderQuickmenu() : string
- Render the quick-menu that is shown when side-menu is hidden.
- renderWrappedTemplate() : mixed
- Renders template(s) wrapped in header and footer
- requirePostRequest() : mixed
- Validates that the request method is POST.
- route() : mixed
- Routes the action into correct subaction
- showadminmenu() : string
- showadminmenu() function returns html text for the administration button bar
- showHeaders() : mixed
- Header
- surveysidemenu() : mixed
- Show side menu for survey view
- titlebar() : mixed
- REFACTORED in LayoutHelper.php
- updatenotification() : mixed
- Display the update notification
- addPseudoParams() : array<string|int, mixed>
- Some functions have different parameters, which are just an alias of the usual parameters we're getting in the url. This function just populates those variables so that we don't end up in an error.
- deleteAnswerL10ns() : array<string|int, mixed>
- This function deletes answers localizations
- deleteAnswers() : array<string|int, mixed>
- This function deletes answers
- deleteAssessments() : array<string|int, mixed>
- This function deletes Assessments
- deleteConditions() : array<string|int, mixed>
- This function deletes conditions
- deleteDefaultValues() : array<string|int, mixed>
- This function deletes default values by join on question
- deleteGroupL10ns() : array<string|int, mixed>
- This function deletes group localizations
- deleteGroups() : array<string|int, mixed>
- This function deletes groups
- deleteOrphanTokenTables() : array<string|int, mixed>
- Delete orphan token tables
- deleteQuestionAttributes() : array<string|int, mixed>
- This function deletes questionAttributes
- deleteQuestionL10ns() : array<string|int, mixed>
- This function deletes question localizations
- deleteQuestions() : array<string|int, mixed>
- This function deletes questions
- deleteQuotaLanguageSettings() : array<string|int, mixed>
- This function deletes quota language settings without related main entries
- deleteQuotaMembers() : array<string|int, mixed>
- This function deletes QuotaMember by join on question
- deleteQuotas() : array<string|int, mixed>
- This function deletes quota entries which not having a related survey entry
- deleteSurveyLanguageSettings() : array<string|int, mixed>
- This function deletes surveyLanguageSettings
- deleteSurveys() : array<string|int, mixed>
- This function deletes surveys
- deleteUserInGroups() : array<string|int, mixed>
- This function deletes UserInGroup
- dropOrphanSurveyTables() : array<string|int, mixed>
- Drop orphan survey tables
Methods
__construct()
Constructor
public
__construct(mixed $controller, mixed $id) : mixed
Parameters
- $controller : mixed
- $id : mixed
fixintegrity()
Fix integrity
public
fixintegrity() : mixed
fixredundancy()
public
fixredundancy() : mixed
index()
public
index() : void
index()
Index
public
index() : mixed
Tags
questionbar()
Shows admin menu for question
public
questionbar(array<string|int, mixed> $aData) : mixed
Parameters
- $aData : array<string|int, mixed>
Tags
renderInternal()
public
renderInternal(string $_viewFile_[, mixed $_data_ = null ][, mixed $_return_ = false ]) : mixed
Parameters
- $_viewFile_ : string
- $_data_ : mixed = null
- $_return_ : mixed = false
Tags
run()
Action classes require them to have a run method. We reroute it to index if called.
public
run() : mixed
runWithParams()
Override runWithParams() implementation in CAction to help us parse requests with subactions.
public
runWithParams(array<string|int, mixed> $params) : bool
Parameters
- $params : array<string|int, mixed>
-
URL Parameters
Return values
boolsurveybar()
Shows admin menu for surveys
public
surveybar(array<string|int, mixed> $aData) : mixed
Parameters
- $aData : array<string|int, mixed>
Tags
beforeSideMenuRender()
Returns content from event beforeSideMenuRender
protected
beforeSideMenuRender(array<string|int, mixed> $aData) : string
REFACTORED in LayoutHelper
Parameters
- $aData : array<string|int, mixed>
Return values
stringcheckGroupOrderDuplicates()
Check group order duplicates.
protected
checkGroupOrderDuplicates() : array<string|int, mixed>
Return values
array<string|int, mixed>checkintegrity()
This function checks the LimeSurvey database for logical consistency and returns an according array containing all issues in the particular tables.
protected
checkintegrity() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —Array with all found issues.
checkQuestionOrderDuplicates()
Check question order duplicates.
protected
checkQuestionOrderDuplicates() : array<string|int, mixed>
Return values
array<string|int, mixed>fetchExtraMenus()
Get extra menus from plugins that are using event beforeAdminMenuRender
protected
fetchExtraMenus(array<string|int, mixed> $aData) : array<string|int, ExtraMenu>
Parameters
- $aData : array<string|int, mixed>
Return values
array<string|int, ExtraMenu>filterImportedResources()
protected
filterImportedResources(string $extractdir, string $destdir) : array<string|int, mixed>
Parameters
- $extractdir : string
- $destdir : string
Tags
Return values
array<string|int, mixed>listquestiongroups()
REFACTORED in LayoutHelper
protected
listquestiongroups(array<string|int, mixed> $aData) : mixed
listquestion groups
Parameters
- $aData : array<string|int, mixed>
listquestions()
REFACTORED in LayoutHelper
protected
listquestions( $aData) : mixed
Parameters
Tags
notifications()
Display notifications
protected
notifications() : mixed
- REFACTORED (in LayoutHelper.php)
nsurveysummary()
REFACTORED in LayoutHelper
protected
nsurveysummary(array<string|int, mixed> $aData) : mixed
Survey summary
Parameters
- $aData : array<string|int, mixed>
organizequestionbar()
Render the save/cancel bar for Organize question groups/questions
protected
organizequestionbar(array<string|int, mixed> $aData) : mixed
REFACTORED in LayoutHelper
Parameters
- $aData : array<string|int, mixed>
Tags
renderCentralContents()
Rendering the subviews and views of renderWrappedTemplate
protected
renderCentralContents(string $sAction, array<string|int, mixed>|string $aViewUrls[, array<string|int, mixed> $aData = [] ]) : string
Parameters
- $sAction : string
- $aViewUrls : array<string|int, mixed>|string
- $aData : array<string|int, mixed> = []
Return values
stringrenderJSON()
Method to render an array as a json document
protected
renderJSON(array<string|int, mixed> $aData[, mixed $success = true ]) : void
REFACTORED in LSBaseController (this one called by a lot of actions in different controllers)
Parameters
- $aData : array<string|int, mixed>
- $success : mixed = true
renderQuickmenu()
Render the quick-menu that is shown when side-menu is hidden.
protected
renderQuickmenu(array<string|int, mixed> $aData) : string
REFACTORED in LayoutHelper
Only show home-icon for now.
Add support for plugin to attach icon elements using event afterQuickMenuLoad
Parameters
- $aData : array<string|int, mixed>
Tags
Return values
stringrenderWrappedTemplate()
Renders template(s) wrapped in header and footer
protected
renderWrappedTemplate([string $sAction = 'checkintegrity' ][, string $aViewUrls = array() ][, array<string|int, mixed> $aData = array() ][, mixed $sRenderFile = false ]) : mixed
Parameters
- $sAction : string = 'checkintegrity'
-
Current action, the folder to fetch views from
- $aViewUrls : string = array()
-
View url(s)
- $aData : array<string|int, mixed> = array()
-
Data to be passed on. Optional.
- $sRenderFile : mixed = false
-
File to be rendered as a layout. Optional.
requirePostRequest()
Validates that the request method is POST.
protected
requirePostRequest() : mixed
This is intended to be used on subactions. When possible (eg. when refactoring a SurveyCommonAction into an actual controller), use 'postOnly' filter instead.
Tags
route()
Routes the action into correct subaction
protected
route(string $sa, array<string|int, string> $get_vars) : mixed
Parameters
- $sa : string
- $get_vars : array<string|int, string>
Tags
showadminmenu()
showadminmenu() function returns html text for the administration button bar
protected
showadminmenu( $aData) : string
REFACTORED (in LayoutHelper.php)
Parameters
Tags
Return values
stringshowHeaders()
Header
protected
showHeaders(array<string|int, mixed> $aData[, mixed $sendHTTPHeader = true ]) : mixed
- REFACTORED (in LayoutHelper.php)
Parameters
- $aData : array<string|int, mixed>
- $sendHTTPHeader : mixed = true
surveysidemenu()
Show side menu for survey view
protected
surveysidemenu(array<string|int, mixed> $aData) : mixed
REFACTORED in LayoutHelper.php
Parameters
- $aData : array<string|int, mixed>
-
all the needed data
titlebar()
REFACTORED in LayoutHelper.php
protected
titlebar( $aData) : mixed
Parameters
Tags
updatenotification()
Display the update notification
protected
updatenotification() : mixed
REFACTORED (in LayoutHelper.php)
Tags
addPseudoParams()
Some functions have different parameters, which are just an alias of the usual parameters we're getting in the url. This function just populates those variables so that we don't end up in an error.
private
addPseudoParams(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
Parameters to parse and populate
Tags
Return values
array<string|int, mixed> —Populated parameters
deleteAnswerL10ns()
This function deletes answers localizations
private
deleteAnswerL10ns(array<string|int, array<string|int, mixed>> $answers, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $answers : array<string|int, array<string|int, mixed>>
-
localizations to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteAnswers()
This function deletes answers
private
deleteAnswers(array<string|int, array<string|int, mixed>> $answers, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $answers : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteAssessments()
This function deletes Assessments
private
deleteAssessments(array<string|int, array<string|int, mixed>> $assessments, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $assessments : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteConditions()
This function deletes conditions
private
deleteConditions(array<string|int, array<string|int, mixed>> $conditions, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $conditions : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteDefaultValues()
This function deletes default values by join on question
private
deleteDefaultValues(array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteGroupL10ns()
This function deletes group localizations
private
deleteGroupL10ns(array<string|int, array<string|int, mixed>> $groupLocalizations, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $groupLocalizations : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteGroups()
This function deletes groups
private
deleteGroups(array<string|int, array<string|int, mixed>> $groups, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $groups : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteOrphanTokenTables()
Delete orphan token tables
private
deleteOrphanTokenTables(array<string|int, mixed> $tokenTables, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $tokenTables : array<string|int, mixed>
- $aData : array<string|int, mixed>
Return values
array<string|int, mixed>deleteQuestionAttributes()
This function deletes questionAttributes
private
deleteQuestionAttributes(array<string|int, array<string|int, mixed>> $questionAttributes, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $questionAttributes : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteQuestionL10ns()
This function deletes question localizations
private
deleteQuestionL10ns(array<string|int, array<string|int, mixed>> $questionLocalizations, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $questionLocalizations : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteQuestions()
This function deletes questions
private
deleteQuestions(array<string|int, array<string|int, mixed>> $questions, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $questions : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteQuotaLanguageSettings()
This function deletes quota language settings without related main entries
private
deleteQuotaLanguageSettings(array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteQuotaMembers()
This function deletes QuotaMember by join on question
private
deleteQuotaMembers(array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteQuotas()
This function deletes quota entries which not having a related survey entry
private
deleteQuotas(array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteSurveyLanguageSettings()
This function deletes surveyLanguageSettings
private
deleteSurveyLanguageSettings(array<string|int, array<string|int, mixed>> $surveyLanguageSettings, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $surveyLanguageSettings : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteSurveys()
This function deletes surveys
private
deleteSurveys(array<string|int, array<string|int, mixed>> $surveys, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $surveys : array<string|int, array<string|int, mixed>>
-
to be deleted
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>deleteUserInGroups()
This function deletes UserInGroup
private
deleteUserInGroups(array<string|int, mixed> $userInGroups, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $userInGroups : array<string|int, mixed>
- $aData : array<string|int, mixed>
-
for view generation
Return values
array<string|int, mixed>dropOrphanSurveyTables()
Drop orphan survey tables
private
dropOrphanSurveyTables(array<string|int, mixed> $surveyTables, array<string|int, mixed> $aData) : array<string|int, mixed>
Parameters
- $surveyTables : array<string|int, mixed>
- $aData : array<string|int, mixed>