Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
EvaluationAnswer Class Reference
Inheritance diagram for EvaluationAnswer:
EvaluationObject StudipObject AuthorObject

Public Member Functions

 __construct ($objectID="", $parentObject=null, $loadChildren=EVAL_LOAD_NO_CHILDREN)
 
 getNumberOfVotes ()
 
 getRows ()
 
 setRows ($rows)
 
 getValue ()
 
 setValue ($value)
 
 isResidual ()
 
 setResidual ($boolean)
 
 vote ($userID)
 
 addUserID ($userID)
 
 getUserID ()
 
 getNextUserID ()
 
 getUserIDs ()
 
 isFreetext ()
 
 check ()
 
 toString ()
 
- Public Member Functions inherited from EvaluationObject
 __construct ($objectID="", $parentObject=NULL, $loadChildren=EVAL_LOAD_NO_CHILDREN)
 
 setTitle ($title)
 
 getTitle ()
 
 setText ($text)
 
 getText ()
 
 setPosition ($position)
 
 getPosition ()
 
 setParentObject (&$parentObject)
 
 getParentObject ()
 
 getParentID ()
 
 setParentID ($parentID)
 
 removeChildID ($childID)
 
 addChild (&$child)
 
getChild ($childID="")
 
getNextChild ()
 
 getChildren ()
 
 getNumberChildren ()
 
 save ()
 
 delete ()
 
duplicate ()
 
 duplicate_init ()
 
 init ($objectID="")
 
 load ()
 
 check ()
 
 getSpecialChildobjects (&$object, $instanceof, $reset=false)
 
 toString ()
 
- Public Member Functions inherited from StudipObject
 __construct ($objectID="")
 
 getObjectID ()
 
 setObjectID ($objectID)
 
 getAuthorID ()
 
 getAuthor ()
 
 getFullname ()
 
 setAuthorID ($authorID)
 
 getRangeID ()
 
 setRangeID ($rangeID)
 
- Public Member Functions inherited from AuthorObject
 __construct ()
 
 x_instanceof ()
 
 isError ()
 
 getErrors ()
 
 resetErrors ()
 
 throwError ($errcode, $errstring)
 
 throwErrorFromClass (AuthorObject $class)
 

Data Fields

 $value
 
 $rows
 
 $users
 
 $userNum
 
 $userNumIterator
 
 $residual
 
- Data Fields inherited from EvaluationObject
 $parentObject
 
 $parentObjectID
 
 $childObjects
 
 $numberChildren
 
 $title
 
 $text
 
 $position
 
 $db
 
 $childNum
 
 $loadChildren
 
- Data Fields inherited from StudipObject
 $objectID
 
 $authorID
 
 $rangeID
 
- Data Fields inherited from AuthorObject
 $errorArray
 
 $instanceof
 

Additional Inherited Members

- Static Public Member Functions inherited from StudipObject
static createNewID ()
 

Constructor & Destructor Documentation

__construct (   $objectID = "",
  $parentObject = null,
  $loadChildren = EVAL_LOAD_NO_CHILDREN 
)

Constructor public

Parameters
string$objectIDThe ID of an existing answer
object$parentObjectThe parent object if exists
integer$loadChildrenSee const EVAL_LOAD_*_CHILDREN

Member Function Documentation

addUserID (   $userID)

Non-Anonymous vote for this answer public

Parameters
string$userIDThe user id
check ( )

Checks if object is in a valid state private

getNextUserID ( )

Gets the next user public

Returns
string The next user id, otherwise NULL
getNumberOfVotes ( )

Gets the number of votes for this answer public

Returns
string The counter of the answer
getRows ( )

Gets the number of rows from freetext answers public

Returns
integer The number of rows
getUserID ( )

Gets the first user and removes it public

Returns
string The first user id
getUserIDs ( )

Gets all the user ids public

Returns
array An array full of user ids
getValue ( )

Gets the value of an answer public

Returns
integer The value
isFreetext ( )

public

Returns
integer YES, if the Answer is a textfield
isResidual ( )

Checks whether the answer is a residual answer public

Returns
boolean YES if it is a residual answer
setResidual (   $boolean)

Sets the answers as an residual answer public

Parameters
boolean$booleanYES to set it as a residual answer
setRows (   $rows)

Gets the number of rows for freetext answers public

Parameters
integer$rowsThe number of rows
setValue (   $value)

Sets the value of an answer public

Parameters
integer$valueThe value
toString ( )

Debugfunction private

vote (   $userID)

Vote for this answer public

Parameters
string$userIDThe user id

Field Documentation

boolean $residual

If true this is the residual answer for a question private

integer $rows

If >0 the answer is a freetext with $rows rows private

integer $userNum

The number of users voted for this answer private

integer $userNumIterator

For internal use (getNextUserID) private

array $users

The userIDs of users who voted for this answer private

integer $value

The value for an answer private


The documentation for this class was generated from the following file: