LimeSurvey API - Master branch

Quotas
in package

Tags
todo

Possible remove this warning

SuppressWarnings

(PHPMD.ExcessiveClassComplexity)

Table of Contents

Properties

$survey  : Survey

Methods

__construct()  : mixed
Quicktranslation constructor.
allAnswersSelected()  : bool
Checks if all possible answers are already selected.
checkActionPermissions()  : bool
Checks for a specific action if current user has the permission for it.
editQuota()  : bool|mixed
getQuotaAnswers()  : array<string|int, mixed>
Returns an answerlist for a specific question type and marks already used answers as such.
getQuotaStructure()  : array<string|int, mixed>
In the array are qoutaId[ aQuotaItems = [ oQuestion, answerTitle, quotaMember valid ??? ] ]
multipleItemsAction()  : null|array<string|int, mixed>
newQuotaLanguageSetting()  : QuotaLanguageSetting
Retunr
saveNewQuota()  : Quota
Saves the new quota and it's language settings.

Properties

Methods

__construct()

Quicktranslation constructor.

public __construct(Survey $survey) : mixed
Parameters
$survey : Survey

the survey object

allAnswersSelected()

Checks if all possible answers are already selected.

public allAnswersSelected(Question $oQuestion, array<string|int, mixed> $aQuestionAnswers) : bool
Parameters
$oQuestion : Question
$aQuestionAnswers : array<string|int, mixed>

array list with possible question answers and already used answers (see getQuotaAnswer)

Return values
bool

true if all possible answers are alreday selected, false otherwise

checkActionPermissions()

Checks for a specific action if current user has the permission for it.

public checkActionPermissions( $action) : bool
Parameters
$action :
Return values
bool

true if user has permission for action, false otherwise

editQuota()

public editQuota(Quota $oQuota, array<string|int, mixed> $quotaParams) : bool|mixed
Parameters
$oQuota : Quota
$quotaParams : array<string|int, mixed>
Return values
bool|mixed

getQuotaAnswers()

Returns an answerlist for a specific question type and marks already used answers as such.

public getQuotaAnswers(int $iQuestionId, int $iQuotaId) : array<string|int, mixed>
Parameters
$iQuestionId : int
$iQuotaId : int
Tags
todo

Refactor and remove phpmd warning

SuppressWarnings

(PHPMD.ExcessiveMethodLength)

Return values
array<string|int, mixed>

getQuotaStructure()

In the array are qoutaId[ aQuotaItems = [ oQuestion, answerTitle, quotaMember valid ??? ] ]

public getQuotaStructure() : array<string|int, mixed>
Return values
array<string|int, mixed>

multipleItemsAction()

public multipleItemsAction(array<string|int, int> $aQuotaIds, string $action[, null|array<string|int, mixed> $languageSettings = [] ]) : null|array<string|int, mixed>
Parameters
$aQuotaIds : array<string|int, int>
$action : string
$languageSettings : null|array<string|int, mixed> = []
Tags
throws
CDbException
Return values
null|array<string|int, mixed>

errors or null if no errors

saveNewQuota()

Saves the new quota and it's language settings.

public saveNewQuota( $quotaParams) : Quota
Parameters
$quotaParams :

array the quota attributes

Tags
throws
CDbException
Return values
Quota

the new quota with added QuotaLanguageSettings, or Quota with errors


        
On this page

Search results