Quotas
in package
Tags
Table of Contents
Properties
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
$survey
private
Survey
$survey
the survey
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
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|mixedgetQuotaAnswers()
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
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
Return values
null|array<string|int, mixed> —errors or null if no errors
newQuotaLanguageSetting()
Retunr
public
newQuotaLanguageSetting(Quota $oQuota, $language) : QuotaLanguageSetting
Parameters
- $oQuota : Quota
- $language :
Return values
QuotaLanguageSettingsaveNewQuota()
Saves the new quota and it's language settings.
public
saveNewQuota( $quotaParams) : Quota
Parameters
Tags
Return values
Quota —the new quota with added QuotaLanguageSettings, or Quota with errors