Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
EvaluationAnswerDB Class Reference
Inheritance diagram for EvaluationAnswerDB:
EvaluationObjectDB DatabaseObject AuthorObject

Public Member Functions

 __construct ()
 
 load (&$answerObject)
 
 loadVotes (&$answerObject)
 
 save (&$answerObject)
 
 resetVotes (&$answerObject)
 
 delete (&$answerObject)
 
 exists ($answerID)
 
 getType ($objectID)
 
 getUserAnwerIDs ($questionID, $userID)
 
 hasVoted ($answerID, $userID)
 
 getAllAnswers ($question_id, $userID, $only_user_answered=false)
 
- Public Member Functions inherited from EvaluationObjectDB
 __construct ()
 
 getRangename ($rangeID, $html_decode=true)
 
 getValidRangeIDs (&$permObj, &$userObj, $rangeID)
 
 getPublicTemplateIDs ($searchString)
 
 getEvaluationIDs ($rangeID="", $state="")
 
 getEvalID ($objectID)
 
 getType ($objectID)
 
- Public Member Functions inherited from DatabaseObject
 __construct ()
 
 getObjectID ()
 
 setObjectID ($objectID)
 
 getAuthorID ()
 
 setAuthorID ($authorID)
 
 getRangeID ()
 
 setRangeID ($rangeID)
 
- Public Member Functions inherited from AuthorObject
 __construct ()
 
 x_instanceof ()
 
 isError ()
 
 getErrors ()
 
 resetErrors ()
 
 throwError ($errcode, $errstring)
 
 throwErrorFromClass (AuthorObject $class)
 

Static Public Member Functions

static addChildren (&$parentObject)
 
static getParentID ($objectID)
 
- Static Public Member Functions inherited from EvaluationObjectDB
static getGlobalPerm ($as_value=false)
 
static getRangePerm ($rangeID, $userID=NULL, $as_value=false)
 
static getEvalUserRangesWithNoPermission (&$eval, $return_ids=false)
 

Additional Inherited Members

- Data Fields inherited from DatabaseObject
 $authorID
 
 $objectID
 
 $rangeID
 
- Data Fields inherited from AuthorObject
 $errorArray
 
 $instanceof
 

Constructor & Destructor Documentation

__construct ( )

Constructor public

Member Function Documentation

static addChildren ( $parentObject)
static

Adds the children to a parent object public

Parameters
EvaluationObject&$parentObjectThe parent object
delete ( $answerObject)

Deletes a answer public

Parameters
EvaluationAnswer&$answerObjectThe answer to delete
Exceptions
error
exists (   $answerID)

Checks if answer with this ID exists public

Parameters
string$answerIDThe answerID
Returns
bool YES if exists
getAllAnswers (   $question_id,
  $userID,
  $only_user_answered = false 
)
static getParentID (   $objectID)
static

Returns the id from the parent object public

Parameters
string$objectIDThe object id
Returns
string The id from the parent object
getType (   $objectID)

Returns the type of an objectID public

Parameters
string$objectIDThe objectID
Returns
string INSTANCEOF_x, else NO
getUserAnwerIDs (   $questionID,
  $userID 
)

Give all textanswers for a user and question for the export public

Parameters
string$questionIDThe question id
string$userIDThe user id
hasVoted (   $answerID,
  $userID 
)

Checks whether a user has voted for an answer public

Parameters
string$answerIDThe answer id
string$userIDThe user id
Returns
boolean YES if user has voted for the answer
load ( $answerObject)

Loads answers of a group from the DB public

Parameters
EvaluationAnswer&&$answerObject The answer object
loadVotes ( $answerObject)

Loads the votes from the users for this answer public

Parameters
EvaluationAnswer&$answerObjectThe answer object
resetVotes ( $answerObject)

Deletes all votes from the users for this answers public

Parameters
EvaluationAnswer&$answerObjectThe answer object
save ( $answerObject)

Writes answers into the DB public

Parameters
EvaluationAnswer&$answerObjectThe answerobject
Exceptions
error

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