modules/postcollection/models/Encoding.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Postcollection_Model_Encoding

Package: Postcollection\Models

Properties

>VPropertyprivate$db
Details
Type
n/a
>VPropertyprivate$dbName
Details
Type
n/a
>VPropertyprivate$prId
Details
Type
n/a
>VPropertyprivate$qsId
Details
Type
n/a

Methods

methodpublic__construct(integer $prId) : void

Model constructor

Parameters
NameTypeDescription
$prIdinteger
methodpublicallocateMeTo(string $questions) : void

Alocate current user to questions

Parameters
NameTypeDescription
$questionsstring
  • coma separated list of questionIds
methodpublicallocateToUser(string $questions,  $allocateUser) : void

Alocate questions to user

Parameters
NameTypeDescription
$questionsstring
  • coma separated list of questionIds
$allocateUser
methodpublicchangeCategory(integer $toCategory, array $fromCategories) : void

Move all answers encoded to any from fromCategories ID array to toCategory ID

Parameters
NameTypeDescription
$toCategoryinteger
$fromCategoriesarray
methodpublicclearAllocation(string $questions) : void

Clear current allocation

Parameters
NameTypeDescription
$questionsstring
  • coma separated list of questionIds
methodpublicdeleteAlocationWithRole() : void

methodpublicencodeAnswers(integer $questionId, string $answerIds, string $categoryIds) : integer

Encode answers

Parameters
NameTypeDescription
$questionIdinteger
$answerIdsstring

// coma separated list of answer Ids

$categoryIdsstring

// coma separated list of categories where to encode

Returns
TypeDescription
integer
methodpublicgetAllocationList() : array

return array pair questionId=>allocatedUserId

Returns
TypeDescription
array
methodpublicgetEncodedAnswers( $questionNum) : array

Return assoc array of encoded answers for questionId

Parameters
NameTypeDescription
$questionNum
Returns
TypeDescription
array
methodpublicgetEncodedAnswersAll() : array

Return assoc array of encoded answers for questionId

Returns
TypeDescription
array
methodpublicgetEncodedAnswersForExport() : array

Return assoc array of encoded answers for Export with Category number

Returns
TypeDescription
array
methodpublicgetEncodedCount( $questionNum) : array

Return count of encoded answers for questionId

Parameters
NameTypeDescription
$questionNum
Returns
TypeDescription
array
methodpublicgetEncodedCountAll() : array

Return array pair QuestionID=>EncodedCountID

Returns
TypeDescription
array
methodpublicgetLastModified() : array

Return array with last question midification data QuestionID=>(datetime,userId)

Returns
TypeDescription
array
methodpublicgetMainQuestionery(integer $prId) : integer

Get main questionnaire

Parameters
NameTypeDescription
$prIdinteger
Returns
TypeDescription
integer
methodpublicgetNonEncodedAnswers( $number) : array

Return assoc array of nonencoded answers

Parameters
NameTypeDescription
$number
Returns
TypeDescription
array
methodpublicgetNonEncodedAnswersProofreading( $question_id) : array

Return assoc array of nonencoded answers

Parameters
NameTypeDescription
$question_id
Returns
TypeDescription
array
methodpublicgetQuestionIdNumList() : void

methodpublicgetQuestionList(boolean $textOnly = false,  $lang = '') : \array[question_num]=info

Return array of question list

Parameters
NameTypeDescription
$textOnlyboolean

// if this parameter == true, return only question number and qyestion text by question id

$lang
Returns
TypeDescription
\array[question_num]=info
methodpublicrelease(string $questions) : void

Release questions

Parameters
NameTypeDescription
$questionsstring
  • coma separated list of questionIds
methodpublicremoveByCategory(integer $categoryId) : void

remove all "encoded" to source category id. This answers back to "unencoded" status

Parameters
NameTypeDescription
$categoryIdinteger
methodpublicremoveByCategoryList(array $categoryIds) : void

remove all "encoded" to source categores ids. This answers back to "unencoded" status

Parameters
NameTypeDescription
$categoryIdsarray
methodpublicunencodeAll() : void

Delete all records related to this project from Encoding table

methodpublicunencodeAnswers( $questionId,  $answers,  $categores) : integer

Unencode answerss

Parameters
NameTypeDescription
$questionId
$answers
$categores
Returns
TypeDescription
integer
Documentation was generated by phpDocumentor 2.8.5.